45 lines
1002 B
JavaScript
45 lines
1002 B
JavaScript
import nextPlugin from '@next/eslint-plugin-next';
|
|
import prettierPlugin from 'eslint-plugin-prettier';
|
|
import prettierConfig from 'eslint-config-prettier';
|
|
import tsParser from '@typescript-eslint/parser';
|
|
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
|
|
|
export default [
|
|
{
|
|
ignores: [
|
|
'.next/**',
|
|
'node_modules/**',
|
|
'coverage/**',
|
|
'.swc/**',
|
|
],
|
|
},
|
|
{
|
|
files: ['**/*.{js,mjs,cjs,ts,tsx}'],
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
},
|
|
plugins: {
|
|
'@next/next': nextPlugin,
|
|
'@typescript-eslint': tsPlugin,
|
|
prettier: prettierPlugin,
|
|
},
|
|
rules: {
|
|
...nextPlugin.configs.recommended.rules,
|
|
...nextPlugin.configs['core-web-vitals'].rules,
|
|
...tsPlugin.configs.recommended.rules,
|
|
'prettier/prettier': [
|
|
'error',
|
|
{
|
|
endOfLine: 'auto',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
prettierConfig,
|
|
];
|