@thethracian/oxlint-config 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +67 -10
- package/dist/codemod-fix/cli.js +0 -3
- package/dist/codemod-fix/cli.js.map +1 -1
- package/dist/codemod-fix/index.d.ts +0 -30
- package/dist/codemod-fix/index.d.ts.map +1 -1
- package/dist/codemod-fix/index.js +0 -24
- package/dist/codemod-fix/index.js.map +1 -1
- package/dist/codemods/arrow-body-style.d.ts +0 -5
- package/dist/codemods/arrow-body-style.d.ts.map +1 -1
- package/dist/codemods/arrow-body-style.js +9 -21
- package/dist/codemods/arrow-body-style.js.map +1 -1
- package/dist/codemods/ast-helpers.d.ts +15 -0
- package/dist/codemods/ast-helpers.d.ts.map +1 -0
- package/dist/codemods/ast-helpers.js +23 -0
- package/dist/codemods/ast-helpers.js.map +1 -0
- package/dist/codemods/comment-format.d.ts +0 -15
- package/dist/codemods/comment-format.d.ts.map +1 -1
- package/dist/codemods/comment-format.js +0 -18
- package/dist/codemods/comment-format.js.map +1 -1
- package/dist/codemods/explicit-return-types.d.ts +0 -5
- package/dist/codemods/explicit-return-types.d.ts.map +1 -1
- package/dist/codemods/explicit-return-types.js +47 -31
- package/dist/codemods/explicit-return-types.js.map +1 -1
- package/dist/codemods/format-file-header.d.ts +0 -5
- package/dist/codemods/format-file-header.d.ts.map +1 -1
- package/dist/codemods/format-file-header.js +0 -8
- package/dist/codemods/format-file-header.js.map +1 -1
- package/dist/codemods/format-jsdoc-comments.d.ts +0 -5
- package/dist/codemods/format-jsdoc-comments.d.ts.map +1 -1
- package/dist/codemods/format-jsdoc-comments.js +0 -8
- package/dist/codemods/format-jsdoc-comments.js.map +1 -1
- package/dist/codemods/function-declarations.d.ts +0 -5
- package/dist/codemods/function-declarations.d.ts.map +1 -1
- package/dist/codemods/function-declarations.js +10 -24
- package/dist/codemods/function-declarations.js.map +1 -1
- package/dist/codemods/inline-export-lists.d.ts +0 -5
- package/dist/codemods/inline-export-lists.d.ts.map +1 -1
- package/dist/codemods/inline-export-lists.js +18 -17
- package/dist/codemods/inline-export-lists.js.map +1 -1
- package/dist/codemods/internal-export-docs.d.ts +0 -5
- package/dist/codemods/internal-export-docs.d.ts.map +1 -1
- package/dist/codemods/internal-export-docs.js +13 -15
- package/dist/codemods/internal-export-docs.js.map +1 -1
- package/dist/codemods/no-ternary-branch-initializers.d.ts +0 -5
- package/dist/codemods/no-ternary-branch-initializers.d.ts.map +1 -1
- package/dist/codemods/no-ternary-branch-initializers.js +16 -26
- package/dist/codemods/no-ternary-branch-initializers.js.map +1 -1
- package/dist/codemods/no-ternary-variable-initializers.d.ts +0 -5
- package/dist/codemods/no-ternary-variable-initializers.d.ts.map +1 -1
- package/dist/codemods/no-ternary-variable-initializers.js +12 -28
- package/dist/codemods/no-ternary-variable-initializers.js.map +1 -1
- package/dist/codemods/no-ternary.d.ts +0 -5
- package/dist/codemods/no-ternary.d.ts.map +1 -1
- package/dist/codemods/no-ternary.js +5 -16
- package/dist/codemods/no-ternary.js.map +1 -1
- package/dist/codemods/run.d.ts.map +1 -1
- package/dist/codemods/run.js +0 -3
- package/dist/codemods/run.js.map +1 -1
- package/dist/codemods/sort-imports.d.ts +0 -5
- package/dist/codemods/sort-imports.d.ts.map +1 -1
- package/dist/codemods/sort-imports.js +14 -23
- package/dist/codemods/sort-imports.js.map +1 -1
- package/dist/index.d.ts +0 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -39
- package/dist/index.js.map +1 -1
- package/dist/rules/char-class.d.ts +0 -25
- package/dist/rules/char-class.d.ts.map +1 -1
- package/dist/rules/char-class.js +0 -28
- package/dist/rules/char-class.js.map +1 -1
- package/dist/rules/diagnostic-guidance.d.ts +0 -10
- package/dist/rules/diagnostic-guidance.d.ts.map +1 -1
- package/dist/rules/diagnostic-guidance.js +0 -13
- package/dist/rules/diagnostic-guidance.js.map +1 -1
- package/dist/rules/effect-alias-canonicalization.d.ts +0 -20
- package/dist/rules/effect-alias-canonicalization.d.ts.map +1 -1
- package/dist/rules/effect-alias-canonicalization.js +0 -18
- package/dist/rules/effect-alias-canonicalization.js.map +1 -1
- package/dist/rules/effect-ast-scope-stack.d.ts +0 -15
- package/dist/rules/effect-ast-scope-stack.d.ts.map +1 -1
- package/dist/rules/effect-ast-scope-stack.js +4 -27
- package/dist/rules/effect-ast-scope-stack.js.map +1 -1
- package/dist/rules/effect-ast-scope.d.ts +0 -19
- package/dist/rules/effect-ast-scope.d.ts.map +1 -1
- package/dist/rules/effect-ast-scope.js +4 -26
- package/dist/rules/effect-ast-scope.js.map +1 -1
- package/dist/rules/effect-ast.d.ts +13 -37
- package/dist/rules/effect-ast.d.ts.map +1 -1
- package/dist/rules/effect-ast.js +11 -46
- package/dist/rules/effect-ast.js.map +1 -1
- package/dist/rules/effect-boundary-ast-shared.d.ts +0 -21
- package/dist/rules/effect-boundary-ast-shared.d.ts.map +1 -1
- package/dist/rules/effect-boundary-ast-shared.js +1 -20
- package/dist/rules/effect-boundary-ast-shared.js.map +1 -1
- package/dist/rules/effect-default-ast.d.ts +9 -53
- package/dist/rules/effect-default-ast.d.ts.map +1 -1
- package/dist/rules/effect-default-ast.js +9 -54
- package/dist/rules/effect-default-ast.js.map +1 -1
- package/dist/rules/effect-default-compat-rules.d.ts +3 -8
- package/dist/rules/effect-default-compat-rules.d.ts.map +1 -1
- package/dist/rules/effect-default-compat-rules.js +0 -8
- package/dist/rules/effect-default-compat-rules.js.map +1 -1
- package/dist/rules/effect-default-env-rules.d.ts +1 -18
- package/dist/rules/effect-default-env-rules.d.ts.map +1 -1
- package/dist/rules/effect-default-env-rules.js +0 -8
- package/dist/rules/effect-default-env-rules.js.map +1 -1
- package/dist/rules/effect-default-fiber-helpers.d.ts +0 -10
- package/dist/rules/effect-default-fiber-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-fiber-helpers.js +0 -10
- package/dist/rules/effect-default-fiber-helpers.js.map +1 -1
- package/dist/rules/effect-default-floating-helpers.d.ts +0 -5
- package/dist/rules/effect-default-floating-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-floating-helpers.js +0 -8
- package/dist/rules/effect-default-floating-helpers.js.map +1 -1
- package/dist/rules/effect-default-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-helpers.js +0 -3
- package/dist/rules/effect-default-helpers.js.map +1 -1
- package/dist/rules/effect-default-resource-helpers.d.ts +0 -15
- package/dist/rules/effect-default-resource-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-resource-helpers.js +0 -18
- package/dist/rules/effect-default-resource-helpers.js.map +1 -1
- package/dist/rules/effect-default-safety-helpers.d.ts +0 -15
- package/dist/rules/effect-default-safety-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-safety-helpers.js +0 -18
- package/dist/rules/effect-default-safety-helpers.js.map +1 -1
- package/dist/rules/effect-default-scan-helpers.d.ts +0 -30
- package/dist/rules/effect-default-scan-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-scan-helpers.js +0 -33
- package/dist/rules/effect-default-scan-helpers.js.map +1 -1
- package/dist/rules/effect-default-schema-helpers.d.ts +0 -20
- package/dist/rules/effect-default-schema-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-schema-helpers.js +0 -23
- package/dist/rules/effect-default-schema-helpers.js.map +1 -1
- package/dist/rules/effect-default-test-helpers.d.ts +0 -15
- package/dist/rules/effect-default-test-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-test-helpers.js +0 -18
- package/dist/rules/effect-default-test-helpers.js.map +1 -1
- package/dist/rules/effect-default-workflow-helpers.d.ts +0 -35
- package/dist/rules/effect-default-workflow-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-workflow-helpers.js +0 -38
- package/dist/rules/effect-default-workflow-helpers.js.map +1 -1
- package/dist/rules/effect-default.d.ts.map +1 -1
- package/dist/rules/effect-default.js +0 -3
- package/dist/rules/effect-default.js.map +1 -1
- package/dist/rules/effect-export-binding-pattern-index.d.ts +0 -7
- package/dist/rules/effect-export-binding-pattern-index.d.ts.map +1 -1
- package/dist/rules/effect-export-binding-pattern-index.js +0 -10
- package/dist/rules/effect-export-binding-pattern-index.js.map +1 -1
- package/dist/rules/effect-export-binding-patterns.d.ts +0 -6
- package/dist/rules/effect-export-binding-patterns.d.ts.map +1 -1
- package/dist/rules/effect-export-binding-patterns.js +0 -9
- package/dist/rules/effect-export-binding-patterns.js.map +1 -1
- package/dist/rules/effect-export-declaration-boundaries.d.ts +0 -15
- package/dist/rules/effect-export-declaration-boundaries.d.ts.map +1 -1
- package/dist/rules/effect-export-declaration-boundaries.js +0 -15
- package/dist/rules/effect-export-declaration-boundaries.js.map +1 -1
- package/dist/rules/effect-export-default-binding.d.ts +0 -3
- package/dist/rules/effect-export-default-binding.d.ts.map +1 -1
- package/dist/rules/effect-export-default-binding.js +0 -6
- package/dist/rules/effect-export-default-binding.js.map +1 -1
- package/dist/rules/effect-export-source-code.d.ts +0 -3
- package/dist/rules/effect-export-source-code.d.ts.map +1 -1
- package/dist/rules/effect-export-source-code.js +0 -8
- package/dist/rules/effect-export-source-code.js.map +1 -1
- package/dist/rules/effect-exported-declaration-projection.d.ts +0 -20
- package/dist/rules/effect-exported-declaration-projection.d.ts.map +1 -1
- package/dist/rules/effect-exported-declaration-projection.js +0 -23
- package/dist/rules/effect-exported-declaration-projection.js.map +1 -1
- package/dist/rules/effect-exported-declarations.d.ts +0 -1
- package/dist/rules/effect-exported-declarations.d.ts.map +1 -1
- package/dist/rules/effect-exported-declarations.js +0 -4
- package/dist/rules/effect-exported-declarations.js.map +1 -1
- package/dist/rules/effect-global-fetch-ast-traversal.d.ts +0 -10
- package/dist/rules/effect-global-fetch-ast-traversal.d.ts.map +1 -1
- package/dist/rules/effect-global-fetch-ast-traversal.js +1 -14
- package/dist/rules/effect-global-fetch-ast-traversal.js.map +1 -1
- package/dist/rules/effect-global-fetch-ast.d.ts +1 -12
- package/dist/rules/effect-global-fetch-ast.d.ts.map +1 -1
- package/dist/rules/effect-global-fetch-ast.js +7 -27
- package/dist/rules/effect-global-fetch-ast.js.map +1 -1
- package/dist/rules/effect-global-fetch-imports.d.ts +0 -19
- package/dist/rules/effect-global-fetch-imports.d.ts.map +1 -1
- package/dist/rules/effect-global-fetch-imports.js +4 -20
- package/dist/rules/effect-global-fetch-imports.js.map +1 -1
- package/dist/rules/effect-import-bindings.d.ts +0 -9
- package/dist/rules/effect-import-bindings.d.ts.map +1 -1
- package/dist/rules/effect-import-bindings.js +5 -16
- package/dist/rules/effect-import-bindings.js.map +1 -1
- package/dist/rules/effect-imported-call-matcher.d.ts +3 -19
- package/dist/rules/effect-imported-call-matcher.d.ts.map +1 -1
- package/dist/rules/effect-imported-call-matcher.js +5 -19
- package/dist/rules/effect-imported-call-matcher.js.map +1 -1
- package/dist/rules/effect-module-source-index.d.ts +0 -22
- package/dist/rules/effect-module-source-index.d.ts.map +1 -1
- package/dist/rules/effect-module-source-index.js +0 -16
- package/dist/rules/effect-module-source-index.js.map +1 -1
- package/dist/rules/effect-native-references.d.ts +3 -61
- package/dist/rules/effect-native-references.d.ts.map +1 -1
- package/dist/rules/effect-native-references.js +36 -117
- package/dist/rules/effect-native-references.js.map +1 -1
- package/dist/rules/effect-native-types.d.ts +30 -0
- package/dist/rules/effect-native-types.d.ts.map +1 -0
- package/dist/rules/effect-native-types.js +2 -0
- package/dist/rules/effect-native-types.js.map +1 -0
- package/dist/rules/effect-path-options.d.ts +0 -40
- package/dist/rules/effect-path-options.d.ts.map +1 -1
- package/dist/rules/effect-path-options.js +8 -40
- package/dist/rules/effect-path-options.js.map +1 -1
- package/dist/rules/effect-recursion-ast.d.ts +1 -12
- package/dist/rules/effect-recursion-ast.d.ts.map +1 -1
- package/dist/rules/effect-recursion-ast.js +2 -15
- package/dist/rules/effect-recursion-ast.js.map +1 -1
- package/dist/rules/effect-recursion-execution.d.ts +0 -5
- package/dist/rules/effect-recursion-execution.d.ts.map +1 -1
- package/dist/rules/effect-recursion-execution.js +11 -18
- package/dist/rules/effect-recursion-execution.js.map +1 -1
- package/dist/rules/effect-recursion-generator.d.ts +0 -5
- package/dist/rules/effect-recursion-generator.d.ts.map +1 -1
- package/dist/rules/effect-recursion-generator.js +0 -8
- package/dist/rules/effect-recursion-generator.js.map +1 -1
- package/dist/rules/effect-recursion-local-bindings.d.ts +0 -25
- package/dist/rules/effect-recursion-local-bindings.d.ts.map +1 -1
- package/dist/rules/effect-recursion-local-bindings.js +0 -13
- package/dist/rules/effect-recursion-local-bindings.js.map +1 -1
- package/dist/rules/effect-recursion-phases.d.ts +0 -29
- package/dist/rules/effect-recursion-phases.d.ts.map +1 -1
- package/dist/rules/effect-recursion-phases.js +0 -22
- package/dist/rules/effect-recursion-phases.js.map +1 -1
- package/dist/rules/effect-recursion-source-copy.d.ts +0 -5
- package/dist/rules/effect-recursion-source-copy.d.ts.map +1 -1
- package/dist/rules/effect-recursion-source-copy.js +0 -8
- package/dist/rules/effect-recursion-source-copy.js.map +1 -1
- package/dist/rules/effect-recursion-source-deferred.d.ts +0 -13
- package/dist/rules/effect-recursion-source-deferred.d.ts.map +1 -1
- package/dist/rules/effect-recursion-source-deferred.js +0 -11
- package/dist/rules/effect-recursion-source-deferred.js.map +1 -1
- package/dist/rules/effect-recursion-source.d.ts +0 -8
- package/dist/rules/effect-recursion-source.d.ts.map +1 -1
- package/dist/rules/effect-recursion-source.js +38 -60
- package/dist/rules/effect-recursion-source.js.map +1 -1
- package/dist/rules/effect-recursion-viability.d.ts +0 -45
- package/dist/rules/effect-recursion-viability.d.ts.map +1 -1
- package/dist/rules/effect-recursion-viability.js +5 -44
- package/dist/rules/effect-recursion-viability.js.map +1 -1
- package/dist/rules/effect-rule-aliases.d.ts +0 -38
- package/dist/rules/effect-rule-aliases.d.ts.map +1 -1
- package/dist/rules/effect-rule-aliases.js +0 -41
- package/dist/rules/effect-rule-aliases.js.map +1 -1
- package/dist/rules/effect-rule-core.d.ts +10 -31
- package/dist/rules/effect-rule-core.d.ts.map +1 -1
- package/dist/rules/effect-rule-core.js +6 -13
- package/dist/rules/effect-rule-core.js.map +1 -1
- package/dist/rules/effect-rule-names.d.ts +1 -21
- package/dist/rules/effect-rule-names.d.ts.map +1 -1
- package/dist/rules/effect-rule-names.js +0 -23
- package/dist/rules/effect-rule-names.js.map +1 -1
- package/dist/rules/effect-schema-no-redundant-tag-identifier.d.ts.map +1 -1
- package/dist/rules/effect-schema-no-redundant-tag-identifier.js +4 -6
- package/dist/rules/effect-schema-no-redundant-tag-identifier.js.map +1 -1
- package/dist/rules/effect-source-cache-weights.d.ts +0 -55
- package/dist/rules/effect-source-cache-weights.d.ts.map +1 -1
- package/dist/rules/effect-source-cache-weights.js +0 -40
- package/dist/rules/effect-source-cache-weights.js.map +1 -1
- package/dist/rules/effect-source-comments.d.ts +0 -9
- package/dist/rules/effect-source-comments.d.ts.map +1 -1
- package/dist/rules/effect-source-comments.js +0 -13
- package/dist/rules/effect-source-comments.js.map +1 -1
- package/dist/rules/effect-source-helpers.d.ts.map +1 -1
- package/dist/rules/effect-source-helpers.js +0 -3
- package/dist/rules/effect-source-helpers.js.map +1 -1
- package/dist/rules/effect-source-jsx-lexer-base.d.ts +0 -5
- package/dist/rules/effect-source-jsx-lexer-base.d.ts.map +1 -1
- package/dist/rules/effect-source-jsx-lexer-base.js +0 -8
- package/dist/rules/effect-source-jsx-lexer-base.js.map +1 -1
- package/dist/rules/effect-source-jsx-lexical.d.ts +0 -240
- package/dist/rules/effect-source-jsx-lexical.d.ts.map +1 -1
- package/dist/rules/effect-source-jsx-lexical.js +0 -208
- package/dist/rules/effect-source-jsx-lexical.js.map +1 -1
- package/dist/rules/effect-source-jsx-scanner.d.ts +0 -10
- package/dist/rules/effect-source-jsx-scanner.d.ts.map +1 -1
- package/dist/rules/effect-source-jsx-scanner.js +0 -13
- package/dist/rules/effect-source-jsx-scanner.js.map +1 -1
- package/dist/rules/effect-source-line-terminators.d.ts +0 -26
- package/dist/rules/effect-source-line-terminators.d.ts.map +1 -1
- package/dist/rules/effect-source-line-terminators.js +0 -29
- package/dist/rules/effect-source-line-terminators.js.map +1 -1
- package/dist/rules/effect-source-navigation-index.d.ts +0 -13
- package/dist/rules/effect-source-navigation-index.d.ts.map +1 -1
- package/dist/rules/effect-source-navigation-index.js +0 -11
- package/dist/rules/effect-source-navigation-index.js.map +1 -1
- package/dist/rules/effect-source-navigation-lexer.d.ts +0 -11
- package/dist/rules/effect-source-navigation-lexer.d.ts.map +1 -1
- package/dist/rules/effect-source-navigation-lexer.js +3 -17
- package/dist/rules/effect-source-navigation-lexer.js.map +1 -1
- package/dist/rules/effect-source-navigation.d.ts +0 -20
- package/dist/rules/effect-source-navigation.d.ts.map +1 -1
- package/dist/rules/effect-source-navigation.js +0 -23
- package/dist/rules/effect-source-navigation.js.map +1 -1
- package/dist/rules/effect-source-regex-lexer-context.d.ts +0 -5
- package/dist/rules/effect-source-regex-lexer-context.d.ts.map +1 -1
- package/dist/rules/effect-source-regex-lexer-context.js +0 -8
- package/dist/rules/effect-source-regex-lexer-context.js.map +1 -1
- package/dist/rules/effect-source-regex-lexer-state.d.ts +0 -8
- package/dist/rules/effect-source-regex-lexer-state.d.ts.map +1 -1
- package/dist/rules/effect-source-regex-lexer-state.js +0 -19
- package/dist/rules/effect-source-regex-lexer-state.js.map +1 -1
- package/dist/rules/effect-source-regex-lexer.d.ts +0 -5
- package/dist/rules/effect-source-regex-lexer.d.ts.map +1 -1
- package/dist/rules/effect-source-regex-lexer.js +0 -8
- package/dist/rules/effect-source-regex-lexer.js.map +1 -1
- package/dist/rules/effect-source-regex-literal.d.ts +0 -9
- package/dist/rules/effect-source-regex-literal.d.ts.map +1 -1
- package/dist/rules/effect-source-regex-literal.js +0 -12
- package/dist/rules/effect-source-regex-literal.js.map +1 -1
- package/dist/rules/effect-source-regex-scan.d.ts +0 -18
- package/dist/rules/effect-source-regex-scan.d.ts.map +1 -1
- package/dist/rules/effect-source-regex-scan.js +0 -21
- package/dist/rules/effect-source-regex-scan.js.map +1 -1
- package/dist/rules/effect-source-scan.d.ts +0 -27
- package/dist/rules/effect-source-scan.d.ts.map +1 -1
- package/dist/rules/effect-source-scan.js +0 -31
- package/dist/rules/effect-source-scan.js.map +1 -1
- package/dist/rules/effect-strict-ast-helpers.d.ts +8 -62
- package/dist/rules/effect-strict-ast-helpers.d.ts.map +1 -1
- package/dist/rules/effect-strict-ast-helpers.js +10 -72
- package/dist/rules/effect-strict-ast-helpers.js.map +1 -1
- package/dist/rules/effect-strict-ast-specs.d.ts +0 -5
- package/dist/rules/effect-strict-ast-specs.d.ts.map +1 -1
- package/dist/rules/effect-strict-ast-specs.js +6 -16
- package/dist/rules/effect-strict-ast-specs.js.map +1 -1
- package/dist/rules/effect-strict-boundary-helpers.d.ts +0 -20
- package/dist/rules/effect-strict-boundary-helpers.d.ts.map +1 -1
- package/dist/rules/effect-strict-boundary-helpers.js +0 -23
- package/dist/rules/effect-strict-boundary-helpers.js.map +1 -1
- package/dist/rules/effect-strict-core-specs.d.ts +0 -5
- package/dist/rules/effect-strict-core-specs.d.ts.map +1 -1
- package/dist/rules/effect-strict-core-specs.js +0 -19
- package/dist/rules/effect-strict-core-specs.js.map +1 -1
- package/dist/rules/effect-strict-external-helpers.d.ts +0 -15
- package/dist/rules/effect-strict-external-helpers.d.ts.map +1 -1
- package/dist/rules/effect-strict-external-helpers.js +0 -18
- package/dist/rules/effect-strict-external-helpers.js.map +1 -1
- package/dist/rules/effect-strict-helpers.d.ts +0 -60
- package/dist/rules/effect-strict-helpers.d.ts.map +1 -1
- package/dist/rules/effect-strict-helpers.js +0 -63
- package/dist/rules/effect-strict-helpers.js.map +1 -1
- package/dist/rules/effect-strict-internals.d.ts.map +1 -1
- package/dist/rules/effect-strict-internals.js +0 -3
- package/dist/rules/effect-strict-internals.js.map +1 -1
- package/dist/rules/effect-strict-segment-helpers.d.ts +0 -65
- package/dist/rules/effect-strict-segment-helpers.d.ts.map +1 -1
- package/dist/rules/effect-strict-segment-helpers.js +0 -68
- package/dist/rules/effect-strict-segment-helpers.js.map +1 -1
- package/dist/rules/effect-strict-server-handler-ast.d.ts +2 -10
- package/dist/rules/effect-strict-server-handler-ast.d.ts.map +1 -1
- package/dist/rules/effect-strict-server-handler-ast.js +7 -17
- package/dist/rules/effect-strict-server-handler-ast.js.map +1 -1
- package/dist/rules/effect-strict-server-handler-imports.d.ts +0 -8
- package/dist/rules/effect-strict-server-handler-imports.d.ts.map +1 -1
- package/dist/rules/effect-strict-server-handler-imports.js +0 -8
- package/dist/rules/effect-strict-server-handler-imports.js.map +1 -1
- package/dist/rules/effect-strict-server-handler-index.d.ts +0 -56
- package/dist/rules/effect-strict-server-handler-index.d.ts.map +1 -1
- package/dist/rules/effect-strict-server-handler-index.js +0 -43
- package/dist/rules/effect-strict-server-handler-index.js.map +1 -1
- package/dist/rules/effect-strict-server-handler-shadow.d.ts +0 -31
- package/dist/rules/effect-strict-server-handler-shadow.d.ts.map +1 -1
- package/dist/rules/effect-strict-server-handler-shadow.js +0 -21
- package/dist/rules/effect-strict-server-handler-shadow.js.map +1 -1
- package/dist/rules/effect-strict-server-handler-source.d.ts +0 -8
- package/dist/rules/effect-strict-server-handler-source.d.ts.map +1 -1
- package/dist/rules/effect-strict-server-handler-source.js +0 -8
- package/dist/rules/effect-strict-server-handler-source.js.map +1 -1
- package/dist/rules/effect-strict-server-handler-types.d.ts +0 -20
- package/dist/rules/effect-strict-server-handler-types.d.ts.map +1 -1
- package/dist/rules/effect-strict-server-handler-types.js +0 -3
- package/dist/rules/effect-strict-server-handler-types.js.map +1 -1
- package/dist/rules/effect-strict-source-predicates.d.ts +1 -100
- package/dist/rules/effect-strict-source-predicates.d.ts.map +1 -1
- package/dist/rules/effect-strict-source-predicates.js +0 -98
- package/dist/rules/effect-strict-source-predicates.js.map +1 -1
- package/dist/rules/effect-strict-wrapper-index.d.ts +0 -10
- package/dist/rules/effect-strict-wrapper-index.d.ts.map +1 -1
- package/dist/rules/effect-strict-wrapper-index.js +0 -13
- package/dist/rules/effect-strict-wrapper-index.js.map +1 -1
- package/dist/rules/effect-strict.d.ts.map +1 -1
- package/dist/rules/effect-strict.js +0 -3
- package/dist/rules/effect-strict.js.map +1 -1
- package/dist/rules/no-chained-type-assertions.d.ts +2 -0
- package/dist/rules/no-chained-type-assertions.d.ts.map +1 -0
- package/dist/rules/no-chained-type-assertions.js +60 -0
- package/dist/rules/no-chained-type-assertions.js.map +1 -0
- package/dist/rules/no-comments.d.ts +2 -0
- package/dist/rules/no-comments.d.ts.map +1 -0
- package/dist/rules/no-comments.js +22 -0
- package/dist/rules/no-comments.js.map +1 -0
- package/dist/rules/no-conditional-empty-object-spread.d.ts +2 -0
- package/dist/rules/no-conditional-empty-object-spread.d.ts.map +1 -0
- package/dist/rules/no-conditional-empty-object-spread.js +40 -0
- package/dist/rules/no-conditional-empty-object-spread.js.map +1 -0
- package/dist/rules/no-known-value-widening.d.ts +2 -0
- package/dist/rules/no-known-value-widening.d.ts.map +1 -0
- package/dist/rules/no-known-value-widening.js +182 -0
- package/dist/rules/no-known-value-widening.js.map +1 -0
- package/dist/rules/no-module-mocking.d.ts +2 -0
- package/dist/rules/no-module-mocking.d.ts.map +1 -0
- package/dist/rules/no-module-mocking.js +104 -0
- package/dist/rules/no-module-mocking.js.map +1 -0
- package/dist/rules/no-object-parameters.d.ts +2 -0
- package/dist/rules/no-object-parameters.d.ts.map +1 -0
- package/dist/rules/no-object-parameters.js +56 -0
- package/dist/rules/no-object-parameters.js.map +1 -0
- package/dist/rules/no-reflect-apply.d.ts +2 -0
- package/dist/rules/no-reflect-apply.d.ts.map +1 -0
- package/dist/rules/no-reflect-apply.js +25 -0
- package/dist/rules/no-reflect-apply.js.map +1 -0
- package/dist/rules/no-reflect-get.d.ts +2 -0
- package/dist/rules/no-reflect-get.d.ts.map +1 -0
- package/dist/rules/no-reflect-get.js +25 -0
- package/dist/rules/no-reflect-get.js.map +1 -0
- package/dist/rules/no-runtime-typeof.d.ts +2 -0
- package/dist/rules/no-runtime-typeof.d.ts.map +1 -0
- package/dist/rules/no-runtime-typeof.js +67 -0
- package/dist/rules/no-runtime-typeof.js.map +1 -0
- package/dist/rules/no-service-constructor-imports.d.ts +2 -0
- package/dist/rules/no-service-constructor-imports.d.ts.map +1 -0
- package/dist/rules/no-service-constructor-imports.js +45 -0
- package/dist/rules/no-service-constructor-imports.js.map +1 -0
- package/dist/rules/no-shape-in-symbol-names.d.ts +2 -0
- package/dist/rules/no-shape-in-symbol-names.d.ts.map +1 -0
- package/dist/rules/no-shape-in-symbol-names.js +42 -0
- package/dist/rules/no-shape-in-symbol-names.js.map +1 -0
- package/dist/rules/no-unknown-parameters.d.ts +2 -0
- package/dist/rules/no-unknown-parameters.d.ts.map +1 -0
- package/dist/rules/no-unknown-parameters.js +51 -0
- package/dist/rules/no-unknown-parameters.js.map +1 -0
- package/dist/rules/no-unknown-returns.d.ts +2 -0
- package/dist/rules/no-unknown-returns.d.ts.map +1 -0
- package/dist/rules/no-unknown-returns.js +57 -0
- package/dist/rules/no-unknown-returns.js.map +1 -0
- package/dist/rules/no-unknown-type-aliases.d.ts +2 -0
- package/dist/rules/no-unknown-type-aliases.d.ts.map +1 -0
- package/dist/rules/no-unknown-type-aliases.js +40 -0
- package/dist/rules/no-unknown-type-aliases.js.map +1 -0
- package/dist/rules/no-unsafe-dictionary-type.d.ts +2 -0
- package/dist/rules/no-unsafe-dictionary-type.d.ts.map +1 -0
- package/dist/rules/no-unsafe-dictionary-type.js +134 -0
- package/dist/rules/no-unsafe-dictionary-type.js.map +1 -0
- package/dist/rules/no-widen-then-assert.d.ts +2 -0
- package/dist/rules/no-widen-then-assert.d.ts.map +1 -0
- package/dist/rules/no-widen-then-assert.js +313 -0
- package/dist/rules/no-widen-then-assert.js.map +1 -0
- package/dist/rules/plugin.d.ts +0 -5
- package/dist/rules/plugin.d.ts.map +1 -1
- package/dist/rules/plugin.js +36 -18
- package/dist/rules/plugin.js.map +1 -1
- package/dist/rules/shared/dictionary-types.d.ts +21 -0
- package/dist/rules/shared/dictionary-types.d.ts.map +1 -0
- package/dist/rules/shared/dictionary-types.js +391 -0
- package/dist/rules/shared/dictionary-types.js.map +1 -0
- package/dist/rules/shared/function-parameters.d.ts +6 -0
- package/dist/rules/shared/function-parameters.d.ts.map +1 -0
- package/dist/rules/shared/function-parameters.js +39 -0
- package/dist/rules/shared/function-parameters.js.map +1 -0
- package/dist/rules/shared/lexical-type-parameters.d.ts +10 -0
- package/dist/rules/shared/lexical-type-parameters.d.ts.map +1 -0
- package/dist/rules/shared/lexical-type-parameters.js +48 -0
- package/dist/rules/shared/lexical-type-parameters.js.map +1 -0
- package/dist/rules/shared/reflect-method.d.ts +3 -0
- package/dist/rules/shared/reflect-method.d.ts.map +1 -0
- package/dist/rules/shared/reflect-method.js +29 -0
- package/dist/rules/shared/reflect-method.js.map +1 -0
- package/dist/rules/shared/type-alias-resolution.d.ts +20 -0
- package/dist/rules/shared/type-alias-resolution.d.ts.map +1 -0
- package/dist/rules/shared/type-alias-resolution.js +159 -0
- package/dist/rules/shared/type-alias-resolution.js.map +1 -0
- package/dist/rules/source-cache.d.ts +0 -15
- package/dist/rules/source-cache.d.ts.map +1 -1
- package/dist/rules/source-cache.js +0 -13
- package/dist/rules/source-cache.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.1 - 2026-09-05
|
|
4
|
+
|
|
5
|
+
### Changes
|
|
6
|
+
|
|
7
|
+
- chore: enable full typescript lint policy (deab231)
|
|
8
|
+
|
|
9
|
+
## 0.7.0 - 2026-09-05
|
|
10
|
+
|
|
11
|
+
### Breaking Changes
|
|
12
|
+
|
|
13
|
+
- feat!: ban source comments across typescript, rust, and elixir (7a8f47d)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- feat(ts): integrate strict safety rules and repository checks (de80b96)
|
|
18
|
+
|
|
19
|
+
### Fixes
|
|
20
|
+
|
|
21
|
+
- fix(ts): resolve conflicting lint rules (9895837)
|
|
22
|
+
|
|
3
23
|
## 0.6.0 - 2026-08-09
|
|
4
24
|
|
|
5
25
|
### Breaking Changes
|
|
@@ -10,6 +30,9 @@
|
|
|
10
30
|
|
|
11
31
|
### Breaking Changes
|
|
12
32
|
|
|
33
|
+
- Enabled `thethracian/no-comments` in every preset. Lexical comments, including JSDoc and
|
|
34
|
+
suppression directives, are forbidden; interpreter shebangs remain allowed. Removed the
|
|
35
|
+
contradictory assertion-safety-comment and Effect suppression-comment requirements.
|
|
13
36
|
- Replaced the broad style/performance preset with an explicit allowlist of approved upstream
|
|
14
37
|
Oxlint rules. Every active rule is an `error`; there is no warning tier and no rule-level `off`
|
|
15
38
|
entry. Rules that the audit found noisy or behavior-changing are omitted from the allowlist.
|
package/README.md
CHANGED
|
@@ -21,7 +21,8 @@ export default theThracian({ typeAware: true });
|
|
|
21
21
|
|
|
22
22
|
## Base policy
|
|
23
23
|
|
|
24
|
-
The base config selects
|
|
24
|
+
The base config selects 143 reviewed rules: 128 syntax-only upstream Oxlint rules and 15
|
|
25
|
+
package-local TypeScript safety rules. Oxlint normally supplies
|
|
25
26
|
implicit `correctness` warnings; the config performs one category-level reset with
|
|
26
27
|
`correctness: 'allow'` and then assigns `error` to the approved rules explicitly. This is not a
|
|
27
28
|
warning downgrade and is not a collection of rule-level disables: unapproved rules simply do not
|
|
@@ -49,6 +50,56 @@ ternary, magic-number, documentation, and absolute `any`/assertion bans: those r
|
|
|
49
50
|
mechanical churn or reject legitimate framework, generated-code, and interop boundaries without a
|
|
50
51
|
reliable defect signal.
|
|
51
52
|
|
|
53
|
+
## Additional TypeScript safety rules
|
|
54
|
+
|
|
55
|
+
The package-local plugin enables these 15 rules as errors in every configuration. They use Oxlint's
|
|
56
|
+
ESTree and lexical-scope APIs, resolve same-file aliases, and deliberately stop at file boundaries:
|
|
57
|
+
|
|
58
|
+
| Rule | Policy |
|
|
59
|
+
| ------------------------------------------------ | ----------------------------------------------------------------------------------------------- |
|
|
60
|
+
| `thethracian/no-chained-type-assertions` | Rejects nested type assertions that fabricate evidence; `as const` chains remain valid. |
|
|
61
|
+
| `thethracian/no-conditional-empty-object-spread` | Rejects conditional object spreads whose empty branch silently omits fields. |
|
|
62
|
+
| `thethracian/no-known-value-widening` | Rejects known values widened into `unknown`, `object`, anonymous objects, or open dictionaries. |
|
|
63
|
+
| `thethracian/no-module-mocking` | Rejects Vitest and Jest module-mocking calls. |
|
|
64
|
+
| `thethracian/no-object-parameters` | Rejects `object` and aliases resolving to it on function inputs. |
|
|
65
|
+
| `thethracian/no-reflect-apply` | Requires typed calls instead of global `Reflect.apply`. |
|
|
66
|
+
| `thethracian/no-reflect-get` | Requires typed property access or boundary parsing instead of global `Reflect.get`. |
|
|
67
|
+
| `thethracian/no-runtime-typeof` | Rejects ad hoc `typeof` narrowing; explicit type guards and existence probes remain valid. |
|
|
68
|
+
| `thethracian/no-shape-in-symbol-names` | Rejects locally owned symbol names containing `shape`; static member names remain valid. |
|
|
69
|
+
| `thethracian/no-unknown-parameters` | Rejects `unknown` function inputs except supported predicate and `cause` conventions. |
|
|
70
|
+
| `thethracian/no-unknown-returns` | Rejects explicit `unknown`, `Promise<unknown>`, and `PromiseLike<unknown>` return contracts. |
|
|
71
|
+
| `thethracian/no-unknown-type-aliases` | Rejects aliases that resolve to `unknown`. |
|
|
72
|
+
| `thethracian/no-unsafe-dictionary-type` | Rejects dictionary value contracts based on `unknown`, `any`, `object`, or `{}`. |
|
|
73
|
+
| `thethracian/no-widen-then-assert` | Rejects immutable flows that widen evidence and later assert it back to a narrow type. |
|
|
74
|
+
| `thethracian/no-comments` | Rejects line, block, JSDoc, JSX, and interpolation comments; interpreter shebangs remain valid. |
|
|
75
|
+
|
|
76
|
+
These rules have no automatic migration behavior and do not replace the native Oxlint allowlist.
|
|
77
|
+
|
|
78
|
+
Comments are errors in JavaScript and TypeScript, including documentation and lint-directive
|
|
79
|
+
comments. The rule uses parser comment tokens, so strings, template text, and regular expressions
|
|
80
|
+
containing comment-like text are unaffected. Interpreter shebangs are execution directives and
|
|
81
|
+
remain valid. There is no automatic comment deletion: removing compiler directives or semantic
|
|
82
|
+
annotations can change behavior. Put explanations in external documentation instead.
|
|
83
|
+
|
|
84
|
+
The former safety-comment assertion rule and Effect suppression-comment requirement are removed.
|
|
85
|
+
Assertions remain subject to the type-safety rules; they no longer require comments.
|
|
86
|
+
|
|
87
|
+
The preset configures `no-runtime-typeof` with `allowInTypeGuards: true`: predicate and assertion
|
|
88
|
+
functions can establish primitive contracts without the boxed `instanceof` checks rejected by
|
|
89
|
+
`unicorn/no-instanceof-builtins`. Other runtime `typeof` narrowing remains forbidden. Calling a
|
|
90
|
+
type guard does not erase the caller's type, so `no-known-value-widening` checks explicit storage,
|
|
91
|
+
return, and assertion types, not predicate arguments.
|
|
92
|
+
|
|
93
|
+
`typescript/no-unnecessary-type-parameters` is intentionally omitted. Its recommendation to
|
|
94
|
+
replace generic parameters with `unknown`, `object`, or broad dictionaries conflicts with the
|
|
95
|
+
boundary rules above. Generic consumers may keep their type parameters; unchecked operations
|
|
96
|
+
remain errors.
|
|
97
|
+
|
|
98
|
+
The mocking rule follows named and namespace imports, including `vitest.vi.mock(...)` and
|
|
99
|
+
`globals.jest.mock(...)`, without treating shadowed local objects as test frameworks. The symbol
|
|
100
|
+
naming rule checks local import bindings, not upstream export names: importing `ZodRawShape` as
|
|
101
|
+
`SchemaFields` is allowed.
|
|
102
|
+
|
|
52
103
|
## Install
|
|
53
104
|
|
|
54
105
|
```sh
|
|
@@ -82,10 +133,11 @@ export default theThracian({
|
|
|
82
133
|
});
|
|
83
134
|
```
|
|
84
135
|
|
|
85
|
-
Type-aware mode adds all
|
|
136
|
+
Type-aware mode keeps the 15 package-local rules and adds all 31 approved semantic rules for 174
|
|
137
|
+
selected errors in total (159 native upstream errors plus the 15 package-local rules). They include
|
|
86
138
|
checks for floating and misused promises, awaiting non-thenables, unsafe calls, member access,
|
|
87
139
|
assignments, arguments, and returns, plus promise rejection and switch exhaustiveness. None of
|
|
88
|
-
those
|
|
140
|
+
those 31 rules is emitted by the syntax-only config, where Oxlint's semantic backend would not run
|
|
89
141
|
it. Type-aware linting is slower because Oxlint loads project type information.
|
|
90
142
|
|
|
91
143
|
Explicit `any` annotations, non-null assertions, and boundary type assertions remain available at
|
|
@@ -95,8 +147,9 @@ still reject unchecked use of those values.
|
|
|
95
147
|
## Effect safety rules (opt in)
|
|
96
148
|
|
|
97
149
|
Effect rules are disabled by default. Pass `effect: true` when the project uses Effect and wants
|
|
98
|
-
the 18 retained high-confidence safety rules
|
|
99
|
-
|
|
150
|
+
the 18 retained high-confidence safety rules plus the additional
|
|
151
|
+
`thethracian/no-service-constructor-imports` rule. These package-local rules are all reported as
|
|
152
|
+
errors and focus on observable hazards rather than style preferences:
|
|
100
153
|
|
|
101
154
|
```js
|
|
102
155
|
export default theThracian({
|
|
@@ -129,11 +182,13 @@ effect-no-unbounded-stream-buffer
|
|
|
129
182
|
|
|
130
183
|
They cover floating Effects and fibers, missing generator delegation, eager recursion, silent
|
|
131
184
|
failures, lost error causes, unscoped resources, unobserved forks, and unbounded queues or
|
|
132
|
-
concurrency.
|
|
185
|
+
concurrency. The additional service-constructor rule rejects named `make<Capability>Service` imports from
|
|
186
|
+
relative project modules outside focused test files. They do not include preference-only migration
|
|
187
|
+
advice.
|
|
133
188
|
|
|
134
189
|
## Strict Effect architecture (explicit opt in)
|
|
135
190
|
|
|
136
|
-
There are
|
|
191
|
+
There are 59 retained strict Effect architecture rules. None is enabled by `effect: true` alone.
|
|
137
192
|
Select each rule by name and provide every path group that it inspects; selected rules remain
|
|
138
193
|
errors.
|
|
139
194
|
|
|
@@ -155,8 +210,9 @@ explicit disable. The path groups are project declarations, not guessed `src/**`
|
|
|
155
210
|
|
|
156
211
|
The plugin also retains 19 specialized migration, version, error-model, schema, and test analyzers
|
|
157
212
|
for explicit rule configuration. They are never in the base preset or the 18-rule safety bucket,
|
|
158
|
-
and they never become warnings. Together with the 18 safety rules and
|
|
159
|
-
the retained
|
|
213
|
+
and they never become warnings. Together with the 18 safety rules and 59 strict architecture rules,
|
|
214
|
+
the retained Effect rule surface is 96 rules; the service-constructor rule above is an additional
|
|
215
|
+
opt-in rule outside those buckets.
|
|
160
216
|
|
|
161
217
|
## Semantic codemods (explicit only)
|
|
162
218
|
|
|
@@ -180,8 +236,9 @@ Do not add this call to `lint`, `lint:fix`, `lint-staged`, or a pre-commit hook.
|
|
|
180
236
|
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
181
237
|
| Shape | 150-line functions, depth 5, six nested callbacks, seven parameters, complexity 20 |
|
|
182
238
|
| Upstream safety | `import/no-duplicates`, `no-debugger`, empty-block checks, `no-eval`, `no-new-func`, `no-script-url`, strict equality, `oxc/only-used-in-recursion`, `prefer-const`, caught-error preservation |
|
|
239
|
+
| TypeScript safety | 15 package-local errors for evidence-preserving assertions, unknown/object boundaries, runtime reflection, mocking, and type-shape hygiene |
|
|
183
240
|
| Type-aware safety | Unsafe operations, floating/misused promises, promise rejection errors, exhaustive switches |
|
|
184
|
-
| Effect | 18 safety errors with `effect: true`;
|
|
241
|
+
| Effect | 18 safety errors with `effect: true`; 59 architecture errors only when explicitly selected with paths |
|
|
185
242
|
| Deliberate omissions | No global `console`, null, ternary, magic-number, naming, file-size, import-count, documentation, or absolute assertion/`any` bans |
|
|
186
243
|
|
|
187
244
|
## Registry links
|
package/dist/codemod-fix/cli.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/* -------------------------------------------------------------------------- */
|
|
3
|
-
/* CLI entry point for running The Thracian codemod fixes. */
|
|
4
|
-
/* -------------------------------------------------------------------------- */
|
|
5
2
|
import { codemodFix } from './index.js';
|
|
6
3
|
const dryRunFlag = '--dry-run';
|
|
7
4
|
const rawArgs = process.argv.slice(2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/codemod-fix/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/codemod-fix/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,UAAU,GAAG,WAAW,CAAC;AAC/B,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACtC,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC5C,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAW,EAAE,CAAC,GAAG,KAAK,UAAU,CAAC,CAAC;AACnE,MAAM,MAAM,GAAG,UAAU,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AAC7C,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE;IACzB,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,aAAa,CAAC;IACvB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC,EAAE,CAAC;AAEL,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,GAAG,IAAI,kCAAkC,MAAM,CAAC,YAAY,CAAC,MAAM,YAAY;IAC7E,WAAW,MAAM,CAAC,YAAY,aAAa,CAC9C,CAAC;AAEF,IAAI,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;IAC7C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -1,44 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Options for running The Thracian codemod fixer.
|
|
3
|
-
*
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
1
|
export interface CodemodFixOptions {
|
|
7
2
|
cwd?: string;
|
|
8
3
|
dryRun?: boolean;
|
|
9
4
|
paths?: readonly string[];
|
|
10
5
|
}
|
|
11
|
-
/**
|
|
12
|
-
* Summary returned after scanning and optionally rewriting source files.
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
6
|
export interface CodemodFixResult {
|
|
17
7
|
changedFiles: string[];
|
|
18
8
|
scannedFiles: number;
|
|
19
9
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Lists TypeScript source files under a root directory.
|
|
22
|
-
*
|
|
23
|
-
* @public
|
|
24
|
-
*/
|
|
25
10
|
export declare const sourceFilesUnder: (root: string) => string[];
|
|
26
|
-
/**
|
|
27
|
-
* Applies all safe codemod fixes to a single source string.
|
|
28
|
-
*
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
11
|
export declare const applyCodemodFixToSource: (source: string) => string;
|
|
32
|
-
/**
|
|
33
|
-
* Applies all safe codemod fixes to one file.
|
|
34
|
-
*
|
|
35
|
-
* @public
|
|
36
|
-
*/
|
|
37
12
|
export declare const applyCodemodFixToFile: (path: string, dryRun: boolean) => boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Runs The Thracian codemod fixer across configured paths.
|
|
40
|
-
*
|
|
41
|
-
* @public
|
|
42
|
-
*/
|
|
43
13
|
export declare const codemodFix: (options?: CodemodFixOptions) => CodemodFixResult;
|
|
44
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codemod-fix/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codemod-fix/index.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;AAKD,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,KAAG,MAAM,EAoBrD,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,QAAQ,MAAM,KAAG,MAWtD,CAAC;AAEJ,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,EAAE,QAAQ,OAAO,KAAG,OAYrE,CAAC;AAUF,eAAO,MAAM,UAAU,GAAI,UAAS,iBAAsB,KAAG,gBAiB5D,CAAC"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/* -------------------------------------------------------------------------- */
|
|
2
|
-
/* Public API for running The Thracian codemod fixes from package scripts or */
|
|
3
|
-
/* Tools. */
|
|
4
|
-
/* -------------------------------------------------------------------------- */
|
|
5
1
|
import { readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs';
|
|
6
2
|
import { addInternalExportDocs } from '../codemods/internal-export-docs.js';
|
|
7
3
|
import { addVoidReturnTypes } from '../codemods/explicit-return-types.js';
|
|
@@ -17,11 +13,6 @@ const defaultPaths = ['src'];
|
|
|
17
13
|
const sourceExtensions = new Set(['.ts', '.tsx', '.mts', '.cts']);
|
|
18
14
|
const ignoredDirectories = new Set(['bench', 'dist', 'fixtures', 'node_modules', 'test']);
|
|
19
15
|
const hasSourceExtension = (path) => [...sourceExtensions].some((extension) => path.endsWith(extension));
|
|
20
|
-
/**
|
|
21
|
-
* Lists TypeScript source files under a root directory.
|
|
22
|
-
*
|
|
23
|
-
* @public
|
|
24
|
-
*/
|
|
25
16
|
export const sourceFilesUnder = (root) => {
|
|
26
17
|
const files = [];
|
|
27
18
|
const visit = (directory) => {
|
|
@@ -41,17 +32,7 @@ export const sourceFilesUnder = (root) => {
|
|
|
41
32
|
visit(root);
|
|
42
33
|
return files;
|
|
43
34
|
};
|
|
44
|
-
/**
|
|
45
|
-
* Applies all safe codemod fixes to a single source string.
|
|
46
|
-
*
|
|
47
|
-
* @public
|
|
48
|
-
*/
|
|
49
35
|
export const applyCodemodFixToSource = (source) => formatJSDocComments(addInternalExportDocs(inlineLocalExportLists(addVoidReturnTypes(preferConciseArrowBodies(preferExplicitBranches(preferFunctionExpressions(sortImportDeclarations(source))))))));
|
|
50
|
-
/**
|
|
51
|
-
* Applies all safe codemod fixes to one file.
|
|
52
|
-
*
|
|
53
|
-
* @public
|
|
54
|
-
*/
|
|
55
36
|
export const applyCodemodFixToFile = (path, dryRun) => {
|
|
56
37
|
const before = readFileSync(path, 'utf8');
|
|
57
38
|
const after = formatFileHeaderComment(applyCodemodFixToSource(before));
|
|
@@ -70,11 +51,6 @@ const candidateFiles = (path) => {
|
|
|
70
51
|
}
|
|
71
52
|
return [path];
|
|
72
53
|
};
|
|
73
|
-
/**
|
|
74
|
-
* Runs The Thracian codemod fixer across configured paths.
|
|
75
|
-
*
|
|
76
|
-
* @public
|
|
77
|
-
*/
|
|
78
54
|
export const codemodFix = (options = {}) => {
|
|
79
55
|
const cwd = options.cwd ?? process.cwd();
|
|
80
56
|
const paths = (() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/codemod-fix/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/codemod-fix/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,wB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AE,MAAM,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-body-style.d.ts","sourceRoot":"","sources":["../../src/codemods/arrow-body-style.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"arrow-body-style.d.ts","sourceRoot":"","sources":["../../src/codemods/arrow-body-style.ts"],"names":[],"mappings":"AAqKA,eAAO,MAAM,wBAAwB,GAAI,QAAQ,MAAM,KAAG,MAazD,CAAC"}
|
|
@@ -1,34 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
/* Conservative codemod for arrow-body-style concise bodies. */
|
|
3
|
-
/* -------------------------------------------------------------------------- */
|
|
4
|
-
import { Array, Option, Order, Predicate, pipe } from 'effect';
|
|
1
|
+
import { Array, Option, Order, pipe } from 'effect';
|
|
5
2
|
import jscodeshift from 'jscodeshift';
|
|
3
|
+
import { nodeEnd, nodeStart, sourceForNode } from './ast-helpers.js';
|
|
6
4
|
const MAX_LINE_LENGTH = 150;
|
|
7
5
|
const NOT_FOUND_INDEX = -1;
|
|
8
6
|
const codemodAPI = jscodeshift.withParser('ts');
|
|
9
|
-
const isObjectRecord = (value) => Predicate.isObject(value);
|
|
10
7
|
const applyReplacements = (source, replacements) => pipe(replacements, Array.sortWith((replacement) => -replacement.start, Order.number), Array.reduce(source, (current, replacement) => current.slice(0, replacement.start) + replacement.text + current.slice(replacement.end)));
|
|
11
|
-
const nodeStart = (node) => pipe(Option.some(node), Option.filter(isObjectRecord), Option.flatMapNullable((value) => value.start), Option.filter(Predicate.isNumber), Option.getOrThrowWith(() => new Error('jscodeshift node is missing a start offset')));
|
|
12
|
-
const nodeEnd = (node) => pipe(Option.some(node), Option.filter(isObjectRecord), Option.flatMapNullable((value) => value.end), Option.filter(Predicate.isNumber), Option.getOrThrowWith(() => new Error('jscodeshift node is missing an end offset')));
|
|
13
|
-
const sourceForNode = (source, node) => source.slice(nodeStart(node), nodeEnd(node));
|
|
14
8
|
const hasAttachedComments = (node) => pipe([
|
|
15
9
|
Option.fromNullable(node.comments),
|
|
16
|
-
pipe(Option.
|
|
17
|
-
pipe(Option.
|
|
10
|
+
pipe(Option.fromNullable('leadingComments' in node ? node.leadingComments : undefined), Option.filter(globalThis.Array.isArray)),
|
|
11
|
+
pipe(Option.fromNullable('trailingComments' in node ? node.trailingComments : undefined), Option.filter(globalThis.Array.isArray)),
|
|
18
12
|
], Array.some((comments) => pipe(comments, Option.exists((values) => values.length > 0))));
|
|
19
13
|
const expressionNeedsParentheses = (expression) => {
|
|
20
14
|
if (expression.type === 'ObjectExpression') {
|
|
21
15
|
return true;
|
|
22
16
|
}
|
|
23
|
-
if (!
|
|
17
|
+
if (!isExpressionWrapper(expression)) {
|
|
24
18
|
return false;
|
|
25
19
|
}
|
|
26
|
-
return
|
|
27
|
-
expression.type === 'TSSatisfiesExpression' ||
|
|
28
|
-
expression.type === 'TSTypeAssertion') &&
|
|
29
|
-
isObjectRecord(expression.expression) &&
|
|
30
|
-
expression.expression.type === 'ObjectExpression');
|
|
20
|
+
return expression.expression.type === 'ObjectExpression';
|
|
31
21
|
};
|
|
22
|
+
const isExpressionWrapper = (expression) => expression.type === 'TSAsExpression' ||
|
|
23
|
+
expression.type === 'TSSatisfiesExpression' ||
|
|
24
|
+
expression.type === 'TSTypeAssertion';
|
|
32
25
|
const lineEndAfter = (source, end) => {
|
|
33
26
|
const nextLineBreak = source.indexOf('\n', end);
|
|
34
27
|
return pipe(Option.some(nextLineBreak), Option.map((lineBreak) => {
|
|
@@ -62,11 +55,6 @@ const replacementForReturnExpression = (source, node, expression) => {
|
|
|
62
55
|
return pipe(Option.some({ end: nodeEnd(node.body), start: nodeStart(node.body), text }), Option.filter((replacement) => !wouldExceedLineLimit(source, replacement.start, replacement.end, replacement.text)), Option.getOrUndefined);
|
|
63
56
|
};
|
|
64
57
|
const replacementForArrow = (source, node) => pipe(Option.some(node.body), Option.filter((body) => body.type === 'BlockStatement'), Option.flatMap((body) => Option.fromNullable(onlyReturnStatement(body))), Option.filter((result) => !hasAttachedComments(result.statement)), Option.flatMap((result) => Option.fromNullable(replacementForReturnExpression(source, node, result.expression))), Option.getOrUndefined);
|
|
65
|
-
/**
|
|
66
|
-
* Internal helper exported for package-local composition.
|
|
67
|
-
*
|
|
68
|
-
* @internal
|
|
69
|
-
*/
|
|
70
58
|
export const preferConciseArrowBodies = (source) => {
|
|
71
59
|
const replacements = [];
|
|
72
60
|
codemodAPI(source)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-body-style.js","sourceRoot":"","sources":["../../src/codemods/arrow-body-style.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"arrow-body-style.js","sourceRoot":"","sources":["../../src/codemods/arrow-body-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAOpD,OAAO,WAAW,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAQlE,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,eAAe,GAAG,CAAC,CAAC,CAAC;AAC3B,MAAM,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAEhD,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAE,YAAoC,EAAU,EAAE,CACzF,IAAI,CACF,YAAY,EACZ,KAAK,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EACjE,KAAK,CAAC,MAAM,CACV,MAAM,EACN,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,CACvB,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC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AAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAC5D,MAAM,CAAC,GAAG,CAAC,CAAC,WAAW,EAAU,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CACpE,CAAC;IACJ,CAAC,CAAC,CAAC;IAEL,OAAO,iBAAiB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AACjD,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Node } from 'jscodeshift';
|
|
2
|
+
export interface CodemodRecord {
|
|
3
|
+
readonly [key: string]: CodemodValue;
|
|
4
|
+
readonly end?: number;
|
|
5
|
+
readonly start?: number;
|
|
6
|
+
readonly type: string;
|
|
7
|
+
}
|
|
8
|
+
export type CodemodValue = boolean | null | number | string | undefined | Node | readonly CodemodValue[] | CodemodRecord;
|
|
9
|
+
export declare const codemodObjectValues: (node: CodemodRecord) => readonly CodemodValue[];
|
|
10
|
+
export declare const isCodemodArray: (value: CodemodValue) => value is readonly CodemodValue[];
|
|
11
|
+
export declare const isCodemodNode: (value: CodemodValue) => value is CodemodRecord;
|
|
12
|
+
export declare const nodeStart: (node: Node | CodemodRecord) => number;
|
|
13
|
+
export declare const nodeEnd: (node: Node | CodemodRecord) => number;
|
|
14
|
+
export declare const sourceForNode: (source: string, node: Node | CodemodRecord) => string;
|
|
15
|
+
//# sourceMappingURL=ast-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast-helpers.d.ts","sourceRoot":"","sources":["../../src/codemods/ast-helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC;IACrC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,YAAY,GACpB,OAAO,GACP,IAAI,GACJ,MAAM,GACN,MAAM,GACN,SAAS,GACT,IAAI,GACJ,SAAS,YAAY,EAAE,GACvB,aAAa,CAAC;AAElB,eAAO,MAAM,mBAAmB,GAAI,MAAM,aAAa,KAAG,SAAS,YAAY,EACtB,CAAC;AAE1D,eAAO,MAAM,cAAc,GAAI,OAAO,YAAY,KAAG,KAAK,IAAI,SAAS,YAAY,EAC7D,CAAC;AAEvB,eAAO,MAAM,aAAa,GAAI,OAAO,YAAY,KAAG,KAAK,IAAI,aAI7B,CAAC;AAEjC,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,GAAG,aAAa,KAAG,MAMtD,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,MAAM,IAAI,GAAG,aAAa,KAAG,MAMpD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,MAAM,EAAE,MAAM,IAAI,GAAG,aAAa,KAAG,MAC7B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Predicate } from 'effect';
|
|
2
|
+
export const codemodObjectValues = (node) => Object.keys(node).map((key) => node[key]);
|
|
3
|
+
export const isCodemodArray = (value) => Array.isArray(value);
|
|
4
|
+
export const isCodemodNode = (value) => Predicate.isObject(value) &&
|
|
5
|
+
!Array.isArray(value) &&
|
|
6
|
+
'type' in value &&
|
|
7
|
+
Predicate.isString(value.type);
|
|
8
|
+
export const nodeStart = (node) => {
|
|
9
|
+
const start = 'start' in node ? node.start : undefined;
|
|
10
|
+
if (!Predicate.isNumber(start)) {
|
|
11
|
+
throw new Error('jscodeshift node is missing a start offset');
|
|
12
|
+
}
|
|
13
|
+
return start;
|
|
14
|
+
};
|
|
15
|
+
export const nodeEnd = (node) => {
|
|
16
|
+
const end = 'end' in node ? node.end : undefined;
|
|
17
|
+
if (!Predicate.isNumber(end)) {
|
|
18
|
+
throw new Error('jscodeshift node is missing an end offset');
|
|
19
|
+
}
|
|
20
|
+
return end;
|
|
21
|
+
};
|
|
22
|
+
export const sourceForNode = (source, node) => source.slice(nodeStart(node), nodeEnd(node));
|
|
23
|
+
//# sourceMappingURL=ast-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ast-helpers.js","sourceRoot":"","sources":["../../src/codemods/ast-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAoBnC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAmB,EAA2B,EAAE,CAClF,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAgB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE1D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAmB,EAAoC,EAAE,CACtF,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEvB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAmB,EAA0B,EAAE,CAC3E,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;IACzB,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;IACrB,MAAM,IAAI,KAAK;IACf,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAEjC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAA0B,EAAU,EAAE;IAC9D,MAAM,KAAK,GAAG,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IACvD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,IAA0B,EAAU,EAAE;IAC5D,MAAM,GAAG,GAAG,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;IACjD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAc,EAAE,IAA0B,EAAU,EAAE,CAClF,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC"}
|
|
@@ -2,23 +2,8 @@ interface JSDocInput {
|
|
|
2
2
|
summary: string;
|
|
3
3
|
tags?: readonly string[];
|
|
4
4
|
}
|
|
5
|
-
/**
|
|
6
|
-
* Formats a classic multi-line JSDoc block.
|
|
7
|
-
*
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
5
|
export declare const formatJSDoc: (input: JSDocInput) => string;
|
|
11
|
-
/**
|
|
12
|
-
* Formats a three-line fixed-width section header.
|
|
13
|
-
*
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
6
|
export declare const formatMainHeader: (text: string) => string;
|
|
17
|
-
/**
|
|
18
|
-
* Formats a one-line fixed-width section header.
|
|
19
|
-
*
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
7
|
export declare const formatSubheader: (text: string) => string;
|
|
23
8
|
export {};
|
|
24
9
|
//# sourceMappingURL=comment-format.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-format.d.ts","sourceRoot":"","sources":["../../src/codemods/comment-format.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"comment-format.d.ts","sourceRoot":"","sources":["../../src/codemods/comment-format.ts"],"names":[],"mappings":"AAEA,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B;AA2FD,eAAO,MAAM,WAAW,GAAI,OAAO,UAAU,KAAG,MAgB/C,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,KAAG,MAOlC,CAAC;AAEf,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,KAAG,MAM9C,CAAC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/* -------------------------------------------------------------------------- */
|
|
2
|
-
/* Reusable comment formatting helpers for codemod output. */
|
|
3
|
-
/* -------------------------------------------------------------------------- */
|
|
4
1
|
import { Array, Number, Option, pipe } from 'effect';
|
|
5
2
|
const dividerLength = 80;
|
|
6
3
|
const dividerFiller = '-';
|
|
@@ -50,11 +47,6 @@ const appendWrappedWordToWidth = (state, word, width) => {
|
|
|
50
47
|
const pushJSDocTextLines = (lines, text) => {
|
|
51
48
|
pipe(wrapText(text), Array.map((wrappedLine) => lines.push(` * ${wrappedLine}`)));
|
|
52
49
|
};
|
|
53
|
-
/**
|
|
54
|
-
* Formats a classic multi-line JSDoc block.
|
|
55
|
-
*
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
50
|
export const formatJSDoc = (input) => {
|
|
59
51
|
const lines = [jsdocOpen];
|
|
60
52
|
pushJSDocTextLines(lines, input.summary);
|
|
@@ -65,21 +57,11 @@ export const formatJSDoc = (input) => {
|
|
|
65
57
|
lines.push(jsdocClose);
|
|
66
58
|
return `${lines.join('\n')}\n`;
|
|
67
59
|
};
|
|
68
|
-
/**
|
|
69
|
-
* Formats a three-line fixed-width section header.
|
|
70
|
-
*
|
|
71
|
-
* @internal
|
|
72
|
-
*/
|
|
73
60
|
export const formatMainHeader = (text) => [
|
|
74
61
|
solidDividerLine(),
|
|
75
62
|
...dividerTextLines(text).map((line) => `${blockLeft}${centeredDividerText(line)}${blockRight}`),
|
|
76
63
|
solidDividerLine(),
|
|
77
64
|
].join('\n');
|
|
78
|
-
/**
|
|
79
|
-
* Formats a one-line fixed-width section header.
|
|
80
|
-
*
|
|
81
|
-
* @internal
|
|
82
|
-
*/
|
|
83
65
|
export const formatSubheader = (text) => {
|
|
84
66
|
const words = ` ${text} `;
|
|
85
67
|
const remaining = Number.max(0, dividerInnerWidth() - words.length);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-format.js","sourceRoot":"","sources":["../../src/codemods/comment-format.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"comment-format.js","sourceRoot":"","sources":["../../src/codemods/comment-format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAYrD,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,SAAS,GAAG,KAAK,CAAC;AACxB,MAAM,UAAU,GAAG,KAAK,CAAC;AACzB,MAAM,SAAS,GAAG,KAAK,CAAC;AACxB,MAAM,UAAU,GAAG,KAAK,CAAC;AAEzB,MAAM,MAAM,GAAG,CAAC,KAAa,EAAE,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AAE5F,MAAM,iBAAiB,GAAG,GAAW,EAAE,CAAC,aAAa,GAAG,SAAS,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;AAE7F,MAAM,gBAAgB,GAAG,GAAW,EAAE,CACpC,GAAG,SAAS,GAAG,MAAM,CAAC,aAAa,EAAE,iBAAiB,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC;AAE3E,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,KAAa,EAAU,EAAE;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AAgB,CAAC,IAAI,CAAC,CAAC,GAAG,CAC3B,CAAC,IAAI,EAAU,EAAE,CAAC,GAAG,SAAS,GAAG,mBAAmB,CAAC,IAAI,CAAC,GAAG,UAAU,EAAE,CAC1E;IACD,gBAAgB,EAAE;CACnB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEf,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAY,EAAU,EAAE;IACtD,MAAM,KAAK,GAAG,IAAI,IAAI,GAAG,CAAC;IAC1B,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IACpE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IACvC,MAAM,KAAK,GAAG,SAAS,GAAG,IAAI,CAAC;IAC/B,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,KAAK,GAAG,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,GAAG,UAAU,EAAE,CAAC;AAC1G,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explicit-return-types.d.ts","sourceRoot":"","sources":["../../src/codemods/explicit-return-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"explicit-return-types.d.ts","sourceRoot":"","sources":["../../src/codemods/explicit-return-types.ts"],"names":[],"mappings":"AAofA,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,KAAG,MACY,CAAC"}
|