-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
82 lines (82 loc) · 2.09 KB
/
.eslintrc.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
module.exports = {
root: true,
settings: {
react: {
version: 'detect',
},
},
env: {
browser: true,
es2021: true,
node: true,
jest: true,
},
extends: [
'next/core-web-vitals',
'standard-with-typescript',
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'plugin:prettier/recommended', // Make sure this is always the last element in the array.
],
overrides: [
{
files: ['*.ts', '*.tsx'],
parserOptions: {
project: ['./tsconfig.json'],
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./.eslintrc.js'],
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2020,
sourceType: 'module',
},
plugins: [
'react',
'@typescript-eslint',
'simple-import-sort',
'unused-imports',
],
rules: {
semi: ['error', 'never'],
'@typescript-eslint/no-unused-vars': 0,
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
'react/display-name': 0,
'react/no-unescaped-entities': 0,
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
'react/react-in-jsx-scope': 0,
'react/prop-types': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'no-console': ['error', { allow: ['warn', 'error'] }],
'react/self-closing-comp': ['error'],
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/strict-boolean-expressions': 0,
'@typescript-eslint/no-invalid-void-type': 0,
'jsx-a11y/anchor-is-valid': [
'error',
{
components: ['Link'],
specialLink: ['hrefLeft', 'hrefRight'],
aspects: ['invalidHref', 'preferButton'],
},
],
},
}