Skip to content

Commit cfbe1ab

Browse files
committed
refactor: Adjust ESLint config
1 parent 350a517 commit cfbe1ab

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

eslint.config.mjs

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1-
import path from 'node:path';
2-
import {fileURLToPath} from 'node:url';
3-
import js from '@eslint/js';
4-
import {FlatCompat} from '@eslint/eslintrc';
1+
import {defineConfig} from 'eslint/config';
2+
import eslintConfig from '@tstv/eslint-config';
53

6-
const __filename = fileURLToPath(import.meta.url);
7-
const __dirname = path.dirname(__filename);
8-
const compat = new FlatCompat({
9-
baseDirectory: __dirname,
10-
recommendedConfig: js.configs.recommended,
11-
allConfig: js.configs.all,
4+
export default defineConfig({
5+
files: ['**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}'],
6+
ignores: [
7+
'**/.dependency-cruiser.cjs',
8+
'**/coverage/**',
9+
'**/dist/**',
10+
'**/docs/**',
11+
'**/eslint.config.mjs',
12+
'**/vitest.config.ts',
13+
],
14+
extends: [eslintConfig],
1215
});
13-
14-
export default [
15-
{
16-
ignores: ['**/coverage', '**/.dependency-cruiser.cjs', '**/docs', '**/vitest.config.ts'],
17-
},
18-
...compat.extends('@tstv/eslint-config'),
19-
];

0 commit comments

Comments
 (0)