@naturalcycles/dev-lib 15.10.1 → 15.11.1
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/biome.jsonc +1 -1
- package/cfg/lint-staged.config.js +11 -2
- package/dist/bin/dev-lib.js +2 -3
- package/dist/lint.util.js +1 -1
- package/package.json +1 -1
package/cfg/biome.jsonc
CHANGED
|
@@ -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')
|
|
@@ -36,7 +44,7 @@ const stylelintCmd = stylelintExists ? `stylelint --fix --config ${stylelintConf
|
|
|
36
44
|
|
|
37
45
|
// const biomeInstalled = fs.existsSync('node_modules/@biomejs/biome')
|
|
38
46
|
const biomeConfigPath = ['biome.jsonc'].find(p => fs.existsSync(p))
|
|
39
|
-
const biomeCmd = biomeConfigPath && `biome lint --write --unsafe
|
|
47
|
+
const biomeCmd = biomeConfigPath && `biome lint --write --unsafe --no-errors-on-unmatched`
|
|
40
48
|
|
|
41
49
|
if (!eslintConfigPathRoot) {
|
|
42
50
|
console.log('eslint is skipped, because ./eslint.config.js is not present')
|
|
@@ -86,7 +94,8 @@ const linters = {
|
|
|
86
94
|
[`./{${prettierDirs}}/**/*.{${stylelintExtensions}}`]: match => {
|
|
87
95
|
const filesList = getFilesList(match)
|
|
88
96
|
if (!filesList) return []
|
|
89
|
-
|
|
97
|
+
// Biome's css/scss support is still in nursery, so Biome is disabled for now
|
|
98
|
+
return [stylelintCmd, prettierCmd].filter(Boolean).map(s => `${s} ${filesList}`)
|
|
90
99
|
},
|
|
91
100
|
|
|
92
101
|
// Files in root dir: prettier
|
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,
|
package/dist/lint.util.js
CHANGED
|
@@ -241,7 +241,7 @@ function runBiome(fix = true) {
|
|
|
241
241
|
return;
|
|
242
242
|
}
|
|
243
243
|
const dirs = [`src`, `scripts`, `e2e`, `playwright`].filter(d => node_fs_1.default.existsSync(d));
|
|
244
|
-
(0, nodejs_lib_1.execVoidCommandSync)(`biome`, [`lint`, fix && '--write', fix && '--unsafe', ...dirs].filter(js_lib_1._isTruthy));
|
|
244
|
+
(0, nodejs_lib_1.execVoidCommandSync)(`biome`, [`lint`, fix && '--write', fix && '--unsafe', '--no-errors-on-unmatched', ...dirs].filter(js_lib_1._isTruthy));
|
|
245
245
|
}
|
|
246
246
|
function canRunBinary(name) {
|
|
247
247
|
try {
|