-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mjs
More file actions
54 lines (52 loc) · 1.21 KB
/
eslint.config.mjs
File metadata and controls
54 lines (52 loc) · 1.21 KB
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
// @ts-check
import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'
import jsxA11y from 'eslint-plugin-jsx-a11y'
import eslintConfigPrettier from 'eslint-config-prettier'
export default tseslint.config(
{
ignores: [
'node_modules/',
'.next/',
'amplify/',
'dist/',
'build/',
'public/',
'*.config.js',
'*.d.ts',
'*.env',
],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
jsxA11y.flatConfigs.recommended,
{
plugins: {
'@typescript-eslint': tseslint.plugin,
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: './tsconfig.json',
},
},
},
{
rules: {
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'error',
'jsx-a11y/anchor-is-valid': 'off',
'no-duplicate-imports': 'error',
'prefer-const': 'error',
curly: 'error',
eqeqeq: 'error',
},
},
{
files: ['**/*.js'],
...tseslint.configs.disableTypeChecked,
},
eslintConfigPrettier
)