-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
88 lines (88 loc) · 2.32 KB
/
.eslintrc.json
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
{
"env": {
"browser": true,
"es2021": true
},
"root": true,
"extends": ["standard"],
"parser": "@typescript-eslint/parser",
"ignorePatterns": ["*.js"],
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module",
"project": [
"./packages/*/tsconfig.json",
"./examples/*/tsconfig.json",
"tsconfig.json"
]
},
"plugins": [
"@typescript-eslint",
"unused-imports",
"@foxglove",
"unicorn",
"custom-elements"
],
"rules": {
"semi": ["error", "always"],
"no-console": "error",
"max-params": [
"error",
{
"max": 4
}
],
"no-return-assign": "off",
"no-redeclare": "off",
"valid-typeof": "off",
"no-undef": "off",
"comma-dangle": [2, "always-multiline"],
"no-use-before-define": "off",
"no-useless-constructor": "off",
"max-lines": ["error", 200],
"max-classes-per-file": ["error", 1],
"class-methods-use-this": "error",
"complexity": ["error", 4],
"max-statements-per-line": ["error", { "max": 1 }],
"max-statements": ["error", { "max": 6 }],
"@foxglove/no-boolean-parameters": "error",
"no-return-await": "error",
"custom-elements/file-name-matches-element": [
"error",
{ "transform": ["kebab"], "matchDirectory": true }
],
"unicorn/no-null": "error",
"no-warning-comments": "error",
"no-inline-comments": "error",
"camelcase": "error",
"@typescript-eslint/no-use-before-define": "error",
// "@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/no-useless-constructor": "error",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "comma", // 'none' or 'semi' or 'comma'
"requireLast": true
},
"singleline": {
"delimiter": "semi", // 'semi' or 'comma'
"requireLast": false
}
}
],
"@typescript-eslint/member-ordering": "error"
}
}