Files
web/eslint.config.mjs

41 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

import {defineConfig, globalIgnores} from 'eslint/config'
import nextVitals from 'eslint-config-next/core-web-vitals'
import nextTs from 'eslint-config-next/typescript'
2025-03-28 15:00:46 +08:00
import stylistic from '@stylistic/eslint-plugin'
2025-03-04 10:10:35 +08:00
2025-03-28 15:00:46 +08:00
// noinspection SpellCheckingInspection
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',
]),
2025-06-06 16:20:23 +08:00
stylistic.configs.recommended,
2025-03-11 14:57:23 +08:00
{
rules: {
'@stylistic/indent': ['error', 2, {
SwitchCase: 0,
}],
2025-06-06 16:20:23 +08:00
'@stylistic/object-curly-spacing': ['error', 'never'],
'@stylistic/jsx-tag-spacing': ['error', {
beforeSelfClosing: 'never',
}],
'@stylistic/jsx-closing-bracket-location': 'off',
'@stylistic/jsx-curly-newline': 'off',
'@stylistic/jsx-one-expression-per-line': 'off',
'@stylistic/multiline-ternary': 'off',
'@stylistic/block-spacing': 'off',
2025-03-11 14:57:23 +08:00
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@react-hooks/set-state-in-effect': 'off',
2025-03-11 14:57:23 +08:00
},
},
])
2025-03-04 10:10:35 +08:00
2025-03-28 15:00:46 +08:00
export default eslintConfig