升级依赖版本并修复构建问题
This commit is contained in:
@@ -1,18 +1,20 @@
|
||||
import {dirname} from 'path'
|
||||
import {fileURLToPath} from 'url'
|
||||
import {FlatCompat} from '@eslint/eslintrc'
|
||||
import {defineConfig, globalIgnores} from 'eslint/config'
|
||||
import nextVitals from 'eslint-config-next/core-web-vitals'
|
||||
import nextTs from 'eslint-config-next/typescript'
|
||||
import stylistic from '@stylistic/eslint-plugin'
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = dirname(__filename)
|
||||
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname,
|
||||
})
|
||||
|
||||
// noinspection SpellCheckingInspection
|
||||
const eslintConfig = [
|
||||
...compat.extends('next/core-web-vitals', 'next/typescript'),
|
||||
const eslintConfig = defineConfig([
|
||||
...nextVitals,
|
||||
...nextTs,
|
||||
// Override default ignores of eslint-config-next.
|
||||
globalIgnores([
|
||||
// Default ignores of eslint-config-next:
|
||||
'.next/**',
|
||||
'out/**',
|
||||
'build/**',
|
||||
'next-env.d.ts',
|
||||
]),
|
||||
stylistic.configs.recommended,
|
||||
{
|
||||
rules: {
|
||||
@@ -32,6 +34,6 @@ const eslintConfig = [
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
},
|
||||
},
|
||||
]
|
||||
])
|
||||
|
||||
export default eslintConfig
|
||||
|
||||
Reference in New Issue
Block a user