Skip to content

Commit 4d998e7

Browse files
Copilotcliedeman
andcommitted
Update dev dependencies and migrate to ESLint 9 flat config
Co-authored-by: cliedeman <3578740+cliedeman@users.noreply.github.com>
1 parent a8f3410 commit 4d998e7

24 files changed

Lines changed: 11628 additions & 16379 deletions

eslint.config.js

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import js from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import react from 'eslint-plugin-react';
4+
import reactHooks from 'eslint-plugin-react-hooks';
5+
import prettier from 'eslint-plugin-prettier/recommended';
6+
import jest from 'eslint-plugin-jest';
7+
8+
export default tseslint.config(
9+
js.configs.recommended,
10+
...tseslint.configs.recommended,
11+
prettier,
12+
{
13+
files: ['**/*.{ts,tsx,js,jsx}'],
14+
languageOptions: {
15+
parserOptions: {
16+
ecmaFeatures: {
17+
jsx: true,
18+
},
19+
},
20+
globals: {
21+
browser: true,
22+
},
23+
},
24+
plugins: {
25+
react,
26+
'react-hooks': reactHooks,
27+
},
28+
settings: {
29+
react: {
30+
version: 'detect',
31+
},
32+
},
33+
rules: {
34+
...react.configs.recommended.rules,
35+
'@typescript-eslint/explicit-module-boundary-types': 'off',
36+
'@typescript-eslint/no-unused-vars': [
37+
'error',
38+
{ ignoreRestSiblings: true },
39+
],
40+
'react/prop-types': 'off',
41+
'no-restricted-imports': [
42+
'error',
43+
'@mui/material',
44+
'@mui/x-date-pickers',
45+
],
46+
},
47+
},
48+
{
49+
files: ['**/*.test.{ts,tsx,js,jsx}'],
50+
plugins: {
51+
jest,
52+
},
53+
languageOptions: {
54+
globals: {
55+
jest: true,
56+
},
57+
},
58+
rules: {
59+
'jest/no-disabled-tests': 'warn',
60+
'jest/no-focused-tests': 'error',
61+
'jest/no-identical-title': 'error',
62+
'jest/prefer-to-have-length': 'warn',
63+
'jest/valid-expect': 'error',
64+
'@typescript-eslint/ban-ts-ignore': 'off',
65+
'@typescript-eslint/no-empty-function': 'off',
66+
'no-restricted-imports': 'off',
67+
},
68+
},
69+
{
70+
files: ['src/stories/*.tsx'],
71+
languageOptions: {
72+
globals: {
73+
node: true,
74+
},
75+
},
76+
},
77+
{
78+
files: ['stories/*.story.tsx'],
79+
rules: {
80+
'react/display-name': 'off',
81+
},
82+
}
83+
);

0 commit comments

Comments
 (0)