@naturalcycles/dev-lib 20.22.0 → 20.22.2
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/oxlint.config.json +3 -0
- package/dist/bin/dev-lib.js +9 -3
- package/package.json +1 -1
- package/readme.md +0 -7
package/cfg/oxlint.config.json
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
{ "blankLine": "always", "prev": "*", "next": "class" }
|
|
22
22
|
],
|
|
23
23
|
"@stylistic/lines-between-class-members": [2, "always", { "exceptAfterSingleLine": true }],
|
|
24
|
+
"complexity": [2, { "max": 40 }],
|
|
24
25
|
"no-this-alias": 0,
|
|
25
26
|
"no-async-promise-executor": 0,
|
|
26
27
|
"no-standalone-expect": 0,
|
|
@@ -262,6 +263,7 @@
|
|
|
262
263
|
}
|
|
263
264
|
],
|
|
264
265
|
"vitest/no-duplicate-hooks": 2,
|
|
266
|
+
"vitest/consistent-vitest-vi": 2,
|
|
265
267
|
"vitest/no-focused-tests": 2,
|
|
266
268
|
"vitest/no-identical-title": 2,
|
|
267
269
|
"vitest/no-test-return-statement": 2,
|
|
@@ -278,6 +280,7 @@
|
|
|
278
280
|
"vitest/prefer-to-be": 2,
|
|
279
281
|
"vitest/prefer-to-contain": 2,
|
|
280
282
|
"vitest/consistent-test-filename": 2,
|
|
283
|
+
"vitest/warn-todo": 0,
|
|
281
284
|
"jest/consistent-test-it": [
|
|
282
285
|
2,
|
|
283
286
|
{
|
package/dist/bin/dev-lib.js
CHANGED
|
@@ -17,7 +17,8 @@ const commands = [
|
|
|
17
17
|
{ name: 'bt', fn: bt, desc: 'Build & Test: run "typecheck" (via oxlint) and then "test".' },
|
|
18
18
|
{
|
|
19
19
|
name: 'typecheck',
|
|
20
|
-
fn: typecheckWithOxlint,
|
|
20
|
+
// fn: typecheckWithOxlint,
|
|
21
|
+
fn: typecheckWithTSC, // todo: attempt tsgo
|
|
21
22
|
desc: 'Run typecheck via oxlint --type-aware',
|
|
22
23
|
},
|
|
23
24
|
{
|
|
@@ -157,6 +158,7 @@ runScript(async () => {
|
|
|
157
158
|
});
|
|
158
159
|
async function check() {
|
|
159
160
|
await lintAllCommand();
|
|
161
|
+
await typecheckWithTSC(); // unfortunately still needed since oxlint doesn't catch all ts errors
|
|
160
162
|
runTest();
|
|
161
163
|
}
|
|
162
164
|
async function quickCheck() {
|
|
@@ -164,15 +166,19 @@ async function quickCheck() {
|
|
|
164
166
|
runTest();
|
|
165
167
|
}
|
|
166
168
|
async function bt() {
|
|
167
|
-
|
|
169
|
+
// Still using tsc, as oxlint is found to fail in certain cases
|
|
170
|
+
// todo: attempt to use tsgo!
|
|
171
|
+
// await typecheckWithOxlint()
|
|
172
|
+
await typecheckWithTSC();
|
|
168
173
|
runTest();
|
|
169
174
|
}
|
|
170
|
-
async function
|
|
175
|
+
async function _typecheckWithOxlint() {
|
|
171
176
|
requireOxlintConfig();
|
|
172
177
|
const fix = !CI;
|
|
173
178
|
runOxlint(fix);
|
|
174
179
|
}
|
|
175
180
|
async function typecheckWithTSC() {
|
|
181
|
+
// todo: try tsgo
|
|
176
182
|
await runTSCInFolders(['src', 'scripts', 'e2e'], ['--noEmit']);
|
|
177
183
|
}
|
|
178
184
|
async function cleanDist() {
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -200,10 +200,3 @@ These files are meant to be extended in target project, so act as _recommended d
|
|
|
200
200
|
- `biome.jsonc`
|
|
201
201
|
- `jest.config.js`
|
|
202
202
|
- `vitest.config.mjs`
|
|
203
|
-
|
|
204
|
-
## eslint
|
|
205
|
-
|
|
206
|
-
Presence of `jest` is detected by checking if `node_modules/jest` exists.
|
|
207
|
-
|
|
208
|
-
If exists - `eslint-plugin-jest` recommended config (plus opinionated `dev-lib`'s rules) are
|
|
209
|
-
enabled. Otherwise disabled ( to not cause "jest not found" errors).
|