-
Notifications
You must be signed in to change notification settings - Fork 11
/
.eslintrc
156 lines (156 loc) · 5.7 KB
/
.eslintrc
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
146
147
148
149
150
151
152
153
154
155
156
{
"root": true,
"settings": {
"next": {
"rootDir": "apps/web/"
},
"react": {
"version": "17.0.2"
},
"tailwindcss": {
"callees": ["twMerge", "cn"],
"config": "apps/web/tailwind.config.ts"
}
},
"plugins": [
"codegen",
"eslint-comments",
"promise",
"tailwindcss",
"unicorn"
],
"extends": [
"next/core-web-vitals",
"plugin:eslint-comments/recommended",
"plugin:promise/recommended",
"plugin:tailwindcss/recommended"
],
"rules": {
"arrow-body-style": "warn",
"object-shorthand": "warn",
"prefer-const": "warn",
"quotes": ["warn", "single", {"avoidEscape": true}],
"codegen/codegen": "warn",
"import/no-unresolved": "error",
"eslint-comments/disable-enable-pair": "off",
"eslint-comments/no-unlimited-disable": "off",
"eslint-comments/no-unused-disable": "warn",
"promise/always-return": "off",
"react/jsx-curly-brace-presence": "warn",
"react-hooks/exhaustive-deps": [
"warn",
{
"additionalHooks": "(useUpdateEffect)"
}
],
"unicorn/catch-error-name": ["warn", {"name": "err"}],
"unicorn/escape-case": "warn",
"unicorn/no-await-expression-member": "warn",
"unicorn/no-console-spaces": "warn",
"unicorn/no-instanceof-array": "warn",
"unicorn/no-useless-fallback-in-spread": "warn",
"unicorn/no-useless-length-check": "warn",
"unicorn/no-useless-promise-resolve-reject": "warn",
"unicorn/no-useless-spread": "warn",
"unicorn/number-literal-case": "warn",
"unicorn/prefer-add-event-listener": "warn",
"unicorn/prefer-array-find": "warn",
"unicorn/prefer-array-flat-map": "warn",
"unicorn/prefer-array-flat": "warn",
"unicorn/prefer-array-index-of": "warn",
"unicorn/prefer-array-some": "warn",
"unicorn/prefer-code-point": "warn",
"unicorn/prefer-date-now": "warn",
"unicorn/prefer-default-parameters": "warn",
"unicorn/prefer-dom-node-append": "warn",
"unicorn/prefer-dom-node-dataset": "warn",
"unicorn/prefer-dom-node-remove": "warn",
"unicorn/prefer-dom-node-text-content": "warn",
"unicorn/prefer-event-target": "warn",
"unicorn/prefer-includes": "warn",
"unicorn/prefer-keyboard-event-key": "warn",
"unicorn/prefer-math-trunc": "warn",
"unicorn/prefer-modern-dom-apis": "warn",
"unicorn/prefer-modern-math-apis": "warn",
"unicorn/prefer-native-coercion-functions": "warn",
"unicorn/prefer-negative-index": "warn",
"unicorn/prefer-node-protocol": "warn",
"unicorn/prefer-number-properties": "warn",
"unicorn/prefer-object-from-entries": "warn",
"unicorn/prefer-optional-catch-binding": "warn",
"unicorn/prefer-prototype-methods": "warn",
"unicorn/prefer-query-selector": "warn",
"unicorn/prefer-reflect-apply": "warn",
"unicorn/prefer-regexp-test": "warn",
"unicorn/prefer-string-replace-all": "warn",
"unicorn/prefer-string-slice": "warn",
"unicorn/prefer-string-starts-ends-with": "warn",
"unicorn/prefer-string-trim-start-end": "warn",
"unicorn/prefer-switch": "warn",
"unicorn/prefer-top-level-await": "warn",
"unicorn/prefer-type-error": "warn",
"unicorn/relative-url-style": "warn",
"unicorn/require-array-join-separator": "warn",
"unicorn/require-number-to-fixed-digits-argument": "warn",
"unicorn/template-indent": "warn",
"unicorn/throw-new-error": "warn"
},
"overrides": [
{
"files": ["**/*.{ts,tsx}"],
"parserOptions": {"project": "tsconfig.json"},
"plugins": ["@typescript-eslint"],
"extends": ["plugin:@typescript-eslint/strict"],
"rules": {
"@typescript-eslint/array-type": ["warn", {"default": "array-simple"}],
"@typescript-eslint/await-thenable": "warn",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-tslint-comment": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/consistent-type-imports": [
"warn",
{"disallowTypeAnnotations": false}
],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-for-in-array": "warn",
"no-implied-eval": "off",
"@typescript-eslint/no-implied-eval": "warn",
"@typescript-eslint/no-invalid-void-type": "off",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-var-requires": "off",
"require-await": "off",
"@typescript-eslint/require-await": "warn",
"@typescript-eslint/restrict-plus-operands": "warn",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/unbound-method": "warn"
}
},
{
"files": [
"**/__{mocks,tests}__/**/*.{js,ts,tsx}",
"**/*.{spec,test}.{js,ts,tsx}"
],
"plugins": ["jest", "jest-formatting"],
"extends": [
"plugin:jest/recommended",
"plugin:jest-formatting/recommended"
],
"rules": {
"jest/expect-expect": "off"
}
}
]
}