-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
115 lines (115 loc) · 3.55 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
module.exports = {
extends: ['next', 'airbnb', 'plugin:@typescript-eslint/recommended', 'airbnb/hooks', 'prettier'],
plugins: ['import', '@typescript-eslint', 'prettier'],
rules: {
'react/no-unescaped-entities': 'off',
'@next/next/no-page-custom-font': 'off',
'mdx/no-unused-expressions': 'off',
'no-unused-expressions': 'off',
'comma-dangle': 'off',
'no-plusplus': 'off',
'import/no-unresolved': 'off',
'react/jsx-filename-extension': 'off',
'react/jsx-props-no-spreading': 'off',
'react/require-default-props': 'off',
'react/forbid-prop-types': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/control-has-associated-label': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'react/destructuring-assignment': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'camelcase': 'off',
'import/order': 'warn',
'@typescript-eslint/no-empty-interface': 'warn',
'prefer-const': 'warn',
'@typescript-eslint/no-use-before-define': 'warn',
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/ban-ts-comment': 'warn',
'import/newline-after-import': 'warn',
'@typescript-eslint/no-var-requires': 'warn',
'no-nested-ternary': 'warn',
'react/jsx-wrap-multilines': 'off',
'react/jsx-curly-brace-presence': 'warn',
'prefer-template': 'warn',
'no-underscore-dangle': 'warn',
'prefer-destructuring': 'warn',
'import/no-extraneous-dependencies': 'warn',
'react/no-array-index-key': 'warn',
'consistent-return': 'warn',
'no-param-reassign': 'warn',
'object-shorthand': 'warn',
'react/jsx-curly-newline': 'warn',
'prettier/prettier': [
'warn',
{
bracketSpacing: true,
printWidth: 80,
singleQuote: true,
trailingComma: 'all',
tabWidth: 2,
useTabs: false,
endOfLine: 'auto',
},
],
'import/extensions': [
'warn',
'ignorePackages',
{
tsx: 'never',
ts: 'never',
js: 'never',
jsx: 'never',
},
],
'import/prefer-default-export': 'off',
'react/prop-types': 'off',
'react/jsx-one-expression-per-line': 0,
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-use-before-define': 'off',
'no-shadow': 'off',
'react/jsx-closing-bracket-location': 'off',
'react/jsx-boolean-value': 'warn',
'import/no-useless-path-segments': 'warn',
'spaced-comment': 'warn',
'no-useless-return': 'warn',
'no-lonely-if': 'warn',
'no-else-return': 'warn',
'no-restricted-properties': 'warn',
'react/jsx-closing-tag-location': 'warn',
'react/jsx-indent': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@next/next/no-img-element': 'off',
'no-console': 'off',
'react/jsx-no-useless-fragment': 'off',
'react/function-component-definition': [
2,
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
'import/no-named-as-default': 0,
'default-param-last': 0,
},
parser: '@typescript-eslint/parser',
parserOptions: {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module",
"project": "tsconfig.json"
},
ignorePatterns: ['babel.config.js', '**/*.config.js', '**/*.js'],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
project: './tsconfig.eslint.json',
},
},
},
};