@nielspeter/eess-ts 0.2.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -35
- package/dist/builders/call-rule-builder.d.ts +66 -26
- package/dist/builders/call-rule-builder.d.ts.map +1 -1
- package/dist/builders/call-rule-builder.js +75 -32
- package/dist/builders/call-rule-builder.js.map +1 -1
- package/dist/builders/class-rule-builder.d.ts +125 -26
- package/dist/builders/class-rule-builder.d.ts.map +1 -1
- package/dist/builders/class-rule-builder.js +141 -55
- package/dist/builders/class-rule-builder.js.map +1 -1
- package/dist/builders/correspondence-builder.d.ts +287 -0
- package/dist/builders/correspondence-builder.d.ts.map +1 -0
- package/dist/builders/correspondence-builder.js +385 -0
- package/dist/builders/correspondence-builder.js.map +1 -0
- package/dist/builders/correspondence-findings.d.ts +104 -0
- package/dist/builders/correspondence-findings.d.ts.map +1 -0
- package/dist/builders/correspondence-findings.js +301 -0
- package/dist/builders/correspondence-findings.js.map +1 -0
- package/dist/builders/cross-layer-builder.d.ts +99 -16
- package/dist/builders/cross-layer-builder.d.ts.map +1 -1
- package/dist/builders/cross-layer-builder.js +182 -35
- package/dist/builders/cross-layer-builder.js.map +1 -1
- package/dist/builders/function-rule-builder.d.ts +144 -25
- package/dist/builders/function-rule-builder.d.ts.map +1 -1
- package/dist/builders/function-rule-builder.js +177 -39
- package/dist/builders/function-rule-builder.js.map +1 -1
- package/dist/builders/jsx-rule-builder.d.ts +70 -14
- package/dist/builders/jsx-rule-builder.d.ts.map +1 -1
- package/dist/builders/jsx-rule-builder.js +73 -14
- package/dist/builders/jsx-rule-builder.js.map +1 -1
- package/dist/builders/module-rule-builder.d.ts +2 -2
- package/dist/builders/module-rule-builder.d.ts.map +1 -1
- package/dist/builders/module-rule-builder.js +16 -19
- package/dist/builders/module-rule-builder.js.map +1 -1
- package/dist/builders/scoped-function-rule-builder.d.ts +11 -0
- package/dist/builders/scoped-function-rule-builder.d.ts.map +1 -1
- package/dist/builders/scoped-function-rule-builder.js +12 -0
- package/dist/builders/scoped-function-rule-builder.js.map +1 -1
- package/dist/builders/slice-discovery-message.d.ts +36 -0
- package/dist/builders/slice-discovery-message.d.ts.map +1 -0
- package/dist/builders/slice-discovery-message.js +181 -0
- package/dist/builders/slice-discovery-message.js.map +1 -0
- package/dist/builders/slice-rule-builder.d.ts +151 -12
- package/dist/builders/slice-rule-builder.d.ts.map +1 -1
- package/dist/builders/slice-rule-builder.js +243 -35
- package/dist/builders/slice-rule-builder.js.map +1 -1
- package/dist/builders/type-rule-builder.d.ts +95 -24
- package/dist/builders/type-rule-builder.d.ts.map +1 -1
- package/dist/builders/type-rule-builder.js +109 -42
- package/dist/builders/type-rule-builder.js.map +1 -1
- package/dist/{helpers → builders}/within.d.ts +2 -2
- package/dist/builders/within.d.ts.map +1 -0
- package/dist/{helpers → builders}/within.js +1 -1
- package/dist/builders/within.js.map +1 -0
- package/dist/cli/commands/baseline.d.ts +8 -3
- package/dist/cli/commands/baseline.d.ts.map +1 -1
- package/dist/cli/commands/baseline.js +111 -7
- package/dist/cli/commands/baseline.js.map +1 -1
- package/dist/cli/commands/check.d.ts +7 -2
- package/dist/cli/commands/check.d.ts.map +1 -1
- package/dist/cli/commands/check.js +385 -47
- package/dist/cli/commands/check.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts +29 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +224 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/explain.d.ts +2 -1
- package/dist/cli/commands/explain.d.ts.map +1 -1
- package/dist/cli/commands/explain.js +19 -10
- package/dist/cli/commands/explain.js.map +1 -1
- package/dist/cli/commands/init.d.ts +9 -3
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +162 -137
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/import-rule-module.d.ts +29 -0
- package/dist/cli/import-rule-module.d.ts.map +1 -0
- package/dist/cli/import-rule-module.js +47 -0
- package/dist/cli/import-rule-module.js.map +1 -0
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +101 -43
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/load-rules.d.ts +6 -11
- package/dist/cli/load-rules.d.ts.map +1 -1
- package/dist/cli/load-rules.js +25 -32
- package/dist/cli/load-rules.js.map +1 -1
- package/dist/cli/resolve-config.d.ts +0 -8
- package/dist/cli/resolve-config.d.ts.map +1 -1
- package/dist/cli/resolve-config.js +25 -55
- package/dist/cli/resolve-config.js.map +1 -1
- package/dist/cli/rule-file-findings.d.ts +178 -0
- package/dist/cli/rule-file-findings.d.ts.map +1 -0
- package/dist/cli/rule-file-findings.js +351 -0
- package/dist/cli/rule-file-findings.js.map +1 -0
- package/dist/cli/watch.d.ts +17 -34
- package/dist/cli/watch.d.ts.map +1 -1
- package/dist/cli/watch.js +14 -129
- package/dist/cli/watch.js.map +1 -1
- package/dist/conditions/body-analysis-function.d.ts.map +1 -1
- package/dist/conditions/body-analysis-function.js +16 -7
- package/dist/conditions/body-analysis-function.js.map +1 -1
- package/dist/conditions/body-analysis-module.d.ts.map +1 -1
- package/dist/conditions/body-analysis-module.js +14 -9
- package/dist/conditions/body-analysis-module.js.map +1 -1
- package/dist/conditions/body-analysis.d.ts.map +1 -1
- package/dist/conditions/body-analysis.js +16 -7
- package/dist/conditions/body-analysis.js.map +1 -1
- package/dist/conditions/call.d.ts.map +1 -1
- package/dist/conditions/call.js +41 -19
- package/dist/conditions/call.js.map +1 -1
- package/dist/conditions/catch-analysis.d.ts +2 -1
- package/dist/conditions/catch-analysis.d.ts.map +1 -1
- package/dist/conditions/catch-analysis.js.map +1 -1
- package/dist/conditions/cross-layer.d.ts +2 -10
- package/dist/conditions/cross-layer.d.ts.map +1 -1
- package/dist/conditions/cross-layer.js +227 -23
- package/dist/conditions/cross-layer.js.map +1 -1
- package/dist/conditions/dependency.d.ts +35 -6
- package/dist/conditions/dependency.d.ts.map +1 -1
- package/dist/conditions/dependency.js +299 -45
- package/dist/conditions/dependency.js.map +1 -1
- package/dist/conditions/exports.d.ts.map +1 -1
- package/dist/conditions/exports.js +41 -37
- package/dist/conditions/exports.js.map +1 -1
- package/dist/conditions/function.d.ts.map +1 -1
- package/dist/conditions/function.js +19 -5
- package/dist/conditions/function.js.map +1 -1
- package/dist/conditions/helpers.d.ts +2 -1
- package/dist/conditions/helpers.d.ts.map +1 -1
- package/dist/conditions/helpers.js +4 -1
- package/dist/conditions/helpers.js.map +1 -1
- package/dist/conditions/jsx.d.ts.map +1 -1
- package/dist/conditions/jsx.js +7 -2
- package/dist/conditions/jsx.js.map +1 -1
- package/dist/conditions/match-identity.d.ts +43 -0
- package/dist/conditions/match-identity.d.ts.map +1 -0
- package/dist/conditions/match-identity.js +43 -0
- package/dist/conditions/match-identity.js.map +1 -0
- package/dist/conditions/members.d.ts.map +1 -1
- package/dist/conditions/members.js +20 -6
- package/dist/conditions/members.js.map +1 -1
- package/dist/conditions/reverse-dependency.d.ts +18 -5
- package/dist/conditions/reverse-dependency.d.ts.map +1 -1
- package/dist/conditions/reverse-dependency.js +155 -93
- package/dist/conditions/reverse-dependency.js.map +1 -1
- package/dist/conditions/slice.d.ts +86 -2
- package/dist/conditions/slice.d.ts.map +1 -1
- package/dist/conditions/slice.js +234 -53
- package/dist/conditions/slice.js.map +1 -1
- package/dist/conditions/structural.d.ts.map +1 -1
- package/dist/conditions/structural.js +16 -4
- package/dist/conditions/structural.js.map +1 -1
- package/dist/core/check-all.d.ts +19 -0
- package/dist/core/check-all.d.ts.map +1 -0
- package/dist/core/check-all.js +150 -0
- package/dist/core/check-all.js.map +1 -0
- package/dist/core/combinators.d.ts +48 -0
- package/dist/core/combinators.d.ts.map +1 -0
- package/dist/core/combinators.js +49 -0
- package/dist/core/combinators.js.map +1 -0
- package/dist/core/descendant-cache.d.ts +36 -0
- package/dist/core/descendant-cache.d.ts.map +1 -0
- package/dist/core/descendant-cache.js +117 -0
- package/dist/core/descendant-cache.js.map +1 -0
- package/dist/core/diagnose.d.ts +234 -0
- package/dist/core/diagnose.d.ts.map +1 -0
- package/dist/core/diagnose.js +390 -0
- package/dist/core/diagnose.js.map +1 -0
- package/dist/core/disk-set.d.ts +48 -0
- package/dist/core/disk-set.d.ts.map +1 -0
- package/dist/core/disk-set.js +218 -0
- package/dist/core/disk-set.js.map +1 -0
- package/dist/core/element-cache.d.ts +75 -0
- package/dist/core/element-cache.d.ts.map +1 -0
- package/dist/core/element-cache.js +32 -0
- package/dist/core/element-cache.js.map +1 -0
- package/dist/core/empty-project-advice.d.ts +75 -0
- package/dist/core/empty-project-advice.d.ts.map +1 -0
- package/dist/core/empty-project-advice.js +61 -0
- package/dist/core/empty-project-advice.js.map +1 -0
- package/dist/core/exclusion-comments.d.ts +19 -0
- package/dist/core/exclusion-comments.d.ts.map +1 -0
- package/dist/core/exclusion-comments.js +7 -0
- package/dist/core/exclusion-comments.js.map +1 -0
- package/dist/core/execute-rule.d.ts +158 -0
- package/dist/core/execute-rule.d.ts.map +1 -0
- package/dist/core/execute-rule.js +666 -0
- package/dist/core/execute-rule.js.map +1 -0
- package/dist/core/glob-diagnosis.d.ts +78 -0
- package/dist/core/glob-diagnosis.d.ts.map +1 -0
- package/dist/core/glob-diagnosis.js +134 -0
- package/dist/core/glob-diagnosis.js.map +1 -0
- package/dist/core/glob-evaluator.d.ts +48 -0
- package/dist/core/glob-evaluator.d.ts.map +1 -0
- package/dist/core/glob-evaluator.js +89 -0
- package/dist/core/glob-evaluator.js.map +1 -0
- package/dist/core/import-candidates.d.ts +60 -0
- package/dist/core/import-candidates.d.ts.map +1 -0
- package/dist/core/import-candidates.js +93 -0
- package/dist/core/import-candidates.js.map +1 -0
- package/dist/core/import-options.d.ts +55 -2
- package/dist/core/import-options.d.ts.map +1 -1
- package/dist/core/import-options.js +64 -0
- package/dist/core/import-options.js.map +1 -1
- package/dist/core/invalidate-on-modify.d.ts +20 -0
- package/dist/core/invalidate-on-modify.d.ts.map +1 -0
- package/dist/core/invalidate-on-modify.js +26 -0
- package/dist/core/invalidate-on-modify.js.map +1 -0
- package/dist/core/line-index.d.ts +3 -0
- package/dist/core/line-index.d.ts.map +1 -0
- package/dist/core/line-index.js +227 -0
- package/dist/core/line-index.js.map +1 -0
- package/dist/core/metric-violation.d.ts +86 -0
- package/dist/core/metric-violation.d.ts.map +1 -0
- package/dist/core/metric-violation.js +132 -0
- package/dist/core/metric-violation.js.map +1 -0
- package/dist/core/module-edges.d.ts +361 -0
- package/dist/core/module-edges.d.ts.map +1 -0
- package/dist/core/module-edges.js +593 -0
- package/dist/core/module-edges.js.map +1 -0
- package/dist/core/object-literal-functions.d.ts +42 -0
- package/dist/core/object-literal-functions.d.ts.map +1 -0
- package/dist/core/object-literal-functions.js +75 -0
- package/dist/core/object-literal-functions.js.map +1 -0
- package/dist/core/orphan-exclusions.d.ts +44 -0
- package/dist/core/orphan-exclusions.d.ts.map +1 -0
- package/dist/core/orphan-exclusions.js +224 -0
- package/dist/core/orphan-exclusions.js.map +1 -0
- package/dist/core/pair-condition.d.ts +32 -3
- package/dist/core/pair-condition.d.ts.map +1 -1
- package/dist/core/path-universe.d.ts +22 -0
- package/dist/core/path-universe.d.ts.map +1 -0
- package/dist/core/path-universe.js +45 -0
- package/dist/core/path-universe.js.map +1 -0
- package/dist/core/per-root-compiler-options.d.ts +20 -0
- package/dist/core/per-root-compiler-options.d.ts.map +1 -0
- package/dist/core/per-root-compiler-options.js +57 -0
- package/dist/core/per-root-compiler-options.js.map +1 -0
- package/dist/core/project-relative.d.ts +98 -0
- package/dist/core/project-relative.d.ts.map +1 -0
- package/dist/core/project-relative.js +185 -0
- package/dist/core/project-relative.js.map +1 -0
- package/dist/core/project.d.ts +7 -1
- package/dist/core/project.d.ts.map +1 -1
- package/dist/core/project.js +29 -4
- package/dist/core/project.js.map +1 -1
- package/dist/core/rule-builder.d.ts +303 -0
- package/dist/core/rule-builder.d.ts.map +1 -0
- package/dist/core/rule-builder.js +463 -0
- package/dist/core/rule-builder.js.map +1 -0
- package/dist/core/rule-declaration.d.ts +32 -0
- package/dist/core/rule-declaration.d.ts.map +1 -0
- package/dist/core/rule-declaration.js +88 -0
- package/dist/core/rule-declaration.js.map +1 -0
- package/dist/core/terminal-builder.d.ts +629 -0
- package/dist/core/terminal-builder.d.ts.map +1 -0
- package/dist/core/terminal-builder.js +807 -0
- package/dist/core/terminal-builder.js.map +1 -0
- package/dist/core/terminal-execution.d.ts +39 -0
- package/dist/core/terminal-execution.d.ts.map +1 -0
- package/dist/core/terminal-execution.js +103 -0
- package/dist/core/terminal-execution.js.map +1 -0
- package/dist/core/ts-comment-mask.d.ts +2 -0
- package/dist/core/ts-comment-mask.d.ts.map +1 -0
- package/dist/core/ts-comment-mask.js +102 -0
- package/dist/core/ts-comment-mask.js.map +1 -0
- package/dist/core/vacuity-diagnosis.d.ts +103 -0
- package/dist/core/vacuity-diagnosis.d.ts.map +1 -0
- package/dist/core/vacuity-diagnosis.js +415 -0
- package/dist/core/vacuity-diagnosis.js.map +1 -0
- package/dist/core/violation.d.ts +16 -11
- package/dist/core/violation.d.ts.map +1 -1
- package/dist/core/violation.js +33 -13
- package/dist/core/violation.js.map +1 -1
- package/dist/graphql/graphql-rule-builder.d.ts +95 -0
- package/dist/graphql/graphql-rule-builder.d.ts.map +1 -0
- package/dist/graphql/graphql-rule-builder.js +127 -0
- package/dist/graphql/graphql-rule-builder.js.map +1 -0
- package/dist/graphql/index.d.ts +1 -0
- package/dist/graphql/index.d.ts.map +1 -1
- package/dist/graphql/index.js +2 -1
- package/dist/graphql/index.js.map +1 -1
- package/dist/graphql/resolver-rule-builder.d.ts +44 -23
- package/dist/graphql/resolver-rule-builder.d.ts.map +1 -1
- package/dist/graphql/resolver-rule-builder.js +80 -72
- package/dist/graphql/resolver-rule-builder.js.map +1 -1
- package/dist/graphql/schema-loader.d.ts +21 -0
- package/dist/graphql/schema-loader.d.ts.map +1 -1
- package/dist/graphql/schema-loader.js +82 -12
- package/dist/graphql/schema-loader.js.map +1 -1
- package/dist/graphql/schema-predicates.d.ts.map +1 -1
- package/dist/graphql/schema-predicates.js +17 -12
- package/dist/graphql/schema-predicates.js.map +1 -1
- package/dist/graphql/schema-rule-builder.d.ts +15 -24
- package/dist/graphql/schema-rule-builder.d.ts.map +1 -1
- package/dist/graphql/schema-rule-builder.js +39 -77
- package/dist/graphql/schema-rule-builder.js.map +1 -1
- package/dist/helpers/baseline-diagnostics.d.ts +45 -0
- package/dist/helpers/baseline-diagnostics.d.ts.map +1 -0
- package/dist/helpers/baseline-diagnostics.js +168 -0
- package/dist/helpers/baseline-diagnostics.js.map +1 -0
- package/dist/helpers/baseline-generator.d.ts +28 -0
- package/dist/helpers/baseline-generator.d.ts.map +1 -0
- package/dist/helpers/baseline-generator.js +27 -0
- package/dist/helpers/baseline-generator.js.map +1 -0
- package/dist/helpers/baseline.d.ts +336 -0
- package/dist/helpers/baseline.d.ts.map +1 -0
- package/dist/helpers/baseline.js +664 -0
- package/dist/helpers/baseline.js.map +1 -0
- package/dist/helpers/body-traversal.d.ts +27 -2
- package/dist/helpers/body-traversal.d.ts.map +1 -1
- package/dist/helpers/body-traversal.js +135 -16
- package/dist/helpers/body-traversal.js.map +1 -1
- package/dist/helpers/callback-extractor.d.ts.map +1 -1
- package/dist/helpers/callback-extractor.js +53 -84
- package/dist/helpers/callback-extractor.js.map +1 -1
- package/dist/helpers/complexity.d.ts +13 -5
- package/dist/helpers/complexity.d.ts.map +1 -1
- package/dist/helpers/complexity.js +15 -6
- package/dist/helpers/complexity.js.map +1 -1
- package/dist/helpers/diff-aware.d.ts +16 -0
- package/dist/helpers/diff-aware.d.ts.map +1 -0
- package/dist/helpers/diff-aware.js +16 -0
- package/dist/helpers/diff-aware.js.map +1 -0
- package/dist/helpers/matchers.d.ts +68 -7
- package/dist/helpers/matchers.d.ts.map +1 -1
- package/dist/helpers/matchers.js +164 -86
- package/dist/helpers/matchers.js.map +1 -1
- package/dist/helpers/slice-graph.d.ts +100 -8
- package/dist/helpers/slice-graph.d.ts.map +1 -1
- package/dist/helpers/slice-graph.js +126 -34
- package/dist/helpers/slice-graph.js.map +1 -1
- package/dist/helpers/tarjan.d.ts +0 -14
- package/dist/helpers/tarjan.d.ts.map +1 -1
- package/dist/helpers/tarjan.js +29 -16
- package/dist/helpers/tarjan.js.map +1 -1
- package/dist/index.d.ts +55 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +67 -15
- package/dist/index.js.map +1 -1
- package/dist/models/arch-call.d.ts +3 -2
- package/dist/models/arch-call.d.ts.map +1 -1
- package/dist/models/arch-call.js.map +1 -1
- package/dist/models/arch-function.d.ts +54 -8
- package/dist/models/arch-function.d.ts.map +1 -1
- package/dist/models/arch-function.js +145 -8
- package/dist/models/arch-function.js.map +1 -1
- package/dist/models/arch-jsx-element.d.ts.map +1 -1
- package/dist/models/arch-jsx-element.js +18 -19
- package/dist/models/arch-jsx-element.js.map +1 -1
- package/dist/models/slice.d.ts +33 -9
- package/dist/models/slice.d.ts.map +1 -1
- package/dist/models/slice.js +129 -19
- package/dist/models/slice.js.map +1 -1
- package/dist/predicates/call.d.ts.map +1 -1
- package/dist/predicates/call.js +5 -0
- package/dist/predicates/call.js.map +1 -1
- package/dist/predicates/identity.d.ts +21 -0
- package/dist/predicates/identity.d.ts.map +1 -1
- package/dist/predicates/identity.js +75 -3
- package/dist/predicates/identity.js.map +1 -1
- package/dist/predicates/index.d.ts +1 -1
- package/dist/predicates/index.d.ts.map +1 -1
- package/dist/predicates/index.js +1 -1
- package/dist/predicates/index.js.map +1 -1
- package/dist/predicates/jsx.d.ts.map +1 -1
- package/dist/predicates/jsx.js +2 -1
- package/dist/predicates/jsx.js.map +1 -1
- package/dist/predicates/metrics.d.ts +4 -2
- package/dist/predicates/metrics.d.ts.map +1 -1
- package/dist/predicates/metrics.js +4 -2
- package/dist/predicates/metrics.js.map +1 -1
- package/dist/predicates/module.d.ts +4 -12
- package/dist/predicates/module.d.ts.map +1 -1
- package/dist/predicates/module.js +57 -37
- package/dist/predicates/module.js.map +1 -1
- package/dist/presets/agent-guardrails.d.ts +49 -16
- package/dist/presets/agent-guardrails.d.ts.map +1 -1
- package/dist/presets/agent-guardrails.js +308 -19
- package/dist/presets/agent-guardrails.js.map +1 -1
- package/dist/presets/boundaries.d.ts +46 -3
- package/dist/presets/boundaries.d.ts.map +1 -1
- package/dist/presets/boundaries.js +132 -23
- package/dist/presets/boundaries.js.map +1 -1
- package/dist/presets/data-layer.d.ts +23 -3
- package/dist/presets/data-layer.d.ts.map +1 -1
- package/dist/presets/data-layer.js +58 -16
- package/dist/presets/data-layer.js.map +1 -1
- package/dist/presets/index.d.ts +10 -5
- package/dist/presets/index.d.ts.map +1 -1
- package/dist/presets/index.js +19 -3
- package/dist/presets/index.js.map +1 -1
- package/dist/presets/layered.d.ts +47 -3
- package/dist/presets/layered.d.ts.map +1 -1
- package/dist/presets/layered.js +66 -29
- package/dist/presets/layered.js.map +1 -1
- package/dist/presets/recommended.d.ts +81 -10
- package/dist/presets/recommended.d.ts.map +1 -1
- package/dist/presets/recommended.js +25 -23
- package/dist/presets/recommended.js.map +1 -1
- package/dist/presets/shared.d.ts +267 -2
- package/dist/presets/shared.d.ts.map +1 -1
- package/dist/presets/shared.js +367 -4
- package/dist/presets/shared.js.map +1 -1
- package/dist/rules/code-quality.d.ts.map +1 -1
- package/dist/rules/code-quality.js +15 -6
- package/dist/rules/code-quality.js.map +1 -1
- package/dist/rules/hygiene.d.ts +1 -1
- package/dist/rules/hygiene.js +1 -1
- package/dist/rules/metrics-function.d.ts +2 -1
- package/dist/rules/metrics-function.d.ts.map +1 -1
- package/dist/rules/metrics-function.js +63 -39
- package/dist/rules/metrics-function.js.map +1 -1
- package/dist/rules/metrics.d.ts +2 -1
- package/dist/rules/metrics.d.ts.map +1 -1
- package/dist/rules/metrics.js +80 -47
- package/dist/rules/metrics.js.map +1 -1
- package/dist/smells/clusters.d.ts +78 -0
- package/dist/smells/clusters.d.ts.map +1 -0
- package/dist/smells/clusters.js +124 -0
- package/dist/smells/clusters.js.map +1 -0
- package/dist/smells/duplicate-bodies.d.ts +92 -5
- package/dist/smells/duplicate-bodies.d.ts.map +1 -1
- package/dist/smells/duplicate-bodies.js +203 -73
- package/dist/smells/duplicate-bodies.js.map +1 -1
- package/dist/smells/duplicate-report.d.ts +90 -0
- package/dist/smells/duplicate-report.d.ts.map +1 -0
- package/dist/smells/duplicate-report.js +344 -0
- package/dist/smells/duplicate-report.js.map +1 -0
- package/dist/smells/fingerprint.d.ts +20 -1
- package/dist/smells/fingerprint.d.ts.map +1 -1
- package/dist/smells/fingerprint.js +27 -3
- package/dist/smells/fingerprint.js.map +1 -1
- package/dist/smells/inconsistent-siblings.d.ts +128 -7
- package/dist/smells/inconsistent-siblings.d.ts.map +1 -1
- package/dist/smells/inconsistent-siblings.js +288 -86
- package/dist/smells/inconsistent-siblings.js.map +1 -1
- package/dist/smells/sibling-files.d.ts +47 -0
- package/dist/smells/sibling-files.d.ts.map +1 -0
- package/dist/smells/sibling-files.js +104 -0
- package/dist/smells/sibling-files.js.map +1 -0
- package/dist/smells/similar-pairs.d.ts +28 -0
- package/dist/smells/similar-pairs.d.ts.map +1 -0
- package/dist/smells/similar-pairs.js +134 -0
- package/dist/smells/similar-pairs.js.map +1 -0
- package/dist/smells/smell-builder.d.ts +57 -12
- package/dist/smells/smell-builder.d.ts.map +1 -1
- package/dist/smells/smell-builder.js +112 -14
- package/dist/smells/smell-builder.js.map +1 -1
- package/dist/smells/variation.d.ts +47 -0
- package/dist/smells/variation.d.ts.map +1 -0
- package/dist/smells/variation.js +90 -0
- package/dist/smells/variation.js.map +1 -0
- package/dist/tsconfig/index.d.ts +19 -0
- package/dist/tsconfig/index.d.ts.map +1 -0
- package/dist/tsconfig/index.js +20 -0
- package/dist/tsconfig/index.js.map +1 -0
- package/dist/tsconfig/tsconfig-builder.d.ts +42 -9
- package/dist/tsconfig/tsconfig-builder.d.ts.map +1 -1
- package/dist/tsconfig/tsconfig-builder.js +65 -16
- package/dist/tsconfig/tsconfig-builder.js.map +1 -1
- package/package.json +4 -2
- package/dist/core/module-dependencies.d.ts +0 -28
- package/dist/core/module-dependencies.d.ts.map +0 -1
- package/dist/core/module-dependencies.js +0 -35
- package/dist/core/module-dependencies.js.map +0 -1
- package/dist/helpers/within.d.ts.map +0 -1
- package/dist/helpers/within.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"complexity.js","sourceRoot":"","sources":["../../src/helpers/complexity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"complexity.js","sourceRoot":"","sources":["../../src/helpers/complexity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAGtD,sEAAsE;AACtE,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;IAC7B,UAAU,CAAC,WAAW;IACtB,UAAU,CAAC,qBAAqB;IAChC,UAAU,CAAC,YAAY;IACvB,UAAU,CAAC,cAAc;IACzB,UAAU,CAAC,cAAc;IACzB,UAAU,CAAC,cAAc;IACzB,UAAU,CAAC,WAAW;IACtB,UAAU,CAAC,WAAW;IACtB,UAAU,CAAC,UAAU;CACtB,CAAC,CAAA;AAEF,iDAAiD;AACjD,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,UAAU,CAAC,uBAAuB,EAAE,KAAK;IACzC,UAAU,CAAC,WAAW,EAAE,KAAK;IAC7B,UAAU,CAAC,qBAAqB,EAAE,KAAK;CACxC,CAAC,CAAA;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAsB;IACzD,IAAI,CAAC,IAAI;QAAE,OAAO,CAAC,CAAA;IAEnB,IAAI,UAAU,GAAG,CAAC,CAAA;IAElB,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;QAC/C,IAAI,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;YAC7C,UAAU,EAAE,CAAA;QACd,CAAC;QAED,gDAAgD;QAChD,IAAI,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC;YACxC,MAAM,MAAM,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAC,OAAO,EAAE,CAAA;YACtD,IAAI,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;gBAClC,UAAU,EAAE,CAAA;YACd,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAA;AACnB,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,WAAW,CAAC,IAAU;IACpC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAA;AAC7B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,GAAqB;IAC/C,OAAO,GAAG,CAAC,UAAU,EAAE,CAAC,MAAM,CAAA;AAChC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diff-aware filtering for `eess-ts` — the kernel's, re-exported.
|
|
3
|
+
*
|
|
4
|
+
* This package carried its own copy, and the copies diverged in BOTH directions:
|
|
5
|
+
* this one gained `DiffFilter.baseBranch` (plan 0071) and a failure message that
|
|
6
|
+
* names why `git diff` could not run, while the kernel's kept the fuller
|
|
7
|
+
* explanation of why a `bypassFilters` finding must never be filtered out. When
|
|
8
|
+
* they were unified the kernel took this copy's behaviour and kept its own
|
|
9
|
+
* docstring, so neither side lost anything.
|
|
10
|
+
*
|
|
11
|
+
* Re-exported from the kernel ROOT (not `/internal`), so ADR-011 clause 2 is
|
|
12
|
+
* satisfied — a dialect must not forward family plumbing, and these are public
|
|
13
|
+
* API on both sides.
|
|
14
|
+
*/
|
|
15
|
+
export { diffAware, DiffFilter } from '@nielspeter/eess';
|
|
16
|
+
//# sourceMappingURL=diff-aware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff-aware.d.ts","sourceRoot":"","sources":["../../src/helpers/diff-aware.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diff-aware filtering for `eess-ts` — the kernel's, re-exported.
|
|
3
|
+
*
|
|
4
|
+
* This package carried its own copy, and the copies diverged in BOTH directions:
|
|
5
|
+
* this one gained `DiffFilter.baseBranch` (plan 0071) and a failure message that
|
|
6
|
+
* names why `git diff` could not run, while the kernel's kept the fuller
|
|
7
|
+
* explanation of why a `bypassFilters` finding must never be filtered out. When
|
|
8
|
+
* they were unified the kernel took this copy's behaviour and kept its own
|
|
9
|
+
* docstring, so neither side lost anything.
|
|
10
|
+
*
|
|
11
|
+
* Re-exported from the kernel ROOT (not `/internal`), so ADR-011 clause 2 is
|
|
12
|
+
* satisfied — a dialect must not forward family plumbing, and these are public
|
|
13
|
+
* API on both sides.
|
|
14
|
+
*/
|
|
15
|
+
export { diffAware, DiffFilter } from '@nielspeter/eess';
|
|
16
|
+
//# sourceMappingURL=diff-aware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff-aware.js","sourceRoot":"","sources":["../../src/helpers/diff-aware.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -21,6 +21,29 @@ export interface ExpressionMatcher {
|
|
|
21
21
|
* The condition layer enforces this — matchers can assume the kind is correct.
|
|
22
22
|
*/
|
|
23
23
|
matches(node: Node): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Every position at which this matcher's pattern matches a comment attached
|
|
26
|
+
* to `node`. Absent for an ordinary matcher, where the node *is* the match.
|
|
27
|
+
*
|
|
28
|
+
* **Presence of this method is what makes a matcher a trivia matcher.** It
|
|
29
|
+
* was two members — a `matchesTrivia: true` flag beside a single-position
|
|
30
|
+
* accessor — and that admitted four states of which two were silently wrong:
|
|
31
|
+
* the flag without the accessor reported every node at its own line, and the
|
|
32
|
+
* accessor without the flag reproduced the original bug. Both were measured.
|
|
33
|
+
* One member cannot disagree with itself.
|
|
34
|
+
*
|
|
35
|
+
* **Every** position, not the first. A node routinely carries several
|
|
36
|
+
* matching comments — four stacked `// TODO` lines lead one statement — and
|
|
37
|
+
* the unit of a comment finding is the **comment**. Returning one collapsed
|
|
38
|
+
* them, which left `noStubComments()` reporting a single finding for four
|
|
39
|
+
* stubs: a ratchet hole exactly where agent-written stubs accumulate, in the
|
|
40
|
+
* rule `agentGuardrails` ships to catch them.
|
|
41
|
+
*
|
|
42
|
+
* Must be **pure and stable for a node**: the traversal calls it to
|
|
43
|
+
* enumerate and deduplicate matches, and the conditions layer calls it again
|
|
44
|
+
* to name the line, across a layer boundary, and the two must agree.
|
|
45
|
+
*/
|
|
46
|
+
matchedTriviaPositions?(node: Node): readonly number[];
|
|
24
47
|
}
|
|
25
48
|
/**
|
|
26
49
|
* Match a CallExpression by function/method name.
|
|
@@ -82,13 +105,50 @@ export declare function newExpr(nameOrRegex: string | RegExp): ExpressionMatcher
|
|
|
82
105
|
export declare function expression(textOrRegex: string | RegExp): ExpressionMatcher;
|
|
83
106
|
export declare function property(name: string | RegExp, value?: boolean | number | string | RegExp): ExpressionMatcher;
|
|
84
107
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
108
|
+
* A stub marker: an **UPPERCASE** marker word opening a comment line, or either
|
|
109
|
+
* of two phrases.
|
|
110
|
+
*
|
|
111
|
+
* Both halves of that are load-bearing, and each was found by a prose false
|
|
112
|
+
* positive in this repo's own source
|
|
113
|
+
* ([ts-archunit bug 0053](https://github.com/nielspeter/ts-archunit/blob/main/bugs/fixed/0053-the-stub-rule-matched-prose-about-stubs.md)).
|
|
114
|
+
*
|
|
115
|
+
* **Anchored to a line start**, because unanchored it matched every sentence that
|
|
116
|
+
* mentions a marker — including the docstring of the fix for bug 0052, which says
|
|
117
|
+
* the word TODO three times.
|
|
118
|
+
*
|
|
119
|
+
* **Case-sensitive for the markers**, because anchoring alone was not enough: a
|
|
120
|
+
* wrapped JSDoc sentence put the lowercase word "stub," at the start of a
|
|
121
|
+
* continuation line. Uppercase is the convention (`// TODO:`, `// FIXME`) and the
|
|
122
|
+
* casing is what separates a marker from the English word. Known limit, stated
|
|
123
|
+
* rather than discovered: a lowercase `// todo: x` is not matched. That is the
|
|
124
|
+
* price of not matching "the todo list below", and it is the right trade for a
|
|
125
|
+
* rule whose findings must fail a build.
|
|
126
|
+
*
|
|
127
|
+
* The phrase forms are anchored too, because unanchored they matched
|
|
128
|
+
* `noStubComments()`'s own docstring, which lists them. That is bug 0043's shape:
|
|
129
|
+
* documentation of a syntax read as the syntax.
|
|
130
|
+
*
|
|
131
|
+
* **The phrase forms ARE case-insensitive, since v0.55.0** — and were not between v0.47.0
|
|
132
|
+
* and then, though this text claimed otherwise for part of that window. The `i` flag was
|
|
133
|
+
* dropped for the whole expression, correctly, because the MARKERS must stay
|
|
134
|
+
* case-sensitive: that is what rejects a wrapped JSDoc line beginning `stub,`. But only
|
|
135
|
+
* the phrases' INITIAL letters were alternated, so `// NOT IMPLEMENTED` and
|
|
136
|
+
* `// COMING SOON` silently stopped matching. The reasoning offered at the time was
|
|
137
|
+
* "nobody writes NOT IMPLEMENTED", which is precisely the casing the marker branch would
|
|
138
|
+
* otherwise have caught. `anyCase` below DERIVES the alternation, so the class cannot come
|
|
139
|
+
* back one letter at a time
|
|
140
|
+
* ([ts-archunit bug 0061](https://github.com/nielspeter/ts-archunit/blob/main/bugs/fixed/0061-an-all-caps-stub-marker-no-longer-matches.md)).
|
|
141
|
+
*/
|
|
142
|
+
/**
|
|
143
|
+
* A word matched case-INSENSITIVELY, letter by letter.
|
|
88
144
|
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
145
|
+
* JavaScript has no inline `(?i:…)` group and the `i` flag applies to the whole expression,
|
|
146
|
+
* which cannot be used here — the MARKER branch must stay case-sensitive. So the phrase
|
|
147
|
+
* branch alternates its own letters, and it is DERIVED rather than hand-written, because
|
|
148
|
+
* hand-writing it is what produced bug 0061: `[Nn]ot\\s+[Ii]mplemented` alternates the
|
|
149
|
+
* first letter of each word and nothing else.
|
|
91
150
|
*/
|
|
151
|
+
export declare function anyCase(word: string): string;
|
|
92
152
|
export declare const STUB_PATTERNS: RegExp;
|
|
93
153
|
/**
|
|
94
154
|
* Match comments attached to AST nodes.
|
|
@@ -98,8 +158,9 @@ export declare const STUB_PATTERNS: RegExp;
|
|
|
98
158
|
* `syntaxKinds: undefined` so the broad traversal path visits every node,
|
|
99
159
|
* and `matches(node)` checks that node's comment ranges.
|
|
100
160
|
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
161
|
+
* The same comment is visible as trivia of several nested nodes, so the
|
|
162
|
+
* traversal deduplicates by the comment's own position — this matcher holds no
|
|
163
|
+
* state of its own (bug 0034).
|
|
103
164
|
*
|
|
104
165
|
* @param pattern - String substring or RegExp to test against comment text.
|
|
105
166
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchers.d.ts","sourceRoot":"","sources":["../../src/helpers/matchers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"matchers.d.ts","sourceRoot":"","sources":["../../src/helpers/matchers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAA8C,MAAM,UAAU,CAAA;AAGvF;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,QAA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CAoBzE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,OAAO,IAAI,iBAAiB,CAwB3C;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAC9B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,iBAAiB,CAoB/E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,iBAAiB,CAQpD"}
|
package/dist/helpers/matchers.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Node, SyntaxKind } from 'ts-morph';
|
|
2
|
+
import { writeStderr } from '@nielspeter/eess/internal';
|
|
2
3
|
/**
|
|
3
4
|
* Normalize expression text for matching.
|
|
4
5
|
* Replaces optional chaining `?.` with `.` so users don't need to
|
|
@@ -9,6 +10,36 @@ import { Node, SyntaxKind } from 'ts-morph';
|
|
|
9
10
|
function normalizeText(text) {
|
|
10
11
|
return text.replace(/\?\./g, '.');
|
|
11
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* One matcher over a node's text, string-exact or regex.
|
|
15
|
+
*
|
|
16
|
+
* `call`, `access` and `newExpr` were the same fourteen lines three times over
|
|
17
|
+
* — string branch, regex branch, both re-testing the node kind — which
|
|
18
|
+
* `no-copy-paste` reported as two clusters at 95% and 92%. What differs is the
|
|
19
|
+
* kind, the two label halves, and HOW the text is read, so `textOf` is a
|
|
20
|
+
* callback returning `undefined` for a node of the wrong kind: the guard and
|
|
21
|
+
* the extraction are one decision, and splitting them is how a matcher ends up
|
|
22
|
+
* testing one kind and reading another.
|
|
23
|
+
*
|
|
24
|
+
* `newExpr` passing raw `getText()` while the other two normalize optional
|
|
25
|
+
* chaining is a real difference, and it is now visible as one line at each
|
|
26
|
+
* call site rather than buried in the middle of a copy.
|
|
27
|
+
*/
|
|
28
|
+
function textMatcher(pattern, spec) {
|
|
29
|
+
return {
|
|
30
|
+
description: typeof pattern === 'string'
|
|
31
|
+
? `${spec.exact} '${pattern}'`
|
|
32
|
+
: `${spec.fuzzy} ${String(pattern)}`,
|
|
33
|
+
syntaxKinds: [spec.kind],
|
|
34
|
+
matches(node) {
|
|
35
|
+
const typed = node.asKind(spec.kind);
|
|
36
|
+
if (typed === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
const text = spec.textOf(typed);
|
|
39
|
+
return typeof pattern === 'string' ? text === pattern : pattern.test(text);
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
}
|
|
12
43
|
/**
|
|
13
44
|
* Match a CallExpression by function/method name.
|
|
14
45
|
*
|
|
@@ -24,28 +55,12 @@ function normalizeText(text) {
|
|
|
24
55
|
* call(/^console\./) // matches console.log, console.warn, etc.
|
|
25
56
|
*/
|
|
26
57
|
export function call(nameOrRegex) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return false;
|
|
34
|
-
const text = normalizeText(node.getExpression().getText());
|
|
35
|
-
return text === nameOrRegex;
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
description: `call matching ${String(nameOrRegex)}`,
|
|
41
|
-
syntaxKinds: [SyntaxKind.CallExpression],
|
|
42
|
-
matches(node) {
|
|
43
|
-
if (!Node.isCallExpression(node))
|
|
44
|
-
return false;
|
|
45
|
-
const text = normalizeText(node.getExpression().getText());
|
|
46
|
-
return nameOrRegex.test(text);
|
|
47
|
-
},
|
|
48
|
-
};
|
|
58
|
+
return textMatcher(nameOrRegex, {
|
|
59
|
+
kind: SyntaxKind.CallExpression,
|
|
60
|
+
exact: 'call to',
|
|
61
|
+
fuzzy: 'call matching',
|
|
62
|
+
textOf: (node) => normalizeText(node.getExpression().getText()),
|
|
63
|
+
});
|
|
49
64
|
}
|
|
50
65
|
/**
|
|
51
66
|
* Match a PropertyAccessExpression by the dotted chain.
|
|
@@ -61,28 +76,12 @@ export function call(nameOrRegex) {
|
|
|
61
76
|
* access(/^this\.db/) // matches this.db, this.db.query, etc.
|
|
62
77
|
*/
|
|
63
78
|
export function access(chain) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return false;
|
|
71
|
-
const text = normalizeText(node.getText());
|
|
72
|
-
return text === chain;
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
return {
|
|
77
|
-
description: `access matching ${String(chain)}`,
|
|
78
|
-
syntaxKinds: [SyntaxKind.PropertyAccessExpression],
|
|
79
|
-
matches(node) {
|
|
80
|
-
if (!Node.isPropertyAccessExpression(node))
|
|
81
|
-
return false;
|
|
82
|
-
const text = normalizeText(node.getText());
|
|
83
|
-
return chain.test(text);
|
|
84
|
-
},
|
|
85
|
-
};
|
|
79
|
+
return textMatcher(chain, {
|
|
80
|
+
kind: SyntaxKind.PropertyAccessExpression,
|
|
81
|
+
exact: 'access to',
|
|
82
|
+
fuzzy: 'access matching',
|
|
83
|
+
textOf: (node) => normalizeText(node.getText()),
|
|
84
|
+
});
|
|
86
85
|
}
|
|
87
86
|
/**
|
|
88
87
|
* Match a NewExpression by constructor name.
|
|
@@ -98,28 +97,14 @@ export function access(chain) {
|
|
|
98
97
|
* newExpr(/Error$/) // matches new Error, new DomainError, new TypeError, etc.
|
|
99
98
|
*/
|
|
100
99
|
export function newExpr(nameOrRegex) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
return text === nameOrRegex;
|
|
110
|
-
},
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
return {
|
|
114
|
-
description: `new matching ${String(nameOrRegex)}`,
|
|
115
|
-
syntaxKinds: [SyntaxKind.NewExpression],
|
|
116
|
-
matches(node) {
|
|
117
|
-
if (!Node.isNewExpression(node))
|
|
118
|
-
return false;
|
|
119
|
-
const text = node.getExpression().getText();
|
|
120
|
-
return nameOrRegex.test(text);
|
|
121
|
-
},
|
|
122
|
-
};
|
|
100
|
+
return textMatcher(nameOrRegex, {
|
|
101
|
+
kind: SyntaxKind.NewExpression,
|
|
102
|
+
exact: 'new',
|
|
103
|
+
fuzzy: 'new matching',
|
|
104
|
+
// Deliberately NOT normalized: `new a?.B()` is not valid syntax, so there
|
|
105
|
+
// is no optional chaining to strip, and stripping would only mask a typo.
|
|
106
|
+
textOf: (node) => node.getExpression().getText(),
|
|
107
|
+
});
|
|
123
108
|
}
|
|
124
109
|
/**
|
|
125
110
|
* Escape hatch: match any node whose getText() contains or matches the given pattern.
|
|
@@ -143,7 +128,7 @@ export function expression(textOrRegex) {
|
|
|
143
128
|
// No syntaxKinds — walks all descendants
|
|
144
129
|
matches(node) {
|
|
145
130
|
if (!warned) {
|
|
146
|
-
|
|
131
|
+
writeStderr(`[eess] expression('${textOrRegex}') is a broad matcher. ` +
|
|
147
132
|
`Prefer call(), access(), or newExpr() for precise matching.`);
|
|
148
133
|
warned = true;
|
|
149
134
|
}
|
|
@@ -156,7 +141,7 @@ export function expression(textOrRegex) {
|
|
|
156
141
|
// No syntaxKinds — walks all descendants
|
|
157
142
|
matches(node) {
|
|
158
143
|
if (!warned) {
|
|
159
|
-
|
|
144
|
+
writeStderr(`[eess] expression(${String(textOrRegex)}) is a broad matcher. ` +
|
|
160
145
|
`Prefer call(), access(), or newExpr() for precise matching.`);
|
|
161
146
|
warned = true;
|
|
162
147
|
}
|
|
@@ -244,7 +229,96 @@ export function property(name, value) {
|
|
|
244
229
|
* Exported as a constant for use with `comment()`. Users can pass
|
|
245
230
|
* their own RegExp to `comment()` for narrower matching.
|
|
246
231
|
*/
|
|
247
|
-
|
|
232
|
+
const MARKER = 'TODO|FIXME|HACK|XXX|STUB|DEFERRED|PLACEHOLDER';
|
|
233
|
+
/** Start of a comment, or of a line inside one, past any `//`, `/*` or `*`. */
|
|
234
|
+
const COMMENT_LINE_START = String.raw `(?:^|\n)[ \t]*(?:\/\/+|\/\*+|\*+)?[ \t]*`;
|
|
235
|
+
/**
|
|
236
|
+
* A stub marker: an **UPPERCASE** marker word opening a comment line, or either
|
|
237
|
+
* of two phrases.
|
|
238
|
+
*
|
|
239
|
+
* Both halves of that are load-bearing, and each was found by a prose false
|
|
240
|
+
* positive in this repo's own source
|
|
241
|
+
* ([ts-archunit bug 0053](https://github.com/nielspeter/ts-archunit/blob/main/bugs/fixed/0053-the-stub-rule-matched-prose-about-stubs.md)).
|
|
242
|
+
*
|
|
243
|
+
* **Anchored to a line start**, because unanchored it matched every sentence that
|
|
244
|
+
* mentions a marker — including the docstring of the fix for bug 0052, which says
|
|
245
|
+
* the word TODO three times.
|
|
246
|
+
*
|
|
247
|
+
* **Case-sensitive for the markers**, because anchoring alone was not enough: a
|
|
248
|
+
* wrapped JSDoc sentence put the lowercase word "stub," at the start of a
|
|
249
|
+
* continuation line. Uppercase is the convention (`// TODO:`, `// FIXME`) and the
|
|
250
|
+
* casing is what separates a marker from the English word. Known limit, stated
|
|
251
|
+
* rather than discovered: a lowercase `// todo: x` is not matched. That is the
|
|
252
|
+
* price of not matching "the todo list below", and it is the right trade for a
|
|
253
|
+
* rule whose findings must fail a build.
|
|
254
|
+
*
|
|
255
|
+
* The phrase forms are anchored too, because unanchored they matched
|
|
256
|
+
* `noStubComments()`'s own docstring, which lists them. That is bug 0043's shape:
|
|
257
|
+
* documentation of a syntax read as the syntax.
|
|
258
|
+
*
|
|
259
|
+
* **The phrase forms ARE case-insensitive, since v0.55.0** — and were not between v0.47.0
|
|
260
|
+
* and then, though this text claimed otherwise for part of that window. The `i` flag was
|
|
261
|
+
* dropped for the whole expression, correctly, because the MARKERS must stay
|
|
262
|
+
* case-sensitive: that is what rejects a wrapped JSDoc line beginning `stub,`. But only
|
|
263
|
+
* the phrases' INITIAL letters were alternated, so `// NOT IMPLEMENTED` and
|
|
264
|
+
* `// COMING SOON` silently stopped matching. The reasoning offered at the time was
|
|
265
|
+
* "nobody writes NOT IMPLEMENTED", which is precisely the casing the marker branch would
|
|
266
|
+
* otherwise have caught. `anyCase` below DERIVES the alternation, so the class cannot come
|
|
267
|
+
* back one letter at a time
|
|
268
|
+
* ([ts-archunit bug 0061](https://github.com/nielspeter/ts-archunit/blob/main/bugs/fixed/0061-an-all-caps-stub-marker-no-longer-matches.md)).
|
|
269
|
+
*/
|
|
270
|
+
/**
|
|
271
|
+
* A word matched case-INSENSITIVELY, letter by letter.
|
|
272
|
+
*
|
|
273
|
+
* JavaScript has no inline `(?i:…)` group and the `i` flag applies to the whole expression,
|
|
274
|
+
* which cannot be used here — the MARKER branch must stay case-sensitive. So the phrase
|
|
275
|
+
* branch alternates its own letters, and it is DERIVED rather than hand-written, because
|
|
276
|
+
* hand-writing it is what produced bug 0061: `[Nn]ot\\s+[Ii]mplemented` alternates the
|
|
277
|
+
* first letter of each word and nothing else.
|
|
278
|
+
*/
|
|
279
|
+
// eess-exclude eess/no-unused-exports: consumed by the test suite; the build tsconfig this gate reads excludes tests, so `src` is the only usage it can see
|
|
280
|
+
export function anyCase(word) {
|
|
281
|
+
const escape = (text) => text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
282
|
+
return [...word]
|
|
283
|
+
.map((ch) => {
|
|
284
|
+
const lower = ch.toLowerCase();
|
|
285
|
+
const upper = ch.toUpperCase();
|
|
286
|
+
// A character CLASS while both mappings are single characters, and an ALTERNATION
|
|
287
|
+
// when either is not.
|
|
288
|
+
//
|
|
289
|
+
// The alternation is the correctness half: a case mapping is not one-to-one.
|
|
290
|
+
// Measured, `'ß'.toUpperCase()` is `'SS'` — two characters — so `[SSß]` is a class of
|
|
291
|
+
// three single characters matching `S` or `ß` and **not** `SS`, and
|
|
292
|
+
// `anyCase('straße')` produced a pattern that did not match its own uppercase form
|
|
293
|
+
// without throwing. Same silent-wrongness as an unescaped metacharacter; the first
|
|
294
|
+
// version of this function fixed only that half.
|
|
295
|
+
//
|
|
296
|
+
// Keeping the class for the single-character case is the *cost* half, and it is not
|
|
297
|
+
// cosmetic. `[Nn]` and `(?:N|n)` match identically, so switching every letter to an
|
|
298
|
+
// alternation would move `STUB_PATTERNS`' text — and therefore every baselined
|
|
299
|
+
// finding's identity — while changing no behaviour at all. That is a migration
|
|
300
|
+
// charged to every adopter for nothing. Found by the change detector firing on it.
|
|
301
|
+
if (lower !== upper) {
|
|
302
|
+
return upper.length === 1 && lower.length === 1
|
|
303
|
+
? `[${escape(upper)}${escape(lower)}]`
|
|
304
|
+
: `(?:${escape(upper)}|${escape(lower)})`;
|
|
305
|
+
}
|
|
306
|
+
// A character with no case is passed through ESCAPED. Measured before adding this:
|
|
307
|
+
// `anyCase('todo(x)')` produced `[Tt][Oo][Dd][Oo]([Xx])` — a capture group; `'wip.'`
|
|
308
|
+
// produced a `.` meaning any character; `'a+b'` produced "one or more a". None of
|
|
309
|
+
// them throw, so the pattern silently means something other than the phrase.
|
|
310
|
+
//
|
|
311
|
+
// No live defect — today's phrases are letters and spaces — but this function exists
|
|
312
|
+
// to be called with a new phrase, and that is when it would bite.
|
|
313
|
+
return escape(ch);
|
|
314
|
+
})
|
|
315
|
+
.join('');
|
|
316
|
+
}
|
|
317
|
+
/** `not implemented` / `coming soon`, any casing, any run of whitespace between words. */
|
|
318
|
+
const PHRASES = ['not implemented', 'coming soon']
|
|
319
|
+
.map((phrase) => phrase.split(' ').map(anyCase).join('\\s+'))
|
|
320
|
+
.join('|');
|
|
321
|
+
export const STUB_PATTERNS = new RegExp([`${COMMENT_LINE_START}(?:${MARKER})\\b`, `${COMMENT_LINE_START}(?:${PHRASES})\\b`].join('|'));
|
|
248
322
|
/**
|
|
249
323
|
* Match comments attached to AST nodes.
|
|
250
324
|
*
|
|
@@ -253,8 +327,9 @@ export const STUB_PATTERNS = /\b(TODO|FIXME|HACK|XXX|STUB|DEFERRED|PLACEHOLDER)\
|
|
|
253
327
|
* `syntaxKinds: undefined` so the broad traversal path visits every node,
|
|
254
328
|
* and `matches(node)` checks that node's comment ranges.
|
|
255
329
|
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
330
|
+
* The same comment is visible as trivia of several nested nodes, so the
|
|
331
|
+
* traversal deduplicates by the comment's own position — this matcher holds no
|
|
332
|
+
* state of its own (bug 0034).
|
|
258
333
|
*
|
|
259
334
|
* @param pattern - String substring or RegExp to test against comment text.
|
|
260
335
|
*
|
|
@@ -264,10 +339,16 @@ export const STUB_PATTERNS = /\b(TODO|FIXME|HACK|XXX|STUB|DEFERRED|PLACEHOLDER)\
|
|
|
264
339
|
* comment('HACK') // matches hack comments
|
|
265
340
|
*/
|
|
266
341
|
export function comment(pattern) {
|
|
267
|
-
//
|
|
268
|
-
//
|
|
269
|
-
//
|
|
270
|
-
|
|
342
|
+
// NO dedup state here, deliberately — bug 0034. This used to hold a
|
|
343
|
+
// `Set<string>` of matched `filePath:pos` keys that was never reset, so the
|
|
344
|
+
// SAME rule object returned 2 violations and then 0 on its second
|
|
345
|
+
// evaluation: measured, and the purest form of the green that means nothing
|
|
346
|
+
// this project exists to remove. It bit watch mode, a preset array checked
|
|
347
|
+
// twice, and any test reusing a rule constant.
|
|
348
|
+
//
|
|
349
|
+
// Dedup now happens in the traversal, keyed by attachment point, via
|
|
350
|
+
// `matchedTriviaPositions` below. A matcher that holds no state cannot go
|
|
351
|
+
// stale.
|
|
271
352
|
function testComment(range) {
|
|
272
353
|
const text = range.getText();
|
|
273
354
|
if (typeof pattern === 'string') {
|
|
@@ -283,18 +364,15 @@ export function comment(pattern) {
|
|
|
283
364
|
: `comment matching ${String(pattern)}`,
|
|
284
365
|
// No syntaxKinds — broad traversal to visit all nodes and their comments
|
|
285
366
|
matches(node) {
|
|
286
|
-
const filePath = node.getSourceFile().getFilePath();
|
|
287
367
|
const ranges = [...node.getLeadingCommentRanges(), ...node.getTrailingCommentRanges()];
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
}
|
|
297
|
-
return false;
|
|
368
|
+
return ranges.some((range) => testComment(range));
|
|
369
|
+
},
|
|
370
|
+
matchedTriviaPositions(node) {
|
|
371
|
+
// `getPos()`, never `getEnd()`: a multi-line block comment or JSDoc would
|
|
372
|
+
// otherwise be reported at its CLOSING line. Invisible to an all-`//`
|
|
373
|
+
// fixture, where the two share a line — found by sabotage.
|
|
374
|
+
const ranges = [...node.getLeadingCommentRanges(), ...node.getTrailingCommentRanges()];
|
|
375
|
+
return ranges.filter((range) => testComment(range)).map((range) => range.getPos());
|
|
298
376
|
},
|
|
299
377
|
};
|
|
300
378
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchers.js","sourceRoot":"","sources":["../../src/helpers/matchers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"matchers.js","sourceRoot":"","sources":["../../src/helpers/matchers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAA8C,MAAM,UAAU,CAAA;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAoDvD;;;;;;GAMG;AACH,SAAS,aAAa,CAAC,IAAY;IACjC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;AACnC,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAS,WAAW,CAClB,OAAwB,EACxB,IAKC;IAED,OAAO;QACL,WAAW,EACT,OAAO,OAAO,KAAK,QAAQ;YACzB,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,KAAK,OAAO,GAAG;YAC9B,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE;QACxC,WAAW,EAAE,CAAC,IAAI,C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