-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
54 lines (48 loc) · 1.4 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import pkg from '@eslint/js';
const { configs: eslintConfigs } = pkg;
import nextPlugin from '@next/eslint-plugin-next';
import importPlugin from 'eslint-plugin-import';
import a11yPlugin from 'eslint-plugin-jsx-a11y';
import reactPlugin from 'eslint-plugin-react';
import globals from 'globals';
export default [
{
files: ['**/*.{js,jsx}'],
ignores: ['**/node_modules/**', '**/.next/**', '**/out/**'],
languageOptions: {
ecmaVersion: 2023,
sourceType: 'module',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.browser,
...globals.node,
},
},
plugins: {
react: reactPlugin,
'jsx-a11y': a11yPlugin,
import: importPlugin,
'@next/next': nextPlugin,
},
rules: {
...eslintConfigs.recommended.rules,
...reactPlugin.configs.recommended.rules,
...a11yPlugin.configs.recommended.rules,
...importPlugin.configs.recommended.rules,
...nextPlugin.configs.recommended.rules,
...nextPlugin.configs['core-web-vitals'].rules,
'react/react-in-jsx-scope': 'off',
'no-unused-vars': 'warn',
'import/no-unresolved': 'off',
'jsx-a11y/anchor-is-valid': 'warn',
'jsx-a11y/alt-text': 'error',
'react/prop-types': 'off',
'@next/next/no-img-element': 'warn',
'@next/next/no-html-link-for-pages': 'error',
},
},
];