38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
import nextVitals from 'eslint-config-next/core-web-vitals';
|
|
import nextTs from 'eslint-config-next/typescript';
|
|
import prettierConfig from 'eslint-plugin-prettier/recommended';
|
|
import unusedImports from 'eslint-plugin-unused-imports';
|
|
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
|
|
const eslintConfig = defineConfig([
|
|
...nextVitals,
|
|
...nextTs,
|
|
prettierConfig,
|
|
{
|
|
plugins: {
|
|
'unused-imports': unusedImports,
|
|
},
|
|
rules: {
|
|
'unused-imports/no-unused-imports': 'error',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
caughtErrorsIgnorePattern: '^_',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
// Override default ignores of eslint-config-next.
|
|
globalIgnores([
|
|
// Default ignores of eslint-config-next:
|
|
'.next/**',
|
|
'out/**',
|
|
'build/**',
|
|
'next-env.d.ts',
|
|
]),
|
|
]);
|
|
|
|
export default eslintConfig;
|