|
1 | 1 | module.exports = { |
2 | | - root: true, |
3 | | - env: { |
4 | | - browser: true, |
5 | | - es6: true, |
6 | | - node: true, |
7 | | - amd: true, |
8 | | - }, |
9 | | - parser: '@typescript-eslint/parser', // Specifies the ESLint parser |
10 | | - extends: [ |
11 | | - 'plugin:@typescript-eslint/eslint-recommended', |
12 | | - 'plugin:@typescript-eslint/recommended', |
13 | | - 'plugin:@typescript-eslint/recommended-requiring-type-checking', |
14 | | - 'airbnb', |
15 | | - 'airbnb-typescript', |
16 | | - 'airbnb/hooks', |
17 | | - 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. |
18 | | - ], |
19 | | - parserOptions: { |
20 | | - tsconfigRootDir: __dirname, |
21 | | - project: './tsconfig.json', |
22 | | - ecmaFeatures: { |
23 | | - ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features |
24 | | - sourceType: 'module', // Allows for the use of imports |
25 | | - jsx: true, |
26 | | - }, |
27 | | - }, |
28 | | - plugins: ['import', 'simple-import-sort', 'react', 'react-hooks'], |
29 | | - rules: { |
30 | | - // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs |
31 | | - // e.g. "@typescript-eslint/explicit-function-return-type": "off", |
32 | | - '@typescript-eslint/unbound-method': 0, |
33 | | - '@typescript-eslint/no-explicit-any': 0, |
34 | | - '@typescript-eslint/no-unsafe-call': 0, |
35 | | - '@typescript-eslint/no-unsafe-return': 0, |
36 | | - '@typescript-eslint/no-unsafe-argument': 0, |
37 | | - '@typescript-eslint/restrict-template-expressions': 0, |
38 | | - 'no-void': 0, |
39 | | - 'import/named': 0, |
40 | | - 'import/no-extraneous-dependencies': [ |
41 | | - 'error', |
42 | | - { |
43 | | - devDependencies: [ |
44 | | - 'jest.setup.ts', |
45 | | - '**/__tests__/*', |
46 | | - '**/*.test.ts', |
47 | | - '**/*.test.tsx', |
48 | | - ], |
49 | | - }, |
50 | | - ], |
51 | | - 'import/prefer-default-export': 0, |
52 | | - 'react/jsx-closing-bracket-location': 0, |
53 | | - 'react/jsx-props-no-spreading': ['error', { html: 'ignore' }], |
54 | | - 'react/jsx-wrap-multilines': [ |
55 | | - 'error', |
56 | | - { declaration: false, assignment: false }, |
57 | | - ], |
58 | | - 'react/prop-types': 0, |
59 | | - 'react/require-default-props': 0, |
60 | | - '@typescript-eslint/no-unsafe-assignment': 0, |
61 | | - '@typescript-eslint/no-unsafe-member-access': 0, |
62 | | - 'jsx-a11y/anchor-is-valid': 0, |
63 | | - 'no-console': ['error', { allow: ['warn', 'error', 'debug'] }], |
64 | | - 'no-underscore-dangle': ['error', { 'allow': ['__schema'] }], |
65 | | - 'import/extensions': ['error', 'always'], |
66 | | - }, |
67 | | - settings: { |
68 | | - react: { |
69 | | - createClass: 'createReactClass', // Regex for Component Factory to use, |
70 | | - // default to "createReactClass" |
71 | | - pragma: 'React', // Pragma to use, default to "React" |
72 | | - version: '17.0', // React version. "detect" automatically picks the version you have installed. |
73 | | - // You can also use `16.0`, `16.3`, etc, if you want to override the detected value. |
74 | | - // default to latest and warns if missing |
75 | | - // It will default to "detect" in the future |
76 | | - }, |
77 | | - }, |
78 | | - ignorePatterns: [ |
79 | | - '**/test/*', |
80 | | - '**/tests/*', |
81 | | - '.prettierrc.js', |
82 | | - 'jest.config.js', |
83 | | - 'jest.setup.ts', |
84 | | - 'utils.d.ts', |
85 | | - 'utils.js', |
86 | | - '.eslintrc.js', |
87 | | - '**/dist/*', |
88 | | - '**/*.d.ts', |
89 | | - 'examples/**/*' |
90 | | - ], |
91 | | - }; |
| 2 | + root: true, |
| 3 | + env: { |
| 4 | + browser: true, |
| 5 | + es6: true, |
| 6 | + node: true, |
| 7 | + amd: true, |
| 8 | + }, |
| 9 | + parser: '@typescript-eslint/parser', // Specifies the ESLint parser |
| 10 | + extends: [ |
| 11 | + 'plugin:@typescript-eslint/eslint-recommended', |
| 12 | + 'plugin:@typescript-eslint/recommended', |
| 13 | + 'plugin:@typescript-eslint/recommended-requiring-type-checking', |
| 14 | + 'airbnb', |
| 15 | + 'airbnb-typescript', |
| 16 | + 'airbnb/hooks', |
| 17 | + 'prettier', // Enables eslint-config-prettier. Make sure this is always the last configuration in the extends array. |
| 18 | + ], |
| 19 | + parserOptions: { |
| 20 | + tsconfigRootDir: __dirname, |
| 21 | + project: './tsconfig.json', |
| 22 | + ecmaFeatures: { |
| 23 | + ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features |
| 24 | + sourceType: 'module', // Allows for the use of imports |
| 25 | + jsx: true, |
| 26 | + }, |
| 27 | + }, |
| 28 | + plugins: ['import', 'simple-import-sort', 'react', 'react-hooks'], |
| 29 | + rules: { |
| 30 | + // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs |
| 31 | + // e.g. "@typescript-eslint/explicit-function-return-type": "off", |
| 32 | + '@typescript-eslint/unbound-method': 0, |
| 33 | + '@typescript-eslint/no-explicit-any': 0, |
| 34 | + '@typescript-eslint/no-unsafe-call': 0, |
| 35 | + '@typescript-eslint/no-unsafe-return': 0, |
| 36 | + '@typescript-eslint/no-unsafe-argument': 0, |
| 37 | + '@typescript-eslint/restrict-template-expressions': 0, |
| 38 | + 'no-void': 0, |
| 39 | + 'import/named': 0, |
| 40 | + 'import/no-extraneous-dependencies': [ |
| 41 | + 'error', |
| 42 | + { |
| 43 | + devDependencies: [ |
| 44 | + 'jest.setup.ts', |
| 45 | + '**/__tests__/*', |
| 46 | + '**/*.test.ts', |
| 47 | + '**/*.test.tsx', |
| 48 | + ], |
| 49 | + }, |
| 50 | + ], |
| 51 | + 'import/prefer-default-export': 0, |
| 52 | + 'react/jsx-closing-bracket-location': 0, |
| 53 | + 'react/jsx-props-no-spreading': ['error', { html: 'ignore' }], |
| 54 | + 'react/jsx-wrap-multilines': [ |
| 55 | + 'error', |
| 56 | + { declaration: false, assignment: false }, |
| 57 | + ], |
| 58 | + 'react/prop-types': 0, |
| 59 | + 'react/require-default-props': 0, |
| 60 | + '@typescript-eslint/no-unsafe-assignment': 0, |
| 61 | + '@typescript-eslint/no-unsafe-member-access': 0, |
| 62 | + 'jsx-a11y/anchor-is-valid': 0, |
| 63 | + 'no-console': ['error', { allow: ['warn', 'error', 'debug'] }], |
| 64 | + 'no-underscore-dangle': ['error', { allow: ['__schema'] }], |
| 65 | + 'import/extensions': ['error', 'always'], |
| 66 | + 'arrow-body-style': 0, |
| 67 | + }, |
| 68 | + settings: { |
| 69 | + react: { |
| 70 | + createClass: 'createReactClass', // Regex for Component Factory to use, |
| 71 | + // default to "createReactClass" |
| 72 | + pragma: 'React', // Pragma to use, default to "React" |
| 73 | + version: '17.0', // React version. "detect" automatically picks the version you have installed. |
| 74 | + // You can also use `16.0`, `16.3`, etc, if you want to override the detected value. |
| 75 | + // default to latest and warns if missing |
| 76 | + // It will default to "detect" in the future |
| 77 | + }, |
| 78 | + }, |
| 79 | + ignorePatterns: [ |
| 80 | + '**/test/*', |
| 81 | + '**/tests/*', |
| 82 | + '.prettierrc.js', |
| 83 | + 'jest.config.js', |
| 84 | + 'jest.setup.ts', |
| 85 | + 'utils.d.ts', |
| 86 | + 'utils.js', |
| 87 | + '.eslintrc.js', |
| 88 | + '**/dist/*', |
| 89 | + '**/*.d.ts', |
| 90 | + 'examples/**/*', |
| 91 | + ], |
| 92 | +}; |
0 commit comments