|
1 | | -import { fixupConfigRules } from '@eslint/compat'; |
2 | | -import { FlatCompat } from '@eslint/eslintrc'; |
3 | | -import js from '@eslint/js'; |
4 | | -import prettier from 'eslint-plugin-prettier'; |
5 | | -import { defineConfig } from 'eslint/config'; |
6 | | -import path from 'node:path'; |
7 | | -import { fileURLToPath } from 'node:url'; |
8 | | - |
9 | | -const __filename = fileURLToPath(import.meta.url); |
10 | | -const __dirname = path.dirname(__filename); |
11 | | -const compat = new FlatCompat({ |
12 | | - baseDirectory: __dirname, |
13 | | - recommendedConfig: js.configs.recommended, |
14 | | - allConfig: js.configs.all, |
15 | | -}); |
| 1 | +import { defineConfig, globalIgnores } from 'eslint/config'; |
| 2 | +import { react, recommended } from 'eslint-config-satya164'; |
| 3 | +import sort from 'eslint-plugin-simple-import-sort'; |
16 | 4 |
|
17 | 5 | export default defineConfig([ |
| 6 | + recommended, |
| 7 | + react, |
| 8 | + |
| 9 | + globalIgnores([ |
| 10 | + '**/node_modules/', |
| 11 | + '**/coverage/', |
| 12 | + '**/dist/', |
| 13 | + '**/lib/', |
| 14 | + '**/.expo/', |
| 15 | + '**/.yarn/', |
| 16 | + '**/.vscode/', |
| 17 | + ]), |
| 18 | + |
18 | 19 | { |
19 | | - extends: fixupConfigRules(compat.extends('@react-native', 'prettier')), |
20 | | - plugins: { prettier }, |
21 | | - rules: { |
22 | | - 'react/react-in-jsx-scope': 'off', |
23 | | - 'prettier/prettier': 'error', |
| 20 | + plugins: { |
| 21 | + 'simple-import-sort': sort, |
24 | 22 | }, |
25 | 23 | }, |
26 | | - { |
27 | | - ignores: ['node_modules/', 'lib/'], |
28 | | - }, |
29 | 24 | ]); |
0 commit comments