@naturalcycles/dev-lib 15.10.0 → 15.11.0
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/cfg/eslint-rules.js +2 -9
- package/cfg/eslint.config.js +1 -1
- package/cfg/lint-staged.config.js +8 -0
- package/dist/bin/dev-lib.js +2 -3
- package/package.json +1 -1
package/cfg/eslint-rules.js
CHANGED
|
@@ -118,9 +118,7 @@ module.exports = {
|
|
|
118
118
|
},
|
|
119
119
|
],
|
|
120
120
|
'@typescript-eslint/no-array-constructor': 2,
|
|
121
|
-
'@typescript-eslint/no-empty-interface': 0, // too inconvenient
|
|
122
121
|
'@typescript-eslint/no-extra-non-null-assertion': 2,
|
|
123
|
-
'@typescript-eslint/no-extra-semi': 0, // prettier handles it
|
|
124
122
|
'@typescript-eslint/no-floating-promises': 2,
|
|
125
123
|
'@typescript-eslint/no-inferrable-types': [
|
|
126
124
|
2,
|
|
@@ -130,7 +128,6 @@ module.exports = {
|
|
|
130
128
|
],
|
|
131
129
|
'@typescript-eslint/no-misused-new': 2,
|
|
132
130
|
'@typescript-eslint/no-non-null-asserted-optional-chain': 2,
|
|
133
|
-
'@typescript-eslint/no-this-alias': 0, // buggy
|
|
134
131
|
'@typescript-eslint/no-unused-expressions': 2,
|
|
135
132
|
'@typescript-eslint/prefer-as-const': 2,
|
|
136
133
|
'@typescript-eslint/prefer-for-of': 2,
|
|
@@ -190,7 +187,7 @@ module.exports = {
|
|
|
190
187
|
'jsdoc/check-alignment': 2,
|
|
191
188
|
// "jsdoc/check-indentation": "error",
|
|
192
189
|
// 'jsdoc/newline-after-description': 2,
|
|
193
|
-
'no-array-constructor':
|
|
190
|
+
'no-array-constructor': 0,
|
|
194
191
|
'no-async-promise-executor': 2,
|
|
195
192
|
'no-bitwise': 2,
|
|
196
193
|
'no-caller': 2,
|
|
@@ -210,12 +207,11 @@ module.exports = {
|
|
|
210
207
|
'no-duplicate-case': 2,
|
|
211
208
|
'no-empty': [2, { allowEmptyCatch: true }],
|
|
212
209
|
'no-empty-character-class': 2,
|
|
213
|
-
'no-empty-function':
|
|
210
|
+
'no-empty-function': 0,
|
|
214
211
|
'no-empty-pattern': 2,
|
|
215
212
|
'no-eval': 2,
|
|
216
213
|
'no-ex-assign': 2,
|
|
217
214
|
'no-extra-boolean-cast': 2,
|
|
218
|
-
'no-extra-semi': 'off',
|
|
219
215
|
'no-implicit-coercion': [
|
|
220
216
|
2,
|
|
221
217
|
{
|
|
@@ -271,12 +267,10 @@ module.exports = {
|
|
|
271
267
|
'no-shadow-restricted-names': 2,
|
|
272
268
|
'no-sparse-arrays': 2,
|
|
273
269
|
'no-this-before-super': 2,
|
|
274
|
-
'no-throw-literal': 0,
|
|
275
270
|
'@typescript-eslint/only-throw-error': 2,
|
|
276
271
|
'no-undef': 0, // covered by TS, conflicts with typescript-eslint
|
|
277
272
|
'no-undef-init': 2,
|
|
278
273
|
'no-underscore-dangle': 0,
|
|
279
|
-
'no-unexpected-multiline': 0, // prettier
|
|
280
274
|
'no-unreachable': 2,
|
|
281
275
|
'no-unsafe-finally': 2,
|
|
282
276
|
'no-unsafe-negation': 2,
|
|
@@ -347,7 +341,6 @@ module.exports = {
|
|
|
347
341
|
'@typescript-eslint/prefer-find': 2,
|
|
348
342
|
'prefer-promise-reject-errors': 0,
|
|
349
343
|
'@typescript-eslint/prefer-promise-reject-errors': 2,
|
|
350
|
-
'arrow-body-style': 0,
|
|
351
344
|
'unicorn/no-array-callback-reference': 0, // false positives
|
|
352
345
|
'unicorn/no-process-exit': 0,
|
|
353
346
|
'unicorn/no-array-push-push': 0,
|
package/cfg/eslint.config.js
CHANGED
|
@@ -83,7 +83,7 @@ function getConfig() {
|
|
|
83
83
|
...require('./eslint-rules').rules,
|
|
84
84
|
...require('./eslint-vue-rules').rules,
|
|
85
85
|
...(hasJest ? require('./eslint-jest-rules').rules : {}),
|
|
86
|
-
...require('./eslint-prettier-rules').rules,
|
|
86
|
+
...require('./eslint-prettier-rules').rules, // disable eslint rules already covered by prettier
|
|
87
87
|
...require('./eslint-biome-rules').rules, // disable eslint rules already covered by biome
|
|
88
88
|
},
|
|
89
89
|
}
|
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
Supports default configs for `prettier`, `stylelint`, `eslint`, if they are not found in target project.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
const {
|
|
8
|
+
platform,
|
|
9
|
+
arch,
|
|
10
|
+
versions: { node },
|
|
11
|
+
} = process
|
|
12
|
+
|
|
13
|
+
console.log(`lint-staged.config.js runs on node ${node} ${platform} ${arch}`)
|
|
14
|
+
|
|
7
15
|
const fs = require('node:fs')
|
|
8
16
|
const micromatch = require('micromatch')
|
|
9
17
|
const { execSync } = require('node:child_process')
|
package/dist/bin/dev-lib.js
CHANGED
|
@@ -146,13 +146,12 @@ async function tscAll() {
|
|
|
146
146
|
await (0, build_util_1.runTSCInFolders)(['.', 'scripts', 'e2e', 'playwright'], ['--noEmit']);
|
|
147
147
|
}
|
|
148
148
|
function logEnvironment() {
|
|
149
|
-
const { CPU_LIMIT, NODE_OPTIONS = 'not defined' } = process
|
|
150
|
-
const { node } = process.versions;
|
|
149
|
+
const { platform, arch, versions: { node }, env: { CPU_LIMIT, NODE_OPTIONS = 'not defined' }, } = process;
|
|
151
150
|
const cpuLimit = Number(CPU_LIMIT) || undefined;
|
|
152
151
|
const availableParallelism = node_os_1.default.availableParallelism?.();
|
|
153
152
|
const cpus = node_os_1.default.cpus().length;
|
|
154
153
|
console.log((0, nodejs_lib_1.dimGrey)(Object.entries({
|
|
155
|
-
node
|
|
154
|
+
node: `${node} ${platform} ${arch}`,
|
|
156
155
|
NODE_OPTIONS,
|
|
157
156
|
cpus,
|
|
158
157
|
availableParallelism,
|