|
1 | 1 | import eslint from '@eslint/js' |
2 | | -import globals from 'globals' |
| 2 | +import { defineConfig, globalIgnores } from 'eslint/config' |
3 | 3 | import tseslint from 'typescript-eslint' |
4 | 4 | import eslintConfigPrettier from 'eslint-config-prettier' |
5 | 5 |
|
6 | | -export default tseslint.config( |
7 | | - { |
8 | | - ignores: [ |
9 | | - '**/.*', |
10 | | - '**/node_modules/*', |
11 | | - 'dist/*', |
| 6 | +export default defineConfig( |
| 7 | + globalIgnores([ |
| 8 | + '**/.*', |
| 9 | + '**/node_modules/*', |
| 10 | + 'dist/*', |
12 | 11 |
|
13 | | - // Ignore files for PNPM, NPM and YARN |
14 | | - '**/pnpm-lock.yaml', |
15 | | - '**/package-lock.json', |
16 | | - '**/yarn.lock', |
| 12 | + // Ignore files for PNPM, NPM and YARN |
| 13 | + '**/pnpm-lock.yaml', |
| 14 | + '**/package-lock.json', |
| 15 | + '**/yarn.lock', |
17 | 16 |
|
18 | | - // Ignore config type check |
19 | | - '**/*.config.js', |
20 | | - '**/*.config.ts', |
21 | | - ], |
22 | | - }, |
| 17 | + // Ignore config type check |
| 18 | + '**/*.config.js', |
| 19 | + '**/*.config.ts', |
| 20 | + ]), |
23 | 21 | eslint.configs.recommended, |
24 | | - ...tseslint.configs.recommendedTypeChecked, |
25 | | - ...tseslint.configs.strictTypeChecked, |
26 | | - ...tseslint.configs.stylisticTypeChecked, |
| 22 | + tseslint.configs.strictTypeChecked, |
| 23 | + tseslint.configs.stylisticTypeChecked, |
27 | 24 | eslintConfigPrettier, |
28 | 25 | { |
29 | | - plugins: { |
30 | | - '@typescript-eslint': tseslint.plugin, |
31 | | - }, |
32 | 26 | languageOptions: { |
33 | | - parser: tseslint.parser, |
34 | 27 | parserOptions: { |
35 | 28 | project: true, |
36 | 29 | tsconfigRootDir: import.meta.dirname, |
|
0 commit comments