|
1 | 1 | import globals from 'globals'; |
2 | 2 | import babelParser from '@babel/eslint-parser'; |
3 | | -import spellcheckDevextreme from 'eslint-config-devextreme/spell-check.js'; |
| 3 | +import spellcheckDevextreme from 'eslint-config-devextreme/spell-check'; |
| 4 | +import testcafeConfig from 'eslint-config-devextreme/testcafe'; |
| 5 | +import typescriptConfig from 'eslint-config-devextreme/typescript'; |
| 6 | +import javascriptConfig from 'eslint-config-devextreme/javascript'; |
4 | 7 | import spellcheckPlugin from 'eslint-plugin-spellcheck'; |
5 | 8 | import noOnlyTests from 'eslint-plugin-no-only-tests'; |
6 | 9 | import deprecation from 'eslint-plugin-deprecation'; |
@@ -29,7 +32,7 @@ const compat = new FlatCompat({ |
29 | 32 | allConfig: js.configs.all |
30 | 33 | }); |
31 | 34 |
|
32 | | -const spellcheckRule = spellcheckDevextreme.rules['spellcheck/spell-checker']; |
| 35 | +const spellcheckRule = spellcheckDevextreme[0].rules['spellcheck/spell-checker']; |
33 | 36 |
|
34 | 37 | export default [ |
35 | 38 | { |
@@ -77,13 +80,13 @@ export default [ |
77 | 80 | }, |
78 | 81 | }, |
79 | 82 |
|
80 | | - ...compat.extends('eslint:recommended', 'devextreme/spell-check'), |
81 | | - |
82 | | - ...compat.extends('devextreme/javascript').map(config => ({ |
| 83 | + js.configs.recommended, |
| 84 | + ...spellcheckDevextreme, |
| 85 | + ...javascriptConfig.map(config => ({ |
83 | 86 | ...config, |
84 | 87 | rules: changeRulesToStylistic(config.rules || {}), |
85 | 88 | })), |
86 | | - ...compat.extends('devextreme/typescript').map(config => ({ |
| 89 | + ...typescriptConfig.map(config => ({ |
87 | 90 | ...config, |
88 | 91 | files: ['**/*.ts', '**/*.tsx'], |
89 | 92 | rules: changeRulesToStylistic(config.rules || {}), |
@@ -221,6 +224,7 @@ export default [ |
221 | 224 |
|
222 | 225 | '@typescript-eslint/naming-convention': 0, |
223 | 226 | '@typescript-eslint/no-throw-literal': 0, |
| 227 | + '@typescript-eslint/only-throw-error': 'warn', |
224 | 228 | '@typescript-eslint/no-use-before-define': 0, |
225 | 229 | '@typescript-eslint/no-shadow': 0, |
226 | 230 | '@typescript-eslint/no-loop-func': 0, |
@@ -467,9 +471,12 @@ export default [ |
467 | 471 | }, |
468 | 472 |
|
469 | 473 | // testcafe tests |
470 | | - ...compat.extends('devextreme/testcafe').map(config => ({ |
| 474 | + ...testcafeConfig.map(config => ({ |
471 | 475 | ...config, |
472 | | - rules: changeRulesToStylistic(config.rules || {}), |
| 476 | + rules: { |
| 477 | + ...changeRulesToStylistic(config.rules || {}), |
| 478 | + 'require-await': 'warn', |
| 479 | + }, |
473 | 480 | files: ['testing/**/*.{js,ts}', 'utils/visual-tests/**/*.*'], |
474 | 481 | })), |
475 | 482 |
|
|
0 commit comments