38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
import {dirname} from 'path'
|
|
import {fileURLToPath} from 'url'
|
|
import {FlatCompat} from '@eslint/eslintrc'
|
|
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'),
|
|
stylistic.configs.recommended,
|
|
{
|
|
rules: {
|
|
'@stylistic/indent': ['error', 2, {
|
|
SwitchCase: 0,
|
|
}],
|
|
'@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',
|
|
'@typescript-eslint/no-empty-object-type': 'off',
|
|
'@typescript-eslint/no-unused-vars': 'off',
|
|
},
|
|
},
|
|
]
|
|
|
|
export default eslintConfig
|