forked from pyatyispyatil/flame-chart-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
121 lines (118 loc) · 4.86 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
{
"parser": "@typescript-eslint/parser",
"plugins": ["prettier", "@typescript-eslint", "react", "markdown", "unused-imports"],
"extends": ["prettier", "plugin:react/recommended", "plugin:markdown/recommended"],
"overrides": [
{
"files": ["**/*.md"],
"processor": "markdown/markdown"
},
{
"files": ["**.md/*.{ts,tsx,js,jsx}"],
"rules": {
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-unnecessary-type-arguments": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unnecessary-type-constraint": "off",
"@typescript-eslint/no-useless-constructor": "off",
"@typescript-eslint/no-useless-empty-export": "off",
"@typescript-eslint/no-unnecessary-qualifier": "off",
"@typescript-eslint/prefer-includes": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/prefer-optional-chain": "off",
"@typescript-eslint/prefer-string-starts-ends-with": "off",
"unused-imports/no-unused-imports": "off",
"unused-imports/no-unused-vars": "off"
}
},
{
"files": ["*.{ts,tsx,js,jsx}"],
"parserOptions": {
"project": "./tsconfig.eslint.json",
"ecmaFeatures": {
"jsx": true
}
},
"excludedFiles": ["**/*.md/*.{ts,tsx,js,jsx}"]
}
],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"quotes": ["error", "single"],
"prettier/prettier": "error",
"no-useless-return": "error",
"no-unreachable": "error",
"eqeqeq": "error",
"no-else-return": "error",
"no-extra-boolean-cast": "error",
"no-implicit-coercion": "error",
"no-lonely-if": "error",
"no-unneeded-ternary": "error",
"no-var": "error",
"prefer-const": "error",
"array-callback-return": "error",
"constructor-super": "error",
"getter-return": "error",
"no-async-promise-executor": "error",
"no-cond-assign": "error",
"no-const-assign": "error",
"no-constructor-return": "error",
"no-control-regex": "error",
"no-dupe-args": "error",
"no-dupe-class-members": "error",
"no-dupe-else-if": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-empty-character-class": "error",
"no-empty-pattern": "error",
"no-ex-assign": "error",
"no-fallthrough": "error",
"no-func-assign": "error",
"no-import-assign": "error",
"no-inner-declarations": "error",
"no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
"no-self-assign": "error",
"no-self-compare": "error",
"no-setter-return": "error",
"object-curly-spacing": ["error", "always"],
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "*", "next": "return" },
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*"},
{ "blankLine": "any", "prev": ["const", "let", "var"], "next": ["const", "let", "var"]},
{
"blankLine": "always",
"prev": ["block", "block-like", "class", "directive", "export", "import", "multiline-block-like"],
"next": "*"
},
{ "blankLine": "any", "prev": ["export", "import"], "next": ["export", "import"]}
],
// imports rules
"no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": "warn",
// TS rules
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-useless-empty-export": "error",
"@typescript-eslint/prefer-enum-initializers": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
// React rules
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"jsx-quotes": ["error", "prefer-single"]
}
}