forked from litmuschaos/litmus-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
88 lines (87 loc) · 2.06 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
const rules = {
ON: 2,
OFF: 0,
WARN: 1,
};
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["react-hooks", "@typescript-eslint"],
env: {
browser: true,
es6: true,
},
parserOptions: {
ecmaVersion: 2018,
ecmaFeatures: {
jsx: true,
},
sourceType: "module",
},
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"prettier/@typescript-eslint",
"plugin:mdx/recommended",
],
overrides: [
{
files: ["*.mdx"],
extends: [
"plugin:mdx/recommended",
"plugin:mdx/overrides",
"plugin:react/recommended",
],
},
],
rules: {
"no-undef": rules.ON,
"@typescript-eslint/explicit-function-return-type": rules.OFF,
"@typescript-eslint/no-non-null-assertion": rules.OFF,
"@typescript-eslint/no-unused-vars": rules.WARN,
"@typescript-eslint/no-explicit-any": rules.OFF,
"react/no-deprecated": rules.OFF,
"react/prop-types": rules.OFF,
"react-hooks/rules-of-hooks": rules.ON,
"react-hooks/exhaustive-deps": rules.WARN,
"react/static-property-placement": [
"warn",
"property assignment",
{ defaultProps: "static public field" },
],
"lines-between-class-members": rules.OFF,
"no-restricted-syntax": rules.OFF,
"no-nested-ternary": rules.OFF,
"no-plusplus": rules.OFF,
"multiline-ternary": rules.OFF,
"no-useless-constructor": rules.OFF,
"mdx/no-unused-expressions": rules.OFF,
"max-len": [
"warn",
{
code: 100,
tabWidth: 2,
comments: 100,
ignoreComments: false,
ignoreTrailingComments: true,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
},
],
"@typescript-eslint/naming-convention": [
rules.ON,
{
selector: "typeLike",
format: ["StrictPascalCase"],
},
],
},
settings: {
"mdx/code-blocks": true,
"mdx/language-mapper": {},
react: {
version: "detect",
},
},
};