mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-08-28 01:06:49 +08:00
update: lint config
This commit is contained in:
@@ -1,25 +1,15 @@
|
||||
import { defineConfig } from 'eslint/config'
|
||||
// @ts-ignore
|
||||
import preact from 'eslint-config-preact'
|
||||
import react from 'eslint-plugin-react'
|
||||
import reactHooks from 'eslint-plugin-react-hooks'
|
||||
import defaultConfig from '../../eslint.config.ts'
|
||||
|
||||
export default defineConfig([
|
||||
defaultConfig,
|
||||
{ ignores: ['dist/**', 'node_modules/**'] },
|
||||
{
|
||||
files: ['**/*.{js,jsx,ts,tsx}'],
|
||||
plugins: { ...preact.plugins },
|
||||
rules: { ...preact.rules },
|
||||
settings: { ...preact.settings },
|
||||
languageOptions: {
|
||||
sourceType: 'module',
|
||||
ecmaVersion: 'latest',
|
||||
parserOptions: {
|
||||
...preact.parserOptions,
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
...preact.parserOptions?.ecmaFeatures,
|
||||
},
|
||||
},
|
||||
},
|
||||
...react.configs.flat.recommended!,
|
||||
settings: { react: { version: '19' } },
|
||||
},
|
||||
react.configs.flat['jsx-runtime']!,
|
||||
reactHooks.configs.flat.recommended,
|
||||
])
|
||||
|
||||
@@ -23,11 +23,9 @@
|
||||
"@types/react": "^19.2.18",
|
||||
"@types/react-dom": "^19.2.4",
|
||||
"@vitejs/plugin-react": "^6.0.5",
|
||||
"eslint-config-react": "^1.1.7",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^7.1.1",
|
||||
"vite": "^8.1.3",
|
||||
"vitest": "^4.1.10"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "react"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user