-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
83 lines (80 loc) · 2.25 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
{
"root": true,
"env": {
"es2022": true
},
"extends": [
"eslint:recommended",
"standard",
"plugin:import/recommended"
],
"parserOptions": {
"ecmaVersion": 2022
},
"ignorePatterns": ["dist/", "*.svg", "*.xml"],
"rules": {
// Inbuilt
"indent": ["error", 4],
"object-shorthand": ["error"],
"sort-imports": [
"error",
{
"ignoreDeclarationSort": true
}
],
"no-console": ["error", { "allow": ["info", "warn", "error", "debug"] }],
// plugin:import
"import/order": [
"error",
{
"alphabetize": {
"order": "asc"
},
"newlines-between": "always-and-inside-groups"
}
],
"import/no-unresolved": "error"
},
"overrides": [
// Nodes use CommonJS and are imported by node-red into a node.js runtime
{
"files": "nodes/**",
"extends": ["plugin:n/recommended"],
"env": {
"commonjs": true,
"browser": false
},
"rules": {
// plugin:n
"n/file-extension-in-import": "error",
"n/no-missing-import": "error",
"n/no-missing-require": "error"
}
},
// Component UI runs in the browser and builds with vite
{
"files": "ui/**",
"plugins": ["vue"],
"extends": [
"plugin:vue/vue3-recommended"
],
"env": {
"browser": true,
"commonjs": false
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2022
},
"rules": {
// plugin:vue
"vue/html-indent": ["error", 4],
"vue/singleline-html-element-content-newline": "off",
"vue/max-attributes-per-line": "off",
"vue/attribute-hyphenation": "off",
// plugin:promise
"promise/always-return": "off" // common Vue.js pattern
}
}
]
}