import { defineConfig, globalIgnores } from 'eslint/config' import nextVitals from 'eslint-config-next/core-web-vitals' import nextTs from 'eslint-config-next/typescript' import tseslint from 'typescript-eslint' import simpleImportSort from 'eslint-plugin-simple-import-sort' import unusedImports from 'eslint-plugin-unused-imports' import { fixupPluginRules } from '@eslint/compat'
const eslintConfig = defineConfig([ ...nextVitals, ...nextTs, tseslint.configs.recommendedTypeChecked, { files: ['src/**/*.{js,jsx,ts,tsx}'], plugins: { 'simple-import-sort': fixupPluginRules(simpleImportSort), 'unused-imports': fixupPluginRules(unusedImports) }, extends: [], languageOptions: { parserOptions: { projectService: true }, globals: { JSX: true } }, rules: { semi: 'off', '@typescript-eslint/explicit-member-accessibility': 'off', 'trailing-comma': 'off', 'simple-import-sort/imports': 'warn', 'simple-import-sort/exports': 'warn', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/ban-ts-comment': 'off', '@typescript-eslint/no-var-requires': 'off', '@typescript-eslint/no-unused-vars': 'off', 'no-unused-vars': 'off', 'react-hooks/exhaustive-deps': 'off', 'react/display-name': 'off', 'import/no-anonymous-default-export': 'off', 'react-hooks/rules-of-hooks': 'off', 'unused-imports/no-unused-imports': 'error', 'react/no-children-prop': 'off', '@next/next/no-img-element': 'off', 'jsx-a11y/alt-text': 'off', '@typescript-eslint/no-unused-expressions': 'off', '@typescript-eslint/no-empty-object-type': 'off', '@typescript-eslint/no-require-imports': 'off', 'prefer-const': 'off', '@typescript-eslint/ban-types': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-argument': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/prefer-promise-reject-errors': 'off', '@typescript-eslint/no-misused-promises': 'off', '@typescript-eslint/require-await': 'off', '@typescript-eslint/restrict-template-expressions': 'off', '@typescript-eslint/no-floating-promises': 'off', '@typescript-eslint/only-throw-error': 'off', '@typescript-eslint/await-thenable': 'off', 'react-hooks/set-state-in-effect': 'off', 'react-hooks/purity': 'off', 'react-hooks/immutability': 'off', 'typescript-eslint/unbound-method': 'off', 'react-hooks/refs': 'off', 'react-hooks/preserve-manual-memoization': 'off', '@typescript-eslint/no-base-to-string': 'off', 'jsx-a11y/alt-text': 'error' } }, globalIgnores([ '.next/**', 'out/**', 'build/**', 'next-env.d.ts', 'eslint.config.mjs', 'node_modules/**', '**/*.json', '**/.vscode', '.husky/**' ]) ])
export default eslintConfig
|