Files
jh-monitor/eslint.config.mjs

29 lines
803 B
JavaScript
Raw Normal View History

2025-09-23 11:21:04 +08:00
import { dirname } from 'path'
import { fileURLToPath } from 'url'
import { FlatCompat } from '@eslint/eslintrc'
import stylistic from '@stylistic/eslint-plugin'
2025-09-13 14:00:56 +08:00
2025-09-23 11:21:04 +08:00
const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)
2025-09-13 14:00:56 +08:00
const compat = new FlatCompat({
baseDirectory: __dirname,
2025-09-23 11:21:04 +08:00
})
2025-09-13 14:00:56 +08:00
const eslintConfig = [
2025-09-23 11:21:04 +08:00
...compat.extends('next/core-web-vitals', 'next/typescript'),
stylistic.configs.recommended,
2025-09-13 14:00:56 +08:00
{
2025-09-23 11:21:04 +08:00
rules: {
'@stylistic/jsx-closing-bracket-location': 'off',
'@stylistic/jsx-curly-newline': 'off',
'@stylistic/jsx-one-expression-per-line': 'off',
'@stylistic/multiline-ternary': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unused-vars': 'off',
},
2025-09-13 14:00:56 +08:00
},
2025-09-23 11:21:04 +08:00
]
2025-09-13 14:00:56 +08:00
2025-09-23 11:21:04 +08:00
export default eslintConfig