Skip to content

Commit 0058a8e

Browse files
Update React dependencies and migrate to ESLint flat config
1 parent ee876a4 commit 0058a8e

8 files changed

Lines changed: 2212 additions & 2036 deletions

File tree

React/.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

React/.eslintrc.cjs

Lines changed: 0 additions & 45 deletions
This file was deleted.

React/.stylelintrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

React/eslint.config.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import path from 'path';
2+
import { fileURLToPath } from 'url';
3+
import tsParser from '@typescript-eslint/parser';
4+
import spellCheck from 'eslint-config-devextreme/spell-check';
5+
import reactConfig from 'eslint-config-devextreme/react';
6+
7+
const __filename = fileURLToPath(import.meta.url);
8+
const __dirname = path.dirname(__filename);
9+
10+
export default [
11+
{
12+
ignores: ['node_modules/**', 'build/**', 'dist/**', 'eslint.config.js', '*.config.ts', 'stylelint.config.mjs'],
13+
},
14+
...spellCheck,
15+
...reactConfig,
16+
{
17+
files: ['**/*.ts', '**/*.tsx'],
18+
languageOptions: {
19+
parserOptions: {
20+
project: './tsconfig.app.json',
21+
tsconfigRootDir: __dirname,
22+
},
23+
},
24+
settings: {
25+
react: {
26+
version: '18.2',
27+
},
28+
},
29+
},
30+
{
31+
files: ['**/*.ts', '**/*.tsx'],
32+
rules: {
33+
'react/react-in-jsx-scope': 'off',
34+
'import/no-extraneous-dependencies': ['error', {
35+
devDependencies: [
36+
'**/vitest.config.ts',
37+
'**/vite.config.ts',
38+
'**/*.test.tsx',
39+
'**/setupTests.ts',
40+
],
41+
}],
42+
},
43+
},
44+
];

0 commit comments

Comments
 (0)