@codeperfect/eslint-plugin 1.0.0 → 2.1.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 +26 -4
- package/dist/.tsbuildinfo +1 -1
- package/dist/{custom-rules.d.ts → application/custom-rules.d.ts} +3 -0
- package/dist/application/custom-rules.d.ts.map +1 -0
- package/dist/application/custom-rules.js +74 -0
- package/dist/application/index.d.ts +4 -0
- package/dist/application/index.d.ts.map +1 -0
- package/dist/application/index.js +3 -0
- package/dist/codeperfect-eslint-plugin-1.0.0.tgz +0 -0
- package/dist/domain/architecture/consistent-barrel-files/barrel-file-utilities.d.ts +56 -0
- package/dist/domain/architecture/consistent-barrel-files/barrel-file-utilities.d.ts.map +1 -0
- package/dist/domain/architecture/consistent-barrel-files/barrel-file-utilities.js +149 -0
- package/dist/{architecture → domain/architecture}/consistent-barrel-files/consistent-barrel-files-listeners.d.ts +4 -4
- package/dist/domain/architecture/consistent-barrel-files/consistent-barrel-files-listeners.d.ts.map +1 -0
- package/dist/domain/architecture/consistent-barrel-files/consistent-barrel-files-listeners.js +98 -0
- package/dist/domain/architecture/consistent-barrel-files/consistent-barrel-files-options.d.ts +45 -0
- package/dist/domain/architecture/consistent-barrel-files/consistent-barrel-files-options.d.ts.map +1 -0
- package/dist/domain/architecture/consistent-barrel-files/consistent-barrel-files-options.js +64 -0
- package/dist/{architecture → domain/architecture}/consistent-barrel-files/exports-only-rule-test-utilities.d.ts +5 -4
- package/dist/domain/architecture/consistent-barrel-files/exports-only-rule-test-utilities.d.ts.map +1 -0
- package/dist/domain/architecture/consistent-barrel-files/exports-only-rule-test-utilities.js +87 -0
- package/dist/domain/architecture/consistent-barrel-files/exports-only-rule.d.ts.map +1 -0
- package/dist/domain/architecture/consistent-barrel-files/exports-only-rule.js +145 -0
- package/dist/domain/architecture/consistent-barrel-files/index.d.ts +5 -0
- package/dist/domain/architecture/consistent-barrel-files/index.d.ts.map +1 -0
- package/dist/domain/architecture/consistent-barrel-files/index.js +4 -0
- package/dist/domain/architecture/consistent-barrel-files/no-reexports-outside-barrels-rule.d.ts.map +1 -0
- package/dist/domain/architecture/consistent-barrel-files/no-reexports-outside-barrels-rule.js +90 -0
- package/dist/{architecture → domain/architecture}/consistent-barrel-files/no-reexports-outside-barrels-test-utilities.d.ts +1 -1
- package/dist/domain/architecture/consistent-barrel-files/no-reexports-outside-barrels-test-utilities.d.ts.map +1 -0
- package/dist/domain/architecture/consistent-barrel-files/no-reexports-outside-barrels-test-utilities.js +91 -0
- package/dist/{architecture → domain/architecture}/consistent-barrel-files/no-reexports-outside-barrels-utilities.d.ts +4 -6
- package/dist/domain/architecture/consistent-barrel-files/no-reexports-outside-barrels-utilities.d.ts.map +1 -0
- package/dist/domain/architecture/consistent-barrel-files/no-reexports-outside-barrels-utilities.js +95 -0
- package/dist/domain/architecture/consistent-barrel-files/rule.d.ts.map +1 -0
- package/dist/domain/architecture/consistent-barrel-files/rule.js +51 -0
- package/dist/domain/architecture/consistent-barrel-files/rule.repeat-runs.d.ts +4 -0
- package/dist/domain/architecture/consistent-barrel-files/rule.repeat-runs.d.ts.map +1 -0
- package/dist/domain/architecture/consistent-barrel-files/rule.repeat-runs.js +4 -0
- package/dist/{architecture → domain/architecture}/consistent-barrel-files/test-helpers.d.ts +48 -48
- package/dist/domain/architecture/consistent-barrel-files/test-helpers.d.ts.map +1 -0
- package/dist/domain/architecture/consistent-barrel-files/test-helpers.file-writers.d.ts +20 -0
- package/dist/domain/architecture/consistent-barrel-files/test-helpers.file-writers.d.ts.map +1 -0
- package/dist/domain/architecture/consistent-barrel-files/test-helpers.file-writers.js +25 -0
- package/dist/domain/architecture/consistent-barrel-files/test-helpers.js +235 -0
- package/dist/domain/architecture/consistent-barrel-files/types.d.ts +19 -0
- package/dist/domain/architecture/consistent-barrel-files/types.d.ts.map +1 -0
- package/dist/domain/architecture/consistent-barrel-files/types.js +2 -0
- package/dist/{architecture → domain/architecture}/index.d.ts +1 -1
- package/dist/domain/architecture/index.d.ts.map +1 -0
- package/dist/domain/architecture/index.js +2 -0
- package/dist/{core → domain/core}/index.d.ts +2 -2
- package/dist/domain/core/index.d.ts.map +1 -0
- package/dist/domain/core/index.js +3 -0
- package/dist/domain/core/no-multiple-declarators/index.d.ts +2 -0
- package/dist/domain/core/no-multiple-declarators/index.d.ts.map +1 -0
- package/dist/domain/core/no-multiple-declarators/index.js +2 -0
- package/dist/domain/core/no-multiple-declarators/rule-test-helpers.d.ts +101 -0
- package/dist/domain/core/no-multiple-declarators/rule-test-helpers.d.ts.map +1 -0
- package/dist/domain/core/no-multiple-declarators/rule-test-helpers.js +108 -0
- package/dist/{core → domain/core}/no-multiple-declarators/rule.d.ts +1 -0
- package/dist/domain/core/no-multiple-declarators/rule.d.ts.map +1 -0
- package/dist/domain/core/no-multiple-declarators/rule.fixes.d.ts +35 -0
- package/dist/domain/core/no-multiple-declarators/rule.fixes.d.ts.map +1 -0
- package/dist/domain/core/no-multiple-declarators/rule.fixes.js +95 -0
- package/dist/domain/core/no-multiple-declarators/rule.guardrails.d.ts +4 -0
- package/dist/domain/core/no-multiple-declarators/rule.guardrails.d.ts.map +1 -0
- package/dist/domain/core/no-multiple-declarators/rule.guardrails.js +4 -0
- package/dist/domain/core/no-multiple-declarators/rule.js +222 -0
- package/dist/domain/core/no-multiple-declarators/rule.mocked-types.d.ts +4 -0
- package/dist/domain/core/no-multiple-declarators/rule.mocked-types.d.ts.map +1 -0
- package/dist/domain/core/no-multiple-declarators/rule.mocked-types.js +4 -0
- package/dist/domain/core/no-multiple-declarators/types.d.ts +77 -0
- package/dist/domain/core/no-multiple-declarators/types.d.ts.map +1 -0
- package/dist/domain/core/no-multiple-declarators/types.js +38 -0
- package/dist/domain/core/prefer-interface-types/index.d.ts +2 -0
- package/dist/domain/core/prefer-interface-types/index.d.ts.map +1 -0
- package/dist/domain/core/prefer-interface-types/index.js +2 -0
- package/dist/domain/core/prefer-interface-types/rule.d.ts.map +1 -0
- package/dist/domain/core/prefer-interface-types/rule.js +148 -0
- package/dist/domain/core/prefer-interface-types/test-helpers.d.ts.map +1 -0
- package/dist/domain/core/prefer-interface-types/test-helpers.js +116 -0
- package/dist/{custom-rule-documentation.d.ts → domain/custom-rule-documentation.d.ts} +3 -1
- package/dist/domain/custom-rule-documentation.d.ts.map +1 -0
- package/dist/domain/custom-rule-documentation.js +36 -0
- package/dist/domain/docs/index.d.ts +4 -0
- package/dist/domain/docs/index.d.ts.map +1 -0
- package/dist/domain/docs/index.js +4 -0
- package/dist/domain/docs/no-interface-member-docs/comment-utilities-test-helpers.d.ts.map +1 -0
- package/dist/domain/docs/no-interface-member-docs/comment-utilities-test-helpers.js +129 -0
- package/dist/{docs → domain/docs}/no-interface-member-docs/comment-utilities.d.ts +1 -1
- package/dist/domain/docs/no-interface-member-docs/comment-utilities.d.ts.map +1 -0
- package/dist/domain/docs/no-interface-member-docs/comment-utilities.js +146 -0
- package/dist/domain/docs/no-interface-member-docs/index.d.ts +2 -0
- package/dist/domain/docs/no-interface-member-docs/index.d.ts.map +1 -0
- package/dist/domain/docs/no-interface-member-docs/index.js +2 -0
- package/dist/{docs → domain/docs}/no-interface-member-docs/parameter-tags.d.ts +1 -1
- package/dist/domain/docs/no-interface-member-docs/parameter-tags.d.ts.map +1 -0
- package/dist/domain/docs/no-interface-member-docs/parameter-tags.js +101 -0
- package/dist/{docs → domain/docs}/no-interface-member-docs/parameter-utilities.d.ts +1 -1
- package/dist/domain/docs/no-interface-member-docs/parameter-utilities.d.ts.map +1 -0
- package/dist/domain/docs/no-interface-member-docs/parameter-utilities.js +125 -0
- package/dist/domain/docs/no-interface-member-docs/rule.d.ts.map +1 -0
- package/dist/domain/docs/no-interface-member-docs/rule.js +171 -0
- package/dist/domain/docs/no-interface-member-docs/test-helpers.d.ts.map +1 -0
- package/dist/{docs → domain/docs}/no-interface-member-docs/test-helpers.js +2 -2
- package/dist/{docs → domain/docs}/no-interface-member-docs/types.d.ts +2 -2
- package/dist/domain/docs/no-interface-member-docs/types.d.ts.map +1 -0
- package/dist/domain/docs/no-interface-member-docs/types.js +2 -0
- package/dist/domain/docs/require-example-language/create-fixer.d.ts +5 -0
- package/dist/domain/docs/require-example-language/create-fixer.d.ts.map +1 -0
- package/dist/domain/docs/require-example-language/create-fixer.js +5 -0
- package/dist/domain/docs/require-example-language/empty-fence-fixes.d.ts.map +1 -0
- package/dist/domain/docs/require-example-language/empty-fence-fixes.js +169 -0
- package/dist/domain/docs/require-example-language/example-utilities.d.ts.map +1 -0
- package/dist/domain/docs/require-example-language/example-utilities.js +76 -0
- package/dist/{docs → domain/docs}/require-example-language/examples.d.ts +1 -1
- package/dist/domain/docs/require-example-language/examples.d.ts.map +1 -0
- package/dist/domain/docs/require-example-language/examples.js +181 -0
- package/dist/{docs → domain/docs}/require-example-language/fixes.d.ts +2 -2
- package/dist/domain/docs/require-example-language/fixes.d.ts.map +1 -0
- package/dist/domain/docs/require-example-language/fixes.js +182 -0
- package/dist/domain/docs/require-example-language/index.d.ts +3 -0
- package/dist/domain/docs/require-example-language/index.d.ts.map +1 -0
- package/dist/domain/docs/require-example-language/index.js +2 -0
- package/dist/{docs → domain/docs}/require-example-language/reporting.d.ts +1 -1
- package/dist/domain/docs/require-example-language/reporting.d.ts.map +1 -0
- package/dist/domain/docs/require-example-language/reporting.js +148 -0
- package/dist/domain/docs/require-example-language/rule.d.ts.map +1 -0
- package/dist/domain/docs/require-example-language/rule.js +37 -0
- package/dist/domain/docs/require-example-language/types.d.ts.map +1 -0
- package/dist/domain/docs/require-example-language/types.js +2 -0
- package/dist/domain/docs/single-line-jsdoc/index.d.ts +2 -0
- package/dist/domain/docs/single-line-jsdoc/index.d.ts.map +1 -0
- package/dist/domain/docs/single-line-jsdoc/index.js +2 -0
- package/dist/domain/docs/single-line-jsdoc/rule.d.ts +4 -0
- package/dist/domain/docs/single-line-jsdoc/rule.d.ts.map +1 -0
- package/dist/domain/docs/single-line-jsdoc/rule.edge-cases.d.ts +4 -0
- package/dist/domain/docs/single-line-jsdoc/rule.edge-cases.d.ts.map +1 -0
- package/dist/domain/docs/single-line-jsdoc/rule.edge-cases.js +5 -0
- package/dist/domain/docs/single-line-jsdoc/rule.js +201 -0
- package/dist/domain/docs/single-line-jsdoc/rule.node-lookups.d.ts +4 -0
- package/dist/domain/docs/single-line-jsdoc/rule.node-lookups.d.ts.map +1 -0
- package/dist/domain/docs/single-line-jsdoc/rule.node-lookups.js +5 -0
- package/dist/domain/docs/single-line-jsdoc/single-line-jsdoc-content.d.ts.map +1 -0
- package/dist/domain/docs/single-line-jsdoc/single-line-jsdoc-content.js +95 -0
- package/dist/{docs → domain/docs}/single-line-jsdoc/single-line-jsdoc-utilities.d.ts +1 -1
- package/dist/domain/docs/single-line-jsdoc/single-line-jsdoc-utilities.d.ts.map +1 -0
- package/dist/domain/docs/single-line-jsdoc/single-line-jsdoc-utilities.js +140 -0
- package/dist/domain/docs/test-helpers.d.ts.map +1 -0
- package/dist/domain/docs/test-helpers.js +107 -0
- package/dist/domain/index.d.ts +6 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/index.js +6 -0
- package/dist/domain/testing/aaa/analyzer.analysis.d.ts +34 -0
- package/dist/domain/testing/aaa/analyzer.analysis.d.ts.map +1 -0
- package/dist/domain/testing/aaa/analyzer.analysis.helpers.d.ts +145 -0
- package/dist/domain/testing/aaa/analyzer.analysis.helpers.d.ts.map +1 -0
- package/dist/domain/testing/aaa/analyzer.analysis.helpers.js +203 -0
- package/dist/domain/testing/aaa/analyzer.analysis.js +82 -0
- package/dist/domain/testing/aaa/analyzer.analysis.unsupported.d.ts +4 -0
- package/dist/domain/testing/aaa/analyzer.analysis.unsupported.d.ts.map +1 -0
- package/dist/domain/testing/aaa/analyzer.analysis.unsupported.js +4 -0
- package/dist/domain/testing/aaa/analyzer.assertions.d.ts +18 -0
- package/dist/domain/testing/aaa/analyzer.assertions.d.ts.map +1 -0
- package/dist/domain/testing/aaa/analyzer.assertions.destructured.d.ts +4 -0
- package/dist/domain/testing/aaa/analyzer.assertions.destructured.d.ts.map +1 -0
- package/dist/domain/testing/aaa/analyzer.assertions.destructured.js +4 -0
- package/dist/domain/testing/aaa/analyzer.assertions.helpers.d.ts +95 -0
- package/dist/domain/testing/aaa/analyzer.assertions.helpers.d.ts.map +1 -0
- package/dist/domain/testing/aaa/analyzer.assertions.helpers.js +185 -0
- package/dist/domain/testing/aaa/analyzer.assertions.js +33 -0
- package/dist/domain/testing/aaa/analyzer.assertions.operands.d.ts +64 -0
- package/dist/domain/testing/aaa/analyzer.assertions.operands.d.ts.map +1 -0
- package/dist/domain/testing/aaa/analyzer.assertions.operands.js +105 -0
- package/dist/domain/testing/aaa/analyzer.classification.d.ts +16 -0
- package/dist/domain/testing/aaa/analyzer.classification.d.ts.map +1 -0
- package/dist/domain/testing/aaa/analyzer.classification.helpers.d.ts +77 -0
- package/dist/domain/testing/aaa/analyzer.classification.helpers.d.ts.map +1 -0
- package/dist/domain/testing/aaa/analyzer.classification.helpers.js +203 -0
- package/dist/domain/testing/aaa/analyzer.classification.js +31 -0
- package/dist/domain/testing/aaa/analyzer.classification.member-patterns.d.ts +9 -0
- package/dist/domain/testing/aaa/analyzer.classification.member-patterns.d.ts.map +1 -0
- package/dist/domain/testing/aaa/analyzer.classification.member-patterns.js +10 -0
- package/dist/domain/testing/aaa/analyzer.classification.mutations.d.ts +4 -0
- package/dist/domain/testing/aaa/analyzer.classification.mutations.d.ts.map +1 -0
- package/dist/domain/testing/aaa/analyzer.classification.mutations.js +4 -0
- package/dist/domain/testing/aaa/analyzer.classification.traversal.d.ts +15 -0
- package/dist/domain/testing/aaa/analyzer.classification.traversal.d.ts.map +1 -0
- package/dist/domain/testing/aaa/analyzer.classification.traversal.js +34 -0
- package/dist/domain/testing/aaa/analyzer.d.ts +46 -0
- package/dist/domain/testing/aaa/analyzer.d.ts.map +1 -0
- package/dist/domain/testing/aaa/analyzer.js +59 -0
- package/dist/domain/testing/aaa/analyzer.super.d.ts +106 -0
- package/dist/domain/testing/aaa/analyzer.super.d.ts.map +1 -0
- package/dist/domain/testing/aaa/analyzer.super.helpers.d.ts +27 -0
- package/dist/domain/testing/aaa/analyzer.super.helpers.d.ts.map +1 -0
- package/dist/domain/testing/aaa/analyzer.super.helpers.js +66 -0
- package/dist/domain/testing/aaa/analyzer.super.js +211 -0
- package/dist/{testing → domain/testing}/aaa/index.d.ts +2 -2
- package/dist/domain/testing/aaa/index.d.ts.map +1 -0
- package/dist/domain/testing/aaa/index.js +2 -0
- package/dist/domain/testing/aaa/types.d.ts +58 -0
- package/dist/domain/testing/aaa/types.d.ts.map +1 -0
- package/dist/domain/testing/aaa/types.js +2 -0
- package/dist/domain/testing/assert-actual-expected-names/index.d.ts +2 -0
- package/dist/domain/testing/assert-actual-expected-names/index.d.ts.map +1 -0
- package/dist/domain/testing/assert-actual-expected-names/index.js +2 -0
- package/dist/{testing → domain/testing}/assert-actual-expected-names/rule.d.ts +1 -0
- package/dist/domain/testing/assert-actual-expected-names/rule.d.ts.map +1 -0
- package/dist/domain/testing/assert-actual-expected-names/rule.js +116 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/index.d.ts +2 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/index.d.ts.map +1 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/index.js +2 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/pattern-identifiers.d.ts +13 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/pattern-identifiers.d.ts.map +1 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/pattern-identifiers.js +134 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-identifiers.d.ts +25 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-identifiers.d.ts.map +1 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-identifiers.js +138 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.combined.d.ts +4 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.combined.d.ts.map +1 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.combined.js +4 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.companion.d.ts +4 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.companion.d.ts.map +1 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.companion.js +4 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.d.ts +4 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.d.ts.map +1 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.behavior.js +4 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.d.ts +14 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.d.ts.map +1 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/phase-purity-reporting.js +180 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/rule-test-helpers.d.ts +42 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/rule-test-helpers.d.ts.map +1 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/rule-test-helpers.js +188 -0
- package/dist/{testing → domain/testing}/enforce-aaa-phase-purity/rule.d.ts +1 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/rule.d.ts.map +1 -0
- package/dist/domain/testing/enforce-aaa-phase-purity/rule.js +37 -0
- package/dist/domain/testing/enforce-aaa-structure/index.d.ts +2 -0
- package/dist/domain/testing/enforce-aaa-structure/index.d.ts.map +1 -0
- package/dist/domain/testing/enforce-aaa-structure/index.js +2 -0
- package/dist/{testing → domain/testing}/enforce-aaa-structure/rule.d.ts +1 -0
- package/dist/domain/testing/enforce-aaa-structure/rule.d.ts.map +1 -0
- package/dist/domain/testing/enforce-aaa-structure/rule.js +88 -0
- package/dist/{testing → domain/testing}/index.d.ts +9 -8
- package/dist/domain/testing/index.d.ts.map +1 -0
- package/dist/domain/testing/index.js +10 -0
- package/dist/domain/testing/prefer-vi-mocked-import/fix-import-statements.d.ts +29 -0
- package/dist/domain/testing/prefer-vi-mocked-import/fix-import-statements.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vi-mocked-import/fix-import-statements.js +90 -0
- package/dist/domain/testing/prefer-vi-mocked-import/fix-import-updates.d.ts +31 -0
- package/dist/domain/testing/prefer-vi-mocked-import/fix-import-updates.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vi-mocked-import/fix-import-updates.js +43 -0
- package/dist/domain/testing/prefer-vi-mocked-import/fix-imports.d.ts +16 -0
- package/dist/domain/testing/prefer-vi-mocked-import/fix-imports.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vi-mocked-import/fix-imports.js +205 -0
- package/dist/domain/testing/prefer-vi-mocked-import/fix.d.ts +28 -0
- package/dist/domain/testing/prefer-vi-mocked-import/fix.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vi-mocked-import/fix.js +171 -0
- package/dist/domain/testing/prefer-vi-mocked-import/index.d.ts +2 -0
- package/dist/domain/testing/prefer-vi-mocked-import/index.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vi-mocked-import/index.js +2 -0
- package/dist/{testing → domain/testing}/prefer-vi-mocked-import/match-bindings.d.ts +1 -1
- package/dist/domain/testing/prefer-vi-mocked-import/match-bindings.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vi-mocked-import/match-bindings.js +52 -0
- package/dist/{testing → domain/testing}/prefer-vi-mocked-import/match-declarations.d.ts +2 -1
- package/dist/domain/testing/prefer-vi-mocked-import/match-declarations.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vi-mocked-import/match-declarations.js +131 -0
- package/dist/domain/testing/prefer-vi-mocked-import/match-helpers.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vi-mocked-import/match-helpers.js +102 -0
- package/dist/{testing → domain/testing}/prefer-vi-mocked-import/match-imports.d.ts +1 -1
- package/dist/domain/testing/prefer-vi-mocked-import/match-imports.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vi-mocked-import/match-imports.js +156 -0
- package/dist/{testing → domain/testing}/prefer-vi-mocked-import/match-rewrites.d.ts +1 -1
- package/dist/domain/testing/prefer-vi-mocked-import/match-rewrites.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vi-mocked-import/match-rewrites.js +119 -0
- package/dist/domain/testing/prefer-vi-mocked-import/match-walk.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vi-mocked-import/match-walk.js +62 -0
- package/dist/domain/testing/prefer-vi-mocked-import/match.d.ts +26 -0
- package/dist/domain/testing/prefer-vi-mocked-import/match.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vi-mocked-import/match.js +198 -0
- package/dist/domain/testing/prefer-vi-mocked-import/rule-test-helpers.d.ts +20 -0
- package/dist/domain/testing/prefer-vi-mocked-import/rule-test-helpers.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vi-mocked-import/rule-test-helpers.js +39 -0
- package/dist/domain/testing/prefer-vi-mocked-import/rule.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vi-mocked-import/rule.js +39 -0
- package/dist/{testing → domain/testing}/prefer-vi-mocked-import/types.d.ts +1 -1
- package/dist/domain/testing/prefer-vi-mocked-import/types.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vi-mocked-import/types.js +2 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/ast-helpers.d.ts +97 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/ast-helpers.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/ast-helpers.js +174 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/index.d.ts +2 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/index.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/index.js +2 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/match-input.d.ts +14 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/match-input.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/match-input.js +84 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/match.d.ts +13 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/match.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/match.js +195 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/replacement-helpers.d.ts +25 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/replacement-helpers.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/replacement-helpers.js +96 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/rule-test-helpers.d.ts +32 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/rule-test-helpers.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/rule-test-helpers.js +164 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/rule.d.ts +5 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/rule.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/rule.guardrails.d.ts +4 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/rule.guardrails.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/rule.guardrails.js +4 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/rule.input-shapes.d.ts +4 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/rule.input-shapes.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/rule.input-shapes.js +4 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/rule.js +88 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/rule.signature-fallback.d.ts +4 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/rule.signature-fallback.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/rule.signature-fallback.js +4 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/type-helpers.d.ts +24 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/type-helpers.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/type-helpers.js +113 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/type-shape-helpers.d.ts +36 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/type-shape-helpers.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/type-shape-helpers.js +138 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/types.d.ts +187 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/types.d.ts.map +1 -0
- package/dist/domain/testing/prefer-vitest-incremental-casts/types.js +2 -0
- package/dist/domain/testing/require-aaa-sections/index.d.ts +2 -0
- package/dist/domain/testing/require-aaa-sections/index.d.ts.map +1 -0
- package/dist/domain/testing/require-aaa-sections/index.js +2 -0
- package/dist/domain/testing/require-aaa-sections/missing-section-fixes.d.ts +17 -0
- package/dist/domain/testing/require-aaa-sections/missing-section-fixes.d.ts.map +1 -0
- package/dist/domain/testing/require-aaa-sections/missing-section-fixes.js +150 -0
- package/dist/{testing → domain/testing}/require-aaa-sections/rule.d.ts +1 -0
- package/dist/domain/testing/require-aaa-sections/rule.d.ts.map +1 -0
- package/dist/domain/testing/require-aaa-sections/rule.js +134 -0
- package/dist/domain/testing/require-aaa-sections/rule.reporting.d.ts +104 -0
- package/dist/domain/testing/require-aaa-sections/rule.reporting.d.ts.map +1 -0
- package/dist/domain/testing/require-aaa-sections/rule.reporting.js +216 -0
- package/dist/domain/testing/require-act-result-capture/index.d.ts +2 -0
- package/dist/domain/testing/require-act-result-capture/index.d.ts.map +1 -0
- package/dist/domain/testing/require-act-result-capture/index.js +2 -0
- package/dist/{testing → domain/testing}/require-act-result-capture/rule.d.ts +1 -0
- package/dist/domain/testing/require-act-result-capture/rule.d.ts.map +1 -0
- package/dist/domain/testing/require-act-result-capture/rule.js +109 -0
- package/dist/domain/testing/require-test-companion/index.d.ts +3 -0
- package/dist/domain/testing/require-test-companion/index.d.ts.map +1 -0
- package/dist/domain/testing/require-test-companion/index.js +3 -0
- package/dist/{testing → domain/testing}/require-test-companion/require-test-companion-listeners.d.ts +1 -1
- package/dist/domain/testing/require-test-companion/require-test-companion-listeners.d.ts.map +1 -0
- package/dist/domain/testing/require-test-companion/require-test-companion-listeners.js +145 -0
- package/dist/domain/testing/require-test-companion/require-test-companion-options.d.ts.map +1 -0
- package/dist/domain/testing/require-test-companion/require-test-companion-options.js +113 -0
- package/dist/{testing → domain/testing}/require-test-companion/require-test-companion-test-helpers.d.ts +1 -1
- package/dist/domain/testing/require-test-companion/require-test-companion-test-helpers.d.ts.map +1 -0
- package/dist/domain/testing/require-test-companion/require-test-companion-test-helpers.js +184 -0
- package/dist/{testing → domain/testing}/require-test-companion/require-test-companion-utilities.d.ts +1 -1
- package/dist/domain/testing/require-test-companion/require-test-companion-utilities.d.ts.map +1 -0
- package/dist/domain/testing/require-test-companion/require-test-companion-utilities.js +26 -0
- package/dist/domain/testing/require-test-companion/rule.d.ts.map +1 -0
- package/dist/domain/testing/require-test-companion/rule.js +82 -0
- package/dist/domain/testing/require-test-companion/types.d.ts.map +1 -0
- package/dist/domain/testing/require-test-companion/types.js +2 -0
- package/dist/domain/testing/single-act-statement/index.d.ts +2 -0
- package/dist/domain/testing/single-act-statement/index.d.ts.map +1 -0
- package/dist/domain/testing/single-act-statement/index.js +2 -0
- package/dist/{testing → domain/testing}/single-act-statement/rule.d.ts +1 -0
- package/dist/domain/testing/single-act-statement/rule.d.ts.map +1 -0
- package/dist/domain/testing/single-act-statement/rule.js +37 -0
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -6
- package/dist/{codeperfect-plugin.d.ts → infrastructure/codeperfect-plugin.d.ts} +2 -0
- package/dist/infrastructure/codeperfect-plugin.d.ts.map +1 -0
- package/dist/infrastructure/codeperfect-plugin.js +30 -0
- package/dist/infrastructure/index.d.ts +5 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +4 -0
- package/dist/infrastructure/presets.d.ts +18 -0
- package/dist/infrastructure/presets.d.ts.map +1 -0
- package/dist/infrastructure/presets.js +81 -0
- package/package.json +67 -32
- package/dist/architecture/consistent-barrel-files/consistent-barrel-files-listeners.d.ts.map +0 -1
- package/dist/architecture/consistent-barrel-files/consistent-barrel-files-listeners.js +0 -131
- package/dist/architecture/consistent-barrel-files/consistent-barrel-files-options.d.ts +0 -48
- package/dist/architecture/consistent-barrel-files/consistent-barrel-files-options.d.ts.map +0 -1
- package/dist/architecture/consistent-barrel-files/consistent-barrel-files-options.js +0 -126
- package/dist/architecture/consistent-barrel-files/exports-only-rule-test-utilities.d.ts.map +0 -1
- package/dist/architecture/consistent-barrel-files/exports-only-rule-test-utilities.js +0 -90
- package/dist/architecture/consistent-barrel-files/exports-only-rule.d.ts.map +0 -1
- package/dist/architecture/consistent-barrel-files/exports-only-rule.js +0 -218
- package/dist/architecture/consistent-barrel-files/index.d.ts +0 -5
- package/dist/architecture/consistent-barrel-files/index.d.ts.map +0 -1
- package/dist/architecture/consistent-barrel-files/index.js +0 -4
- package/dist/architecture/consistent-barrel-files/no-reexports-outside-barrels-rule.d.ts.map +0 -1
- package/dist/architecture/consistent-barrel-files/no-reexports-outside-barrels-rule.js +0 -100
- package/dist/architecture/consistent-barrel-files/no-reexports-outside-barrels-test-utilities.d.ts.map +0 -1
- package/dist/architecture/consistent-barrel-files/no-reexports-outside-barrels-test-utilities.js +0 -90
- package/dist/architecture/consistent-barrel-files/no-reexports-outside-barrels-utilities.d.ts.map +0 -1
- package/dist/architecture/consistent-barrel-files/no-reexports-outside-barrels-utilities.js +0 -154
- package/dist/architecture/consistent-barrel-files/rule.d.ts.map +0 -1
- package/dist/architecture/consistent-barrel-files/rule.js +0 -58
- package/dist/architecture/consistent-barrel-files/test-helpers.d.ts.map +0 -1
- package/dist/architecture/consistent-barrel-files/test-helpers.js +0 -229
- package/dist/architecture/consistent-barrel-files/types.d.ts +0 -25
- package/dist/architecture/consistent-barrel-files/types.d.ts.map +0 -1
- package/dist/architecture/consistent-barrel-files/types.js +0 -2
- package/dist/architecture/index.d.ts.map +0 -1
- package/dist/architecture/index.js +0 -2
- package/dist/benchmark-rules.d.ts +0 -83
- package/dist/benchmark-rules.d.ts.map +0 -1
- package/dist/benchmark-rules.js +0 -175
- package/dist/codeperfect-plugin.d.ts.map +0 -1
- package/dist/codeperfect-plugin.js +0 -29
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -3
- package/dist/core/no-multiple-declarators/index.d.ts +0 -2
- package/dist/core/no-multiple-declarators/index.d.ts.map +0 -1
- package/dist/core/no-multiple-declarators/index.js +0 -2
- package/dist/core/no-multiple-declarators/rule.d.ts.map +0 -1
- package/dist/core/no-multiple-declarators/rule.js +0 -100
- package/dist/core/prefer-interface-types/index.d.ts +0 -2
- package/dist/core/prefer-interface-types/index.d.ts.map +0 -1
- package/dist/core/prefer-interface-types/index.js +0 -2
- package/dist/core/prefer-interface-types/rule.d.ts.map +0 -1
- package/dist/core/prefer-interface-types/rule.js +0 -145
- package/dist/core/prefer-interface-types/test-helpers.d.ts.map +0 -1
- package/dist/core/prefer-interface-types/test-helpers.js +0 -116
- package/dist/custom-rule-documentation.d.ts.map +0 -1
- package/dist/custom-rule-documentation.js +0 -35
- package/dist/custom-rules.d.ts.map +0 -1
- package/dist/custom-rules.js +0 -70
- package/dist/docs/index.d.ts +0 -4
- package/dist/docs/index.d.ts.map +0 -1
- package/dist/docs/index.js +0 -4
- package/dist/docs/no-interface-member-docs/comment-utilities-test-helpers.d.ts.map +0 -1
- package/dist/docs/no-interface-member-docs/comment-utilities-test-helpers.js +0 -129
- package/dist/docs/no-interface-member-docs/comment-utilities.d.ts.map +0 -1
- package/dist/docs/no-interface-member-docs/comment-utilities.js +0 -146
- package/dist/docs/no-interface-member-docs/index.d.ts +0 -2
- package/dist/docs/no-interface-member-docs/index.d.ts.map +0 -1
- package/dist/docs/no-interface-member-docs/index.js +0 -2
- package/dist/docs/no-interface-member-docs/parameter-tags.d.ts.map +0 -1
- package/dist/docs/no-interface-member-docs/parameter-tags.js +0 -101
- package/dist/docs/no-interface-member-docs/parameter-utilities.d.ts.map +0 -1
- package/dist/docs/no-interface-member-docs/parameter-utilities.js +0 -125
- package/dist/docs/no-interface-member-docs/rule.d.ts.map +0 -1
- package/dist/docs/no-interface-member-docs/rule.js +0 -168
- package/dist/docs/no-interface-member-docs/test-helpers.d.ts.map +0 -1
- package/dist/docs/no-interface-member-docs/types.d.ts.map +0 -1
- package/dist/docs/no-interface-member-docs/types.js +0 -2
- package/dist/docs/require-example-language/empty-fence-fixes.d.ts.map +0 -1
- package/dist/docs/require-example-language/empty-fence-fixes.js +0 -169
- package/dist/docs/require-example-language/example-utilities.d.ts.map +0 -1
- package/dist/docs/require-example-language/example-utilities.js +0 -76
- package/dist/docs/require-example-language/examples.d.ts.map +0 -1
- package/dist/docs/require-example-language/examples.js +0 -181
- package/dist/docs/require-example-language/fixes.d.ts.map +0 -1
- package/dist/docs/require-example-language/fixes.js +0 -182
- package/dist/docs/require-example-language/index.d.ts +0 -3
- package/dist/docs/require-example-language/index.d.ts.map +0 -1
- package/dist/docs/require-example-language/index.js +0 -2
- package/dist/docs/require-example-language/reporting.d.ts.map +0 -1
- package/dist/docs/require-example-language/reporting.js +0 -145
- package/dist/docs/require-example-language/rule.d.ts.map +0 -1
- package/dist/docs/require-example-language/rule.js +0 -34
- package/dist/docs/require-example-language/types.d.ts.map +0 -1
- package/dist/docs/require-example-language/types.js +0 -2
- package/dist/docs/single-line-jsdoc/index.d.ts +0 -2
- package/dist/docs/single-line-jsdoc/index.d.ts.map +0 -1
- package/dist/docs/single-line-jsdoc/index.js +0 -2
- package/dist/docs/single-line-jsdoc/rule.d.ts +0 -5
- package/dist/docs/single-line-jsdoc/rule.d.ts.map +0 -1
- package/dist/docs/single-line-jsdoc/rule.js +0 -196
- package/dist/docs/single-line-jsdoc/single-line-jsdoc-content.d.ts.map +0 -1
- package/dist/docs/single-line-jsdoc/single-line-jsdoc-content.js +0 -95
- package/dist/docs/single-line-jsdoc/single-line-jsdoc-utilities.d.ts.map +0 -1
- package/dist/docs/single-line-jsdoc/single-line-jsdoc-utilities.js +0 -140
- package/dist/docs/test-helpers.d.ts.map +0 -1
- package/dist/docs/test-helpers.js +0 -107
- package/dist/presets.d.ts +0 -10
- package/dist/presets.d.ts.map +0 -1
- package/dist/presets.js +0 -50
- package/dist/rules/index.d.ts +0 -5
- package/dist/rules/index.d.ts.map +0 -1
- package/dist/rules/index.js +0 -6
- package/dist/testing/aaa/analyzer.d.ts +0 -36
- package/dist/testing/aaa/analyzer.d.ts.map +0 -1
- package/dist/testing/aaa/analyzer.js +0 -490
- package/dist/testing/aaa/index.d.ts.map +0 -1
- package/dist/testing/aaa/index.js +0 -2
- package/dist/testing/aaa/types.d.ts +0 -31
- package/dist/testing/aaa/types.d.ts.map +0 -1
- package/dist/testing/aaa/types.js +0 -2
- package/dist/testing/assert-actual-expected-names/index.d.ts +0 -2
- package/dist/testing/assert-actual-expected-names/index.d.ts.map +0 -1
- package/dist/testing/assert-actual-expected-names/index.js +0 -2
- package/dist/testing/assert-actual-expected-names/rule.d.ts.map +0 -1
- package/dist/testing/assert-actual-expected-names/rule.js +0 -54
- package/dist/testing/enforce-aaa-phase-purity/index.d.ts +0 -2
- package/dist/testing/enforce-aaa-phase-purity/index.d.ts.map +0 -1
- package/dist/testing/enforce-aaa-phase-purity/index.js +0 -2
- package/dist/testing/enforce-aaa-phase-purity/rule.d.ts.map +0 -1
- package/dist/testing/enforce-aaa-phase-purity/rule.js +0 -110
- package/dist/testing/enforce-aaa-structure/index.d.ts +0 -2
- package/dist/testing/enforce-aaa-structure/index.d.ts.map +0 -1
- package/dist/testing/enforce-aaa-structure/index.js +0 -2
- package/dist/testing/enforce-aaa-structure/rule.d.ts.map +0 -1
- package/dist/testing/enforce-aaa-structure/rule.js +0 -48
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/index.js +0 -9
- package/dist/testing/prefer-vi-mocked-import/fix.d.ts +0 -16
- package/dist/testing/prefer-vi-mocked-import/fix.d.ts.map +0 -1
- package/dist/testing/prefer-vi-mocked-import/fix.js +0 -224
- package/dist/testing/prefer-vi-mocked-import/index.d.ts +0 -2
- package/dist/testing/prefer-vi-mocked-import/index.d.ts.map +0 -1
- package/dist/testing/prefer-vi-mocked-import/index.js +0 -2
- package/dist/testing/prefer-vi-mocked-import/match-bindings.d.ts.map +0 -1
- package/dist/testing/prefer-vi-mocked-import/match-bindings.js +0 -52
- package/dist/testing/prefer-vi-mocked-import/match-declarations.d.ts.map +0 -1
- package/dist/testing/prefer-vi-mocked-import/match-declarations.js +0 -99
- package/dist/testing/prefer-vi-mocked-import/match-helpers.d.ts.map +0 -1
- package/dist/testing/prefer-vi-mocked-import/match-helpers.js +0 -102
- package/dist/testing/prefer-vi-mocked-import/match-imports.d.ts.map +0 -1
- package/dist/testing/prefer-vi-mocked-import/match-imports.js +0 -156
- package/dist/testing/prefer-vi-mocked-import/match-rewrites.d.ts.map +0 -1
- package/dist/testing/prefer-vi-mocked-import/match-rewrites.js +0 -119
- package/dist/testing/prefer-vi-mocked-import/match-walk.d.ts.map +0 -1
- package/dist/testing/prefer-vi-mocked-import/match-walk.js +0 -62
- package/dist/testing/prefer-vi-mocked-import/match.d.ts +0 -15
- package/dist/testing/prefer-vi-mocked-import/match.d.ts.map +0 -1
- package/dist/testing/prefer-vi-mocked-import/match.js +0 -193
- package/dist/testing/prefer-vi-mocked-import/rule.d.ts.map +0 -1
- package/dist/testing/prefer-vi-mocked-import/rule.js +0 -32
- package/dist/testing/prefer-vi-mocked-import/types.d.ts.map +0 -1
- package/dist/testing/prefer-vi-mocked-import/types.js +0 -2
- package/dist/testing/require-aaa-sections/index.d.ts +0 -2
- package/dist/testing/require-aaa-sections/index.d.ts.map +0 -1
- package/dist/testing/require-aaa-sections/index.js +0 -2
- package/dist/testing/require-aaa-sections/rule.d.ts.map +0 -1
- package/dist/testing/require-aaa-sections/rule.js +0 -111
- package/dist/testing/require-act-result-capture/index.d.ts +0 -2
- package/dist/testing/require-act-result-capture/index.d.ts.map +0 -1
- package/dist/testing/require-act-result-capture/index.js +0 -2
- package/dist/testing/require-act-result-capture/rule.d.ts.map +0 -1
- package/dist/testing/require-act-result-capture/rule.js +0 -34
- package/dist/testing/require-test-companion/index.d.ts +0 -3
- package/dist/testing/require-test-companion/index.d.ts.map +0 -1
- package/dist/testing/require-test-companion/index.js +0 -3
- package/dist/testing/require-test-companion/require-test-companion-listeners.d.ts.map +0 -1
- package/dist/testing/require-test-companion/require-test-companion-listeners.js +0 -145
- package/dist/testing/require-test-companion/require-test-companion-options.d.ts.map +0 -1
- package/dist/testing/require-test-companion/require-test-companion-options.js +0 -112
- package/dist/testing/require-test-companion/require-test-companion-test-helpers.d.ts.map +0 -1
- package/dist/testing/require-test-companion/require-test-companion-test-helpers.js +0 -183
- package/dist/testing/require-test-companion/require-test-companion-utilities.d.ts.map +0 -1
- package/dist/testing/require-test-companion/require-test-companion-utilities.js +0 -26
- package/dist/testing/require-test-companion/rule.d.ts.map +0 -1
- package/dist/testing/require-test-companion/rule.js +0 -57
- package/dist/testing/require-test-companion/types.d.ts.map +0 -1
- package/dist/testing/require-test-companion/types.js +0 -2
- package/dist/testing/single-act-statement/index.d.ts +0 -2
- package/dist/testing/single-act-statement/index.d.ts.map +0 -1
- package/dist/testing/single-act-statement/index.js +0 -2
- package/dist/testing/single-act-statement/rule.d.ts.map +0 -1
- package/dist/testing/single-act-statement/rule.js +0 -33
- /package/dist/{architecture → domain/architecture}/consistent-barrel-files/exports-only-rule.d.ts +0 -0
- /package/dist/{architecture → domain/architecture}/consistent-barrel-files/no-reexports-outside-barrels-rule.d.ts +0 -0
- /package/dist/{architecture → domain/architecture}/consistent-barrel-files/rule.d.ts +0 -0
- /package/dist/{core → domain/core}/prefer-interface-types/rule.d.ts +0 -0
- /package/dist/{core → domain/core}/prefer-interface-types/test-helpers.d.ts +0 -0
- /package/dist/{docs → domain/docs}/no-interface-member-docs/comment-utilities-test-helpers.d.ts +0 -0
- /package/dist/{docs → domain/docs}/no-interface-member-docs/rule.d.ts +0 -0
- /package/dist/{docs → domain/docs}/no-interface-member-docs/test-helpers.d.ts +0 -0
- /package/dist/{docs → domain/docs}/require-example-language/empty-fence-fixes.d.ts +0 -0
- /package/dist/{docs → domain/docs}/require-example-language/example-utilities.d.ts +0 -0
- /package/dist/{docs → domain/docs}/require-example-language/rule.d.ts +0 -0
- /package/dist/{docs → domain/docs}/require-example-language/types.d.ts +0 -0
- /package/dist/{docs → domain/docs}/single-line-jsdoc/single-line-jsdoc-content.d.ts +0 -0
- /package/dist/{docs → domain/docs}/test-helpers.d.ts +0 -0
- /package/dist/{testing → domain/testing}/prefer-vi-mocked-import/match-helpers.d.ts +0 -0
- /package/dist/{testing → domain/testing}/prefer-vi-mocked-import/match-walk.d.ts +0 -0
- /package/dist/{testing → domain/testing}/prefer-vi-mocked-import/rule.d.ts +0 -0
- /package/dist/{testing → domain/testing}/require-test-companion/require-test-companion-options.d.ts +0 -0
- /package/dist/{testing → domain/testing}/require-test-companion/rule.d.ts +0 -0
- /package/dist/{testing → domain/testing}/require-test-companion/types.d.ts +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
+
import type { ShorthandContext, SupportedProperty } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Checks whether a property can remain in shorthand form after replacement.
|
|
5
|
+
* @param context Property shorthand decision context.
|
|
6
|
+
* @returns True when shorthand syntax remains valid.
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const keepShorthand = canUseShorthand(context);
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
declare function canUseShorthand(context: ShorthandContext): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Resolves the expression returned by the mock factory.
|
|
15
|
+
* @param factoryArgument Mock factory function expression.
|
|
16
|
+
* @returns Returned expression when one is present.
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* const returnExpression = getFactoryReturnExpression(factoryArgument);
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare function getFactoryReturnExpression(factoryArgument: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression): TSESTree.Expression | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Extracts the module specifier from a mock call argument.
|
|
25
|
+
* @param moduleArgument Import expression or string literal argument.
|
|
26
|
+
* @returns Static module specifier when it can be determined.
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* const moduleSpecifier = getModuleSpecifier(moduleArgument);
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare function getModuleSpecifier(moduleArgument: TSESTree.Expression): string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Converts an object property key node into a stable string name.
|
|
35
|
+
* @param propertyKey Property key node from the object literal.
|
|
36
|
+
* @returns Property name when the key is statically known.
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* const propertyName = getPropertyName(property.key);
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
declare function getPropertyName(propertyKey: TSESTree.PropertyName): string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Checks whether an expression's cast chain contains an escape-hatch cast through unknown or any.
|
|
45
|
+
* @param expression Expression to inspect.
|
|
46
|
+
* @returns True when at least one cast in the chain uses unknown or any as the type annotation.
|
|
47
|
+
* @example
|
|
48
|
+
* ```typescript
|
|
49
|
+
* const isEscapeHatch = hasEscapeHatchCast(expression);
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
declare function hasEscapeHatchCast(expression: TSESTree.Expression): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Narrows object literal elements to the subset the fixer can rewrite safely.
|
|
55
|
+
* @param property Object literal element to inspect.
|
|
56
|
+
* @returns True when the property is supported by the fixer.
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const supported = isSupportedProperty(property);
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
declare function isSupportedProperty(property: TSESTree.ObjectLiteralElement): property is SupportedProperty;
|
|
63
|
+
/**
|
|
64
|
+
* Detects `vi.mock(...)` and `vi.doMock(...)` calls.
|
|
65
|
+
* @param node Call expression being inspected.
|
|
66
|
+
* @returns True when the call targets a Vitest mock factory.
|
|
67
|
+
* @example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* const isMockCall = isVitestMockCall(callExpression);
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
declare function isVitestMockCall(node: TSESTree.CallExpression): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Determines whether the fixed object literal must be parenthesized.
|
|
75
|
+
* @param factoryArgument Mock factory function expression.
|
|
76
|
+
* @param returnExpression Expression returned by the factory.
|
|
77
|
+
* @param objectExpression Object literal being rewritten.
|
|
78
|
+
* @returns True when parentheses are required around the object literal.
|
|
79
|
+
* @example
|
|
80
|
+
* ```typescript
|
|
81
|
+
* const wrapObject = shouldWrapImplicitObject(factoryArgument, returnExpression, objectExpression);
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
declare function shouldWrapImplicitObject(factoryArgument: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression, returnExpression: TSESTree.Expression, objectExpression: TSESTree.ObjectExpression): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Checks whether an expression's cast chain contains an escape-hatch cast through unknown or any.
|
|
87
|
+
* Removes surrounding cast wrappers from an expression.
|
|
88
|
+
* @param expression Expression to unwrap.
|
|
89
|
+
* @returns The innermost non-cast expression.
|
|
90
|
+
* @example
|
|
91
|
+
* ```typescript
|
|
92
|
+
* const baseExpression = unwrapExpression(expression);
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
declare function unwrapExpression(expression: TSESTree.Expression): TSESTree.Expression;
|
|
96
|
+
export { canUseShorthand, getFactoryReturnExpression, getModuleSpecifier, getPropertyName, hasEscapeHatchCast, isSupportedProperty, isVitestMockCall, shouldWrapImplicitObject, unwrapExpression, };
|
|
97
|
+
//# sourceMappingURL=ast-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast-helpers.d.ts","sourceRoot":"","sources":["../../../../src/domain/testing/prefer-vitest-incremental-casts/ast-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEnE;;;;;;;;GAQG;AACH,iBAAS,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAU3D;AAED;;;;;;;;GAQG;AACH,iBAAS,0BAA0B,CACjC,eAAe,EACX,QAAQ,CAAC,uBAAuB,GAChC,QAAQ,CAAC,kBAAkB,GAC9B,QAAQ,CAAC,UAAU,GAAG,SAAS,CAYjC;AAED;;;;;;;;GAQG;AACH,iBAAS,kBAAkB,CACzB,cAAc,EAAE,QAAQ,CAAC,UAAU,GAClC,MAAM,GAAG,SAAS,CAkBpB;AAED;;;;;;;;GAQG;AACH,iBAAS,eAAe,CACtB,WAAW,EAAE,QAAQ,CAAC,YAAY,GACjC,MAAM,GAAG,SAAS,CAapB;AAED;;;;;;;;GAQG;AACH,iBAAS,kBAAkB,CAAC,UAAU,EAAE,QAAQ,CAAC,UAAU,GAAG,OAAO,CAoBpE;AAED;;;;;;;;GAQG;AACH,iBAAS,mBAAmB,CAC1B,QAAQ,EAAE,QAAQ,CAAC,oBAAoB,GACtC,QAAQ,IAAI,iBAAiB,CAQ/B;AAED;;;;;;;;GAQG;AACH,iBAAS,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,cAAc,GAAG,OAAO,CAahE;AAED;;;;;;;;;;GAUG;AACH,iBAAS,wBAAwB,CAC/B,eAAe,EACX,QAAQ,CAAC,uBAAuB,GAChC,QAAQ,CAAC,kBAAkB,EAC/B,gBAAgB,EAAE,QAAQ,CAAC,UAAU,EACrC,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,GAC1C,OAAO,CAMT;AAED;;;;;;;;;GASG;AACH,iBAAS,gBAAgB,CACvB,UAAU,EAAE,QAAQ,CAAC,UAAU,GAC9B,QAAQ,CAAC,UAAU,CAYrB;AAED,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,gBAAgB,GACjB,CAAC"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
+
/**
|
|
3
|
+
* Checks whether a property can remain in shorthand form after replacement.
|
|
4
|
+
* @param context Property shorthand decision context.
|
|
5
|
+
* @returns True when shorthand syntax remains valid.
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const keepShorthand = canUseShorthand(context);
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
function canUseShorthand(context) {
|
|
12
|
+
const { baseValue, keyName, needsCast, property } = context;
|
|
13
|
+
return (!needsCast &&
|
|
14
|
+
baseValue.type === TSESTree.AST_NODE_TYPES.Identifier &&
|
|
15
|
+
property.key.type === TSESTree.AST_NODE_TYPES.Identifier &&
|
|
16
|
+
property.key.name === keyName &&
|
|
17
|
+
baseValue.name === keyName);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Resolves the expression returned by the mock factory.
|
|
21
|
+
* @param factoryArgument Mock factory function expression.
|
|
22
|
+
* @returns Returned expression when one is present.
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const returnExpression = getFactoryReturnExpression(factoryArgument);
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
function getFactoryReturnExpression(factoryArgument) {
|
|
29
|
+
if (factoryArgument.body.type !== TSESTree.AST_NODE_TYPES.BlockStatement) {
|
|
30
|
+
return factoryArgument.body;
|
|
31
|
+
}
|
|
32
|
+
const returnStatement = factoryArgument.body.body.find((statement) => statement.type === TSESTree.AST_NODE_TYPES.ReturnStatement &&
|
|
33
|
+
statement.argument !== null);
|
|
34
|
+
return returnStatement?.argument ?? void 0;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Extracts the module specifier from a mock call argument.
|
|
38
|
+
* @param moduleArgument Import expression or string literal argument.
|
|
39
|
+
* @returns Static module specifier when it can be determined.
|
|
40
|
+
* @example
|
|
41
|
+
* ```typescript
|
|
42
|
+
* const moduleSpecifier = getModuleSpecifier(moduleArgument);
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
function getModuleSpecifier(moduleArgument) {
|
|
46
|
+
if (moduleArgument.type === TSESTree.AST_NODE_TYPES.ImportExpression) {
|
|
47
|
+
const { source } = moduleArgument;
|
|
48
|
+
if (source.type === TSESTree.AST_NODE_TYPES.Literal &&
|
|
49
|
+
typeof source.value === "string") {
|
|
50
|
+
return source.value;
|
|
51
|
+
}
|
|
52
|
+
return void 0;
|
|
53
|
+
}
|
|
54
|
+
return moduleArgument.type === TSESTree.AST_NODE_TYPES.Literal &&
|
|
55
|
+
typeof moduleArgument.value === "string"
|
|
56
|
+
? moduleArgument.value
|
|
57
|
+
: void 0;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Converts an object property key node into a stable string name.
|
|
61
|
+
* @param propertyKey Property key node from the object literal.
|
|
62
|
+
* @returns Property name when the key is statically known.
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* const propertyName = getPropertyName(property.key);
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
function getPropertyName(propertyKey) {
|
|
69
|
+
if (propertyKey.type === TSESTree.AST_NODE_TYPES.Identifier) {
|
|
70
|
+
return propertyKey.name;
|
|
71
|
+
}
|
|
72
|
+
if (propertyKey.type === TSESTree.AST_NODE_TYPES.Literal) {
|
|
73
|
+
return typeof propertyKey.value === "string" ||
|
|
74
|
+
typeof propertyKey.value === "number"
|
|
75
|
+
? String(propertyKey.value)
|
|
76
|
+
: void 0;
|
|
77
|
+
}
|
|
78
|
+
return void 0;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Checks whether an expression's cast chain contains an escape-hatch cast through unknown or any.
|
|
82
|
+
* @param expression Expression to inspect.
|
|
83
|
+
* @returns True when at least one cast in the chain uses unknown or any as the type annotation.
|
|
84
|
+
* @example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* const isEscapeHatch = hasEscapeHatchCast(expression);
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
function hasEscapeHatchCast(expression) {
|
|
90
|
+
let current = expression;
|
|
91
|
+
while (current.type === TSESTree.AST_NODE_TYPES.TSAsExpression ||
|
|
92
|
+
current.type === TSESTree.AST_NODE_TYPES.TSTypeAssertion ||
|
|
93
|
+
current.type === TSESTree.AST_NODE_TYPES.TSSatisfiesExpression) {
|
|
94
|
+
if (current.typeAnnotation.type ===
|
|
95
|
+
TSESTree.AST_NODE_TYPES.TSUnknownKeyword ||
|
|
96
|
+
current.typeAnnotation.type === TSESTree.AST_NODE_TYPES.TSAnyKeyword) {
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
current = current.expression;
|
|
100
|
+
}
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Narrows object literal elements to the subset the fixer can rewrite safely.
|
|
105
|
+
* @param property Object literal element to inspect.
|
|
106
|
+
* @returns True when the property is supported by the fixer.
|
|
107
|
+
* @example
|
|
108
|
+
* ```typescript
|
|
109
|
+
* const supported = isSupportedProperty(property);
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
function isSupportedProperty(property) {
|
|
113
|
+
return (property.type === TSESTree.AST_NODE_TYPES.Property &&
|
|
114
|
+
!property.computed &&
|
|
115
|
+
property.kind === "init" &&
|
|
116
|
+
!property.method &&
|
|
117
|
+
property.value.type !== TSESTree.AST_NODE_TYPES.AssignmentPattern);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Detects `vi.mock(...)` and `vi.doMock(...)` calls.
|
|
121
|
+
* @param node Call expression being inspected.
|
|
122
|
+
* @returns True when the call targets a Vitest mock factory.
|
|
123
|
+
* @example
|
|
124
|
+
* ```typescript
|
|
125
|
+
* const isMockCall = isVitestMockCall(callExpression);
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
function isVitestMockCall(node) {
|
|
129
|
+
if (node.callee.type !== TSESTree.AST_NODE_TYPES.MemberExpression) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
const { object, property } = node.callee;
|
|
133
|
+
return (object.type === TSESTree.AST_NODE_TYPES.Identifier &&
|
|
134
|
+
object.name === "vi" &&
|
|
135
|
+
property.type === TSESTree.AST_NODE_TYPES.Identifier &&
|
|
136
|
+
(property.name === "mock" || property.name === "doMock"));
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Determines whether the fixed object literal must be parenthesized.
|
|
140
|
+
* @param factoryArgument Mock factory function expression.
|
|
141
|
+
* @param returnExpression Expression returned by the factory.
|
|
142
|
+
* @param objectExpression Object literal being rewritten.
|
|
143
|
+
* @returns True when parentheses are required around the object literal.
|
|
144
|
+
* @example
|
|
145
|
+
* ```typescript
|
|
146
|
+
* const wrapObject = shouldWrapImplicitObject(factoryArgument, returnExpression, objectExpression);
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
function shouldWrapImplicitObject(factoryArgument, returnExpression, objectExpression) {
|
|
150
|
+
return (factoryArgument.body.type !== TSESTree.AST_NODE_TYPES.BlockStatement &&
|
|
151
|
+
(returnExpression.range[0] !== objectExpression.range[0] ||
|
|
152
|
+
returnExpression.range[1] !== objectExpression.range[1]));
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Checks whether an expression's cast chain contains an escape-hatch cast through unknown or any.
|
|
156
|
+
* Removes surrounding cast wrappers from an expression.
|
|
157
|
+
* @param expression Expression to unwrap.
|
|
158
|
+
* @returns The innermost non-cast expression.
|
|
159
|
+
* @example
|
|
160
|
+
* ```typescript
|
|
161
|
+
* const baseExpression = unwrapExpression(expression);
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
function unwrapExpression(expression) {
|
|
165
|
+
let currentExpression = expression;
|
|
166
|
+
while (currentExpression.type === TSESTree.AST_NODE_TYPES.TSAsExpression ||
|
|
167
|
+
currentExpression.type === TSESTree.AST_NODE_TYPES.TSSatisfiesExpression ||
|
|
168
|
+
currentExpression.type === TSESTree.AST_NODE_TYPES.TSTypeAssertion) {
|
|
169
|
+
currentExpression = currentExpression.expression;
|
|
170
|
+
}
|
|
171
|
+
return currentExpression;
|
|
172
|
+
}
|
|
173
|
+
export { canUseShorthand, getFactoryReturnExpression, getModuleSpecifier, getPropertyName, hasEscapeHatchCast, isSupportedProperty, isVitestMockCall, shouldWrapImplicitObject, unwrapExpression, };
|
|
174
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXN0LWhlbHBlcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvZG9tYWluL3Rlc3RpbmcvcHJlZmVyLXZpdGVzdC1pbmNyZW1lbnRhbC1jYXN0cy9hc3QtaGVscGVycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFJcEQ7Ozs7Ozs7O0dBUUc7QUFDSCxTQUFTLGVBQWUsQ0FBQyxPQUF5QjtJQUNoRCxNQUFNLEVBQUUsU0FBUyxFQUFFLE9BQU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dXJyZW50RXhwcmVzc2lvbi50eXBlID09PSBUU0VTVHJlZS5BU1RfTk9ERV9UWVBFUy5UU1R5cGVBc3NlcnRpb25cclxuICApIHtcclxuICAgIGN1cnJlbnRFeHByZXNzaW9uID0gY3VycmVudEV4cHJlc3Npb24uZXhwcmVzc2lvbjtcclxuICB9XHJcblxyXG4gIHJldHVybiBjdXJyZW50RXhwcmVzc2lvbjtcclxufVxyXG5cclxuZXhwb3J0IHtcclxuICBjYW5Vc2VTaG9ydGhhbmQsXHJcbiAgZ2V0RmFjdG9yeVJldHVybkV4cHJlc3Npb24sXHJcbiAgZ2V0TW9kdWxlU3BlY2lmaWVyLFxyXG4gIGdldFByb3BlcnR5TmFtZSxcclxuICBoYXNFc2NhcGVIYXRjaENhc3QsXHJcbiAgaXNTdXBwb3J0ZWRQcm9wZXJ0eSxcclxuICBpc1ZpdGVzdE1vY2tDYWxsLFxyXG4gIHNob3VsZFdyYXBJbXBsaWNpdE9iamVjdCxcclxuICB1bndyYXBFeHByZXNzaW9uLFxyXG59O1xyXG4iXX0=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/domain/testing/prefer-vitest-incremental-casts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { preferVitestIncrementalCastsRule } from "./rule.js";
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvZG9tYWluL3Rlc3RpbmcvcHJlZmVyLXZpdGVzdC1pbmNyZW1lbnRhbC1jYXN0cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsZ0NBQWdDLEVBQUUsTUFBTSxRQUFRLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBwcmVmZXJWaXRlc3RJbmNyZW1lbnRhbENhc3RzUnVsZSB9IGZyb20gXCIuL3J1bGVcIjtcbiJdfQ==
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
+
import type { FactoryMatchInput } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Extracts the mock-factory inputs needed for a rewrite attempt.
|
|
5
|
+
* @param callExpression Call expression to inspect.
|
|
6
|
+
* @returns Normalized factory input when the call is supported.
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const factoryInput = getFactoryMatchInput(callExpression);
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
declare function getFactoryMatchInput(callExpression: TSESTree.CallExpression): FactoryMatchInput | undefined;
|
|
13
|
+
export { getFactoryMatchInput };
|
|
14
|
+
//# sourceMappingURL=match-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match-input.d.ts","sourceRoot":"","sources":["../../../../src/domain/testing/prefer-vitest-incremental-casts/match-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,KAAK,EAEV,iBAAiB,EAElB,MAAM,SAAS,CAAC;AAgDjB;;;;;;;;GAQG;AACH,iBAAS,oBAAoB,CAC3B,cAAc,EAAE,QAAQ,CAAC,cAAc,GACtC,iBAAiB,GAAG,SAAS,CAU/B;AA+CD,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
+
import { getFactoryReturnExpression, getModuleSpecifier, hasEscapeHatchCast, isVitestMockCall, unwrapExpression, } from "./ast-helpers.js";
|
|
3
|
+
/**
|
|
4
|
+
* Builds normalized match input from a supported factory call.
|
|
5
|
+
* @param mockArguments Supported mock-call arguments.
|
|
6
|
+
* @returns Normalized factory input when the returned value is an object literal.
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const factoryInput = buildFactoryMatchInput(mockArguments);
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
function buildFactoryMatchInput(mockArguments) {
|
|
13
|
+
const { factoryArgument, moduleArgument } = mockArguments;
|
|
14
|
+
const moduleSpecifier = getModuleSpecifier(moduleArgument);
|
|
15
|
+
const returnExpression = getFactoryReturnExpression(factoryArgument);
|
|
16
|
+
if (moduleSpecifier === void 0 || returnExpression === void 0) {
|
|
17
|
+
return void 0;
|
|
18
|
+
}
|
|
19
|
+
const objectExpression = unwrapExpression(returnExpression);
|
|
20
|
+
if (objectExpression.type !== TSESTree.AST_NODE_TYPES.ObjectExpression ||
|
|
21
|
+
(returnExpression !== objectExpression &&
|
|
22
|
+
!hasEscapeHatchCast(returnExpression))) {
|
|
23
|
+
return void 0;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
factoryArgument,
|
|
27
|
+
moduleSpecifier,
|
|
28
|
+
objectExpression,
|
|
29
|
+
returnExpression,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Extracts the mock-factory inputs needed for a rewrite attempt.
|
|
34
|
+
* @param callExpression Call expression to inspect.
|
|
35
|
+
* @returns Normalized factory input when the call is supported.
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* const factoryInput = getFactoryMatchInput(callExpression);
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
function getFactoryMatchInput(callExpression) {
|
|
42
|
+
if (!isVitestMockCall(callExpression)) {
|
|
43
|
+
return void 0;
|
|
44
|
+
}
|
|
45
|
+
const mockArguments = getMockFactoryArguments(callExpression.arguments);
|
|
46
|
+
return mockArguments === void 0
|
|
47
|
+
? void 0
|
|
48
|
+
: buildFactoryMatchInput(mockArguments);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Extracts valid mock-factory arguments from a call expression.
|
|
52
|
+
* @param argumentsList Arguments supplied to the mock call.
|
|
53
|
+
* @returns Normalized arguments when the call shape is supported.
|
|
54
|
+
* @example
|
|
55
|
+
* ```typescript
|
|
56
|
+
* const mockArguments = getMockFactoryArguments(callExpression.arguments);
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
function getMockFactoryArguments(argumentsList) {
|
|
60
|
+
const [moduleArgument, factoryArgument] = argumentsList;
|
|
61
|
+
if (moduleArgument === void 0 ||
|
|
62
|
+
factoryArgument === void 0 ||
|
|
63
|
+
moduleArgument.type === TSESTree.AST_NODE_TYPES.SpreadElement ||
|
|
64
|
+
factoryArgument.type === TSESTree.AST_NODE_TYPES.SpreadElement ||
|
|
65
|
+
!isFactoryFunctionExpression(factoryArgument)) {
|
|
66
|
+
return void 0;
|
|
67
|
+
}
|
|
68
|
+
return { factoryArgument, moduleArgument };
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Determines whether an expression is a supported mock factory function.
|
|
72
|
+
* @param expression Expression to inspect.
|
|
73
|
+
* @returns True when the expression is a function compatible with the fixer.
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const supported = isFactoryFunctionExpression(expression);
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
function isFactoryFunctionExpression(expression) {
|
|
80
|
+
return (expression.type === TSESTree.AST_NODE_TYPES.ArrowFunctionExpression ||
|
|
81
|
+
expression.type === TSESTree.AST_NODE_TYPES.FunctionExpression);
|
|
82
|
+
}
|
|
83
|
+
export { getFactoryMatchInput };
|
|
84
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWF0Y2gtaW5wdXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvZG9tYWluL3R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eU1hdGNoSW5wdXQgfTtcclxuIl19
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CollectMatchContext, MatchResult } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Collects a fix match for a supported Vitest mock factory call.
|
|
4
|
+
* @param context Match collection context.
|
|
5
|
+
* @returns Match result when the object literal can be safely rewritten.
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const match = collectMatch(context);
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
declare function collectMatch(context: CollectMatchContext): MatchResult | undefined;
|
|
12
|
+
export { collectMatch };
|
|
13
|
+
//# sourceMappingURL=match.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../../src/domain/testing/prefer-vitest-incremental-casts/match.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,mBAAmB,EAEnB,WAAW,EAKZ,MAAM,SAAS,CAAC;AA2GjB;;;;;;;;GAQG;AACH,iBAAS,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,WAAW,GAAG,SAAS,CA+C3E;AAkHD,OAAO,EAAE,YAAY,EAAE,CAAC"}
|