|
1 | 1 | module.exports = { |
2 | 2 | root: true, |
3 | 3 |
|
4 | | - ignorePatterns: [ |
5 | | - 'node_modules', |
6 | | - 'coverage', |
7 | | - 'storybook-build', |
8 | | - 'dist', |
9 | | - '.github/workflows', |
10 | | - '.husky', |
11 | | - 'CHANGELOG.md', |
12 | | - ], |
13 | | - |
14 | 4 | parserOptions: { |
15 | 5 | project: './tsconfig.eslint.json', |
16 | | - tsconfigRootDir: __dirname, |
17 | | - extraFileExtensions: ['.md'], |
| 6 | + extraFileExtensions: ['.md', '.mdx'], |
18 | 7 | }, |
19 | 8 |
|
20 | 9 | overrides: [ |
21 | 10 | { |
22 | | - files: ['*.js', '*.ts', '*.jsx', '*.tsx'], |
23 | | - extends: ['@react-hookz/eslint-config/react'], |
24 | | - rules: { |
25 | | - 'react/button-has-type': 'off', |
26 | | - 'unicorn/prefer-node-protocol': 'off', |
27 | | - 'unicorn/prefer-top-level-await': 'off', |
28 | | - }, |
| 11 | + files: ['*.js'], |
| 12 | + extends: ['@react-hookz/eslint-config/base.cjs'], |
29 | 13 | }, |
30 | 14 | { |
31 | | - files: [ |
32 | | - '**/__tests__/**/*.js', |
33 | | - '**/__tests__/**/*.ts', |
34 | | - '**/__tests__/**/*.jsx', |
35 | | - '**/__tests__/**/*.tsx', |
| 15 | + files: ['*.jsx'], |
| 16 | + extends: ['@react-hookz/eslint-config/base.cjs', '@react-hookz/eslint-config/react.cjs'], |
| 17 | + }, |
| 18 | + { |
| 19 | + files: ['*.ts'], |
| 20 | + extends: ['@react-hookz/eslint-config/typescript.cjs'], |
| 21 | + }, |
| 22 | + { |
| 23 | + files: ['*.tsx'], |
| 24 | + extends: [ |
| 25 | + '@react-hookz/eslint-config/typescript.cjs', |
| 26 | + '@react-hookz/eslint-config/react.cjs', |
36 | 27 | ], |
37 | | - extends: ['@react-hookz/eslint-config/react', '@react-hookz/eslint-config/jest'], |
38 | 28 | }, |
39 | 29 | { |
40 | | - files: ['**/__docs__/**', '**/__tests__/**'], |
41 | | - rules: { |
42 | | - '@typescript-eslint/no-floating-promises': 'off', |
43 | | - '@typescript-eslint/no-explicit-any': 'off', |
44 | | - '@typescript-eslint/no-unsafe-assignment': 'off', |
45 | | - '@typescript-eslint/no-unsafe-member-access': 'off', |
46 | | - '@typescript-eslint/no-unsafe-call': 'off', |
47 | | - '@typescript-eslint/no-unsafe-argument': 'off', |
48 | | - '@typescript-eslint/no-unsafe-return': 'off', |
49 | | - 'unicorn/consistent-function-scoping': 'off', |
50 | | - 'unicorn/no-this-assignment': 'off', |
51 | | - }, |
| 30 | + files: ['**/__tests__/**/*.js'], |
| 31 | + extends: ['@react-hookz/eslint-config/base.cjs', '@react-hookz/eslint-config/jest.cjs'], |
| 32 | + }, |
| 33 | + { |
| 34 | + files: ['**/__tests__/**/*.jsx'], |
| 35 | + extends: [ |
| 36 | + '@react-hookz/eslint-config/base.cjs', |
| 37 | + '@react-hookz/eslint-config/react.cjs', |
| 38 | + '@react-hookz/eslint-config/jest.cjs', |
| 39 | + ], |
| 40 | + }, |
| 41 | + { |
| 42 | + files: ['**/__tests__/**/*.ts'], |
| 43 | + extends: [ |
| 44 | + '@react-hookz/eslint-config/typescript-unsafe.cjs', |
| 45 | + '@react-hookz/eslint-config/jest.cjs', |
| 46 | + ], |
| 47 | + }, |
| 48 | + { |
| 49 | + files: ['**/__tests__/**/*.tsx'], |
| 50 | + extends: [ |
| 51 | + '@react-hookz/eslint-config/typescript-unsafe.cjs', |
| 52 | + '@react-hookz/eslint-config/react.cjs', |
| 53 | + '@react-hookz/eslint-config/jest.cjs', |
| 54 | + ], |
52 | 55 | }, |
53 | 56 | { |
54 | 57 | files: ['*.md'], |
55 | | - extends: ['@react-hookz/eslint-config/mdx'], |
| 58 | + extends: ['@react-hookz/eslint-config/md.cjs'], |
| 59 | + }, |
| 60 | + { |
| 61 | + files: ['*.mdx'], |
| 62 | + extends: ['@react-hookz/eslint-config/mdx.cjs'], |
56 | 63 | }, |
57 | 64 | ], |
58 | 65 | }; |
0 commit comments