Skip to content

Commit

Permalink
chore: migrate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 5, 2024
1 parent d919106 commit 8046343
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/eslint-config/src/legacy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '@rushstack/eslint-patch/modern-module-resolution'
import type { ESLint } from 'eslint'

const config: ESLint.ConfigData = {
Expand Down
4 changes: 3 additions & 1 deletion packages/eslint-config/test/legacy.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { fileURLToPath } from 'node:url'
import { it, expect, describe } from 'vitest'
import { ESLint } from 'eslint'
// @ts-expect-error missing types
import { loadESLint } from 'eslint'

describe('eslint-config', () => {
it('loads config in eslint to validate all rule syntax is correct', async () => {
const ESLint = await loadESLint({ useFlatConfig: false })
const cli = new ESLint({
useEslintrc: false,
overrideConfigFile: fileURLToPath(new URL('../dist/legacy.cjs', import.meta.url)),
Expand Down

0 comments on commit 8046343

Please sign in to comment.