32 lines
1.0 KiB
JavaScript
32 lines
1.0 KiB
JavaScript
import { dirname } from "path";
|
|
import { fileURLToPath } from "url";
|
|
import { FlatCompat } from "@eslint/eslintrc";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
|
|
const compat = new FlatCompat({
|
|
baseDirectory: __dirname,
|
|
});
|
|
|
|
const eslintConfig = [
|
|
...compat.extends("next/core-web-vitals", "next/typescript", "plugin:prettier/recommended", "plugin:jsx-a11y/recommended"),
|
|
{
|
|
rules: {
|
|
'prefer-const': 'warn',
|
|
'no-unused-vars': ['warn', { 'args': 'none' }],
|
|
'@typescript-eslint/no-unused-vars': ['warn', { 'args': 'none' }],
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
'@typescript-eslint/ban-ts-comment': 'warn',
|
|
'@typescript-eslint/no-empty-object-type': 'warn',
|
|
'prettier/prettier': 'warn',
|
|
'jsx-a11y/click-events-have-key-events': 'warn',
|
|
'jsx-a11y/no-static-element-interactions': 'warn',
|
|
'jsx-a11y/alt-text': 'warn',
|
|
'jsx-a11y/no-noninteractive-element-interactions': 'warn',
|
|
},
|
|
},
|
|
];
|
|
|
|
export default eslintConfig;
|