68 lines
2.3 KiB
JavaScript
68 lines
2.3 KiB
JavaScript
import { FlatCompat } from '@eslint/eslintrc'
|
|
|
|
const compat = new FlatCompat({
|
|
baseDirectory: import.meta.dirname,
|
|
})
|
|
|
|
const eslintConfig = [
|
|
...compat.config({
|
|
extends: ['next'],
|
|
rules: {
|
|
// Disable all Next.js specific rules
|
|
'@next/next/google-font-display': 'off',
|
|
'@next/next/google-font-preconnect': 'off',
|
|
'@next/next/inline-script-id': 'off',
|
|
'@next/next/next-script-for-ga': 'off',
|
|
'@next/next/no-assign-module-variable': 'off',
|
|
'@next/next/no-async-client-component': 'off',
|
|
'@next/next/no-before-interactive-script-outside-document': 'off',
|
|
'@next/next/no-css-tags': 'off',
|
|
'@next/next/no-document-import-in-page': 'off',
|
|
'@next/next/no-duplicate-head': 'off',
|
|
'@next/next/no-head-element': 'off',
|
|
'@next/next/no-head-import-in-document': 'off',
|
|
'@next/next/no-html-link-for-pages': 'off',
|
|
'@next/next/no-img-element': 'off',
|
|
'@next/next/no-page-custom-font': 'off',
|
|
'@next/next/no-script-component-in-head': 'off',
|
|
'@next/next/no-styled-jsx-in-document': 'off',
|
|
'@next/next/no-sync-scripts': 'off',
|
|
'@next/next/no-title-in-document-head': 'off',
|
|
'@next/next/no-typos': 'off',
|
|
'@next/next/no-unwanted-polyfillio': 'off',
|
|
|
|
// Disable React rules
|
|
'react/no-unescaped-entities': 'off',
|
|
'react/react-in-jsx-scope': 'off',
|
|
'react/prop-types': 'off',
|
|
'react/display-name': 'off',
|
|
'react/jsx-key': 'off',
|
|
'react/jsx-no-target-blank': 'off',
|
|
'react/no-children-prop': 'off',
|
|
'react/no-danger-with-children': 'off',
|
|
'react/no-deprecated': 'off',
|
|
'react/no-direct-mutation-state': 'off',
|
|
'react/no-find-dom-node': 'off',
|
|
'react/no-is-mounted': 'off',
|
|
'react/no-render-return-value': 'off',
|
|
'react/no-string-refs': 'off',
|
|
'react/no-unescaped-entities': 'off',
|
|
'react/no-unknown-property': 'off',
|
|
'react/no-unsafe': 'off',
|
|
'react/require-render-return': 'off',
|
|
|
|
// Disable React Hooks rules
|
|
'react-hooks/rules-of-hooks': 'off',
|
|
'react-hooks/exhaustive-deps': 'off',
|
|
|
|
// Disable common ESLint rules that can slow down builds
|
|
'no-unused-vars': 'off',
|
|
'no-console': 'off',
|
|
'no-debugger': 'off',
|
|
'prefer-const': 'off',
|
|
'no-var': 'off',
|
|
},
|
|
}),
|
|
]
|
|
|
|
export default eslintConfig |