@balena/lint 7.2.5 → 7.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/.eslintrc.js +110 -122
- package/package.json +4 -4
- package/tsconfig.json +3 -2
package/config/.eslintrc.js
CHANGED
|
@@ -1,149 +1,137 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
env: {
|
|
3
|
+
browser: true,
|
|
4
|
+
es6: true,
|
|
5
|
+
node: true,
|
|
6
6
|
},
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
parser: '@typescript-eslint/parser',
|
|
8
|
+
parserOptions: {
|
|
9
|
+
project: 'tsconfig.json',
|
|
10
|
+
sourceType: 'module',
|
|
11
11
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
plugins: [
|
|
13
|
+
'eslint-plugin-jsdoc',
|
|
14
|
+
'eslint-plugin-react',
|
|
15
|
+
'@typescript-eslint',
|
|
16
|
+
'no-only-tests',
|
|
17
|
+
'chai-friendly',
|
|
18
18
|
],
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
extends: [
|
|
20
|
+
'eslint:recommended',
|
|
21
|
+
'plugin:@typescript-eslint/recommended',
|
|
22
|
+
'plugin:chai-friendly/recommended',
|
|
23
|
+
'prettier',
|
|
24
24
|
],
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
rules: {
|
|
26
|
+
'@typescript-eslint/adjacent-overload-signatures': 'error',
|
|
27
|
+
'@typescript-eslint/array-type': [
|
|
28
|
+
'error',
|
|
29
29
|
{
|
|
30
|
-
|
|
31
|
-
}
|
|
30
|
+
default: 'array-simple',
|
|
31
|
+
},
|
|
32
32
|
],
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
'@typescript-eslint/ban-ts-comment': [
|
|
34
|
+
'error',
|
|
35
35
|
{
|
|
36
|
-
|
|
37
|
-
}
|
|
36
|
+
'ts-expect-error': 'allow-with-description',
|
|
37
|
+
},
|
|
38
38
|
],
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
'@typescript-eslint/consistent-type-assertions': 'error',
|
|
40
|
+
'@typescript-eslint/naming-convention': [
|
|
41
|
+
'error',
|
|
42
42
|
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"PascalCase"
|
|
48
|
-
],
|
|
49
|
-
"leadingUnderscore": "allow",
|
|
50
|
-
"trailingUnderscore": "forbid"
|
|
43
|
+
selector: 'variable',
|
|
44
|
+
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
|
|
45
|
+
leadingUnderscore: 'allow',
|
|
46
|
+
trailingUnderscore: 'forbid',
|
|
51
47
|
},
|
|
52
48
|
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
"@typescript-eslint/no-empty-function": "error",
|
|
59
|
-
"@typescript-eslint/no-empty-interface": "error",
|
|
60
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
61
|
-
"@typescript-eslint/no-floating-promises": [
|
|
62
|
-
"error",
|
|
63
|
-
{ "ignoreVoid": true }
|
|
49
|
+
selector: 'variable',
|
|
50
|
+
modifiers: ['destructured'],
|
|
51
|
+
format: null,
|
|
52
|
+
},
|
|
64
53
|
],
|
|
65
|
-
|
|
66
|
-
|
|
54
|
+
'@typescript-eslint/no-empty-function': 'error',
|
|
55
|
+
'@typescript-eslint/no-empty-interface': 'error',
|
|
56
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
57
|
+
'@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],
|
|
58
|
+
'@typescript-eslint/no-shadow': [
|
|
59
|
+
'error',
|
|
67
60
|
{
|
|
68
|
-
|
|
69
|
-
}
|
|
61
|
+
hoist: 'all',
|
|
62
|
+
},
|
|
70
63
|
],
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
64
|
+
'@typescript-eslint/no-this-alias': 'off',
|
|
65
|
+
'@typescript-eslint/no-unused-vars': [
|
|
66
|
+
'error',
|
|
74
67
|
{
|
|
75
68
|
// Ideally we would want to block trailing unused destructured vars
|
|
76
69
|
// similarly to how `"args": "after-used"` works, but this isn't supported at.
|
|
77
|
-
|
|
78
|
-
|
|
70
|
+
destructuredArrayIgnorePattern: '^_',
|
|
71
|
+
ignoreRestSiblings: true,
|
|
79
72
|
},
|
|
80
73
|
],
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
74
|
+
'@typescript-eslint/prefer-for-of': 'error',
|
|
75
|
+
'@typescript-eslint/prefer-function-type': 'error',
|
|
76
|
+
'@typescript-eslint/prefer-namespace-keyword': 'error',
|
|
77
|
+
'@typescript-eslint/triple-slash-reference': [
|
|
78
|
+
'error',
|
|
86
79
|
{
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
80
|
+
path: 'always',
|
|
81
|
+
types: 'prefer-import',
|
|
82
|
+
lib: 'always',
|
|
83
|
+
},
|
|
91
84
|
],
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
85
|
+
'constructor-super': 'error',
|
|
86
|
+
curly: 'error',
|
|
87
|
+
eqeqeq: ['error', 'always', { null: 'ignore' }],
|
|
88
|
+
'guard-for-in': 'error',
|
|
89
|
+
'id-denylist': [
|
|
90
|
+
'error',
|
|
91
|
+
'any',
|
|
92
|
+
'Number',
|
|
93
|
+
'number',
|
|
94
|
+
'String',
|
|
95
|
+
'string',
|
|
96
|
+
'Boolean',
|
|
97
|
+
'boolean',
|
|
98
|
+
'Undefined',
|
|
99
|
+
'undefined',
|
|
107
100
|
],
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
101
|
+
'id-match': 'error',
|
|
102
|
+
indent: 'off',
|
|
103
|
+
'jsdoc/check-alignment': 'error',
|
|
104
|
+
'new-parens': 'error',
|
|
105
|
+
'no-bitwise': 'error',
|
|
106
|
+
'no-caller': 'error',
|
|
107
|
+
'no-cond-assign': 'error',
|
|
108
|
+
'no-constant-binary-expression': 'error',
|
|
109
|
+
'no-debugger': 'error',
|
|
110
|
+
'no-empty': 'error',
|
|
111
|
+
'no-empty-function': 'off',
|
|
112
|
+
'no-eval': 'error',
|
|
113
|
+
'no-fallthrough': [
|
|
114
|
+
'error',
|
|
122
115
|
{
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
],
|
|
127
|
-
"no-new-wrappers": "error",
|
|
128
|
-
"no-only-tests/no-only-tests": "error",
|
|
129
|
-
"no-shadow": "off",
|
|
130
|
-
"no-throw-literal": "error",
|
|
131
|
-
"no-unused-expressions": "off",
|
|
132
|
-
"no-var": "error",
|
|
133
|
-
"one-var": [
|
|
134
|
-
"error",
|
|
135
|
-
"never"
|
|
116
|
+
allowEmptyCase: true,
|
|
117
|
+
commentPattern: 'break[\\s\\w]*omitted',
|
|
118
|
+
},
|
|
136
119
|
],
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
120
|
+
'no-new-wrappers': 'error',
|
|
121
|
+
'no-only-tests/no-only-tests': 'error',
|
|
122
|
+
'no-shadow': 'off',
|
|
123
|
+
'no-throw-literal': 'error',
|
|
124
|
+
'no-unused-expressions': 'off',
|
|
125
|
+
'no-var': 'error',
|
|
126
|
+
'one-var': ['error', 'never'],
|
|
127
|
+
'prefer-const': ['error', { destructuring: 'all' }],
|
|
128
|
+
radix: 'error',
|
|
129
|
+
'spaced-comment': [
|
|
130
|
+
'error',
|
|
131
|
+
'always',
|
|
142
132
|
{
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
]
|
|
148
|
-
}
|
|
133
|
+
markers: ['/'],
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
},
|
|
149
137
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@balena/lint",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.6",
|
|
4
4
|
"description": "Balena.io eslint & prettier wrapper",
|
|
5
5
|
"bin": {
|
|
6
6
|
"balena-lint": "./bin/balena-lint"
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "tsc && npm run prettify && npm run lint",
|
|
22
|
-
"lint": "node ./bin/balena-lint -t tsconfig.json lib/",
|
|
22
|
+
"lint": "node ./bin/balena-lint -t tsconfig.json lib/ config/.eslintrc.js",
|
|
23
23
|
"prepublish": "require-npm4-to-publish",
|
|
24
24
|
"prepublishOnly": "npm run test",
|
|
25
|
-
"prettify": "node ./bin/balena-lint -t tsconfig.json --fix lib/",
|
|
25
|
+
"prettify": "node ./bin/balena-lint -t tsconfig.json --fix -e ts -e js -t tsconfig.json lib/ config/.eslintrc.js",
|
|
26
26
|
"test": "npm run build && npm run test:typescript",
|
|
27
27
|
"test:typescript": "node ./bin/balena-lint -t tsconfig.test.json test/typescript/prettier -i",
|
|
28
28
|
"prepare": "node -e \"try { require('husky').install() } catch (e) {if (e.code !== 'MODULE_NOT_FOUND') throw e}\""
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"require-npm4-to-publish": "^1.0.0"
|
|
60
60
|
},
|
|
61
61
|
"versionist": {
|
|
62
|
-
"publishedAt": "2024-01-30T14:
|
|
62
|
+
"publishedAt": "2024-01-30T14:45:44.276Z"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": ">=16.0.0",
|