forked from grafana/eslint-config-grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
90 lines (89 loc) · 2.43 KB
/
index.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
"use strict";
module.exports = {
parserOptions: {
ecmaVersion: 2019,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
settings: {
react: {
version: "detect",
},
},
plugins: ["jsdoc", "@typescript-eslint", "react-hooks"],
extends: [
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"prettier",
],
parser: "@typescript-eslint/parser",
rules: {
curly: "error",
"dot-notation": "off",
"eol-last": "error",
eqeqeq: ["error", "always", { null: "ignore" }],
"guard-for-in": "off",
"jsdoc/check-alignment": "error",
"new-parens": "error",
"no-array-constructor": "error",
"no-bitwise": "off",
"no-caller": "error",
"no-cond-assign": "error",
"no-console": ["error", { allow: ["error", "log", "warn", "info"] }],
"no-debugger": "error",
"no-empty": "off",
"no-eval": "error",
"no-fallthrough": "off",
"no-new-wrappers": "error",
"no-redeclare": "error",
"no-restricted-imports": ["error", "moment"],
"no-shadow": "off",
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-var": "error",
radix: "error",
"sort-keys": "off",
"spaced-comment": ["off", "always"],
"use-isnan": "error",
"no-duplicate-imports": "error",
"@typescript-eslint/no-unused-expressions": [
"error",
{ allowShortCircuit: true, allowTernary: true },
],
"@typescript-eslint/array-type": ["error", { default: "array-simple" }],
"@typescript-eslint/naming-convention": [
"error",
{
selector: "interface",
format: ["PascalCase"],
custom: {
regex: "^I[A-Z]",
match: false,
},
},
],
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{ accessibility: "no-public" },
],
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-namespace": ["error", { allowDeclarations: false }],
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/type-annotation-spacing": [
"error",
{
after: true,
before: false,
overrides: {
arrow: { after: true, before: true },
},
},
],
"react-hooks/exhaustive-deps": "error",
},
};