Skip to content

Commit 6c04837

Browse files
committed
update frontend deps. udpate esling config
1 parent 864918e commit 6c04837

File tree

5 files changed

+3999
-1465
lines changed

5 files changed

+3999
-1465
lines changed

frontend/eslint.config.js

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
import js from '@eslint/js'
22
import globals from 'globals'
3-
import reactHooks from 'eslint-plugin-react-hooks'
4-
import reactRefresh from 'eslint-plugin-react-refresh'
53
import tseslint from 'typescript-eslint'
6-
import eslintConfigPrettier from 'eslint-config-prettier'
4+
import pluginReact from 'eslint-plugin-react'
5+
import json from '@eslint/json'
6+
import { defineConfig } from 'eslint/config'
7+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
78

8-
export default tseslint.config(
9-
{ ignores: ['dist'] },
10-
{
11-
extends: [js.configs.recommended, ...tseslint.configs.recommended],
12-
files: ['**/*.{ts,tsx}'],
13-
languageOptions: {
14-
ecmaVersion: 2020,
15-
globals: globals.browser,
16-
},
17-
plugins: {
18-
'react-hooks': reactHooks,
19-
'react-refresh': reactRefresh,
20-
},
21-
rules: {
22-
...reactHooks.configs.recommended.rules,
23-
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
24-
},
9+
export default defineConfig([
10+
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'], plugins: { js }, extends: ['js/recommended'] },
11+
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'], languageOptions: { globals: globals.browser } },
12+
tseslint.configs.recommended,
13+
{
14+
...pluginReact.configs.flat.recommended,
15+
settings: {
16+
react: {
17+
version: 'detect',
18+
},
2519
},
26-
eslintConfigPrettier,
27-
)
20+
},
21+
{
22+
rules: {
23+
'react/react-in-jsx-scope': 'off',
24+
'react/prop-types': 'off',
25+
},
26+
},
27+
{ files: ['**/*.json'], plugins: { json }, language: 'json/json', extends: ['json/recommended'] },
28+
eslintPluginPrettierRecommended,
29+
])

0 commit comments

Comments
 (0)