-
Notifications
You must be signed in to change notification settings - Fork 70
/
eslint.config.js
90 lines (89 loc) · 2.66 KB
/
eslint.config.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
const globals = require("globals");
const eslint = require("@eslint/js");
const tseslint = require('typescript-eslint');
module.exports = [
eslint.configs.recommended,
{
ignores: [
"**/node_modules",
"**/dist",
".nx",
".tmp"
],
},
{
name: "root",
files: [ "**/*.js", "**/*.mjs" ],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"block-scoped-var": "error",
"consistent-return": "error",
"curly": "error",
"default-case": "error",
"eqeqeq": ["error", "smart"],
"no-alert": "error",
"no-caller": "error",
"no-console": "error",
"no-else-return": "error",
"no-eval": "error",
"no-implied-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-implicit-coercion": "error",
"no-invalid-this": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-new": "error",
"no-param-reassign": "error",
"no-return-assign": "error",
"no-sequences": "error",
"no-useless-call": "error",
"camelcase": "error",
"consistent-this": ["error", "that"],
"max-params": ["error", 4],
"no-nested-ternary": "error",
"arrow-body-style": "error",
"no-var": "error"
}
},
{
name: "html-components",
files: [
"packages/html/**/*.ts",
"packages/html/**/*.tsx"
],
plugins: {
"@typescript-eslint": tseslint.plugin
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
ecmaFeatures: {
jsx: true
}
},
globals: {
...globals.browser,
...globals.node,
React: true
}
},
rules: {
...tseslint.configs.recommended.rules,
...tseslint.configs.stylistic.rules,
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": ["error", {"varsIgnorePattern": "^_"}],
"no-unused-vars": "off",
"no-undef": 'off'
}
}
]