-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
145 lines (145 loc) · 3.77 KB
/
.eslintrc.cjs
File metadata and controls
145 lines (145 loc) · 3.77 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
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
"plugin:react/recommended",
"airbnb",
"plugin:@next/next/recommended",
"plugin:@typescript-eslint/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["react", "@typescript-eslint"],
rules: {
camelcase: "off",
indent: "off",
"@next/next/no-img-element": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-empty-interface": "off",
"arrow-body-style": "off",
"arrow-parens": "off",
"brace-style": "off",
"class-methods-use-this": "off",
"comma-dangle": ["error", "never"],
"consistent-return": "off",
"import/prefer-default-export": "off",
"import/extensions": "off",
"import/no-unresolved": "off",
"import/no-extraneous-dependencies": "off",
"@typescript-eslint/ban-types": [
"error",
{
types: {
"{}": false,
},
extendDefaults: true,
},
],
"react/no-unstable-nested-components": "off",
"react/jsx-wrap-multilines": "off",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-quotes": ["error", "prefer-single"],
"max-classes-per-file": "off",
"max-len": [
"error",
{
code: 150,
ignoreComments: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
"no-alert": "off",
"no-confusing-arrow": "off",
"no-else-return": "off",
"no-multiple-empty-lines": [
"error",
{
max: 1,
},
],
"no-nested-ternary": "off",
"no-param-reassign": "off",
"no-prototype-builtins": "off",
"no-plusplus": [
"error",
{
allowForLoopAfterthoughts: true,
},
],
"no-restricted-syntax": "off",
"no-underscore-dangle": "off",
"no-unused-vars": "off",
"no-use-before-define": [
"error",
{
functions: false,
},
],
"no-await-in-loop": "off",
"no-throw-literal": "off",
"object-curly-newline": "off",
"padded-blocks": "off",
"prefer-destructuring": "off",
"prefer-promise-reject-errors": "off",
radix: "off",
"space-before-function-paren": "off",
"react/destructuring-assignment": "off",
"react/jsx-boolean-value": "off",
"react/jsx-filename-extension": [
1,
{
extensions: [".tsx", ".jsx"],
},
],
"react/jsx-no-bind": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-props-no-spreading": "off",
"react/no-unescaped-entities": "off",
"react/prop-types": "off",
"react/require-default-props": "off",
"react/react-in-jsx-scope": "off",
"react/self-closing-comp": "off",
"react/state-in-constructor": "off",
"no-bitwise": "warn",
"no-undef": "off",
"jsx-a11y/alt-text": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"no-shadow": "error",
"@typescript-eslint/no-shadow": "error",
"implicit-arrow-linebreak": "off",
"function-paren-newline": "off",
"operator-linebreak": "off",
"react/jsx-curly-newline": "off",
},
overrides: [
{
files: ["stories/**/*.stories.tsx"],
rules: {
"react/function-component-definition": "off",
},
},
{
files: ["./jest.config.ts"],
rules: {
"@typescript-eslint/no-var-requires": "off",
},
},
],
};