@hublo/sentinel 1.6.0-alpha.1 → 1.6.0-alpha.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/README.md +3 -2
- package/dist/bin/sentinel.js +13 -7
- package/dist/{chunk-P7NYSMLS.js → chunk-67QLOX6F.js} +2737 -28
- package/dist/{chunk-5VNYQIFD.js → chunk-EESVRILJ.js} +1 -1
- package/dist/{chunk-5VNYQIFD.js.map → chunk-EESVRILJ.js.map} +1 -1
- package/dist/{chunk-5267A6X3.js → chunk-R7DS7VN4.js} +53 -2565
- package/dist/index.js +2 -2
- package/dist/roles/test/nest/toolchain.js +1 -1
- package/dist/roles/test/react/toolchain.js +1 -1
- package/dist/roles/test/shared-test-config.js +1 -1
- package/dist/{validate-5SD5CTTO.js → validate-NP7X6XCG.js} +1 -1
- package/docs/env-adoption.md +11 -5
- package/docs/lint-adoption.md +87 -6
- package/docs/using-sentinel.md +10 -10
- package/docs/validating-a-change.md +89 -4
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
LINT_BASELINE_SPECIFIER,
|
|
10
10
|
LINT_CONFIG_FILE,
|
|
11
11
|
LINT_MEASURE_FILE,
|
|
12
|
+
LINT_PRESETS,
|
|
12
13
|
LINT_SCRIPT_NAME,
|
|
13
14
|
OWNED_WHEN_SET_KEYS,
|
|
14
15
|
PERMITTED_LOCAL_KEYS,
|
|
@@ -23,17 +24,24 @@ import {
|
|
|
23
24
|
canonicalRuleName,
|
|
24
25
|
describeHolds,
|
|
25
26
|
describeRuleKey,
|
|
27
|
+
disabledFor,
|
|
28
|
+
downgradedFor,
|
|
26
29
|
extendsWithBaseline,
|
|
27
30
|
extendsWithPreset,
|
|
28
31
|
formatPresetFor,
|
|
29
32
|
formatPresetName,
|
|
30
33
|
formatTargets,
|
|
34
|
+
governedRules,
|
|
35
|
+
hasLintPreset,
|
|
31
36
|
heldRules,
|
|
32
37
|
holdsFrom,
|
|
38
|
+
isOffRuleValue,
|
|
33
39
|
isSentinelPreset,
|
|
40
|
+
lintPresetFor,
|
|
34
41
|
lintTarget,
|
|
35
42
|
localOnlyKeys,
|
|
36
43
|
manifestOperation,
|
|
44
|
+
moduleOwnBlocks,
|
|
37
45
|
moduleScripts,
|
|
38
46
|
nxTargetOperations,
|
|
39
47
|
oxfmtRejects,
|
|
@@ -48,6 +56,7 @@ import {
|
|
|
48
56
|
readAdoption,
|
|
49
57
|
readFormatAdoption,
|
|
50
58
|
readLintAdoption,
|
|
59
|
+
readModuleAdditions,
|
|
51
60
|
renderBaseline,
|
|
52
61
|
resolveBin,
|
|
53
62
|
resolveConfigTarget,
|
|
@@ -57,9 +66,10 @@ import {
|
|
|
57
66
|
scriptPath,
|
|
58
67
|
selfCommand,
|
|
59
68
|
splitToolArgs,
|
|
69
|
+
uncoveredFor,
|
|
60
70
|
walk,
|
|
61
71
|
writtenFileFormatter
|
|
62
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-67QLOX6F.js";
|
|
63
73
|
import {
|
|
64
74
|
DEFAULT_MAX_DIAGNOSTICS,
|
|
65
75
|
WORKSPACE_ROOT_MARKER,
|
|
@@ -1425,8 +1435,8 @@ function readValue(raw) {
|
|
|
1425
1435
|
const rest = value.slice(end + 1).trim();
|
|
1426
1436
|
return { blank: end === 1 && (rest === "" || rest.startsWith("#")) };
|
|
1427
1437
|
}
|
|
1428
|
-
const comment =
|
|
1429
|
-
return { blank: (comment
|
|
1438
|
+
const comment = /\s#/.exec(raw);
|
|
1439
|
+
return { blank: (comment ? raw.slice(0, comment.index) : raw).trim() === "" };
|
|
1430
1440
|
}
|
|
1431
1441
|
function parseEnvFile(content) {
|
|
1432
1442
|
const entries = [];
|
|
@@ -3334,2430 +3344,6 @@ function describeFixOutcome(outcome, toolLabel) {
|
|
|
3334
3344
|
return `the ${toolLabel} autofix rewrote ${outcome.changed.length} file${outcome.changed.length === 1 ? "" : "s"}: ${listed}. Review the diff before committing: rules this module used to have switched off are enforced from now on.`;
|
|
3335
3345
|
}
|
|
3336
3346
|
|
|
3337
|
-
// src/roles/lint/presets/nest.json
|
|
3338
|
-
var nest_default = {
|
|
3339
|
-
plugins: ["typescript", "jest", "vitest", "import", "unicorn", "oxc", "node"],
|
|
3340
|
-
jsPlugins: [
|
|
3341
|
-
"eslint-plugin-no-barrel-files",
|
|
3342
|
-
{
|
|
3343
|
-
name: "nx",
|
|
3344
|
-
specifier: "@nx/eslint-plugin"
|
|
3345
|
-
}
|
|
3346
|
-
],
|
|
3347
|
-
settings: null,
|
|
3348
|
-
rules: {
|
|
3349
|
-
"array-callback-return": [
|
|
3350
|
-
"error",
|
|
3351
|
-
{
|
|
3352
|
-
allowImplicit: false,
|
|
3353
|
-
checkForEach: false,
|
|
3354
|
-
allowVoid: false
|
|
3355
|
-
}
|
|
3356
|
-
],
|
|
3357
|
-
complexity: ["error", 30],
|
|
3358
|
-
curly: ["error", "all"],
|
|
3359
|
-
"dot-notation": [
|
|
3360
|
-
"error",
|
|
3361
|
-
{
|
|
3362
|
-
allowKeywords: true,
|
|
3363
|
-
allowPattern: ""
|
|
3364
|
-
}
|
|
3365
|
-
],
|
|
3366
|
-
eqeqeq: {
|
|
3367
|
-
severity: "warn",
|
|
3368
|
-
reason: "1 pre-existing violation(s) across one module, and they were never reported: the nx eslint target matched a couple of files per module (2 of 2888 on bff-admin), so the rule was configured and not enforced. Held at warn so adoption stays a lateral move rather than turning green modules red for code that predates it; the debt stays visible and countable via `--run --lint --json` and `--inspect`, and the severity is restored once it reaches zero."
|
|
3369
|
-
},
|
|
3370
|
-
"for-direction": "error",
|
|
3371
|
-
"func-style": {
|
|
3372
|
-
severity: "warn",
|
|
3373
|
-
reason: "58 pre-existing violation(s) across network and contract, and they were never reported: the nx eslint target matched a couple of files per module (2 of 2888 on bff-admin), so the rule was configured and not enforced. Held at warn so adoption stays a lateral move rather than turning green modules red for code that predates it; the debt stays visible and countable via `--run --lint --json` and `--inspect`, and the severity is restored once it reaches zero.",
|
|
3374
|
-
options: [
|
|
3375
|
-
"expression",
|
|
3376
|
-
{
|
|
3377
|
-
allowArrowFunctions: false,
|
|
3378
|
-
allowTypeAnnotation: false,
|
|
3379
|
-
overrides: {}
|
|
3380
|
-
}
|
|
3381
|
-
]
|
|
3382
|
-
},
|
|
3383
|
-
"import/no-duplicates": [
|
|
3384
|
-
"error",
|
|
3385
|
-
{
|
|
3386
|
-
considerQueryString: true,
|
|
3387
|
-
"prefer-inline": true
|
|
3388
|
-
}
|
|
3389
|
-
],
|
|
3390
|
-
"jest/expect-expect": {
|
|
3391
|
-
severity: "off",
|
|
3392
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3393
|
-
},
|
|
3394
|
-
"jest/no-alias-methods": {
|
|
3395
|
-
severity: "off",
|
|
3396
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3397
|
-
},
|
|
3398
|
-
"jest/no-commented-out-tests": {
|
|
3399
|
-
severity: "off",
|
|
3400
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3401
|
-
},
|
|
3402
|
-
"jest/no-deprecated-functions": "error",
|
|
3403
|
-
"jest/no-disabled-tests": {
|
|
3404
|
-
severity: "off",
|
|
3405
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3406
|
-
},
|
|
3407
|
-
"jest/no-done-callback": "error",
|
|
3408
|
-
"jest/no-export": "error",
|
|
3409
|
-
"jest/no-focused-tests": {
|
|
3410
|
-
severity: "off",
|
|
3411
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3412
|
-
},
|
|
3413
|
-
"jest/no-identical-title": {
|
|
3414
|
-
severity: "off",
|
|
3415
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3416
|
-
},
|
|
3417
|
-
"jest/no-interpolation-in-snapshots": {
|
|
3418
|
-
severity: "off",
|
|
3419
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3420
|
-
},
|
|
3421
|
-
"jest/no-jasmine-globals": "error",
|
|
3422
|
-
"jest/no-mocks-import": {
|
|
3423
|
-
severity: "off",
|
|
3424
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3425
|
-
},
|
|
3426
|
-
"jest/no-standalone-expect": {
|
|
3427
|
-
severity: "off",
|
|
3428
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3429
|
-
},
|
|
3430
|
-
"jest/no-test-prefixes": {
|
|
3431
|
-
severity: "off",
|
|
3432
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3433
|
-
},
|
|
3434
|
-
"jest/prefer-to-be": {
|
|
3435
|
-
severity: "off",
|
|
3436
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3437
|
-
},
|
|
3438
|
-
"jest/prefer-to-contain": {
|
|
3439
|
-
severity: "off",
|
|
3440
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3441
|
-
},
|
|
3442
|
-
"jest/prefer-to-have-length": {
|
|
3443
|
-
severity: "off",
|
|
3444
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3445
|
-
},
|
|
3446
|
-
"jest/valid-describe-callback": {
|
|
3447
|
-
severity: "off",
|
|
3448
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3449
|
-
},
|
|
3450
|
-
"jest/valid-expect": {
|
|
3451
|
-
severity: "off",
|
|
3452
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3453
|
-
},
|
|
3454
|
-
"jest/valid-expect-in-promise": {
|
|
3455
|
-
severity: "off",
|
|
3456
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3457
|
-
},
|
|
3458
|
-
"jest/valid-title": {
|
|
3459
|
-
severity: "off",
|
|
3460
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
3461
|
-
},
|
|
3462
|
-
"no-async-promise-executor": "error",
|
|
3463
|
-
"no-barrel-files/no-barrel-files": {
|
|
3464
|
-
severity: "off",
|
|
3465
|
-
reason: "nest modules use barrel index.ts files as a deliberate structural pattern; the rule fired 127 times and every one was the architecture working as intended"
|
|
3466
|
-
},
|
|
3467
|
-
"no-case-declarations": "error",
|
|
3468
|
-
"no-compare-neg-zero": "error",
|
|
3469
|
-
"no-cond-assign": ["error", "except-parens"],
|
|
3470
|
-
"no-console": {
|
|
3471
|
-
severity: "warn",
|
|
3472
|
-
reason: "61 pre-existing violation(s) across network, db-client-management and others, and they were never reported: the nx eslint target matched a couple of files per module (2 of 2888 on bff-admin), so the rule was configured and not enforced. Held at warn so adoption stays a lateral move rather than turning green modules red for code that predates it; the debt stays visible and countable via `--run --lint --json` and `--inspect`, and the severity is restored once it reaches zero.",
|
|
3473
|
-
options: [
|
|
3474
|
-
{
|
|
3475
|
-
allow: ["warn", "error"]
|
|
3476
|
-
}
|
|
3477
|
-
]
|
|
3478
|
-
},
|
|
3479
|
-
"no-constant-binary-expression": "error",
|
|
3480
|
-
"no-constant-condition": [
|
|
3481
|
-
"error",
|
|
3482
|
-
{
|
|
3483
|
-
checkLoops: "allExceptWhileTrue"
|
|
3484
|
-
}
|
|
3485
|
-
],
|
|
3486
|
-
"no-control-regex": {
|
|
3487
|
-
severity: "off",
|
|
3488
|
-
reason: "the single occurrence is a regex whose whole purpose is stripping ASCII control characters before XML output, which the rule cannot distinguish from an accident"
|
|
3489
|
-
},
|
|
3490
|
-
"no-debugger": "error",
|
|
3491
|
-
"no-delete-var": "error",
|
|
3492
|
-
"no-dupe-else-if": "error",
|
|
3493
|
-
"no-dupe-keys": "error",
|
|
3494
|
-
"no-duplicate-case": "error",
|
|
3495
|
-
"no-else-return": [
|
|
3496
|
-
"error",
|
|
3497
|
-
{
|
|
3498
|
-
allowElseIf: true
|
|
3499
|
-
}
|
|
3500
|
-
],
|
|
3501
|
-
"no-empty": [
|
|
3502
|
-
"error",
|
|
3503
|
-
{
|
|
3504
|
-
allowEmptyCatch: false
|
|
3505
|
-
}
|
|
3506
|
-
],
|
|
3507
|
-
"no-empty-character-class": "error",
|
|
3508
|
-
"no-empty-pattern": [
|
|
3509
|
-
"error",
|
|
3510
|
-
{
|
|
3511
|
-
allowObjectPatternsAsParameters: false
|
|
3512
|
-
}
|
|
3513
|
-
],
|
|
3514
|
-
"no-empty-static-block": "error",
|
|
3515
|
-
"no-ex-assign": "error",
|
|
3516
|
-
"no-extra-boolean-cast": ["error", {}],
|
|
3517
|
-
"no-fallthrough": [
|
|
3518
|
-
"error",
|
|
3519
|
-
{
|
|
3520
|
-
allowEmptyCase: false,
|
|
3521
|
-
reportUnusedFallthroughComment: false
|
|
3522
|
-
}
|
|
3523
|
-
],
|
|
3524
|
-
"no-global-assign": [
|
|
3525
|
-
"error",
|
|
3526
|
-
{
|
|
3527
|
-
exceptions: []
|
|
3528
|
-
}
|
|
3529
|
-
],
|
|
3530
|
-
"no-implicit-coercion": [
|
|
3531
|
-
"error",
|
|
3532
|
-
{
|
|
3533
|
-
allow: [],
|
|
3534
|
-
boolean: true,
|
|
3535
|
-
disallowTemplateShorthand: false,
|
|
3536
|
-
number: true,
|
|
3537
|
-
string: true
|
|
3538
|
-
}
|
|
3539
|
-
],
|
|
3540
|
-
"no-invalid-regexp": ["error", {}],
|
|
3541
|
-
"no-irregular-whitespace": [
|
|
3542
|
-
"error",
|
|
3543
|
-
{
|
|
3544
|
-
skipComments: false,
|
|
3545
|
-
skipJSXText: false,
|
|
3546
|
-
skipRegExps: false,
|
|
3547
|
-
skipStrings: true,
|
|
3548
|
-
skipTemplates: false
|
|
3549
|
-
}
|
|
3550
|
-
],
|
|
3551
|
-
"no-lonely-if": "error",
|
|
3552
|
-
"no-loss-of-precision": "error",
|
|
3553
|
-
"no-misleading-character-class": "error",
|
|
3554
|
-
"no-nonoctal-decimal-escape": "error",
|
|
3555
|
-
"no-prototype-builtins": "error",
|
|
3556
|
-
"no-regex-spaces": "error",
|
|
3557
|
-
"no-restricted-imports": [
|
|
3558
|
-
"error",
|
|
3559
|
-
{
|
|
3560
|
-
paths: [
|
|
3561
|
-
{
|
|
3562
|
-
name: "@front/theme",
|
|
3563
|
-
importNames: [
|
|
3564
|
-
"hubloTheme",
|
|
3565
|
-
"legacyHubloTheme",
|
|
3566
|
-
"customCommonColors",
|
|
3567
|
-
"customPalette",
|
|
3568
|
-
"breakpointsOptions",
|
|
3569
|
-
"breakpointsValues",
|
|
3570
|
-
"spacingConstants"
|
|
3571
|
-
],
|
|
3572
|
-
message: "Use the MUI theme context or the public providers exposed by @front/theme."
|
|
3573
|
-
}
|
|
3574
|
-
],
|
|
3575
|
-
patterns: [
|
|
3576
|
-
{
|
|
3577
|
-
group: ["@front/theme/*", "!@front/theme/testing"],
|
|
3578
|
-
message: "Deep imports from @front/theme are forbidden outside the theme lib."
|
|
3579
|
-
}
|
|
3580
|
-
]
|
|
3581
|
-
}
|
|
3582
|
-
],
|
|
3583
|
-
"no-self-assign": [
|
|
3584
|
-
"error",
|
|
3585
|
-
{
|
|
3586
|
-
props: true
|
|
3587
|
-
}
|
|
3588
|
-
],
|
|
3589
|
-
"no-shadow-restricted-names": [
|
|
3590
|
-
"error",
|
|
3591
|
-
{
|
|
3592
|
-
reportGlobalThis: false
|
|
3593
|
-
}
|
|
3594
|
-
],
|
|
3595
|
-
"no-sparse-arrays": "error",
|
|
3596
|
-
"no-unneeded-ternary": [
|
|
3597
|
-
"error",
|
|
3598
|
-
{
|
|
3599
|
-
defaultAssignment: true
|
|
3600
|
-
}
|
|
3601
|
-
],
|
|
3602
|
-
"no-unsafe-finally": "error",
|
|
3603
|
-
"no-unsafe-optional-chaining": {
|
|
3604
|
-
severity: "warn",
|
|
3605
|
-
reason: "7 pre-existing violation(s) across the db-* libs, and they were never reported: the nx eslint target matched a couple of files per module (2 of 2888 on bff-admin), so the rule was configured and not enforced. Held at warn so adoption stays a lateral move rather than turning green modules red for code that predates it; the debt stays visible and countable via `--run --lint --json` and `--inspect`, and the severity is restored once it reaches zero.",
|
|
3606
|
-
options: [
|
|
3607
|
-
{
|
|
3608
|
-
disallowArithmeticOperators: false
|
|
3609
|
-
}
|
|
3610
|
-
]
|
|
3611
|
-
},
|
|
3612
|
-
"no-unused-labels": "error",
|
|
3613
|
-
"no-unused-private-class-members": "error",
|
|
3614
|
-
"no-useless-backreference": "error",
|
|
3615
|
-
"no-useless-catch": "error",
|
|
3616
|
-
"no-useless-escape": [
|
|
3617
|
-
"error",
|
|
3618
|
-
{
|
|
3619
|
-
allowRegexCharacters: []
|
|
3620
|
-
}
|
|
3621
|
-
],
|
|
3622
|
-
"no-useless-return": "error",
|
|
3623
|
-
"nx/enforce-module-boundaries": [
|
|
3624
|
-
"error",
|
|
3625
|
-
{
|
|
3626
|
-
enforceBuildableLibDependency: true,
|
|
3627
|
-
allow: [],
|
|
3628
|
-
depConstraints: [
|
|
3629
|
-
{
|
|
3630
|
-
sourceTag: "*",
|
|
3631
|
-
onlyDependOnLibsWithTags: ["*"]
|
|
3632
|
-
}
|
|
3633
|
-
]
|
|
3634
|
-
}
|
|
3635
|
-
],
|
|
3636
|
-
"prefer-arrow-callback": [
|
|
3637
|
-
"error",
|
|
3638
|
-
{
|
|
3639
|
-
allowNamedFunctions: false,
|
|
3640
|
-
allowUnboundThis: true
|
|
3641
|
-
}
|
|
3642
|
-
],
|
|
3643
|
-
"require-yield": "error",
|
|
3644
|
-
"typescript/await-thenable": "error",
|
|
3645
|
-
"typescript/no-confusing-non-null-assertion": "error",
|
|
3646
|
-
"typescript/no-empty-function": {
|
|
3647
|
-
severity: "warn",
|
|
3648
|
-
reason: "pre-existing violations that were never reported: the nx eslint target matched a couple of files per module (2 of 2888 on bff-admin), so the rule was configured and not enforced. Held at warn so adoption stays a lateral move rather than turning green modules red for code that predates it; the debt stays visible and countable via `--run --lint --json` and `--inspect`, and the severity is restored once it reaches zero.",
|
|
3649
|
-
options: [
|
|
3650
|
-
{
|
|
3651
|
-
allow: []
|
|
3652
|
-
}
|
|
3653
|
-
]
|
|
3654
|
-
},
|
|
3655
|
-
"typescript/no-explicit-any": "error",
|
|
3656
|
-
"typescript/no-floating-promises": [
|
|
3657
|
-
"error",
|
|
3658
|
-
{
|
|
3659
|
-
ignoreVoid: true
|
|
3660
|
-
}
|
|
3661
|
-
],
|
|
3662
|
-
"typescript/no-import-type-side-effects": "error",
|
|
3663
|
-
"typescript/no-inferrable-types": "error",
|
|
3664
|
-
"typescript/no-non-null-assertion": "error",
|
|
3665
|
-
"typescript/no-unused-vars": {
|
|
3666
|
-
severity: "warn",
|
|
3667
|
-
reason: "pre-existing violations that were never reported: the nx eslint target matched a couple of files per module (2 of 2888 on bff-admin), so the rule was configured and not enforced. Held at warn so adoption stays a lateral move rather than turning green modules red for code that predates it; the debt stays visible and countable via `--run --lint --json` and `--inspect`, and the severity is restored once it reaches zero.",
|
|
3668
|
-
options: [
|
|
3669
|
-
{
|
|
3670
|
-
argsIgnorePattern: "^_",
|
|
3671
|
-
caughtErrors: "none"
|
|
3672
|
-
}
|
|
3673
|
-
]
|
|
3674
|
-
},
|
|
3675
|
-
"typescript/return-await": {
|
|
3676
|
-
severity: "warn",
|
|
3677
|
-
reason: "replaces the deprecated core `no-return-await`, which both modules set to error but which was never actually reporting: the nx lint target expanded to 2 files of 2888. `in-try-catch` rather than `never`, and the planning adoption is what settled it. `never` forces `return await f()` to become `const x = await f(); return x` even inside a `try`, where the await is REQUIRED for the catch to fire: it produced 10 such edits across 15 modules, every one of them inside a try/catch, and every one of them a rewrite that made the code longer without making it safer. Worse, the obvious reading of the rule is to delete the `await`, which silently stops the catch from running. `in-try-catch` is what typescript-eslint recommends and flags none of those 10. Held at warn so adoption does not turn a green module red, and raised to error once the remaining findings are fixed.",
|
|
3678
|
-
options: ["in-try-catch"]
|
|
3679
|
-
},
|
|
3680
|
-
"typescript/switch-exhaustiveness-check": [
|
|
3681
|
-
"error",
|
|
3682
|
-
{
|
|
3683
|
-
considerDefaultExhaustiveForUnions: true
|
|
3684
|
-
}
|
|
3685
|
-
],
|
|
3686
|
-
"use-isnan": [
|
|
3687
|
-
"error",
|
|
3688
|
-
{
|
|
3689
|
-
enforceForIndexOf: false,
|
|
3690
|
-
enforceForSwitchCase: true
|
|
3691
|
-
}
|
|
3692
|
-
],
|
|
3693
|
-
"valid-typeof": [
|
|
3694
|
-
"error",
|
|
3695
|
-
{
|
|
3696
|
-
requireStringLiterals: false
|
|
3697
|
-
}
|
|
3698
|
-
],
|
|
3699
|
-
"vitest/expect-expect": {
|
|
3700
|
-
severity: "warn",
|
|
3701
|
-
reason: "the modules already ran this at warn (confirmed in the bff-admin proof-of-concept config); adoption is like-for-like, so raising it to error is a separate decision"
|
|
3702
|
-
},
|
|
3703
|
-
"vitest/no-alias-methods": "error",
|
|
3704
|
-
"vitest/no-commented-out-tests": {
|
|
3705
|
-
severity: "warn",
|
|
3706
|
-
reason: "the modules already ran this at warn (confirmed in the bff-admin proof-of-concept config); adoption is like-for-like, so raising it to error is a separate decision"
|
|
3707
|
-
},
|
|
3708
|
-
"vitest/no-conditional-expect": {
|
|
3709
|
-
severity: "warn",
|
|
3710
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
3711
|
-
},
|
|
3712
|
-
"vitest/no-disabled-tests": {
|
|
3713
|
-
severity: "warn",
|
|
3714
|
-
reason: "the modules already ran this at warn (confirmed in the bff-admin proof-of-concept config); a skipped test is a deliberate act often paired with a ticket, so it reports rather than blocks"
|
|
3715
|
-
},
|
|
3716
|
-
"vitest/no-focused-tests": "error",
|
|
3717
|
-
"vitest/no-identical-title": "error",
|
|
3718
|
-
"vitest/no-interpolation-in-snapshots": "error",
|
|
3719
|
-
"vitest/no-mocks-import": "error",
|
|
3720
|
-
"vitest/no-standalone-expect": "error",
|
|
3721
|
-
"vitest/no-test-prefixes": "error",
|
|
3722
|
-
"vitest/prefer-to-be": "error",
|
|
3723
|
-
"vitest/prefer-to-contain": "error",
|
|
3724
|
-
"vitest/prefer-to-have-length": "error",
|
|
3725
|
-
"vitest/require-mock-type-parameters": {
|
|
3726
|
-
severity: "off",
|
|
3727
|
-
reason: "4 479 of the 5 255 findings this plugin reports over this repository, 85% of them. It asks for type parameters on vi.fn<\u2026>(), a convention this codebase never had; adopting it is its own piece of work and not part of reading the right plugin"
|
|
3728
|
-
},
|
|
3729
|
-
"vitest/require-to-throw-message": {
|
|
3730
|
-
severity: "warn",
|
|
3731
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
3732
|
-
},
|
|
3733
|
-
"vitest/valid-describe-callback": "error",
|
|
3734
|
-
"vitest/valid-expect": {
|
|
3735
|
-
severity: "warn",
|
|
3736
|
-
reason: "1 pre-existing violation(s) across bdd-tooling, and they were never reported: the nx eslint target matched a couple of files per module (2 of 2888 on bff-admin), so the rule was configured and not enforced. Held at warn so adoption stays a lateral move rather than turning green modules red for code that predates it; the debt stays visible and countable via `--run --lint --json` and `--inspect`, and the severity is restored once it reaches zero."
|
|
3737
|
-
},
|
|
3738
|
-
"vitest/valid-expect-in-promise": "error",
|
|
3739
|
-
"vitest/valid-title": "error",
|
|
3740
|
-
"vitest/warn-todo": {
|
|
3741
|
-
severity: "warn",
|
|
3742
|
-
reason: "a todo test is a reminder rather than a defect, so it reports and never blocks"
|
|
3743
|
-
}
|
|
3744
|
-
},
|
|
3745
|
-
uncovered: {
|
|
3746
|
-
"array-bracket-newline": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
|
|
3747
|
-
"array-bracket-spacing": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
|
|
3748
|
-
"block-spacing": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
|
|
3749
|
-
"computed-property-spacing": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
|
|
3750
|
-
"dot-location": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
|
|
3751
|
-
"eol-last": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
|
|
3752
|
-
"func-call-spacing": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
|
|
3753
|
-
"import/order": "import ordering is FORMATTING, and the format role owns it: oxfmt's `sortImports` reproduces exactly these groups (builtin, external, internal, parent/index, sibling, alphabetical, blank line between) and sorts a file completely in ONE pass, because it rewrites the whole import block. A lint fixer cannot: it emits text edits over overlapping ranges, so this rule needed several runs to finish (five imports took four passes, measured) and sentinel deliberately runs autofix once. Enforced by `pnpm run format`, not by the linter, which is also why `eslint-plugin-import` is no longer hosted at all: its only other rule, no-duplicates, is native in oxlint.",
|
|
3754
|
-
"key-spacing": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
|
|
3755
|
-
"keyword-spacing": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
|
|
3756
|
-
"lines-between-class-members": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
|
|
3757
|
-
"no-invalid-this": "no oxlint equivalent, and hosting does not help: the rule crashes on every file under oxlint's plugin API (sourceCode.getJSDocComment is not implemented). Its coverage moves to TypeScript's noImplicitThis, which the sentinel TypeScript role manages.",
|
|
3758
|
-
"no-multi-spaces": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
|
|
3759
|
-
"no-octal": "no oxlint equivalent",
|
|
3760
|
-
"no-restricted-syntax": "no oxlint equivalent, and unlike the react tier this preset hosts no house-rule plugin, so architectural guards written as AST selectors are not enforced at all. They belong in sentinel's `hublo` plugin, next to the frontend ones: tell us which guards your service relies on. A per-module copy of a house rule drifts, which is the problem sentinel exists to remove.",
|
|
3761
|
-
"no-trailing-spaces": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
|
|
3762
|
-
semi: "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
|
|
3763
|
-
"template-curly-spacing": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
|
|
3764
|
-
"typescript/member-ordering": "oxlint has no native rule for it, and the preset deliberately does NOT host @typescript-eslint/eslint-plugin: hosting a whole plugin for one rule costs a dependency, a load step and a pass over every file. Accepted as a loss rather than paid for, the same call as no-octal."
|
|
3765
|
-
},
|
|
3766
|
-
overrides: [
|
|
3767
|
-
{
|
|
3768
|
-
files: [
|
|
3769
|
-
"**/*.test.ts",
|
|
3770
|
-
"**/*.test.tsx",
|
|
3771
|
-
"**/*.spec.ts",
|
|
3772
|
-
"**/*.spec.tsx",
|
|
3773
|
-
"**/*.integration-spec.ts",
|
|
3774
|
-
"**/*.e2e-spec.ts"
|
|
3775
|
-
],
|
|
3776
|
-
rules: {
|
|
3777
|
-
"no-restricted-properties": {
|
|
3778
|
-
severity: "warn",
|
|
3779
|
-
reason: "held at warn: over the 8 011 test files, 7 call Math.random(), 104 call Date.now(), 3 crypto.randomUUID(), 1 performance.now() and 1 process.hrtime, and 28 of the files that read the clock already install fake timers. A warning says it without turning a suite that was green yesterday red. Verified at error on a fixture carrying all nine forms: these six are reported, new Date('2026-01-01') is not, which is the point",
|
|
3780
|
-
options: [
|
|
3781
|
-
{
|
|
3782
|
-
object: "Math",
|
|
3783
|
-
property: "random",
|
|
3784
|
-
message: "No Math.random() in a test: use a deterministic fixture, or stub the random source."
|
|
3785
|
-
},
|
|
3786
|
-
{
|
|
3787
|
-
object: "Date",
|
|
3788
|
-
property: "now",
|
|
3789
|
-
message: "No Date.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
|
|
3790
|
-
},
|
|
3791
|
-
{
|
|
3792
|
-
object: "performance",
|
|
3793
|
-
property: "now",
|
|
3794
|
-
message: "No performance.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
|
|
3795
|
-
},
|
|
3796
|
-
{
|
|
3797
|
-
object: "process",
|
|
3798
|
-
property: "hrtime",
|
|
3799
|
-
message: "No process.hrtime in a test: use vi.useFakeTimers() with vi.setSystemTime()."
|
|
3800
|
-
},
|
|
3801
|
-
{
|
|
3802
|
-
object: "crypto",
|
|
3803
|
-
property: "randomUUID",
|
|
3804
|
-
message: "No crypto.randomUUID() in a test: use a fixed id, or stub the random source."
|
|
3805
|
-
},
|
|
3806
|
-
{
|
|
3807
|
-
object: "crypto",
|
|
3808
|
-
property: "getRandomValues",
|
|
3809
|
-
message: "No crypto.getRandomValues() in a test: use a fixed buffer, or stub the random source."
|
|
3810
|
-
}
|
|
3811
|
-
]
|
|
3812
|
-
},
|
|
3813
|
-
"no-restricted-globals": {
|
|
3814
|
-
severity: "warn",
|
|
3815
|
-
reason: "held at warn: 68 test files call setTimeout and only 2 of them install fake timers, so waiting on the real clock is the second source of flakiness after reading it. The flush idiom await new Promise((resolve) => setTimeout(resolve, 0)) is inside that count and is usually harmless, which is exactly why this reports and never blocks",
|
|
3816
|
-
options: [
|
|
3817
|
-
{
|
|
3818
|
-
name: "setTimeout",
|
|
3819
|
-
message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
|
|
3820
|
-
},
|
|
3821
|
-
{
|
|
3822
|
-
name: "setInterval",
|
|
3823
|
-
message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
|
|
3824
|
-
}
|
|
3825
|
-
]
|
|
3826
|
-
}
|
|
3827
|
-
}
|
|
3828
|
-
}
|
|
3829
|
-
]
|
|
3830
|
-
};
|
|
3831
|
-
|
|
3832
|
-
// src/roles/lint/presets/node.json
|
|
3833
|
-
var node_default = {
|
|
3834
|
-
plugins: ["typescript", "oxc", "vitest"],
|
|
3835
|
-
jsPlugins: [],
|
|
3836
|
-
settings: null,
|
|
3837
|
-
rules: {
|
|
3838
|
-
"typescript/no-unused-expressions": {
|
|
3839
|
-
severity: "warn",
|
|
3840
|
-
reason: "3 pre-existing violations in apps/cloud/institution, never reported because the nx eslint target matched a couple of files per module. Held at warn so adoption stays a lateral move; the debt is visible in `--inspect` and the severity returns once it reaches zero. Parked in the node LAYER rather than the shared base on purpose: the base is the floor every preset stands on, and softening it would weaken presets that have no such debt.",
|
|
3841
|
-
options: [
|
|
3842
|
-
{
|
|
3843
|
-
allowShortCircuit: false,
|
|
3844
|
-
allowTaggedTemplates: false,
|
|
3845
|
-
allowTernary: false
|
|
3846
|
-
}
|
|
3847
|
-
]
|
|
3848
|
-
},
|
|
3849
|
-
"vitest/expect-expect": {
|
|
3850
|
-
severity: "warn",
|
|
3851
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3852
|
-
},
|
|
3853
|
-
"vitest/no-alias-methods": {
|
|
3854
|
-
severity: "warn",
|
|
3855
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3856
|
-
},
|
|
3857
|
-
"vitest/no-commented-out-tests": {
|
|
3858
|
-
severity: "warn",
|
|
3859
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3860
|
-
},
|
|
3861
|
-
"vitest/no-conditional-expect": {
|
|
3862
|
-
severity: "warn",
|
|
3863
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3864
|
-
},
|
|
3865
|
-
"vitest/no-disabled-tests": {
|
|
3866
|
-
severity: "warn",
|
|
3867
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3868
|
-
},
|
|
3869
|
-
"vitest/no-focused-tests": {
|
|
3870
|
-
severity: "warn",
|
|
3871
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3872
|
-
},
|
|
3873
|
-
"vitest/no-identical-title": {
|
|
3874
|
-
severity: "warn",
|
|
3875
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3876
|
-
},
|
|
3877
|
-
"vitest/no-interpolation-in-snapshots": {
|
|
3878
|
-
severity: "warn",
|
|
3879
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3880
|
-
},
|
|
3881
|
-
"vitest/no-mocks-import": {
|
|
3882
|
-
severity: "warn",
|
|
3883
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3884
|
-
},
|
|
3885
|
-
"vitest/no-standalone-expect": {
|
|
3886
|
-
severity: "warn",
|
|
3887
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3888
|
-
},
|
|
3889
|
-
"vitest/no-test-prefixes": {
|
|
3890
|
-
severity: "warn",
|
|
3891
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3892
|
-
},
|
|
3893
|
-
"vitest/prefer-to-be": {
|
|
3894
|
-
severity: "warn",
|
|
3895
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3896
|
-
},
|
|
3897
|
-
"vitest/prefer-to-contain": {
|
|
3898
|
-
severity: "warn",
|
|
3899
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3900
|
-
},
|
|
3901
|
-
"vitest/prefer-to-have-length": {
|
|
3902
|
-
severity: "warn",
|
|
3903
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3904
|
-
},
|
|
3905
|
-
"vitest/require-mock-type-parameters": {
|
|
3906
|
-
severity: "off",
|
|
3907
|
-
reason: "4 479 of the 5 255 findings this plugin reports over this repository, 85% of them. It asks for type parameters on vi.fn<\u2026>(), a convention this codebase never had; adopting it is its own piece of work and not part of reading the right plugin"
|
|
3908
|
-
},
|
|
3909
|
-
"vitest/require-to-throw-message": {
|
|
3910
|
-
severity: "warn",
|
|
3911
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3912
|
-
},
|
|
3913
|
-
"vitest/valid-describe-callback": {
|
|
3914
|
-
severity: "warn",
|
|
3915
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3916
|
-
},
|
|
3917
|
-
"vitest/valid-expect": {
|
|
3918
|
-
severity: "warn",
|
|
3919
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3920
|
-
},
|
|
3921
|
-
"vitest/valid-expect-in-promise": {
|
|
3922
|
-
severity: "warn",
|
|
3923
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3924
|
-
},
|
|
3925
|
-
"vitest/valid-title": {
|
|
3926
|
-
severity: "warn",
|
|
3927
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3928
|
-
},
|
|
3929
|
-
"vitest/warn-todo": {
|
|
3930
|
-
severity: "warn",
|
|
3931
|
-
reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
|
|
3932
|
-
}
|
|
3933
|
-
},
|
|
3934
|
-
overrides: [
|
|
3935
|
-
{
|
|
3936
|
-
files: [
|
|
3937
|
-
"**/*.test.ts",
|
|
3938
|
-
"**/*.test.tsx",
|
|
3939
|
-
"**/*.spec.ts",
|
|
3940
|
-
"**/*.spec.tsx",
|
|
3941
|
-
"**/*.integration-spec.ts",
|
|
3942
|
-
"**/*.e2e-spec.ts"
|
|
3943
|
-
],
|
|
3944
|
-
rules: {
|
|
3945
|
-
"no-restricted-properties": {
|
|
3946
|
-
severity: "warn",
|
|
3947
|
-
reason: "held at warn: over the 8 011 test files, 7 call Math.random(), 104 call Date.now(), 3 crypto.randomUUID(), 1 performance.now() and 1 process.hrtime, and 28 of the files that read the clock already install fake timers. A warning says it without turning a suite that was green yesterday red. Verified at error on a fixture carrying all nine forms: these six are reported, new Date('2026-01-01') is not, which is the point",
|
|
3948
|
-
options: [
|
|
3949
|
-
{
|
|
3950
|
-
object: "Math",
|
|
3951
|
-
property: "random",
|
|
3952
|
-
message: "No Math.random() in a test: use a deterministic fixture, or stub the random source."
|
|
3953
|
-
},
|
|
3954
|
-
{
|
|
3955
|
-
object: "Date",
|
|
3956
|
-
property: "now",
|
|
3957
|
-
message: "No Date.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
|
|
3958
|
-
},
|
|
3959
|
-
{
|
|
3960
|
-
object: "performance",
|
|
3961
|
-
property: "now",
|
|
3962
|
-
message: "No performance.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
|
|
3963
|
-
},
|
|
3964
|
-
{
|
|
3965
|
-
object: "process",
|
|
3966
|
-
property: "hrtime",
|
|
3967
|
-
message: "No process.hrtime in a test: use vi.useFakeTimers() with vi.setSystemTime()."
|
|
3968
|
-
},
|
|
3969
|
-
{
|
|
3970
|
-
object: "crypto",
|
|
3971
|
-
property: "randomUUID",
|
|
3972
|
-
message: "No crypto.randomUUID() in a test: use a fixed id, or stub the random source."
|
|
3973
|
-
},
|
|
3974
|
-
{
|
|
3975
|
-
object: "crypto",
|
|
3976
|
-
property: "getRandomValues",
|
|
3977
|
-
message: "No crypto.getRandomValues() in a test: use a fixed buffer, or stub the random source."
|
|
3978
|
-
}
|
|
3979
|
-
]
|
|
3980
|
-
},
|
|
3981
|
-
"no-restricted-globals": {
|
|
3982
|
-
severity: "warn",
|
|
3983
|
-
reason: "held at warn: 68 test files call setTimeout and only 2 of them install fake timers, so waiting on the real clock is the second source of flakiness after reading it. The flush idiom await new Promise((resolve) => setTimeout(resolve, 0)) is inside that count and is usually harmless, which is exactly why this reports and never blocks",
|
|
3984
|
-
options: [
|
|
3985
|
-
{
|
|
3986
|
-
name: "setTimeout",
|
|
3987
|
-
message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
|
|
3988
|
-
},
|
|
3989
|
-
{
|
|
3990
|
-
name: "setInterval",
|
|
3991
|
-
message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
|
|
3992
|
-
}
|
|
3993
|
-
]
|
|
3994
|
-
}
|
|
3995
|
-
}
|
|
3996
|
-
}
|
|
3997
|
-
]
|
|
3998
|
-
};
|
|
3999
|
-
|
|
4000
|
-
// src/roles/lint/presets/react-lib.json
|
|
4001
|
-
var react_lib_default = {
|
|
4002
|
-
plugins: ["typescript", "react", "jsx-a11y", "jest", "vitest", "unicorn", "oxc", "nextjs"],
|
|
4003
|
-
jsPlugins: [
|
|
4004
|
-
"eslint-plugin-no-barrel-files",
|
|
4005
|
-
{
|
|
4006
|
-
name: "nx",
|
|
4007
|
-
specifier: "@nx/eslint-plugin"
|
|
4008
|
-
},
|
|
4009
|
-
{
|
|
4010
|
-
name: "jest-dom",
|
|
4011
|
-
specifier: "eslint-plugin-jest-dom"
|
|
4012
|
-
},
|
|
4013
|
-
{
|
|
4014
|
-
name: "storybook",
|
|
4015
|
-
specifier: "eslint-plugin-storybook"
|
|
4016
|
-
},
|
|
4017
|
-
"../plugins/hublo.js",
|
|
4018
|
-
{
|
|
4019
|
-
name: "@tanstack/query",
|
|
4020
|
-
specifier: "@tanstack/eslint-plugin-query"
|
|
4021
|
-
}
|
|
4022
|
-
],
|
|
4023
|
-
settings: null,
|
|
4024
|
-
renames: {
|
|
4025
|
-
"@next/next": "nextjs"
|
|
4026
|
-
},
|
|
4027
|
-
rules: {
|
|
4028
|
-
"@tanstack/query/exhaustive-deps": {
|
|
4029
|
-
severity: "warn",
|
|
4030
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4031
|
-
},
|
|
4032
|
-
"@tanstack/query/infinite-query-property-order": {
|
|
4033
|
-
severity: "warn",
|
|
4034
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4035
|
-
},
|
|
4036
|
-
"@tanstack/query/mutation-property-order": {
|
|
4037
|
-
severity: "warn",
|
|
4038
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4039
|
-
},
|
|
4040
|
-
"@tanstack/query/no-rest-destructuring": {
|
|
4041
|
-
severity: "warn",
|
|
4042
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4043
|
-
},
|
|
4044
|
-
"@tanstack/query/no-unstable-deps": {
|
|
4045
|
-
severity: "warn",
|
|
4046
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4047
|
-
},
|
|
4048
|
-
"@tanstack/query/no-void-query-fn": {
|
|
4049
|
-
severity: "warn",
|
|
4050
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4051
|
-
},
|
|
4052
|
-
"@tanstack/query/prefer-query-options": {
|
|
4053
|
-
severity: "warn",
|
|
4054
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4055
|
-
},
|
|
4056
|
-
"@tanstack/query/stable-query-client": {
|
|
4057
|
-
severity: "warn",
|
|
4058
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4059
|
-
},
|
|
4060
|
-
curly: ["error", "all"],
|
|
4061
|
-
"for-direction": "error",
|
|
4062
|
-
"hublo/no-regex-lookbehind": "error",
|
|
4063
|
-
"jest-dom/prefer-checked": "error",
|
|
4064
|
-
"jest-dom/prefer-empty": "error",
|
|
4065
|
-
"jest-dom/prefer-enabled-disabled": "error",
|
|
4066
|
-
"jest-dom/prefer-focus": "error",
|
|
4067
|
-
"jest-dom/prefer-in-document": "error",
|
|
4068
|
-
"jest-dom/prefer-required": "error",
|
|
4069
|
-
"jest-dom/prefer-to-have-attribute": "error",
|
|
4070
|
-
"jest-dom/prefer-to-have-class": "error",
|
|
4071
|
-
"jest-dom/prefer-to-have-style": "error",
|
|
4072
|
-
"jest-dom/prefer-to-have-text-content": "error",
|
|
4073
|
-
"jest-dom/prefer-to-have-value": "error",
|
|
4074
|
-
"jest/expect-expect": {
|
|
4075
|
-
severity: "off",
|
|
4076
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4077
|
-
},
|
|
4078
|
-
"jest/no-alias-methods": {
|
|
4079
|
-
severity: "off",
|
|
4080
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4081
|
-
},
|
|
4082
|
-
"jest/no-commented-out-tests": {
|
|
4083
|
-
severity: "off",
|
|
4084
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4085
|
-
},
|
|
4086
|
-
"jest/no-conditional-expect": {
|
|
4087
|
-
severity: "off",
|
|
4088
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4089
|
-
},
|
|
4090
|
-
"jest/no-deprecated-functions": "error",
|
|
4091
|
-
"jest/no-disabled-tests": {
|
|
4092
|
-
severity: "off",
|
|
4093
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4094
|
-
},
|
|
4095
|
-
"jest/no-done-callback": "error",
|
|
4096
|
-
"jest/no-export": "error",
|
|
4097
|
-
"jest/no-focused-tests": {
|
|
4098
|
-
severity: "off",
|
|
4099
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4100
|
-
},
|
|
4101
|
-
"jest/no-identical-title": {
|
|
4102
|
-
severity: "off",
|
|
4103
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4104
|
-
},
|
|
4105
|
-
"jest/no-interpolation-in-snapshots": {
|
|
4106
|
-
severity: "off",
|
|
4107
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4108
|
-
},
|
|
4109
|
-
"jest/no-jasmine-globals": "error",
|
|
4110
|
-
"jest/no-mocks-import": {
|
|
4111
|
-
severity: "off",
|
|
4112
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4113
|
-
},
|
|
4114
|
-
"jest/no-standalone-expect": {
|
|
4115
|
-
severity: "off",
|
|
4116
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4117
|
-
},
|
|
4118
|
-
"jest/no-test-prefixes": {
|
|
4119
|
-
severity: "off",
|
|
4120
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4121
|
-
},
|
|
4122
|
-
"jest/prefer-to-be": {
|
|
4123
|
-
severity: "off",
|
|
4124
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4125
|
-
},
|
|
4126
|
-
"jest/prefer-to-contain": {
|
|
4127
|
-
severity: "off",
|
|
4128
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4129
|
-
},
|
|
4130
|
-
"jest/prefer-to-have-length": {
|
|
4131
|
-
severity: "off",
|
|
4132
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4133
|
-
},
|
|
4134
|
-
"jest/valid-describe-callback": {
|
|
4135
|
-
severity: "off",
|
|
4136
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4137
|
-
},
|
|
4138
|
-
"jest/valid-expect": {
|
|
4139
|
-
severity: "off",
|
|
4140
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4141
|
-
},
|
|
4142
|
-
"jest/valid-expect-in-promise": {
|
|
4143
|
-
severity: "off",
|
|
4144
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4145
|
-
},
|
|
4146
|
-
"jest/valid-title": {
|
|
4147
|
-
severity: "off",
|
|
4148
|
-
reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
|
|
4149
|
-
},
|
|
4150
|
-
"jsx-a11y/anchor-is-valid": [
|
|
4151
|
-
"error",
|
|
4152
|
-
{
|
|
4153
|
-
components: ["Link"],
|
|
4154
|
-
specialLink: ["hrefLeft", "hrefRight"],
|
|
4155
|
-
aspects: ["invalidHref", "preferButton"]
|
|
4156
|
-
}
|
|
4157
|
-
],
|
|
4158
|
-
"nextjs/google-font-display": {
|
|
4159
|
-
severity: "warn",
|
|
4160
|
-
reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
|
|
4161
|
-
},
|
|
4162
|
-
"nextjs/google-font-preconnect": {
|
|
4163
|
-
severity: "warn",
|
|
4164
|
-
reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
|
|
4165
|
-
},
|
|
4166
|
-
"nextjs/inline-script-id": "error",
|
|
4167
|
-
"nextjs/next-script-for-ga": {
|
|
4168
|
-
severity: "warn",
|
|
4169
|
-
reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
|
|
4170
|
-
},
|
|
4171
|
-
"nextjs/no-assign-module-variable": "error",
|
|
4172
|
-
"nextjs/no-async-client-component": {
|
|
4173
|
-
severity: "warn",
|
|
4174
|
-
reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
|
|
4175
|
-
},
|
|
4176
|
-
"nextjs/no-before-interactive-script-outside-document": {
|
|
4177
|
-
severity: "warn",
|
|
4178
|
-
reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
|
|
4179
|
-
},
|
|
4180
|
-
"nextjs/no-css-tags": {
|
|
4181
|
-
severity: "warn",
|
|
4182
|
-
reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
|
|
4183
|
-
},
|
|
4184
|
-
"nextjs/no-document-import-in-page": "error",
|
|
4185
|
-
"nextjs/no-duplicate-head": "error",
|
|
4186
|
-
"nextjs/no-head-element": {
|
|
4187
|
-
severity: "warn",
|
|
4188
|
-
reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
|
|
4189
|
-
},
|
|
4190
|
-
"nextjs/no-head-import-in-document": "error",
|
|
4191
|
-
"nextjs/no-html-link-for-pages": "error",
|
|
4192
|
-
"nextjs/no-img-element": {
|
|
4193
|
-
severity: "warn",
|
|
4194
|
-
reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
|
|
4195
|
-
},
|
|
4196
|
-
"nextjs/no-page-custom-font": {
|
|
4197
|
-
severity: "warn",
|
|
4198
|
-
reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
|
|
4199
|
-
},
|
|
4200
|
-
"nextjs/no-script-component-in-head": "error",
|
|
4201
|
-
"nextjs/no-styled-jsx-in-document": {
|
|
4202
|
-
severity: "warn",
|
|
4203
|
-
reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
|
|
4204
|
-
},
|
|
4205
|
-
"nextjs/no-sync-scripts": "error",
|
|
4206
|
-
"nextjs/no-title-in-document-head": {
|
|
4207
|
-
severity: "warn",
|
|
4208
|
-
reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
|
|
4209
|
-
},
|
|
4210
|
-
"nextjs/no-typos": {
|
|
4211
|
-
severity: "warn",
|
|
4212
|
-
reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
|
|
4213
|
-
},
|
|
4214
|
-
"nextjs/no-unwanted-polyfillio": {
|
|
4215
|
-
severity: "warn",
|
|
4216
|
-
reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
|
|
4217
|
-
},
|
|
4218
|
-
"no-async-promise-executor": "error",
|
|
4219
|
-
"no-barrel-files/no-barrel-files": {
|
|
4220
|
-
severity: "warn",
|
|
4221
|
-
reason: "the front libs already run this at warn today (read with `eslint --print-config`), so keeping it there is a like-for-like migration. Raising it to error would be a NEW enforcement decision, and it needs its own count of violations first."
|
|
4222
|
-
},
|
|
4223
|
-
"no-case-declarations": "error",
|
|
4224
|
-
"no-compare-neg-zero": "error",
|
|
4225
|
-
"no-cond-assign": ["error", "except-parens"],
|
|
4226
|
-
"no-console": {
|
|
4227
|
-
severity: "warn",
|
|
4228
|
-
reason: "53 pre-existing violation(s) across libs/front/analytics, and they were never reported: the nx eslint target matched a couple of files per module (2 of 2888 on bff-admin), so the rule was configured and not enforced. Held at warn so adoption stays a lateral move rather than turning green modules red for code that predates it; the debt stays visible and countable via `--run --lint --json` and `--inspect`, and the severity is restored once it reaches zero.",
|
|
4229
|
-
options: [
|
|
4230
|
-
{
|
|
4231
|
-
allow: ["warn", "error"]
|
|
4232
|
-
}
|
|
4233
|
-
]
|
|
4234
|
-
},
|
|
4235
|
-
"no-constant-binary-expression": "error",
|
|
4236
|
-
"no-constant-condition": [
|
|
4237
|
-
"error",
|
|
4238
|
-
{
|
|
4239
|
-
checkLoops: "allExceptWhileTrue"
|
|
4240
|
-
}
|
|
4241
|
-
],
|
|
4242
|
-
"no-control-regex": "error",
|
|
4243
|
-
"no-debugger": "error",
|
|
4244
|
-
"no-delete-var": "error",
|
|
4245
|
-
"no-dupe-else-if": "error",
|
|
4246
|
-
"no-duplicate-case": "error",
|
|
4247
|
-
"no-empty": [
|
|
4248
|
-
"error",
|
|
4249
|
-
{
|
|
4250
|
-
allowEmptyCatch: false
|
|
4251
|
-
}
|
|
4252
|
-
],
|
|
4253
|
-
"no-empty-character-class": "error",
|
|
4254
|
-
"no-empty-pattern": [
|
|
4255
|
-
"error",
|
|
4256
|
-
{
|
|
4257
|
-
allowObjectPatternsAsParameters: false
|
|
4258
|
-
}
|
|
4259
|
-
],
|
|
4260
|
-
"no-empty-static-block": "error",
|
|
4261
|
-
"no-ex-assign": "error",
|
|
4262
|
-
"no-extra-boolean-cast": ["error", {}],
|
|
4263
|
-
"no-fallthrough": [
|
|
4264
|
-
"error",
|
|
4265
|
-
{
|
|
4266
|
-
allowEmptyCase: false,
|
|
4267
|
-
reportUnusedFallthroughComment: false
|
|
4268
|
-
}
|
|
4269
|
-
],
|
|
4270
|
-
"no-global-assign": [
|
|
4271
|
-
"error",
|
|
4272
|
-
{
|
|
4273
|
-
exceptions: []
|
|
4274
|
-
}
|
|
4275
|
-
],
|
|
4276
|
-
"no-invalid-regexp": ["error", {}],
|
|
4277
|
-
"no-irregular-whitespace": [
|
|
4278
|
-
"error",
|
|
4279
|
-
{
|
|
4280
|
-
skipComments: false,
|
|
4281
|
-
skipJSXText: false,
|
|
4282
|
-
skipRegExps: false,
|
|
4283
|
-
skipStrings: true,
|
|
4284
|
-
skipTemplates: false
|
|
4285
|
-
}
|
|
4286
|
-
],
|
|
4287
|
-
"no-loss-of-precision": "error",
|
|
4288
|
-
"no-misleading-character-class": "error",
|
|
4289
|
-
"no-nonoctal-decimal-escape": "error",
|
|
4290
|
-
"no-prototype-builtins": "error",
|
|
4291
|
-
"no-regex-spaces": "error",
|
|
4292
|
-
"no-restricted-properties": [
|
|
4293
|
-
"error",
|
|
4294
|
-
{
|
|
4295
|
-
object: "i18n",
|
|
4296
|
-
property: "changeLanguage",
|
|
4297
|
-
message: "This does not work in Nextjs. Please use Link or router instead. See https://nextjs.org/docs/advanced-features/i18n-routing#transition-between-locales"
|
|
4298
|
-
}
|
|
4299
|
-
],
|
|
4300
|
-
"no-self-assign": [
|
|
4301
|
-
"error",
|
|
4302
|
-
{
|
|
4303
|
-
props: true
|
|
4304
|
-
}
|
|
4305
|
-
],
|
|
4306
|
-
"no-shadow-restricted-names": [
|
|
4307
|
-
"error",
|
|
4308
|
-
{
|
|
4309
|
-
reportGlobalThis: false
|
|
4310
|
-
}
|
|
4311
|
-
],
|
|
4312
|
-
"no-sparse-arrays": "error",
|
|
4313
|
-
"no-unsafe-finally": "error",
|
|
4314
|
-
"no-unsafe-optional-chaining": [
|
|
4315
|
-
"error",
|
|
4316
|
-
{
|
|
4317
|
-
disallowArithmeticOperators: false
|
|
4318
|
-
}
|
|
4319
|
-
],
|
|
4320
|
-
"no-unused-labels": "error",
|
|
4321
|
-
"no-unused-private-class-members": "error",
|
|
4322
|
-
"no-useless-backreference": "error",
|
|
4323
|
-
"no-useless-catch": "error",
|
|
4324
|
-
"no-useless-escape": [
|
|
4325
|
-
"error",
|
|
4326
|
-
{
|
|
4327
|
-
allowRegexCharacters: []
|
|
4328
|
-
}
|
|
4329
|
-
],
|
|
4330
|
-
"nx/enforce-module-boundaries": [
|
|
4331
|
-
"error",
|
|
4332
|
-
{
|
|
4333
|
-
enforceBuildableLibDependency: true,
|
|
4334
|
-
allow: [],
|
|
4335
|
-
depConstraints: [
|
|
4336
|
-
{
|
|
4337
|
-
sourceTag: "*",
|
|
4338
|
-
onlyDependOnLibsWithTags: ["*"]
|
|
4339
|
-
}
|
|
4340
|
-
]
|
|
4341
|
-
}
|
|
4342
|
-
],
|
|
4343
|
-
"react-hooks/exhaustive-deps": {
|
|
4344
|
-
severity: "warn",
|
|
4345
|
-
reason: "the front libs already run this at warn today (read with `eslint --print-config`), so keeping it there is a like-for-like migration. Raising it to error would be a NEW enforcement decision, and it needs its own count of violations first."
|
|
4346
|
-
},
|
|
4347
|
-
"react-hooks/rules-of-hooks": "error",
|
|
4348
|
-
"react/jsx-curly-brace-presence": {
|
|
4349
|
-
severity: "warn",
|
|
4350
|
-
reason: "the front libs already run this at warn today (read with `eslint --print-config`), so keeping it there is a like-for-like migration. Raising it to error would be a NEW enforcement decision, and it needs its own count of violations first.",
|
|
4351
|
-
options: [
|
|
4352
|
-
{
|
|
4353
|
-
props: "never",
|
|
4354
|
-
children: "never"
|
|
4355
|
-
}
|
|
4356
|
-
]
|
|
4357
|
-
},
|
|
4358
|
-
"react/jsx-no-useless-fragment": [
|
|
4359
|
-
"error",
|
|
4360
|
-
{
|
|
4361
|
-
allowExpressions: true
|
|
4362
|
-
}
|
|
4363
|
-
],
|
|
4364
|
-
"require-yield": "error",
|
|
4365
|
-
"typescript/consistent-type-imports": [
|
|
4366
|
-
"error",
|
|
4367
|
-
{
|
|
4368
|
-
fixStyle: "inline-type-imports"
|
|
4369
|
-
}
|
|
4370
|
-
],
|
|
4371
|
-
"typescript/no-empty-function": [
|
|
4372
|
-
"error",
|
|
4373
|
-
{
|
|
4374
|
-
allow: []
|
|
4375
|
-
}
|
|
4376
|
-
],
|
|
4377
|
-
"typescript/no-explicit-any": "error",
|
|
4378
|
-
"typescript/no-floating-promises": [
|
|
4379
|
-
"error",
|
|
4380
|
-
{
|
|
4381
|
-
ignoreVoid: true
|
|
4382
|
-
}
|
|
4383
|
-
],
|
|
4384
|
-
"typescript/no-inferrable-types": "error",
|
|
4385
|
-
"typescript/no-non-null-assertion": {
|
|
4386
|
-
severity: "warn",
|
|
4387
|
-
reason: "the front libs already run this at warn today (read with `eslint --print-config`), so keeping it there is a like-for-like migration. Raising it to error would be a NEW enforcement decision, and it needs its own count of violations first."
|
|
4388
|
-
},
|
|
4389
|
-
"typescript/no-unused-vars": [
|
|
4390
|
-
"error",
|
|
4391
|
-
{
|
|
4392
|
-
argsIgnorePattern: "^_",
|
|
4393
|
-
caughtErrors: "none"
|
|
4394
|
-
}
|
|
4395
|
-
],
|
|
4396
|
-
"typescript/no-useless-constructor": {
|
|
4397
|
-
severity: "warn",
|
|
4398
|
-
reason: "the front libs already run this at warn today (read with `eslint --print-config`), so keeping it there is a like-for-like migration. Raising it to error would be a NEW enforcement decision, and it needs its own count of violations first."
|
|
4399
|
-
},
|
|
4400
|
-
"typescript/return-await": {
|
|
4401
|
-
severity: "warn",
|
|
4402
|
-
reason: "replaces the deprecated core `no-return-await`, which both modules set to error but which was never actually reporting: the nx lint target expanded to 2 files of 2888. `in-try-catch` rather than `never`, and the planning adoption is what settled it. `never` forces `return await f()` to become `const x = await f(); return x` even inside a `try`, where the await is REQUIRED for the catch to fire: it produced 10 such edits across 15 modules, every one of them inside a try/catch, and every one of them a rewrite that made the code longer without making it safer. Worse, the obvious reading of the rule is to delete the `await`, which silently stops the catch from running. `in-try-catch` is what typescript-eslint recommends and flags none of those 10. Held at warn so adoption does not turn a green module red, and raised to error once the remaining findings are fixed.",
|
|
4403
|
-
options: ["in-try-catch"]
|
|
4404
|
-
},
|
|
4405
|
-
"use-isnan": [
|
|
4406
|
-
"error",
|
|
4407
|
-
{
|
|
4408
|
-
enforceForIndexOf: false,
|
|
4409
|
-
enforceForSwitchCase: true
|
|
4410
|
-
}
|
|
4411
|
-
],
|
|
4412
|
-
"valid-typeof": [
|
|
4413
|
-
"error",
|
|
4414
|
-
{
|
|
4415
|
-
requireStringLiterals: false
|
|
4416
|
-
}
|
|
4417
|
-
],
|
|
4418
|
-
"vitest/expect-expect": [
|
|
4419
|
-
"error",
|
|
4420
|
-
{
|
|
4421
|
-
assertFunctionNames: [
|
|
4422
|
-
"expect",
|
|
4423
|
-
"expect*",
|
|
4424
|
-
"waitForElementToBeRemoved",
|
|
4425
|
-
"screen.findBy*",
|
|
4426
|
-
"result.findBy*"
|
|
4427
|
-
]
|
|
4428
|
-
}
|
|
4429
|
-
],
|
|
4430
|
-
"vitest/no-alias-methods": "error",
|
|
4431
|
-
"vitest/no-commented-out-tests": {
|
|
4432
|
-
severity: "warn",
|
|
4433
|
-
reason: "the front libs already run this at warn today (read with `eslint --print-config`), so keeping it there is a like-for-like migration. Raising it to error would be a NEW enforcement decision, and it needs its own count of violations first."
|
|
4434
|
-
},
|
|
4435
|
-
"vitest/no-conditional-expect": "error",
|
|
4436
|
-
"vitest/no-disabled-tests": {
|
|
4437
|
-
severity: "warn",
|
|
4438
|
-
reason: "the front libs already run this at warn today (read with `eslint --print-config`), so keeping it there is a like-for-like migration. Raising it to error would be a NEW enforcement decision, and it needs its own count of violations first."
|
|
4439
|
-
},
|
|
4440
|
-
"vitest/no-focused-tests": "error",
|
|
4441
|
-
"vitest/no-identical-title": "error",
|
|
4442
|
-
"vitest/no-interpolation-in-snapshots": "error",
|
|
4443
|
-
"vitest/no-mocks-import": "error",
|
|
4444
|
-
"vitest/no-standalone-expect": "error",
|
|
4445
|
-
"vitest/no-test-prefixes": "error",
|
|
4446
|
-
"vitest/prefer-to-be": "error",
|
|
4447
|
-
"vitest/prefer-to-contain": "error",
|
|
4448
|
-
"vitest/prefer-to-have-length": "error",
|
|
4449
|
-
"vitest/require-mock-type-parameters": {
|
|
4450
|
-
severity: "off",
|
|
4451
|
-
reason: "4 479 of the 5 255 findings this plugin reports over this repository, 85% of them. It asks for type parameters on vi.fn<\u2026>(), a convention this codebase never had; adopting it is its own piece of work and not part of reading the right plugin"
|
|
4452
|
-
},
|
|
4453
|
-
"vitest/require-to-throw-message": {
|
|
4454
|
-
severity: "warn",
|
|
4455
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
4456
|
-
},
|
|
4457
|
-
"vitest/valid-describe-callback": "error",
|
|
4458
|
-
"vitest/valid-expect": "error",
|
|
4459
|
-
"vitest/valid-expect-in-promise": "error",
|
|
4460
|
-
"vitest/valid-title": "error",
|
|
4461
|
-
"vitest/warn-todo": {
|
|
4462
|
-
severity: "warn",
|
|
4463
|
-
reason: "a todo test is a reminder rather than a defect, so it reports and never blocks"
|
|
4464
|
-
}
|
|
4465
|
-
},
|
|
4466
|
-
overrides: [
|
|
4467
|
-
{
|
|
4468
|
-
files: ["**/*.stories.ts", "**/*.stories.tsx", "**/*.stories.js", "**/*.stories.jsx"],
|
|
4469
|
-
rules: {
|
|
4470
|
-
"storybook/await-interactions": "error",
|
|
4471
|
-
"storybook/context-in-play-function": "error",
|
|
4472
|
-
"storybook/default-exports": "error",
|
|
4473
|
-
"storybook/hierarchy-separator": {
|
|
4474
|
-
severity: "warn",
|
|
4475
|
-
reason: "the storybook plugin sets this severity for story files; adoption is like-for-like"
|
|
4476
|
-
},
|
|
4477
|
-
"storybook/no-redundant-story-name": {
|
|
4478
|
-
severity: "warn",
|
|
4479
|
-
reason: "the storybook plugin sets this severity for story files; adoption is like-for-like"
|
|
4480
|
-
},
|
|
4481
|
-
"storybook/no-renderer-packages": "error",
|
|
4482
|
-
"storybook/prefer-pascal-case": {
|
|
4483
|
-
severity: "warn",
|
|
4484
|
-
reason: "the storybook plugin sets this severity for story files; adoption is like-for-like"
|
|
4485
|
-
},
|
|
4486
|
-
"storybook/story-exports": "error",
|
|
4487
|
-
"storybook/use-storybook-expect": "error",
|
|
4488
|
-
"storybook/use-storybook-testing-library": "error",
|
|
4489
|
-
"react-hooks/rules-of-hooks": {
|
|
4490
|
-
severity: "off",
|
|
4491
|
-
reason: "off for story files in the module's own config, and it has to be: a story's render function is not a React component and the rule cannot tell, so it reports every useState in a story. Measured on libs/front/components: 7 errors, none of them real."
|
|
4492
|
-
}
|
|
4493
|
-
}
|
|
4494
|
-
},
|
|
4495
|
-
{
|
|
4496
|
-
files: [
|
|
4497
|
-
"**/*.test.ts",
|
|
4498
|
-
"**/*.test.tsx",
|
|
4499
|
-
"**/*.spec.ts",
|
|
4500
|
-
"**/*.spec.tsx",
|
|
4501
|
-
"**/*.integration-spec.ts",
|
|
4502
|
-
"**/*.e2e-spec.ts"
|
|
4503
|
-
],
|
|
4504
|
-
rules: {
|
|
4505
|
-
"no-restricted-properties": {
|
|
4506
|
-
severity: "warn",
|
|
4507
|
-
reason: "held at warn: over the 8 011 test files, 7 call Math.random(), 104 call Date.now(), 3 crypto.randomUUID(), 1 performance.now() and 1 process.hrtime, and 28 of the files that read the clock already install fake timers. A warning says it without turning a suite that was green yesterday red. Verified at error on a fixture carrying all nine forms: these six are reported, new Date('2026-01-01') is not, which is the point",
|
|
4508
|
-
options: [
|
|
4509
|
-
{
|
|
4510
|
-
object: "Math",
|
|
4511
|
-
property: "random",
|
|
4512
|
-
message: "No Math.random() in a test: use a deterministic fixture, or stub the random source."
|
|
4513
|
-
},
|
|
4514
|
-
{
|
|
4515
|
-
object: "Date",
|
|
4516
|
-
property: "now",
|
|
4517
|
-
message: "No Date.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
|
|
4518
|
-
},
|
|
4519
|
-
{
|
|
4520
|
-
object: "performance",
|
|
4521
|
-
property: "now",
|
|
4522
|
-
message: "No performance.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
|
|
4523
|
-
},
|
|
4524
|
-
{
|
|
4525
|
-
object: "process",
|
|
4526
|
-
property: "hrtime",
|
|
4527
|
-
message: "No process.hrtime in a test: use vi.useFakeTimers() with vi.setSystemTime()."
|
|
4528
|
-
},
|
|
4529
|
-
{
|
|
4530
|
-
object: "crypto",
|
|
4531
|
-
property: "randomUUID",
|
|
4532
|
-
message: "No crypto.randomUUID() in a test: use a fixed id, or stub the random source."
|
|
4533
|
-
},
|
|
4534
|
-
{
|
|
4535
|
-
object: "crypto",
|
|
4536
|
-
property: "getRandomValues",
|
|
4537
|
-
message: "No crypto.getRandomValues() in a test: use a fixed buffer, or stub the random source."
|
|
4538
|
-
}
|
|
4539
|
-
]
|
|
4540
|
-
},
|
|
4541
|
-
"no-restricted-globals": {
|
|
4542
|
-
severity: "warn",
|
|
4543
|
-
reason: "held at warn: 68 test files call setTimeout and only 2 of them install fake timers, so waiting on the real clock is the second source of flakiness after reading it. The flush idiom await new Promise((resolve) => setTimeout(resolve, 0)) is inside that count and is usually harmless, which is exactly why this reports and never blocks",
|
|
4544
|
-
options: [
|
|
4545
|
-
{
|
|
4546
|
-
name: "setTimeout",
|
|
4547
|
-
message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
|
|
4548
|
-
},
|
|
4549
|
-
{
|
|
4550
|
-
name: "setInterval",
|
|
4551
|
-
message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
|
|
4552
|
-
}
|
|
4553
|
-
]
|
|
4554
|
-
}
|
|
4555
|
-
}
|
|
4556
|
-
}
|
|
4557
|
-
],
|
|
4558
|
-
uncovered: {
|
|
4559
|
-
"no-octal": "no oxlint equivalent",
|
|
4560
|
-
"no-restricted-syntax": "no oxlint equivalent; the house rules it encoded ship as the local `hublo` plugin instead, so this tier hosts `../plugins/hublo.js` too. It enforces exactly one of them: `hublo/no-regex-lookbehind`, because a library is where that bug is WRITTEN and it reaches an app tier only by being imported (HUB-43431 shipped from libs/front/components into the worker app). The palette selectors stay app-tier only.",
|
|
4561
|
-
semi: "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between."
|
|
4562
|
-
}
|
|
4563
|
-
};
|
|
4564
|
-
|
|
4565
|
-
// src/roles/lint/presets/react.json
|
|
4566
|
-
var react_default = {
|
|
4567
|
-
plugins: ["typescript", "react", "jsx-a11y", "jest", "vitest", "import", "unicorn", "oxc"],
|
|
4568
|
-
jsPlugins: [
|
|
4569
|
-
"eslint-plugin-no-barrel-files",
|
|
4570
|
-
{
|
|
4571
|
-
name: "nx",
|
|
4572
|
-
specifier: "@nx/eslint-plugin"
|
|
4573
|
-
},
|
|
4574
|
-
{
|
|
4575
|
-
name: "@tanstack/query",
|
|
4576
|
-
specifier: "@tanstack/eslint-plugin-query"
|
|
4577
|
-
},
|
|
4578
|
-
{
|
|
4579
|
-
name: "styled-components-a11y",
|
|
4580
|
-
specifier: "eslint-plugin-styled-components-a11y"
|
|
4581
|
-
},
|
|
4582
|
-
{
|
|
4583
|
-
name: "react-refresh",
|
|
4584
|
-
specifier: "eslint-plugin-react-refresh"
|
|
4585
|
-
},
|
|
4586
|
-
"../plugins/hublo.js",
|
|
4587
|
-
{
|
|
4588
|
-
name: "@tanstack/router",
|
|
4589
|
-
specifier: "@tanstack/eslint-plugin-router"
|
|
4590
|
-
}
|
|
4591
|
-
],
|
|
4592
|
-
settings: null,
|
|
4593
|
-
rules: {
|
|
4594
|
-
"@tanstack/query/exhaustive-deps": {
|
|
4595
|
-
severity: "warn",
|
|
4596
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4597
|
-
},
|
|
4598
|
-
"@tanstack/query/infinite-query-property-order": {
|
|
4599
|
-
severity: "warn",
|
|
4600
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4601
|
-
},
|
|
4602
|
-
"@tanstack/query/mutation-property-order": {
|
|
4603
|
-
severity: "warn",
|
|
4604
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4605
|
-
},
|
|
4606
|
-
"@tanstack/query/no-rest-destructuring": {
|
|
4607
|
-
severity: "warn",
|
|
4608
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4609
|
-
},
|
|
4610
|
-
"@tanstack/query/no-unstable-deps": {
|
|
4611
|
-
severity: "warn",
|
|
4612
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4613
|
-
},
|
|
4614
|
-
"@tanstack/query/no-void-query-fn": {
|
|
4615
|
-
severity: "warn",
|
|
4616
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4617
|
-
},
|
|
4618
|
-
"@tanstack/query/prefer-query-options": {
|
|
4619
|
-
severity: "warn",
|
|
4620
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4621
|
-
},
|
|
4622
|
-
"@tanstack/query/stable-query-client": {
|
|
4623
|
-
severity: "warn",
|
|
4624
|
-
reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
|
|
4625
|
-
},
|
|
4626
|
-
"@tanstack/router/create-route-property-order": {
|
|
4627
|
-
severity: "warn",
|
|
4628
|
-
reason: "held at warn on the APP tier only: routes live in applications, and libs/front holds 0 of the 227 files that call createFileRoute, the same reason hublo/require-reload-document is here and not in react-lib. Measured over the three fronts, 7 133 files and 226 route files, the two rules report 3 findings, all create-route-property-order on host-admin. The order is not cosmetic: TanStack Router infers types through it"
|
|
4629
|
-
},
|
|
4630
|
-
"@tanstack/router/route-param-names": {
|
|
4631
|
-
severity: "warn",
|
|
4632
|
-
reason: "held at warn on the APP tier only: routes live in applications, and libs/front holds 0 of the 227 files that call createFileRoute, the same reason hublo/require-reload-document is here and not in react-lib. Measured over the three fronts, 7 133 files and 226 route files, the two rules report 3 findings, all create-route-property-order on host-admin. The order is not cosmetic: TanStack Router infers types through it"
|
|
4633
|
-
},
|
|
4634
|
-
curly: ["error", "all"],
|
|
4635
|
-
"for-direction": "error",
|
|
4636
|
-
"hublo/no-palette-common": {
|
|
4637
|
-
severity: "off",
|
|
4638
|
-
reason: "the house rule finds 3 real violations; they are fixed as their own change rather than inside a linter swap, so the rule ships visible-but-off and can be switched on once they are"
|
|
4639
|
-
},
|
|
4640
|
-
"hublo/no-regex-lookbehind": "error",
|
|
4641
|
-
"hublo/require-reload-document": "error",
|
|
4642
|
-
"jest/expect-expect": {
|
|
4643
|
-
severity: "off",
|
|
4644
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4645
|
-
},
|
|
4646
|
-
"jest/no-alias-methods": {
|
|
4647
|
-
severity: "off",
|
|
4648
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4649
|
-
},
|
|
4650
|
-
"jest/no-commented-out-tests": {
|
|
4651
|
-
severity: "off",
|
|
4652
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4653
|
-
},
|
|
4654
|
-
"jest/no-conditional-expect": {
|
|
4655
|
-
severity: "off",
|
|
4656
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4657
|
-
},
|
|
4658
|
-
"jest/no-deprecated-functions": {
|
|
4659
|
-
severity: "off",
|
|
4660
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4661
|
-
},
|
|
4662
|
-
"jest/no-disabled-tests": {
|
|
4663
|
-
severity: "off",
|
|
4664
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4665
|
-
},
|
|
4666
|
-
"jest/no-done-callback": {
|
|
4667
|
-
severity: "off",
|
|
4668
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4669
|
-
},
|
|
4670
|
-
"jest/no-export": {
|
|
4671
|
-
severity: "off",
|
|
4672
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4673
|
-
},
|
|
4674
|
-
"jest/no-focused-tests": {
|
|
4675
|
-
severity: "off",
|
|
4676
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4677
|
-
},
|
|
4678
|
-
"jest/no-identical-title": {
|
|
4679
|
-
severity: "off",
|
|
4680
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4681
|
-
},
|
|
4682
|
-
"jest/no-interpolation-in-snapshots": {
|
|
4683
|
-
severity: "off",
|
|
4684
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4685
|
-
},
|
|
4686
|
-
"jest/no-jasmine-globals": {
|
|
4687
|
-
severity: "off",
|
|
4688
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4689
|
-
},
|
|
4690
|
-
"jest/no-mocks-import": {
|
|
4691
|
-
severity: "off",
|
|
4692
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4693
|
-
},
|
|
4694
|
-
"jest/no-standalone-expect": {
|
|
4695
|
-
severity: "off",
|
|
4696
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4697
|
-
},
|
|
4698
|
-
"jest/no-test-prefixes": {
|
|
4699
|
-
severity: "off",
|
|
4700
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4701
|
-
},
|
|
4702
|
-
"jest/prefer-to-be": {
|
|
4703
|
-
severity: "off",
|
|
4704
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4705
|
-
},
|
|
4706
|
-
"jest/prefer-to-contain": {
|
|
4707
|
-
severity: "off",
|
|
4708
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4709
|
-
},
|
|
4710
|
-
"jest/prefer-to-have-length": {
|
|
4711
|
-
severity: "off",
|
|
4712
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4713
|
-
},
|
|
4714
|
-
"jest/valid-describe-callback": {
|
|
4715
|
-
severity: "off",
|
|
4716
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4717
|
-
},
|
|
4718
|
-
"jest/valid-expect": {
|
|
4719
|
-
severity: "off",
|
|
4720
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4721
|
-
},
|
|
4722
|
-
"jest/valid-expect-in-promise": {
|
|
4723
|
-
severity: "off",
|
|
4724
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4725
|
-
},
|
|
4726
|
-
"jest/valid-title": {
|
|
4727
|
-
severity: "off",
|
|
4728
|
-
reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
|
|
4729
|
-
},
|
|
4730
|
-
"jsx-a11y/alt-text": "error",
|
|
4731
|
-
"jsx-a11y/anchor-has-content": "error",
|
|
4732
|
-
"jsx-a11y/anchor-is-valid": "error",
|
|
4733
|
-
"jsx-a11y/aria-activedescendant-has-tabindex": "error",
|
|
4734
|
-
"jsx-a11y/aria-props": "error",
|
|
4735
|
-
"jsx-a11y/aria-proptypes": "error",
|
|
4736
|
-
"jsx-a11y/aria-role": "error",
|
|
4737
|
-
"jsx-a11y/aria-unsupported-elements": "error",
|
|
4738
|
-
"jsx-a11y/autocomplete-valid": "error",
|
|
4739
|
-
"jsx-a11y/click-events-have-key-events": "error",
|
|
4740
|
-
"jsx-a11y/heading-has-content": "error",
|
|
4741
|
-
"jsx-a11y/html-has-lang": "error",
|
|
4742
|
-
"jsx-a11y/iframe-has-title": "error",
|
|
4743
|
-
"jsx-a11y/img-redundant-alt": {
|
|
4744
|
-
severity: "off",
|
|
4745
|
-
reason: 'one real finding, a decorative image whose title is already rendered as a heading beside it, so the fix is alt="". A genuine accessibility issue rather than a false positive: parked only so swapping linters stays a lateral move, and worth switching back on as soon as it is fixed'
|
|
4746
|
-
},
|
|
4747
|
-
"jsx-a11y/interactive-supports-focus": [
|
|
4748
|
-
"error",
|
|
4749
|
-
{
|
|
4750
|
-
tabbable: [
|
|
4751
|
-
"button",
|
|
4752
|
-
"checkbox",
|
|
4753
|
-
"link",
|
|
4754
|
-
"progressbar",
|
|
4755
|
-
"searchbox",
|
|
4756
|
-
"slider",
|
|
4757
|
-
"spinbutton",
|
|
4758
|
-
"switch",
|
|
4759
|
-
"textbox"
|
|
4760
|
-
]
|
|
4761
|
-
}
|
|
4762
|
-
],
|
|
4763
|
-
"jsx-a11y/label-has-associated-control": "error",
|
|
4764
|
-
"jsx-a11y/media-has-caption": "error",
|
|
4765
|
-
"jsx-a11y/mouse-events-have-key-events": "error",
|
|
4766
|
-
"jsx-a11y/no-access-key": "error",
|
|
4767
|
-
"jsx-a11y/no-autofocus": "error",
|
|
4768
|
-
"jsx-a11y/no-distracting-elements": "error",
|
|
4769
|
-
"jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
|
|
4770
|
-
"jsx-a11y/no-noninteractive-element-interactions": [
|
|
4771
|
-
"error",
|
|
4772
|
-
{
|
|
4773
|
-
body: ["onError", "onLoad"],
|
|
4774
|
-
iframe: ["onError", "onLoad"],
|
|
4775
|
-
img: ["onError", "onLoad"]
|
|
4776
|
-
}
|
|
4777
|
-
],
|
|
4778
|
-
"jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
|
|
4779
|
-
"jsx-a11y/no-noninteractive-tabindex": "error",
|
|
4780
|
-
"jsx-a11y/no-redundant-roles": "error",
|
|
4781
|
-
"jsx-a11y/no-static-element-interactions": "error",
|
|
4782
|
-
"jsx-a11y/role-has-required-aria-props": "error",
|
|
4783
|
-
"jsx-a11y/role-supports-aria-props": "error",
|
|
4784
|
-
"jsx-a11y/scope": "error",
|
|
4785
|
-
"jsx-a11y/tabindex-no-positive": "error",
|
|
4786
|
-
"no-async-promise-executor": "error",
|
|
4787
|
-
"no-barrel-files/no-barrel-files": {
|
|
4788
|
-
severity: "warn",
|
|
4789
|
-
reason: "the modules already ran this at warn (confirmed in the host-admin proof-of-concept config); nest disables it outright as deliberate architecture, react keeps it visible"
|
|
4790
|
-
},
|
|
4791
|
-
"no-case-declarations": "error",
|
|
4792
|
-
"no-compare-neg-zero": "error",
|
|
4793
|
-
"no-cond-assign": ["error", "except-parens"],
|
|
4794
|
-
"no-console": {
|
|
4795
|
-
severity: "off",
|
|
4796
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
4797
|
-
},
|
|
4798
|
-
"no-constant-binary-expression": "error",
|
|
4799
|
-
"no-constant-condition": [
|
|
4800
|
-
"error",
|
|
4801
|
-
{
|
|
4802
|
-
checkLoops: "allExceptWhileTrue"
|
|
4803
|
-
}
|
|
4804
|
-
],
|
|
4805
|
-
"no-control-regex": "error",
|
|
4806
|
-
"no-debugger": "error",
|
|
4807
|
-
"no-delete-var": "error",
|
|
4808
|
-
"no-dupe-else-if": "error",
|
|
4809
|
-
"no-duplicate-case": "error",
|
|
4810
|
-
"no-empty": [
|
|
4811
|
-
"error",
|
|
4812
|
-
{
|
|
4813
|
-
allowEmptyCatch: false
|
|
4814
|
-
}
|
|
4815
|
-
],
|
|
4816
|
-
"no-empty-character-class": "error",
|
|
4817
|
-
"no-empty-pattern": [
|
|
4818
|
-
"error",
|
|
4819
|
-
{
|
|
4820
|
-
allowObjectPatternsAsParameters: false
|
|
4821
|
-
}
|
|
4822
|
-
],
|
|
4823
|
-
"no-empty-static-block": "error",
|
|
4824
|
-
"no-ex-assign": "error",
|
|
4825
|
-
"no-extra-boolean-cast": ["error", {}],
|
|
4826
|
-
"no-fallthrough": [
|
|
4827
|
-
"error",
|
|
4828
|
-
{
|
|
4829
|
-
allowEmptyCase: false,
|
|
4830
|
-
reportUnusedFallthroughComment: false
|
|
4831
|
-
}
|
|
4832
|
-
],
|
|
4833
|
-
"no-global-assign": [
|
|
4834
|
-
"error",
|
|
4835
|
-
{
|
|
4836
|
-
exceptions: []
|
|
4837
|
-
}
|
|
4838
|
-
],
|
|
4839
|
-
"no-invalid-regexp": ["error", {}],
|
|
4840
|
-
"no-irregular-whitespace": [
|
|
4841
|
-
"error",
|
|
4842
|
-
{
|
|
4843
|
-
skipComments: false,
|
|
4844
|
-
skipJSXText: false,
|
|
4845
|
-
skipRegExps: false,
|
|
4846
|
-
skipStrings: true,
|
|
4847
|
-
skipTemplates: false
|
|
4848
|
-
}
|
|
4849
|
-
],
|
|
4850
|
-
"no-loss-of-precision": "error",
|
|
4851
|
-
"no-misleading-character-class": "error",
|
|
4852
|
-
"no-nonoctal-decimal-escape": "error",
|
|
4853
|
-
"no-prototype-builtins": "error",
|
|
4854
|
-
"no-regex-spaces": "error",
|
|
4855
|
-
"no-restricted-imports": [
|
|
4856
|
-
"error",
|
|
4857
|
-
{
|
|
4858
|
-
patterns: [
|
|
4859
|
-
{
|
|
4860
|
-
group: ["next/*"],
|
|
4861
|
-
message: "Importing from next/* is not allowed in the admin project."
|
|
4862
|
-
},
|
|
4863
|
-
{
|
|
4864
|
-
group: ["storybook/*"],
|
|
4865
|
-
message: "Importing from storybook/* is not allowed in the admin project."
|
|
4866
|
-
},
|
|
4867
|
-
{
|
|
4868
|
-
group: ["@nestjs/*"],
|
|
4869
|
-
message: "Importing from @nestjs/* is not allowed in the admin project."
|
|
4870
|
-
},
|
|
4871
|
-
{
|
|
4872
|
-
group: ["next-i18next"],
|
|
4873
|
-
message: "Importing from next-i18next is not allowed in the admin project."
|
|
4874
|
-
},
|
|
4875
|
-
{
|
|
4876
|
-
group: ["@hublo/style/colors", "@hublo/style/colors/*"],
|
|
4877
|
-
message: "Importing runtime colors directly is not allowed. Use the MUI theme, theme-derived CSS variables, or an explicit product-specific mapping."
|
|
4878
|
-
}
|
|
4879
|
-
]
|
|
4880
|
-
}
|
|
4881
|
-
],
|
|
4882
|
-
"no-self-assign": [
|
|
4883
|
-
"error",
|
|
4884
|
-
{
|
|
4885
|
-
props: true
|
|
4886
|
-
}
|
|
4887
|
-
],
|
|
4888
|
-
"no-shadow-restricted-names": [
|
|
4889
|
-
"error",
|
|
4890
|
-
{
|
|
4891
|
-
reportGlobalThis: false
|
|
4892
|
-
}
|
|
4893
|
-
],
|
|
4894
|
-
"no-sparse-arrays": "error",
|
|
4895
|
-
"no-unexpected-multiline": "error",
|
|
4896
|
-
"no-unsafe-finally": "error",
|
|
4897
|
-
"no-unsafe-optional-chaining": {
|
|
4898
|
-
severity: "off",
|
|
4899
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
4900
|
-
},
|
|
4901
|
-
"no-unused-labels": "error",
|
|
4902
|
-
"no-unused-private-class-members": "error",
|
|
4903
|
-
"no-useless-backreference": "error",
|
|
4904
|
-
"no-useless-catch": "error",
|
|
4905
|
-
"no-useless-escape": [
|
|
4906
|
-
"error",
|
|
4907
|
-
{
|
|
4908
|
-
allowRegexCharacters: []
|
|
4909
|
-
}
|
|
4910
|
-
],
|
|
4911
|
-
"nx/enforce-module-boundaries": [
|
|
4912
|
-
"error",
|
|
4913
|
-
{
|
|
4914
|
-
enforceBuildableLibDependency: true,
|
|
4915
|
-
allow: [],
|
|
4916
|
-
depConstraints: [
|
|
4917
|
-
{
|
|
4918
|
-
sourceTag: "*",
|
|
4919
|
-
onlyDependOnLibsWithTags: ["*"]
|
|
4920
|
-
}
|
|
4921
|
-
]
|
|
4922
|
-
}
|
|
4923
|
-
],
|
|
4924
|
-
"react-hooks/exhaustive-deps": {
|
|
4925
|
-
severity: "warn",
|
|
4926
|
-
reason: "the modules already ran this at warn (confirmed in the host-admin proof-of-concept config); its suggested fix can change behaviour, so it reports and a human decides"
|
|
4927
|
-
},
|
|
4928
|
-
"react-hooks/rules-of-hooks": "error",
|
|
4929
|
-
"react-refresh/only-export-components": {
|
|
4930
|
-
severity: "warn",
|
|
4931
|
-
reason: "the modules already ran this at warn (confirmed in the host-admin proof-of-concept config); it guards fast-refresh ergonomics, not correctness",
|
|
4932
|
-
options: [
|
|
4933
|
-
{
|
|
4934
|
-
allowConstantExport: true
|
|
4935
|
-
}
|
|
4936
|
-
]
|
|
4937
|
-
},
|
|
4938
|
-
"react/jsx-curly-brace-presence": {
|
|
4939
|
-
severity: "off",
|
|
4940
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
4941
|
-
},
|
|
4942
|
-
"require-yield": "error",
|
|
4943
|
-
"styled-components-a11y/alt-text": "error",
|
|
4944
|
-
"styled-components-a11y/anchor-has-content": "error",
|
|
4945
|
-
"styled-components-a11y/anchor-is-valid": "error",
|
|
4946
|
-
"styled-components-a11y/aria-activedescendant-has-tabindex": "error",
|
|
4947
|
-
"styled-components-a11y/aria-props": "error",
|
|
4948
|
-
"styled-components-a11y/aria-proptypes": "error",
|
|
4949
|
-
"styled-components-a11y/aria-role": "error",
|
|
4950
|
-
"styled-components-a11y/aria-unsupported-elements": "error",
|
|
4951
|
-
"styled-components-a11y/autocomplete-valid": "error",
|
|
4952
|
-
"styled-components-a11y/click-events-have-key-events": "error",
|
|
4953
|
-
"styled-components-a11y/control-has-associated-label": {
|
|
4954
|
-
severity: "off",
|
|
4955
|
-
reason: "off in the host-admin proof-of-concept config, with its element and role ignore lists; it fires on composed styled components where the label lives in a wrapper the rule cannot see",
|
|
4956
|
-
options: [
|
|
4957
|
-
{
|
|
4958
|
-
ignoreElements: ["audio", "canvas", "embed", "input", "textarea", "tr", "video"],
|
|
4959
|
-
ignoreRoles: [
|
|
4960
|
-
"grid",
|
|
4961
|
-
"listbox",
|
|
4962
|
-
"menu",
|
|
4963
|
-
"menubar",
|
|
4964
|
-
"radiogroup",
|
|
4965
|
-
"row",
|
|
4966
|
-
"tablist",
|
|
4967
|
-
"toolbar",
|
|
4968
|
-
"tree",
|
|
4969
|
-
"treegrid"
|
|
4970
|
-
],
|
|
4971
|
-
includeRoles: ["alert", "dialog"]
|
|
4972
|
-
}
|
|
4973
|
-
]
|
|
4974
|
-
},
|
|
4975
|
-
"styled-components-a11y/heading-has-content": "error",
|
|
4976
|
-
"styled-components-a11y/html-has-lang": "error",
|
|
4977
|
-
"styled-components-a11y/iframe-has-title": "error",
|
|
4978
|
-
"styled-components-a11y/img-redundant-alt": "error",
|
|
4979
|
-
"styled-components-a11y/interactive-supports-focus": [
|
|
4980
|
-
"error",
|
|
4981
|
-
{
|
|
4982
|
-
tabbable: [
|
|
4983
|
-
"button",
|
|
4984
|
-
"checkbox",
|
|
4985
|
-
"link",
|
|
4986
|
-
"progressbar",
|
|
4987
|
-
"searchbox",
|
|
4988
|
-
"slider",
|
|
4989
|
-
"spinbutton",
|
|
4990
|
-
"switch",
|
|
4991
|
-
"textbox"
|
|
4992
|
-
]
|
|
4993
|
-
}
|
|
4994
|
-
],
|
|
4995
|
-
"styled-components-a11y/label-has-associated-control": "error",
|
|
4996
|
-
"styled-components-a11y/label-has-for": {
|
|
4997
|
-
severity: "off",
|
|
4998
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
4999
|
-
},
|
|
5000
|
-
"styled-components-a11y/media-has-caption": "error",
|
|
5001
|
-
"styled-components-a11y/mouse-events-have-key-events": "error",
|
|
5002
|
-
"styled-components-a11y/no-access-key": "error",
|
|
5003
|
-
"styled-components-a11y/no-autofocus": "error",
|
|
5004
|
-
"styled-components-a11y/no-distracting-elements": "error",
|
|
5005
|
-
"styled-components-a11y/no-interactive-element-to-noninteractive-role": "error",
|
|
5006
|
-
"styled-components-a11y/no-noninteractive-element-interactions": [
|
|
5007
|
-
"error",
|
|
5008
|
-
{
|
|
5009
|
-
body: ["onError", "onLoad"],
|
|
5010
|
-
iframe: ["onError", "onLoad"],
|
|
5011
|
-
img: ["onError", "onLoad"]
|
|
5012
|
-
}
|
|
5013
|
-
],
|
|
5014
|
-
"styled-components-a11y/no-noninteractive-element-to-interactive-role": "error",
|
|
5015
|
-
"styled-components-a11y/no-noninteractive-tabindex": "error",
|
|
5016
|
-
"styled-components-a11y/no-redundant-roles": "error",
|
|
5017
|
-
"styled-components-a11y/no-static-element-interactions": "error",
|
|
5018
|
-
"styled-components-a11y/role-has-required-aria-props": "error",
|
|
5019
|
-
"styled-components-a11y/role-supports-aria-props": "error",
|
|
5020
|
-
"styled-components-a11y/scope": "error",
|
|
5021
|
-
"styled-components-a11y/tabindex-no-positive": "error",
|
|
5022
|
-
"typescript/await-thenable": "error",
|
|
5023
|
-
"typescript/no-array-delete": "error",
|
|
5024
|
-
"typescript/no-base-to-string": "error",
|
|
5025
|
-
"typescript/no-duplicate-type-constituents": "error",
|
|
5026
|
-
"typescript/no-empty-function": {
|
|
5027
|
-
severity: "off",
|
|
5028
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
5029
|
-
},
|
|
5030
|
-
"typescript/no-explicit-any": {
|
|
5031
|
-
severity: "off",
|
|
5032
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
5033
|
-
},
|
|
5034
|
-
"typescript/no-floating-promises": [
|
|
5035
|
-
"error",
|
|
5036
|
-
{
|
|
5037
|
-
ignoreVoid: true
|
|
5038
|
-
}
|
|
5039
|
-
],
|
|
5040
|
-
"typescript/no-for-in-array": "error",
|
|
5041
|
-
"typescript/no-implied-eval": "error",
|
|
5042
|
-
"typescript/no-inferrable-types": "error",
|
|
5043
|
-
"typescript/no-misused-promises": [
|
|
5044
|
-
"error",
|
|
5045
|
-
{
|
|
5046
|
-
checksVoidReturn: {
|
|
5047
|
-
attributes: false
|
|
5048
|
-
}
|
|
5049
|
-
}
|
|
5050
|
-
],
|
|
5051
|
-
"typescript/no-non-null-assertion": {
|
|
5052
|
-
severity: "warn",
|
|
5053
|
-
reason: "kept at the severity the proof of concept measured; no module config set it, so raising it to error would be a NEW enforcement decision rather than a like-for-like migration, and it needs its own count of violations first"
|
|
5054
|
-
},
|
|
5055
|
-
"typescript/no-redundant-type-constituents": "error",
|
|
5056
|
-
"typescript/no-require-imports": "error",
|
|
5057
|
-
"typescript/no-unnecessary-type-assertion": {
|
|
5058
|
-
severity: "off",
|
|
5059
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
5060
|
-
},
|
|
5061
|
-
"typescript/no-unsafe-argument": {
|
|
5062
|
-
severity: "off",
|
|
5063
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
5064
|
-
},
|
|
5065
|
-
"typescript/no-unsafe-assignment": {
|
|
5066
|
-
severity: "off",
|
|
5067
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
5068
|
-
},
|
|
5069
|
-
"typescript/no-unsafe-call": {
|
|
5070
|
-
severity: "off",
|
|
5071
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
5072
|
-
},
|
|
5073
|
-
"typescript/no-unsafe-enum-comparison": {
|
|
5074
|
-
severity: "off",
|
|
5075
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
5076
|
-
},
|
|
5077
|
-
"typescript/no-unsafe-member-access": {
|
|
5078
|
-
severity: "off",
|
|
5079
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
5080
|
-
},
|
|
5081
|
-
"typescript/no-unsafe-return": {
|
|
5082
|
-
severity: "off",
|
|
5083
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
5084
|
-
},
|
|
5085
|
-
"typescript/no-unsafe-unary-minus": "error",
|
|
5086
|
-
"typescript/no-unused-vars": {
|
|
5087
|
-
severity: "off",
|
|
5088
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
5089
|
-
},
|
|
5090
|
-
"typescript/only-throw-error": {
|
|
5091
|
-
severity: "off",
|
|
5092
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
5093
|
-
},
|
|
5094
|
-
"typescript/prefer-promise-reject-errors": "error",
|
|
5095
|
-
"typescript/require-await": {
|
|
5096
|
-
severity: "off",
|
|
5097
|
-
reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
|
|
5098
|
-
},
|
|
5099
|
-
"typescript/restrict-plus-operands": "error",
|
|
5100
|
-
"typescript/restrict-template-expressions": "error",
|
|
5101
|
-
"typescript/return-await": {
|
|
5102
|
-
severity: "warn",
|
|
5103
|
-
reason: "replaces the deprecated core `no-return-await`, which both modules set to error but which was never actually reporting: the nx lint target expanded to 2 files of 2888. `in-try-catch` rather than `never`, and the planning adoption is what settled it. `never` forces `return await f()` to become `const x = await f(); return x` even inside a `try`, where the await is REQUIRED for the catch to fire: it produced 10 such edits across 15 modules, every one of them inside a try/catch, and every one of them a rewrite that made the code longer without making it safer. Worse, the obvious reading of the rule is to delete the `await`, which silently stops the catch from running. `in-try-catch` is what typescript-eslint recommends and flags none of those 10. Held at warn so adoption does not turn a green module red, and raised to error once the remaining findings are fixed.",
|
|
5104
|
-
options: ["in-try-catch"]
|
|
5105
|
-
},
|
|
5106
|
-
"typescript/switch-exhaustiveness-check": {
|
|
5107
|
-
severity: "warn",
|
|
5108
|
-
reason: "kept at the severity the proof of concept measured; no module config set it, so raising it to error would be a NEW enforcement decision rather than a like-for-like migration, and it needs its own count of violations first"
|
|
5109
|
-
},
|
|
5110
|
-
"typescript/unbound-method": "error",
|
|
5111
|
-
"use-isnan": [
|
|
5112
|
-
"error",
|
|
5113
|
-
{
|
|
5114
|
-
enforceForIndexOf: false,
|
|
5115
|
-
enforceForSwitchCase: true
|
|
5116
|
-
}
|
|
5117
|
-
],
|
|
5118
|
-
"valid-typeof": [
|
|
5119
|
-
"error",
|
|
5120
|
-
{
|
|
5121
|
-
requireStringLiterals: false
|
|
5122
|
-
}
|
|
5123
|
-
],
|
|
5124
|
-
"vitest/expect-expect": {
|
|
5125
|
-
severity: "warn",
|
|
5126
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5127
|
-
},
|
|
5128
|
-
"vitest/no-alias-methods": {
|
|
5129
|
-
severity: "warn",
|
|
5130
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5131
|
-
},
|
|
5132
|
-
"vitest/no-commented-out-tests": {
|
|
5133
|
-
severity: "warn",
|
|
5134
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5135
|
-
},
|
|
5136
|
-
"vitest/no-conditional-expect": {
|
|
5137
|
-
severity: "warn",
|
|
5138
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5139
|
-
},
|
|
5140
|
-
"vitest/no-disabled-tests": {
|
|
5141
|
-
severity: "warn",
|
|
5142
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5143
|
-
},
|
|
5144
|
-
"vitest/no-focused-tests": {
|
|
5145
|
-
severity: "warn",
|
|
5146
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5147
|
-
},
|
|
5148
|
-
"vitest/no-identical-title": {
|
|
5149
|
-
severity: "warn",
|
|
5150
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5151
|
-
},
|
|
5152
|
-
"vitest/no-interpolation-in-snapshots": {
|
|
5153
|
-
severity: "warn",
|
|
5154
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5155
|
-
},
|
|
5156
|
-
"vitest/no-mocks-import": {
|
|
5157
|
-
severity: "warn",
|
|
5158
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5159
|
-
},
|
|
5160
|
-
"vitest/no-standalone-expect": {
|
|
5161
|
-
severity: "warn",
|
|
5162
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5163
|
-
},
|
|
5164
|
-
"vitest/no-test-prefixes": {
|
|
5165
|
-
severity: "warn",
|
|
5166
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5167
|
-
},
|
|
5168
|
-
"vitest/prefer-to-be": {
|
|
5169
|
-
severity: "warn",
|
|
5170
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5171
|
-
},
|
|
5172
|
-
"vitest/prefer-to-contain": {
|
|
5173
|
-
severity: "warn",
|
|
5174
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5175
|
-
},
|
|
5176
|
-
"vitest/prefer-to-have-length": {
|
|
5177
|
-
severity: "warn",
|
|
5178
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5179
|
-
},
|
|
5180
|
-
"vitest/require-mock-type-parameters": {
|
|
5181
|
-
severity: "off",
|
|
5182
|
-
reason: "4 479 of the 5 255 findings this plugin reports over this repository, 85% of them. It asks for type parameters on vi.fn<\u2026>(), a convention this codebase never had; adopting it is its own piece of work and not part of reading the right plugin"
|
|
5183
|
-
},
|
|
5184
|
-
"vitest/require-to-throw-message": {
|
|
5185
|
-
severity: "warn",
|
|
5186
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5187
|
-
},
|
|
5188
|
-
"vitest/valid-describe-callback": {
|
|
5189
|
-
severity: "warn",
|
|
5190
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5191
|
-
},
|
|
5192
|
-
"vitest/valid-expect": {
|
|
5193
|
-
severity: "warn",
|
|
5194
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5195
|
-
},
|
|
5196
|
-
"vitest/valid-expect-in-promise": {
|
|
5197
|
-
severity: "warn",
|
|
5198
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5199
|
-
},
|
|
5200
|
-
"vitest/valid-title": {
|
|
5201
|
-
severity: "warn",
|
|
5202
|
-
reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
|
|
5203
|
-
},
|
|
5204
|
-
"vitest/warn-todo": {
|
|
5205
|
-
severity: "warn",
|
|
5206
|
-
reason: "a todo test is a reminder rather than a defect, so it reports and never blocks"
|
|
5207
|
-
}
|
|
5208
|
-
},
|
|
5209
|
-
uncovered: {
|
|
5210
|
-
"import/order": "import ordering is FORMATTING, and the format role owns it: oxfmt's `sortImports` reproduces exactly these groups (builtin, external, internal, parent/index, sibling, alphabetical, blank line between) and sorts a file completely in ONE pass, because it rewrites the whole import block. A lint fixer cannot: it emits text edits over overlapping ranges, so this rule needed several runs to finish (five imports took four passes, measured) and sentinel deliberately runs autofix once. Enforced by `pnpm run format`, not by the linter, which is also why `eslint-plugin-import` is no longer hosted at all: its only other rule, no-duplicates, is native in oxlint.",
|
|
5211
|
-
"no-octal": "no oxlint equivalent",
|
|
5212
|
-
"no-restricted-syntax": "no oxlint equivalent as configuration, so the AST selectors this repo used are shipped as real rules in the local `hublo` plugin instead, which this tier hosts (`../plugins/hublo.js`). Three are hosted today: the eight palette selectors as `hublo/no-palette-common`, the lookbehind selector as `hublo/no-regex-lookbehind`, and the TanStack Router one as `hublo/require-reload-document`, carried here from an ESLint selector in the monorepo (PR #22043) because ADR 0042 makes this the layer that outlives it. App tier only: measured on main, `libs/front` calls `redirect(` nowhere, while host-admin does in 93 files and console in 2. Any selector NOT in that plugin is not enforced here; propose it and it joins the plugin rather than a per-module copy.",
|
|
5213
|
-
semi: "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between."
|
|
5214
|
-
},
|
|
5215
|
-
overrides: [
|
|
5216
|
-
{
|
|
5217
|
-
files: [
|
|
5218
|
-
"**/*.test.ts",
|
|
5219
|
-
"**/*.test.tsx",
|
|
5220
|
-
"**/*.spec.ts",
|
|
5221
|
-
"**/*.spec.tsx",
|
|
5222
|
-
"**/*.integration-spec.ts",
|
|
5223
|
-
"**/*.e2e-spec.ts"
|
|
5224
|
-
],
|
|
5225
|
-
rules: {
|
|
5226
|
-
"no-restricted-properties": {
|
|
5227
|
-
severity: "warn",
|
|
5228
|
-
reason: "held at warn: over the 8 011 test files, 7 call Math.random(), 104 call Date.now(), 3 crypto.randomUUID(), 1 performance.now() and 1 process.hrtime, and 28 of the files that read the clock already install fake timers. A warning says it without turning a suite that was green yesterday red. Verified at error on a fixture carrying all nine forms: these six are reported, new Date('2026-01-01') is not, which is the point",
|
|
5229
|
-
options: [
|
|
5230
|
-
{
|
|
5231
|
-
object: "Math",
|
|
5232
|
-
property: "random",
|
|
5233
|
-
message: "No Math.random() in a test: use a deterministic fixture, or stub the random source."
|
|
5234
|
-
},
|
|
5235
|
-
{
|
|
5236
|
-
object: "Date",
|
|
5237
|
-
property: "now",
|
|
5238
|
-
message: "No Date.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
|
|
5239
|
-
},
|
|
5240
|
-
{
|
|
5241
|
-
object: "performance",
|
|
5242
|
-
property: "now",
|
|
5243
|
-
message: "No performance.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
|
|
5244
|
-
},
|
|
5245
|
-
{
|
|
5246
|
-
object: "process",
|
|
5247
|
-
property: "hrtime",
|
|
5248
|
-
message: "No process.hrtime in a test: use vi.useFakeTimers() with vi.setSystemTime()."
|
|
5249
|
-
},
|
|
5250
|
-
{
|
|
5251
|
-
object: "crypto",
|
|
5252
|
-
property: "randomUUID",
|
|
5253
|
-
message: "No crypto.randomUUID() in a test: use a fixed id, or stub the random source."
|
|
5254
|
-
},
|
|
5255
|
-
{
|
|
5256
|
-
object: "crypto",
|
|
5257
|
-
property: "getRandomValues",
|
|
5258
|
-
message: "No crypto.getRandomValues() in a test: use a fixed buffer, or stub the random source."
|
|
5259
|
-
}
|
|
5260
|
-
]
|
|
5261
|
-
},
|
|
5262
|
-
"no-restricted-globals": {
|
|
5263
|
-
severity: "warn",
|
|
5264
|
-
reason: "held at warn: 68 test files call setTimeout and only 2 of them install fake timers, so waiting on the real clock is the second source of flakiness after reading it. The flush idiom await new Promise((resolve) => setTimeout(resolve, 0)) is inside that count and is usually harmless, which is exactly why this reports and never blocks",
|
|
5265
|
-
options: [
|
|
5266
|
-
{
|
|
5267
|
-
name: "setTimeout",
|
|
5268
|
-
message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
|
|
5269
|
-
},
|
|
5270
|
-
{
|
|
5271
|
-
name: "setInterval",
|
|
5272
|
-
message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
|
|
5273
|
-
}
|
|
5274
|
-
]
|
|
5275
|
-
}
|
|
5276
|
-
}
|
|
5277
|
-
}
|
|
5278
|
-
]
|
|
5279
|
-
};
|
|
5280
|
-
|
|
5281
|
-
// src/roles/lint/presets/shared.json
|
|
5282
|
-
var shared_default2 = {
|
|
5283
|
-
rules: {
|
|
5284
|
-
"no-var": "error",
|
|
5285
|
-
"prefer-const": [
|
|
5286
|
-
"error",
|
|
5287
|
-
{
|
|
5288
|
-
destructuring: "any",
|
|
5289
|
-
ignoreReadBeforeAssign: false
|
|
5290
|
-
}
|
|
5291
|
-
],
|
|
5292
|
-
"prefer-rest-params": "error",
|
|
5293
|
-
"prefer-spread": "error",
|
|
5294
|
-
"typescript/ban-ts-comment": "error",
|
|
5295
|
-
"typescript/no-array-constructor": "error",
|
|
5296
|
-
"typescript/no-duplicate-enum-values": "error",
|
|
5297
|
-
"typescript/no-empty-object-type": "error",
|
|
5298
|
-
"typescript/no-extra-non-null-assertion": "error",
|
|
5299
|
-
"typescript/no-misused-new": "error",
|
|
5300
|
-
"typescript/no-namespace": "error",
|
|
5301
|
-
"typescript/no-non-null-asserted-optional-chain": "error",
|
|
5302
|
-
"typescript/no-this-alias": "error",
|
|
5303
|
-
"typescript/no-unnecessary-type-constraint": "error",
|
|
5304
|
-
"typescript/no-unsafe-declaration-merging": "error",
|
|
5305
|
-
"typescript/no-unsafe-function-type": "error",
|
|
5306
|
-
"typescript/no-unused-expressions": [
|
|
5307
|
-
"error",
|
|
5308
|
-
{
|
|
5309
|
-
allowShortCircuit: false,
|
|
5310
|
-
allowTaggedTemplates: false,
|
|
5311
|
-
allowTernary: false
|
|
5312
|
-
}
|
|
5313
|
-
],
|
|
5314
|
-
"typescript/no-wrapper-object-types": "error",
|
|
5315
|
-
"typescript/prefer-as-const": "error",
|
|
5316
|
-
"typescript/prefer-namespace-keyword": "error",
|
|
5317
|
-
"typescript/triple-slash-reference": "error"
|
|
5318
|
-
}
|
|
5319
|
-
};
|
|
5320
|
-
|
|
5321
|
-
// src/roles/lint/presets/svelte.json
|
|
5322
|
-
var svelte_default = {
|
|
5323
|
-
plugins: ["typescript", "oxc"],
|
|
5324
|
-
jsPlugins: [],
|
|
5325
|
-
settings: null,
|
|
5326
|
-
rules: {
|
|
5327
|
-
"constructor-super": "error",
|
|
5328
|
-
"for-direction": "error",
|
|
5329
|
-
"getter-return": [
|
|
5330
|
-
"error",
|
|
5331
|
-
{
|
|
5332
|
-
allowImplicit: false
|
|
5333
|
-
}
|
|
5334
|
-
],
|
|
5335
|
-
"no-async-promise-executor": "error",
|
|
5336
|
-
"no-case-declarations": "error",
|
|
5337
|
-
"no-class-assign": "error",
|
|
5338
|
-
"no-compare-neg-zero": "error",
|
|
5339
|
-
"no-cond-assign": ["error", "except-parens"],
|
|
5340
|
-
"no-const-assign": "error",
|
|
5341
|
-
"no-constant-binary-expression": "error",
|
|
5342
|
-
"no-constant-condition": [
|
|
5343
|
-
"error",
|
|
5344
|
-
{
|
|
5345
|
-
checkLoops: "allExceptWhileTrue"
|
|
5346
|
-
}
|
|
5347
|
-
],
|
|
5348
|
-
"no-control-regex": "error",
|
|
5349
|
-
"no-debugger": "error",
|
|
5350
|
-
"no-delete-var": "error",
|
|
5351
|
-
"no-dupe-class-members": "error",
|
|
5352
|
-
"no-dupe-else-if": "error",
|
|
5353
|
-
"no-dupe-keys": "error",
|
|
5354
|
-
"no-duplicate-case": "error",
|
|
5355
|
-
"no-empty": [
|
|
5356
|
-
"error",
|
|
5357
|
-
{
|
|
5358
|
-
allowEmptyCatch: false
|
|
5359
|
-
}
|
|
5360
|
-
],
|
|
5361
|
-
"no-empty-character-class": "error",
|
|
5362
|
-
"no-empty-pattern": [
|
|
5363
|
-
"error",
|
|
5364
|
-
{
|
|
5365
|
-
allowObjectPatternsAsParameters: false
|
|
5366
|
-
}
|
|
5367
|
-
],
|
|
5368
|
-
"no-empty-static-block": "error",
|
|
5369
|
-
"no-ex-assign": "error",
|
|
5370
|
-
"no-extra-boolean-cast": ["error", {}],
|
|
5371
|
-
"no-fallthrough": [
|
|
5372
|
-
"error",
|
|
5373
|
-
{
|
|
5374
|
-
allowEmptyCase: false,
|
|
5375
|
-
reportUnusedFallthroughComment: false
|
|
5376
|
-
}
|
|
5377
|
-
],
|
|
5378
|
-
"no-func-assign": "error",
|
|
5379
|
-
"no-global-assign": [
|
|
5380
|
-
"error",
|
|
5381
|
-
{
|
|
5382
|
-
exceptions: []
|
|
5383
|
-
}
|
|
5384
|
-
],
|
|
5385
|
-
"no-import-assign": "error",
|
|
5386
|
-
"no-invalid-regexp": ["error", {}],
|
|
5387
|
-
"no-irregular-whitespace": [
|
|
5388
|
-
"error",
|
|
5389
|
-
{
|
|
5390
|
-
skipComments: false,
|
|
5391
|
-
skipJSXText: false,
|
|
5392
|
-
skipRegExps: false,
|
|
5393
|
-
skipStrings: true,
|
|
5394
|
-
skipTemplates: false
|
|
5395
|
-
}
|
|
5396
|
-
],
|
|
5397
|
-
"no-loss-of-precision": "error",
|
|
5398
|
-
"no-misleading-character-class": "error",
|
|
5399
|
-
"no-new-native-nonconstructor": "error",
|
|
5400
|
-
"no-nonoctal-decimal-escape": "error",
|
|
5401
|
-
"no-obj-calls": "error",
|
|
5402
|
-
"no-prototype-builtins": "error",
|
|
5403
|
-
"no-redeclare": [
|
|
5404
|
-
"error",
|
|
5405
|
-
{
|
|
5406
|
-
builtinGlobals: true
|
|
5407
|
-
}
|
|
5408
|
-
],
|
|
5409
|
-
"no-regex-spaces": "error",
|
|
5410
|
-
"no-self-assign": [
|
|
5411
|
-
"error",
|
|
5412
|
-
{
|
|
5413
|
-
props: true
|
|
5414
|
-
}
|
|
5415
|
-
],
|
|
5416
|
-
"no-setter-return": "error",
|
|
5417
|
-
"no-shadow-restricted-names": [
|
|
5418
|
-
"error",
|
|
5419
|
-
{
|
|
5420
|
-
reportGlobalThis: false
|
|
5421
|
-
}
|
|
5422
|
-
],
|
|
5423
|
-
"no-sparse-arrays": "error",
|
|
5424
|
-
"no-this-before-super": "error",
|
|
5425
|
-
"no-undef": {
|
|
5426
|
-
severity: "off",
|
|
5427
|
-
reason: "unusable under oxlint for Svelte, and not for want of configuration. Svelte 5's runes ($state, $props, $derived, $effect) are compiler globals, and `$store` auto-subscription invents an identifier per store ($_, $page, $currentAdmin, \u2026), so the names cannot be enumerated. eslint-plugin-svelte's PARSER supplies both; oxlint has no Svelte parser, so it reported 1641 undefined identifiers on hr-management, none of them real. TypeScript and svelte-check already report genuinely undefined identifiers, which is why react and nest never enabled this rule either."
|
|
5428
|
-
},
|
|
5429
|
-
"no-unreachable": "error",
|
|
5430
|
-
"no-unsafe-finally": "error",
|
|
5431
|
-
"no-unsafe-negation": [
|
|
5432
|
-
"error",
|
|
5433
|
-
{
|
|
5434
|
-
enforceForOrderingRelations: false
|
|
5435
|
-
}
|
|
5436
|
-
],
|
|
5437
|
-
"no-unsafe-optional-chaining": [
|
|
5438
|
-
"error",
|
|
5439
|
-
{
|
|
5440
|
-
disallowArithmeticOperators: false
|
|
5441
|
-
}
|
|
5442
|
-
],
|
|
5443
|
-
"no-unused-labels": "error",
|
|
5444
|
-
"no-unused-private-class-members": "error",
|
|
5445
|
-
"no-useless-backreference": "error",
|
|
5446
|
-
"no-useless-catch": "error",
|
|
5447
|
-
"no-useless-escape": [
|
|
5448
|
-
"error",
|
|
5449
|
-
{
|
|
5450
|
-
allowRegexCharacters: []
|
|
5451
|
-
}
|
|
5452
|
-
],
|
|
5453
|
-
"no-with": "error",
|
|
5454
|
-
"prefer-rest-params": {
|
|
5455
|
-
severity: "warn",
|
|
5456
|
-
reason: "error in the module's eslint config, but never actually reported: `eslint src/lib/analytics/useAnalytics.js` exits clean today while oxlint finds 3 real violations in it. Held at warn so adoption does not turn a green module red, and restored to error once they are fixed. Not auto-fixable, verified with --fix."
|
|
5457
|
-
},
|
|
5458
|
-
"prefer-spread": {
|
|
5459
|
-
severity: "warn",
|
|
5460
|
-
reason: "error in the module's eslint config, but never actually reported: `eslint src/lib/analytics/useAnalytics.js` exits clean today while oxlint finds 3 real violations in it. Held at warn so adoption does not turn a green module red, and restored to error once they are fixed. Not auto-fixable, verified with --fix."
|
|
5461
|
-
},
|
|
5462
|
-
"require-yield": "error",
|
|
5463
|
-
"typescript/no-explicit-any": {
|
|
5464
|
-
severity: "warn",
|
|
5465
|
-
reason: "libs/front/ui enforces it and apps/front/hr-management turns it off; enforcing it would newly fail hr-management, so it reports for both instead of breaking one"
|
|
5466
|
-
},
|
|
5467
|
-
"typescript/no-require-imports": "error",
|
|
5468
|
-
"typescript/no-unused-vars": {
|
|
5469
|
-
severity: "warn",
|
|
5470
|
-
reason: "the two modules disagree: libs/front/ui runs it at error with no ignore patterns, apps/front/hr-management at warn with the ^_ patterns kept here (both read from eslint --print-config). Holding it at error would newly fail hr-management, so it reports for both and keeps the patterns hr-management already relies on",
|
|
5471
|
-
options: [
|
|
5472
|
-
{
|
|
5473
|
-
varsIgnorePattern: "^_",
|
|
5474
|
-
argsIgnorePattern: "^_",
|
|
5475
|
-
destructuredArrayIgnorePattern: "^_"
|
|
5476
|
-
}
|
|
5477
|
-
]
|
|
5478
|
-
},
|
|
5479
|
-
"use-isnan": [
|
|
5480
|
-
"error",
|
|
5481
|
-
{
|
|
5482
|
-
enforceForIndexOf: false,
|
|
5483
|
-
enforceForSwitchCase: true
|
|
5484
|
-
}
|
|
5485
|
-
],
|
|
5486
|
-
"valid-typeof": [
|
|
5487
|
-
"error",
|
|
5488
|
-
{
|
|
5489
|
-
requireStringLiterals: false
|
|
5490
|
-
}
|
|
5491
|
-
]
|
|
5492
|
-
},
|
|
5493
|
-
uncovered: {
|
|
5494
|
-
"svelte/comment-directive": "oxlint cannot parse Svelte templates, so the eslint-disable comments inside markup are neither read nor honoured",
|
|
5495
|
-
"svelte/system": "the plugin internal rule that reports Svelte parse errors; it needs the Svelte parser",
|
|
5496
|
-
"svelte/no-at-debug-tags": "reads {@debug} in the template",
|
|
5497
|
-
"svelte/no-at-html-tags": "reads {@html} in the template, the XSS guard; the highest-value loss in this list",
|
|
5498
|
-
"svelte/no-dupe-else-if-blocks": "reads {#if}/{:else if} chains in the template",
|
|
5499
|
-
"svelte/no-dupe-style-properties": "reads the style block",
|
|
5500
|
-
"svelte/no-dynamic-slot-name": "reads <slot> in the template",
|
|
5501
|
-
"svelte/no-inner-declarations": "the Svelte-aware variant; the core rule it shadows is not a substitute inside markup",
|
|
5502
|
-
"svelte/no-not-function-handler": "reads on:event handlers in the template",
|
|
5503
|
-
"svelte/no-object-in-text-mustaches": "reads {expression} interpolation in the template",
|
|
5504
|
-
"svelte/no-shorthand-style-property-overrides": "reads the style block",
|
|
5505
|
-
"svelte/no-unknown-style-directive-property": "reads style: directives in the template",
|
|
5506
|
-
"svelte/no-unused-svelte-ignore": "reads svelte-ignore comments in the template",
|
|
5507
|
-
"svelte/valid-compile": "runs the Svelte compiler and reports its warnings",
|
|
5508
|
-
"no-dupe-args": "no oxlint equivalent (TypeScript rejects duplicate parameter names anyway)",
|
|
5509
|
-
"no-octal": "no oxlint equivalent"
|
|
5510
|
-
}
|
|
5511
|
-
};
|
|
5512
|
-
|
|
5513
|
-
// src/roles/lint/presets/tools.json
|
|
5514
|
-
var tools_default = {
|
|
5515
|
-
plugins: ["typescript", "oxc", "unicorn", "import", "node"],
|
|
5516
|
-
jsPlugins: [],
|
|
5517
|
-
settings: null,
|
|
5518
|
-
rules: {
|
|
5519
|
-
"for-direction": "error",
|
|
5520
|
-
"no-async-promise-executor": "error",
|
|
5521
|
-
"no-case-declarations": "error",
|
|
5522
|
-
"no-compare-neg-zero": "error",
|
|
5523
|
-
"no-cond-assign": ["error", "except-parens"],
|
|
5524
|
-
"no-constant-binary-expression": [
|
|
5525
|
-
"error",
|
|
5526
|
-
{
|
|
5527
|
-
checkRelationalComparisons: false
|
|
5528
|
-
}
|
|
5529
|
-
],
|
|
5530
|
-
"no-constant-condition": [
|
|
5531
|
-
"error",
|
|
5532
|
-
{
|
|
5533
|
-
checkLoops: "allExceptWhileTrue"
|
|
5534
|
-
}
|
|
5535
|
-
],
|
|
5536
|
-
"no-control-regex": "error",
|
|
5537
|
-
"no-debugger": "error",
|
|
5538
|
-
"no-delete-var": "error",
|
|
5539
|
-
"no-dupe-else-if": "error",
|
|
5540
|
-
"no-duplicate-case": "error",
|
|
5541
|
-
"no-empty": [
|
|
5542
|
-
"error",
|
|
5543
|
-
{
|
|
5544
|
-
allowEmptyCatch: false
|
|
5545
|
-
}
|
|
5546
|
-
],
|
|
5547
|
-
"no-empty-character-class": "error",
|
|
5548
|
-
"no-empty-pattern": [
|
|
5549
|
-
"error",
|
|
5550
|
-
{
|
|
5551
|
-
allowObjectPatternsAsParameters: false
|
|
5552
|
-
}
|
|
5553
|
-
],
|
|
5554
|
-
"no-empty-static-block": "error",
|
|
5555
|
-
"no-ex-assign": "error",
|
|
5556
|
-
"no-extra-boolean-cast": ["error", {}],
|
|
5557
|
-
"no-fallthrough": [
|
|
5558
|
-
"error",
|
|
5559
|
-
{
|
|
5560
|
-
allowEmptyCase: false,
|
|
5561
|
-
reportUnusedFallthroughComment: false
|
|
5562
|
-
}
|
|
5563
|
-
],
|
|
5564
|
-
"no-global-assign": [
|
|
5565
|
-
"error",
|
|
5566
|
-
{
|
|
5567
|
-
exceptions: []
|
|
5568
|
-
}
|
|
5569
|
-
],
|
|
5570
|
-
"no-invalid-regexp": ["error", {}],
|
|
5571
|
-
"no-irregular-whitespace": [
|
|
5572
|
-
"error",
|
|
5573
|
-
{
|
|
5574
|
-
skipComments: false,
|
|
5575
|
-
skipJSXText: false,
|
|
5576
|
-
skipRegExps: false,
|
|
5577
|
-
skipStrings: true,
|
|
5578
|
-
skipTemplates: false
|
|
5579
|
-
}
|
|
5580
|
-
],
|
|
5581
|
-
"no-loss-of-precision": "error",
|
|
5582
|
-
"no-misleading-character-class": [
|
|
5583
|
-
"error",
|
|
5584
|
-
{
|
|
5585
|
-
allowEscape: false
|
|
5586
|
-
}
|
|
5587
|
-
],
|
|
5588
|
-
"no-nonoctal-decimal-escape": "error",
|
|
5589
|
-
"no-prototype-builtins": "error",
|
|
5590
|
-
"no-regex-spaces": "error",
|
|
5591
|
-
"no-self-assign": [
|
|
5592
|
-
"error",
|
|
5593
|
-
{
|
|
5594
|
-
props: true
|
|
5595
|
-
}
|
|
5596
|
-
],
|
|
5597
|
-
"no-shadow-restricted-names": [
|
|
5598
|
-
"error",
|
|
5599
|
-
{
|
|
5600
|
-
reportGlobalThis: true
|
|
5601
|
-
}
|
|
5602
|
-
],
|
|
5603
|
-
"no-sparse-arrays": "error",
|
|
5604
|
-
"no-unassigned-vars": "error",
|
|
5605
|
-
"no-unsafe-finally": "error",
|
|
5606
|
-
"no-unsafe-optional-chaining": [
|
|
5607
|
-
"error",
|
|
5608
|
-
{
|
|
5609
|
-
disallowArithmeticOperators: false
|
|
5610
|
-
}
|
|
5611
|
-
],
|
|
5612
|
-
"no-unused-labels": "error",
|
|
5613
|
-
"no-unused-private-class-members": "error",
|
|
5614
|
-
"no-useless-assignment": "error",
|
|
5615
|
-
"no-useless-backreference": "error",
|
|
5616
|
-
"no-useless-catch": "error",
|
|
5617
|
-
"no-useless-escape": [
|
|
5618
|
-
"error",
|
|
5619
|
-
{
|
|
5620
|
-
allowRegexCharacters: []
|
|
5621
|
-
}
|
|
5622
|
-
],
|
|
5623
|
-
"preserve-caught-error": [
|
|
5624
|
-
"error",
|
|
5625
|
-
{
|
|
5626
|
-
requireCatchParameter: false
|
|
5627
|
-
}
|
|
5628
|
-
],
|
|
5629
|
-
"require-yield": "error",
|
|
5630
|
-
"typescript/no-explicit-any": "error",
|
|
5631
|
-
"typescript/no-require-imports": "error",
|
|
5632
|
-
"typescript/no-unused-vars": [
|
|
5633
|
-
"error",
|
|
5634
|
-
{
|
|
5635
|
-
argsIgnorePattern: "^_",
|
|
5636
|
-
varsIgnorePattern: "^_"
|
|
5637
|
-
}
|
|
5638
|
-
],
|
|
5639
|
-
"use-isnan": [
|
|
5640
|
-
"error",
|
|
5641
|
-
{
|
|
5642
|
-
enforceForIndexOf: false,
|
|
5643
|
-
enforceForSwitchCase: true
|
|
5644
|
-
}
|
|
5645
|
-
],
|
|
5646
|
-
"valid-typeof": [
|
|
5647
|
-
"error",
|
|
5648
|
-
{
|
|
5649
|
-
requireStringLiterals: false
|
|
5650
|
-
}
|
|
5651
|
-
]
|
|
5652
|
-
},
|
|
5653
|
-
uncovered: {
|
|
5654
|
-
"no-octal": "no oxlint equivalent"
|
|
5655
|
-
}
|
|
5656
|
-
};
|
|
5657
|
-
|
|
5658
|
-
// src/roles/lint/preset-data.ts
|
|
5659
|
-
var SHARED_RULES = shared_default2.rules;
|
|
5660
|
-
var PRESET_FILES = {
|
|
5661
|
-
nest: nest_default,
|
|
5662
|
-
node: node_default,
|
|
5663
|
-
react: react_default,
|
|
5664
|
-
svelte: svelte_default,
|
|
5665
|
-
tools: tools_default
|
|
5666
|
-
};
|
|
5667
|
-
var VARIANT_FILES = {
|
|
5668
|
-
"react-lib": react_lib_default
|
|
5669
|
-
};
|
|
5670
|
-
var LINT_PRESETS = Object.keys(PRESET_FILES);
|
|
5671
|
-
var GENERATED_LINT_PRESETS = [
|
|
5672
|
-
...Object.keys(PRESET_FILES),
|
|
5673
|
-
...Object.keys(VARIANT_FILES)
|
|
5674
|
-
];
|
|
5675
|
-
function hasLintPreset(preset) {
|
|
5676
|
-
return preset in PRESET_FILES;
|
|
5677
|
-
}
|
|
5678
|
-
function presetFile(preset) {
|
|
5679
|
-
return VARIANT_FILES[preset] ?? PRESET_FILES[preset] ?? node_default;
|
|
5680
|
-
}
|
|
5681
|
-
function sharedRules() {
|
|
5682
|
-
return SHARED_RULES;
|
|
5683
|
-
}
|
|
5684
|
-
function presetRules(preset) {
|
|
5685
|
-
return presetFile(preset).rules;
|
|
5686
|
-
}
|
|
5687
|
-
function uncoveredFor(preset) {
|
|
5688
|
-
return Object.entries(presetFile(preset).uncovered ?? {}).map(([rule, reason]) => ({ rule, reason })).sort((left, right) => left.rule.localeCompare(right.rule));
|
|
5689
|
-
}
|
|
5690
|
-
|
|
5691
|
-
// src/roles/lint/rule-data.ts
|
|
5692
|
-
var sharedRules2 = sharedRules();
|
|
5693
|
-
function isDecision(value) {
|
|
5694
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5695
|
-
}
|
|
5696
|
-
function severityOf(value) {
|
|
5697
|
-
if (isDecision(value)) return value.severity;
|
|
5698
|
-
if (Array.isArray(value)) return String(value[0]);
|
|
5699
|
-
return value;
|
|
5700
|
-
}
|
|
5701
|
-
function validate(preset, rules) {
|
|
5702
|
-
for (const [rule, value] of Object.entries(rules)) {
|
|
5703
|
-
const severity = severityOf(value);
|
|
5704
|
-
if (!["off", "warn", "error"].includes(severity)) {
|
|
5705
|
-
throw new Error(
|
|
5706
|
-
`${preset}: rule "${rule}" has severity "${severity}"; expected off, warn or error`
|
|
5707
|
-
);
|
|
5708
|
-
}
|
|
5709
|
-
if (severity === "error") continue;
|
|
5710
|
-
const reason = isDecision(value) ? value.reason.trim() : "";
|
|
5711
|
-
if (reason === "") {
|
|
5712
|
-
throw new Error(
|
|
5713
|
-
`${preset}: rule "${rule}" is set to "${severity}" without a reason. Every rule that is not enforced must say why, so --inspect can tell a developer what is not running. Use { "severity": "${severity}", "reason": "..." }.`
|
|
5714
|
-
);
|
|
5715
|
-
}
|
|
5716
|
-
}
|
|
5717
|
-
}
|
|
5718
|
-
function rejectTwoSpellings(label, rules) {
|
|
5719
|
-
const seen = /* @__PURE__ */ new Map();
|
|
5720
|
-
for (const rule of Object.keys(rules)) {
|
|
5721
|
-
const canonical = canonicalRuleName(rule);
|
|
5722
|
-
const other = seen.get(canonical);
|
|
5723
|
-
if (other !== void 0) {
|
|
5724
|
-
throw new Error(
|
|
5725
|
-
`${label}: "${other}" and "${rule}" are the same rule to oxlint (${canonical}). Configure it once, under one name: oxlint keeps both and picks one by hash order.`
|
|
5726
|
-
);
|
|
5727
|
-
}
|
|
5728
|
-
seen.set(canonical, rule);
|
|
5729
|
-
}
|
|
5730
|
-
}
|
|
5731
|
-
function layered(preset) {
|
|
5732
|
-
const base = sharedRules();
|
|
5733
|
-
const layer = presetRules(preset);
|
|
5734
|
-
validate("base", base);
|
|
5735
|
-
validate(preset, layer);
|
|
5736
|
-
return { ...base, ...layer };
|
|
5737
|
-
}
|
|
5738
|
-
function toRuleMap(label, rules) {
|
|
5739
|
-
validate(label, rules);
|
|
5740
|
-
rejectTwoSpellings(label, rules);
|
|
5741
|
-
const entries = Object.entries(rules).map(([rule, value]) => {
|
|
5742
|
-
if (!isDecision(value)) return [rule, value];
|
|
5743
|
-
const options = value.options ?? [];
|
|
5744
|
-
return [rule, options.length > 0 ? [value.severity, ...options] : value.severity];
|
|
5745
|
-
});
|
|
5746
|
-
return Object.fromEntries(entries);
|
|
5747
|
-
}
|
|
5748
|
-
function rulesFor(preset) {
|
|
5749
|
-
return toRuleMap(preset, layered(preset));
|
|
5750
|
-
}
|
|
5751
|
-
function disabledFor(preset) {
|
|
5752
|
-
return decisionsAt(preset, "off");
|
|
5753
|
-
}
|
|
5754
|
-
function downgradedFor(preset) {
|
|
5755
|
-
return decisionsAt(preset, "warn");
|
|
5756
|
-
}
|
|
5757
|
-
function decisionsAt(preset, severity) {
|
|
5758
|
-
return Object.entries(layered(preset)).filter(([, value]) => isDecision(value) && value.severity === severity).map(([rule, value]) => ({ rule, reason: value.reason })).sort((left, right) => left.rule.localeCompare(right.rule));
|
|
5759
|
-
}
|
|
5760
|
-
|
|
5761
3347
|
// src/roles/lint/disabled-rules.ts
|
|
5762
3348
|
function disabledRulesFor(preset) {
|
|
5763
3349
|
return disabledFor(preset);
|
|
@@ -5805,110 +3391,6 @@ function committedExtendsList(cwd, configFile) {
|
|
|
5805
3391
|
}
|
|
5806
3392
|
}
|
|
5807
3393
|
|
|
5808
|
-
// src/roles/lint/module-own-config.ts
|
|
5809
|
-
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5810
|
-
function pluginKey(entry) {
|
|
5811
|
-
if (typeof entry === "string") return entry;
|
|
5812
|
-
if (isRecord(entry) && typeof entry.name === "string") return entry.name;
|
|
5813
|
-
if (isRecord(entry) && typeof entry.specifier === "string") return entry.specifier;
|
|
5814
|
-
return void 0;
|
|
5815
|
-
}
|
|
5816
|
-
function governedRuleNames(preset) {
|
|
5817
|
-
return /* @__PURE__ */ new Set([
|
|
5818
|
-
...Object.keys(preset.rules),
|
|
5819
|
-
...(preset.overrides ?? []).flatMap((override) => Object.keys(override.rules))
|
|
5820
|
-
]);
|
|
5821
|
-
}
|
|
5822
|
-
function governedRules(preset) {
|
|
5823
|
-
const governed = /* @__PURE__ */ new Map();
|
|
5824
|
-
for (const name of governedRuleNames(preset)) {
|
|
5825
|
-
const canonical = canonicalRuleName(name);
|
|
5826
|
-
if (!governed.has(canonical)) governed.set(canonical, name);
|
|
5827
|
-
}
|
|
5828
|
-
return governed;
|
|
5829
|
-
}
|
|
5830
|
-
function moduleOwnBlocks(committed, preset) {
|
|
5831
|
-
const blocks = {};
|
|
5832
|
-
const kept = [];
|
|
5833
|
-
const dropped = [];
|
|
5834
|
-
if (Array.isArray(committed.plugins)) {
|
|
5835
|
-
const own = committed.plugins.filter(
|
|
5836
|
-
(name) => typeof name === "string" && !preset.plugins.includes(name)
|
|
5837
|
-
);
|
|
5838
|
-
if (own.length > 0) {
|
|
5839
|
-
blocks.plugins = own;
|
|
5840
|
-
kept.push(
|
|
5841
|
-
`kept this module's own plugins (${own.join(", ")}): the preset does not enable them`
|
|
5842
|
-
);
|
|
5843
|
-
}
|
|
5844
|
-
}
|
|
5845
|
-
if (Array.isArray(committed.jsPlugins)) {
|
|
5846
|
-
const presetKeys = new Set(preset.jsPlugins.map((entry) => pluginKey(entry)));
|
|
5847
|
-
const own = [];
|
|
5848
|
-
for (const entry of committed.jsPlugins) {
|
|
5849
|
-
const key = pluginKey(entry);
|
|
5850
|
-
if (key !== void 0 && presetKeys.has(key)) dropped.push(`jsPlugins ${key}`);
|
|
5851
|
-
else own.push(entry);
|
|
5852
|
-
}
|
|
5853
|
-
if (own.length > 0) {
|
|
5854
|
-
blocks.jsPlugins = own;
|
|
5855
|
-
kept.push(
|
|
5856
|
-
`kept ${own.length} jsPlugin(s) this module added (${own.map((entry) => pluginKey(entry) ?? "?").join(", ")})`
|
|
5857
|
-
);
|
|
5858
|
-
}
|
|
5859
|
-
}
|
|
5860
|
-
if (isRecord(committed.settings)) {
|
|
5861
|
-
const presetSettings = preset.settings ?? {};
|
|
5862
|
-
const own = {};
|
|
5863
|
-
for (const [key, value] of Object.entries(committed.settings)) {
|
|
5864
|
-
if (key in presetSettings) dropped.push(`settings.${key}`);
|
|
5865
|
-
else own[key] = value;
|
|
5866
|
-
}
|
|
5867
|
-
if (Object.keys(own).length > 0) {
|
|
5868
|
-
blocks.settings = own;
|
|
5869
|
-
kept.push(`kept this module's own settings (${Object.keys(own).join(", ")})`);
|
|
5870
|
-
}
|
|
5871
|
-
}
|
|
5872
|
-
if (Array.isArray(committed.overrides)) {
|
|
5873
|
-
const governed = governedRules(preset);
|
|
5874
|
-
const byFiles = /* @__PURE__ */ new Map();
|
|
5875
|
-
for (const block of committed.overrides) {
|
|
5876
|
-
if (!isRecord(block) || !Array.isArray(block.files)) continue;
|
|
5877
|
-
const files = JSON.stringify([...block.files].map(String).sort());
|
|
5878
|
-
const rules = {};
|
|
5879
|
-
for (const [rule, value] of Object.entries(isRecord(block.rules) ? block.rules : {})) {
|
|
5880
|
-
const presetSpelling = governed.get(canonicalRuleName(rule));
|
|
5881
|
-
if (presetSpelling === void 0) rules[rule] = value;
|
|
5882
|
-
else
|
|
5883
|
-
dropped.push(
|
|
5884
|
-
`overrides[${block.files.join(", ")}] ${describeRuleKey(rule, presetSpelling)}`
|
|
5885
|
-
);
|
|
5886
|
-
}
|
|
5887
|
-
const { rules: _rules, ...rest } = block;
|
|
5888
|
-
const merged = byFiles.get(files);
|
|
5889
|
-
if (merged === void 0) {
|
|
5890
|
-
byFiles.set(files, { ...rest, ...Object.keys(rules).length > 0 ? { rules } : {} });
|
|
5891
|
-
continue;
|
|
5892
|
-
}
|
|
5893
|
-
const { files: _sameFiles, ...others } = rest;
|
|
5894
|
-
const mergedRules = { ...isRecord(merged.rules) ? merged.rules : {}, ...rules };
|
|
5895
|
-
Object.assign(
|
|
5896
|
-
merged,
|
|
5897
|
-
others,
|
|
5898
|
-
Object.keys(mergedRules).length > 0 ? { rules: mergedRules } : {}
|
|
5899
|
-
);
|
|
5900
|
-
}
|
|
5901
|
-
const own = [...byFiles.values()].filter((block) => Object.keys(block).length > 1);
|
|
5902
|
-
if (own.length > 0) {
|
|
5903
|
-
blocks.overrides = own;
|
|
5904
|
-
kept.push(
|
|
5905
|
-
`kept ${own.length} override block(s) this module set (${own.map((block) => block.files.join(", ")).join("; ")})`
|
|
5906
|
-
);
|
|
5907
|
-
}
|
|
5908
|
-
}
|
|
5909
|
-
return { blocks, kept, dropped };
|
|
5910
|
-
}
|
|
5911
|
-
|
|
5912
3394
|
// src/roles/lint/parse-diagnostics.ts
|
|
5913
3395
|
function ruleId(code) {
|
|
5914
3396
|
const inner = /\(([^)]+)\)/.exec(code);
|
|
@@ -5958,26 +3440,6 @@ function errorCountsByConfigRule(stdout) {
|
|
|
5958
3440
|
return counts;
|
|
5959
3441
|
}
|
|
5960
3442
|
|
|
5961
|
-
// src/roles/lint/presets.ts
|
|
5962
|
-
var hasRuleData = (name) => GENERATED_LINT_PRESETS.includes(name);
|
|
5963
|
-
function lintPresetFor(preset) {
|
|
5964
|
-
const file = presetFile(preset);
|
|
5965
|
-
const resolved = hasRuleData(preset) ? preset : "node";
|
|
5966
|
-
return {
|
|
5967
|
-
plugins: file.plugins,
|
|
5968
|
-
jsPlugins: file.jsPlugins,
|
|
5969
|
-
...file.settings === null ? {} : { settings: file.settings },
|
|
5970
|
-
...file.renames ? { renames: file.renames } : {},
|
|
5971
|
-
...file.overrides ? {
|
|
5972
|
-
overrides: file.overrides.map((override, index) => ({
|
|
5973
|
-
files: override.files,
|
|
5974
|
-
rules: toRuleMap(`${preset} override ${index}`, override.rules)
|
|
5975
|
-
}))
|
|
5976
|
-
} : {},
|
|
5977
|
-
rules: rulesFor(resolved)
|
|
5978
|
-
};
|
|
5979
|
-
}
|
|
5980
|
-
|
|
5981
3443
|
// src/roles/lint/adapters/oxlint/plan.ts
|
|
5982
3444
|
import { existsSync as existsSync13, readFileSync as readFileSync14 } from "node:fs";
|
|
5983
3445
|
import { join as join20 } from "node:path";
|
|
@@ -6261,7 +3723,7 @@ function plan2(context2) {
|
|
|
6261
3723
|
const carried = [.../* @__PURE__ */ new Set([...DEFAULT_IGNORE_PATTERNS, ...moduleOwn])];
|
|
6262
3724
|
const committed = committedConfig(context2.cwd);
|
|
6263
3725
|
const { kept: teamRules, governed: droppedRules } = moduleOwnRules(
|
|
6264
|
-
|
|
3726
|
+
isRecord(committed.rules) ? committed.rules : {},
|
|
6265
3727
|
lintPresetFor(variant)
|
|
6266
3728
|
);
|
|
6267
3729
|
const teamBlocks = moduleOwnBlocks(committed, lintPresetFor(variant));
|
|
@@ -6407,14 +3869,14 @@ function committedExtends(cwd) {
|
|
|
6407
3869
|
return [];
|
|
6408
3870
|
}
|
|
6409
3871
|
}
|
|
6410
|
-
var
|
|
3872
|
+
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6411
3873
|
function committedConfig(cwd) {
|
|
6412
3874
|
try {
|
|
6413
3875
|
const parsed = parseJsonc(
|
|
6414
3876
|
readFileSync14(join20(cwd, LINT_CONFIG_FILE), "utf8"),
|
|
6415
3877
|
LINT_CONFIG_FILE
|
|
6416
3878
|
);
|
|
6417
|
-
return
|
|
3879
|
+
return isRecord(parsed) ? parsed : {};
|
|
6418
3880
|
} catch {
|
|
6419
3881
|
return {};
|
|
6420
3882
|
}
|
|
@@ -6809,7 +4271,11 @@ ${result.stderr ?? ""}`);
|
|
|
6809
4271
|
// else here: the stub still holds only `extends` and `ignorePatterns`, so a module with
|
|
6810
4272
|
// a team layer reports `conformant=true drift=[]` and used to say nothing at all about
|
|
6811
4273
|
// the extra rules it runs. See `extra-layers` for why that state is legitimate.
|
|
6812
|
-
layers: extraLayers(ctx.cwd, committedExtendsList(ctx.cwd, LINT_CONFIG_FILE))
|
|
4274
|
+
layers: extraLayers(ctx.cwd, committedExtendsList(ctx.cwd, LINT_CONFIG_FILE)),
|
|
4275
|
+
// What this module ADDS in its own stub: rules the preset does not name. Not drift, by the
|
|
4276
|
+
// criterion a re-init keeps them by, so without this list they would be invisible. A rule
|
|
4277
|
+
// the preset names, set differently, is not here: it is a conflict, reported as drift.
|
|
4278
|
+
...describeAdditions(readModuleAdditions(ctx.cwd))
|
|
6813
4279
|
};
|
|
6814
4280
|
}
|
|
6815
4281
|
/** How many rules the extended preset enforces, read from the preset on disk. */
|
|
@@ -6951,6 +4417,28 @@ ${result.stderr ?? ""}`);
|
|
|
6951
4417
|
);
|
|
6952
4418
|
}
|
|
6953
4419
|
};
|
|
4420
|
+
function describeAdditions(additions) {
|
|
4421
|
+
return {
|
|
4422
|
+
added: additions.rules.map((entry) => ({
|
|
4423
|
+
rule: entry.rule,
|
|
4424
|
+
...entry.files === void 0 ? {} : { files: entry.files },
|
|
4425
|
+
value: entry.value,
|
|
4426
|
+
reason: describeAddition(entry.value, entry.files)
|
|
4427
|
+
})),
|
|
4428
|
+
addedConfig: additions.config.map((entry) => ({
|
|
4429
|
+
entry: entry.entry,
|
|
4430
|
+
key: entry.key,
|
|
4431
|
+
...entry.files === void 0 ? {} : { files: entry.files },
|
|
4432
|
+
value: entry.value,
|
|
4433
|
+
reason: typeof entry.value === "string" ? "the preset does not set it" : `${JSON.stringify(entry.value)}: the preset does not set it`
|
|
4434
|
+
}))
|
|
4435
|
+
};
|
|
4436
|
+
}
|
|
4437
|
+
function describeAddition(value, files) {
|
|
4438
|
+
const where = files === void 0 ? "" : ` for ${files.join(", ")}`;
|
|
4439
|
+
const off = files === void 0 && isOffRuleValue(value) ? "; off changes nothing, since a rule the preset does not name is already off" : "";
|
|
4440
|
+
return `${JSON.stringify(value)}${where}: the preset does not name this rule${off}`;
|
|
4441
|
+
}
|
|
6954
4442
|
|
|
6955
4443
|
// src/roles/lint/register.ts
|
|
6956
4444
|
function registerLint() {
|
|
@@ -10781,7 +8269,7 @@ import { createRequire } from "node:module";
|
|
|
10781
8269
|
import { join as join33 } from "node:path";
|
|
10782
8270
|
|
|
10783
8271
|
// src/roles/typescript/presets/nest.json
|
|
10784
|
-
var
|
|
8272
|
+
var nest_default = {
|
|
10785
8273
|
compilerOptions: {
|
|
10786
8274
|
module: "esnext",
|
|
10787
8275
|
moduleResolution: "bundler",
|
|
@@ -10798,7 +8286,7 @@ var nest_default2 = {
|
|
|
10798
8286
|
};
|
|
10799
8287
|
|
|
10800
8288
|
// src/roles/typescript/presets/node.json
|
|
10801
|
-
var
|
|
8289
|
+
var node_default = {
|
|
10802
8290
|
compilerOptions: {
|
|
10803
8291
|
module: "esnext",
|
|
10804
8292
|
moduleResolution: "bundler",
|
|
@@ -10811,7 +8299,7 @@ var node_default2 = {
|
|
|
10811
8299
|
};
|
|
10812
8300
|
|
|
10813
8301
|
// src/roles/typescript/presets/react.json
|
|
10814
|
-
var
|
|
8302
|
+
var react_default = {
|
|
10815
8303
|
compilerOptions: {
|
|
10816
8304
|
target: "ES2023",
|
|
10817
8305
|
lib: ["ES2023", "DOM", "DOM.Iterable"],
|
|
@@ -10830,7 +8318,7 @@ var react_default2 = {
|
|
|
10830
8318
|
};
|
|
10831
8319
|
|
|
10832
8320
|
// src/roles/typescript/presets/shared.json
|
|
10833
|
-
var
|
|
8321
|
+
var shared_default2 = {
|
|
10834
8322
|
$schema: "https://json.schemastore.org/tsconfig",
|
|
10835
8323
|
compilerOptions: {
|
|
10836
8324
|
strict: true,
|
|
@@ -10856,15 +8344,15 @@ var shared_default3 = {
|
|
|
10856
8344
|
};
|
|
10857
8345
|
|
|
10858
8346
|
// src/roles/typescript/preset-data.ts
|
|
10859
|
-
var SHARED =
|
|
8347
|
+
var SHARED = shared_default2;
|
|
10860
8348
|
var LAYERS = {
|
|
10861
|
-
nest:
|
|
10862
|
-
node:
|
|
10863
|
-
react:
|
|
8349
|
+
nest: nest_default,
|
|
8350
|
+
node: node_default,
|
|
8351
|
+
react: react_default
|
|
10864
8352
|
};
|
|
10865
8353
|
var SHIPPED_PRESETS = Object.keys(LAYERS).sort();
|
|
10866
8354
|
var DEFERRED_RULES = Object.entries(SHARED.deferred ?? {}).map(([rule, entry]) => ({ rule, phase: entry.phase, reason: entry.reason })).sort((left, right) => left.rule.localeCompare(right.rule));
|
|
10867
|
-
function
|
|
8355
|
+
function validate() {
|
|
10868
8356
|
for (const { rule, phase, reason } of DEFERRED_RULES) {
|
|
10869
8357
|
if (!Number.isInteger(phase) || phase < 2) {
|
|
10870
8358
|
throw new Error(
|
|
@@ -10890,7 +8378,7 @@ function validate2() {
|
|
|
10890
8378
|
}
|
|
10891
8379
|
}
|
|
10892
8380
|
}
|
|
10893
|
-
|
|
8381
|
+
validate();
|
|
10894
8382
|
function hasShippedPreset(preset) {
|
|
10895
8383
|
return preset in LAYERS;
|
|
10896
8384
|
}
|