Skip to content

Commit d9e0671

Browse files
chnaged the eslint.config.js to fix CI
1 parent 6fd5d7b commit d9e0671

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

frontend/eslint.config.js

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,34 @@
1-
import js from '@eslint/js'
2-
import globals from 'globals'
3-
import react from 'eslint-plugin-react'
4-
import reactHooks from 'eslint-plugin-react-hooks'
5-
import reactRefresh from 'eslint-plugin-react-refresh'
1+
import js from '@eslint/js';
2+
import globals from 'globals';
3+
import react from 'eslint-plugin-react';
4+
import reactHooks from 'eslint-plugin-react-hooks';
5+
import reactRefresh from 'eslint-plugin-react-refresh';
66

77
export default [
88
{ ignores: ['dist'] },
99
{
10-
files: ['**/*.{js,jsx}'],
10+
files: ['**/*.{js,jsx,ts,tsx}'], // Added ts, tsx support
1111
languageOptions: {
12-
ecmaVersion: 2020,
12+
ecmaVersion: 'latest', // Unified the ECMA version declaration
1313
globals: globals.browser,
1414
parserOptions: {
15-
ecmaVersion: 'latest',
1615
ecmaFeatures: { jsx: true },
1716
sourceType: 'module',
1817
},
1918
},
2019
settings: { react: { version: '18.3' } },
21-
plugins: {
20+
plugins: [
2221
react,
23-
'react-hooks': reactHooks,
24-
'react-refresh': reactRefresh,
25-
},
22+
reactHooks,
23+
reactRefresh,
24+
], // Changed plugins to an array as required by ESLint v9
2625
rules: {
2726
...js.configs.recommended.rules,
2827
...react.configs.recommended.rules,
2928
...react.configs['jsx-runtime'].rules,
3029
...reactHooks.configs.recommended.rules,
3130
'react/jsx-no-target-blank': 'off',
32-
'react-refresh/only-export-components': [
33-
'warn',
34-
{ allowConstantExport: true },
35-
],
31+
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
3632
},
3733
},
38-
]
34+
];

0 commit comments

Comments
 (0)