Skip to content

Commit 462f22e

Browse files
update tsc and lint rules
1 parent 4d50ee3 commit 462f22e

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

React/.eslintrc.cjs

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,26 @@ module.exports = {
44
overrides: [{
55
files: ['*.ts', '*.tsx'],
66
extends: ['devextreme/react'],
7-
"rules": {
8-
"react/jsx-uses-react": "off",
9-
'import/no-extraneous-dependencies': "off",
10-
"react/react-in-jsx-scope": "off"
11-
},
127
env: {
138
browser: true,
149
es6: true
1510
},
1611
parserOptions: {
17-
project: './tsconfig.app.json',
12+
project: './tsconfig.json',
1813
'createDefaultProgram': true,
19-
'ecmaVersion': 6,
14+
ecmaVersion: 2022,
15+
sourceType: 'module',
16+
},
17+
rules: {
18+
"react/react-in-jsx-scope": "off",
19+
"import/no-extraneous-dependencies": ["error", {
20+
"devDependencies": [
21+
"**/vitest.config.ts", // allow vitest in config file
22+
"**/vite.config.ts", // allow vite in config file
23+
"**/*.test.tsx", // allow test files if needed
24+
"**/setupTests.ts", // allow setup tests file
25+
]
26+
}]
2027
},
2128
globals: {
2229
System: false,
@@ -27,12 +34,11 @@ module.exports = {
2734
react: {
2835
createClass: 'createReactClass',
2936
'pragma': 'React',
30-
version: '16.2',
31-
flowVersion: '0.53',
37+
version: '18.2',
3238
},
3339
propWrapperFunctions: [
3440
'forbidExtraProps',
3541
],
3642
},
3743
}]
38-
};
44+
};

React/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pnpm-debug.log*
88
lerna-debug.log*
99

1010
node_modules
11-
dist
11+
/dist/*
1212
dist-ssr
1313
*.local
1414

React/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"files": [],
3-
3+
"compilerOptions": {
4+
"strict": true
5+
},
46
"references": [
57
{ "path": "./tsconfig.app.json" },
68
{ "path": "./tsconfig.node.json" }

0 commit comments

Comments
 (0)