eslint-plugin-etc-misc 1.0.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/LICENSE +21 -0
- package/README.md +259 -0
- package/dist/_internal/casing.d.ts +13 -0
- package/dist/_internal/casing.d.ts.map +1 -0
- package/dist/_internal/casing.js +34 -0
- package/dist/_internal/casing.js.map +1 -0
- package/dist/_internal/create-external-rule.d.ts +12 -0
- package/dist/_internal/create-external-rule.d.ts.map +1 -0
- package/dist/_internal/create-external-rule.js +66 -0
- package/dist/_internal/create-external-rule.js.map +1 -0
- package/dist/_internal/create-import-pattern-rule.d.ts +39 -0
- package/dist/_internal/create-import-pattern-rule.d.ts.map +1 -0
- package/dist/_internal/create-import-pattern-rule.js +67 -0
- package/dist/_internal/create-import-pattern-rule.js.map +1 -0
- package/dist/_internal/create-selector-rule.d.ts +18 -0
- package/dist/_internal/create-selector-rule.d.ts.map +1 -0
- package/dist/_internal/create-selector-rule.js +31 -0
- package/dist/_internal/create-selector-rule.js.map +1 -0
- package/dist/_internal/get-core-rule.d.ts +8 -0
- package/dist/_internal/get-core-rule.d.ts.map +1 -0
- package/dist/_internal/get-core-rule.js +14 -0
- package/dist/_internal/get-core-rule.js.map +1 -0
- package/dist/_internal/identifier-blocks.d.ts +10 -0
- package/dist/_internal/identifier-blocks.d.ts.map +1 -0
- package/dist/_internal/identifier-blocks.js +24 -0
- package/dist/_internal/identifier-blocks.js.map +1 -0
- package/dist/_internal/ignore-patterns.d.ts +26 -0
- package/dist/_internal/ignore-patterns.d.ts.map +1 -0
- package/dist/_internal/ignore-patterns.js +35 -0
- package/dist/_internal/ignore-patterns.js.map +1 -0
- package/dist/_internal/import-patterns.d.ts +30 -0
- package/dist/_internal/import-patterns.d.ts.map +1 -0
- package/dist/_internal/import-patterns.js +52 -0
- package/dist/_internal/import-patterns.js.map +1 -0
- package/dist/_internal/plugin-meta.d.ts +13 -0
- package/dist/_internal/plugin-meta.d.ts.map +1 -0
- package/dist/_internal/plugin-meta.js +9 -0
- package/dist/_internal/plugin-meta.js.map +1 -0
- package/dist/_internal/rule-catalog.d.ts +36 -0
- package/dist/_internal/rule-catalog.d.ts.map +1 -0
- package/dist/_internal/rule-catalog.js +49 -0
- package/dist/_internal/rule-catalog.js.map +1 -0
- package/dist/_internal/rule-creator.d.ts +26 -0
- package/dist/_internal/rule-creator.d.ts.map +1 -0
- package/dist/_internal/rule-creator.js +14 -0
- package/dist/_internal/rule-creator.js.map +1 -0
- package/dist/_internal/rule-deprecation.d.ts +32 -0
- package/dist/_internal/rule-deprecation.d.ts.map +1 -0
- package/dist/_internal/rule-deprecation.js +38 -0
- package/dist/_internal/rule-deprecation.js.map +1 -0
- package/dist/_internal/symbol-usage.d.ts +25 -0
- package/dist/_internal/symbol-usage.d.ts.map +1 -0
- package/dist/_internal/symbol-usage.js +82 -0
- package/dist/_internal/symbol-usage.js.map +1 -0
- package/dist/_internal/syntax-selectors.d.ts +24 -0
- package/dist/_internal/syntax-selectors.d.ts.map +1 -0
- package/dist/_internal/syntax-selectors.js +30 -0
- package/dist/_internal/syntax-selectors.js.map +1 -0
- package/dist/configs/all-strict.d.ts +11 -0
- package/dist/configs/all-strict.d.ts.map +1 -0
- package/dist/configs/all-strict.js +16 -0
- package/dist/configs/all-strict.js.map +1 -0
- package/dist/configs/all.d.ts +10 -0
- package/dist/configs/all.d.ts.map +1 -0
- package/dist/configs/all.js +18 -0
- package/dist/configs/all.js.map +1 -0
- package/dist/configs/recommended.d.ts +29 -0
- package/dist/configs/recommended.d.ts.map +1 -0
- package/dist/configs/recommended.js +29 -0
- package/dist/configs/recommended.js.map +1 -0
- package/dist/configs/strict-type-checked.d.ts +15 -0
- package/dist/configs/strict-type-checked.d.ts.map +1 -0
- package/dist/configs/strict-type-checked.js +38 -0
- package/dist/configs/strict-type-checked.js.map +1 -0
- package/dist/configs/strict.d.ts +13 -0
- package/dist/configs/strict.d.ts.map +1 -0
- package/dist/configs/strict.js +10 -0
- package/dist/configs/strict.js.map +1 -0
- package/dist/configs.d.ts +34 -0
- package/dist/configs.d.ts.map +1 -0
- package/dist/configs.js +33 -0
- package/dist/configs.js.map +1 -0
- package/dist/plugin.cjs +4 -0
- package/dist/plugin.d.cts +2 -0
- package/dist/plugin.d.ts +15 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +14 -0
- package/dist/plugin.js.map +1 -0
- package/dist/rules/array-type.d.ts +8 -0
- package/dist/rules/array-type.d.ts.map +1 -0
- package/dist/rules/array-type.js +25 -0
- package/dist/rules/array-type.js.map +1 -0
- package/dist/rules/class-match-filename.d.ts +9 -0
- package/dist/rules/class-match-filename.d.ts.map +1 -0
- package/dist/rules/class-match-filename.js +51 -0
- package/dist/rules/class-match-filename.js.map +1 -0
- package/dist/rules/comment-spacing.d.ts +9 -0
- package/dist/rules/comment-spacing.d.ts.map +1 -0
- package/dist/rules/comment-spacing.js +63 -0
- package/dist/rules/comment-spacing.js.map +1 -0
- package/dist/rules/consistent-empty-lines.d.ts +9 -0
- package/dist/rules/consistent-empty-lines.d.ts.map +1 -0
- package/dist/rules/consistent-empty-lines.js +74 -0
- package/dist/rules/consistent-empty-lines.js.map +1 -0
- package/dist/rules/consistent-enum-members.d.ts +9 -0
- package/dist/rules/consistent-enum-members.d.ts.map +1 -0
- package/dist/rules/consistent-enum-members.js +36 -0
- package/dist/rules/consistent-enum-members.js.map +1 -0
- package/dist/rules/consistent-filename.d.ts +18 -0
- package/dist/rules/consistent-filename.d.ts.map +1 -0
- package/dist/rules/consistent-filename.js +87 -0
- package/dist/rules/consistent-filename.js.map +1 -0
- package/dist/rules/consistent-import.d.ts +14 -0
- package/dist/rules/consistent-import.d.ts.map +1 -0
- package/dist/rules/consistent-import.js +91 -0
- package/dist/rules/consistent-import.js.map +1 -0
- package/dist/rules/consistent-optional-props.d.ts +9 -0
- package/dist/rules/consistent-optional-props.d.ts.map +1 -0
- package/dist/rules/consistent-optional-props.js +68 -0
- package/dist/rules/consistent-optional-props.js.map +1 -0
- package/dist/rules/consistent-source-extension.d.ts +14 -0
- package/dist/rules/consistent-source-extension.d.ts.map +1 -0
- package/dist/rules/consistent-source-extension.js +56 -0
- package/dist/rules/consistent-source-extension.js.map +1 -0
- package/dist/rules/consistent-symbol-description.d.ts +9 -0
- package/dist/rules/consistent-symbol-description.d.ts.map +1 -0
- package/dist/rules/consistent-symbol-description.js +36 -0
- package/dist/rules/consistent-symbol-description.js.map +1 -0
- package/dist/rules/default-case.d.ts +7 -0
- package/dist/rules/default-case.d.ts.map +1 -0
- package/dist/rules/default-case.js +9 -0
- package/dist/rules/default-case.js.map +1 -0
- package/dist/rules/disallow-import.d.ts +7 -0
- package/dist/rules/disallow-import.d.ts.map +1 -0
- package/dist/rules/disallow-import.js +11 -0
- package/dist/rules/disallow-import.js.map +1 -0
- package/dist/rules/export-matching-filename-only.d.ts +14 -0
- package/dist/rules/export-matching-filename-only.d.ts.map +1 -0
- package/dist/rules/export-matching-filename-only.js +102 -0
- package/dist/rules/export-matching-filename-only.js.map +1 -0
- package/dist/rules/match-filename.d.ts +18 -0
- package/dist/rules/match-filename.d.ts.map +1 -0
- package/dist/rules/match-filename.js +119 -0
- package/dist/rules/match-filename.js.map +1 -0
- package/dist/rules/max-identifier-blocks.d.ts +9 -0
- package/dist/rules/max-identifier-blocks.d.ts.map +1 -0
- package/dist/rules/max-identifier-blocks.js +46 -0
- package/dist/rules/max-identifier-blocks.js.map +1 -0
- package/dist/rules/no-assign-mutated-array.d.ts +9 -0
- package/dist/rules/no-assign-mutated-array.d.ts.map +1 -0
- package/dist/rules/no-assign-mutated-array.js +117 -0
- package/dist/rules/no-assign-mutated-array.js.map +1 -0
- package/dist/rules/no-at-sign-import.d.ts +7 -0
- package/dist/rules/no-at-sign-import.d.ts.map +1 -0
- package/dist/rules/no-at-sign-import.js +11 -0
- package/dist/rules/no-at-sign-import.js.map +1 -0
- package/dist/rules/no-at-sign-internal-import.d.ts +7 -0
- package/dist/rules/no-at-sign-internal-import.d.ts.map +1 -0
- package/dist/rules/no-at-sign-internal-import.js +11 -0
- package/dist/rules/no-at-sign-internal-import.js.map +1 -0
- package/dist/rules/no-chain-coalescence-mixture.d.ts +10 -0
- package/dist/rules/no-chain-coalescence-mixture.d.ts.map +1 -0
- package/dist/rules/no-chain-coalescence-mixture.js +36 -0
- package/dist/rules/no-chain-coalescence-mixture.js.map +1 -0
- package/dist/rules/no-commented-out-code.d.ts +13 -0
- package/dist/rules/no-commented-out-code.d.ts.map +1 -0
- package/dist/rules/no-commented-out-code.js +220 -0
- package/dist/rules/no-commented-out-code.js.map +1 -0
- package/dist/rules/no-const-enum.d.ts +13 -0
- package/dist/rules/no-const-enum.d.ts.map +1 -0
- package/dist/rules/no-const-enum.js +90 -0
- package/dist/rules/no-const-enum.js.map +1 -0
- package/dist/rules/no-deprecated.d.ts +18 -0
- package/dist/rules/no-deprecated.d.ts.map +1 -0
- package/dist/rules/no-deprecated.js +133 -0
- package/dist/rules/no-deprecated.js.map +1 -0
- package/dist/rules/no-enum.d.ts +8 -0
- package/dist/rules/no-enum.d.ts.map +1 -0
- package/dist/rules/no-enum.js +34 -0
- package/dist/rules/no-enum.js.map +1 -0
- package/dist/rules/no-expression-empty-lines.d.ts +9 -0
- package/dist/rules/no-expression-empty-lines.d.ts.map +1 -0
- package/dist/rules/no-expression-empty-lines.js +51 -0
- package/dist/rules/no-expression-empty-lines.js.map +1 -0
- package/dist/rules/no-foreach.d.ts +13 -0
- package/dist/rules/no-foreach.d.ts.map +1 -0
- package/dist/rules/no-foreach.js +95 -0
- package/dist/rules/no-foreach.js.map +1 -0
- package/dist/rules/no-implicit-any-catch.d.ts +13 -0
- package/dist/rules/no-implicit-any-catch.d.ts.map +1 -0
- package/dist/rules/no-implicit-any-catch.js +156 -0
- package/dist/rules/no-implicit-any-catch.js.map +1 -0
- package/dist/rules/no-index-import.d.ts +7 -0
- package/dist/rules/no-index-import.d.ts.map +1 -0
- package/dist/rules/no-index-import.js +11 -0
- package/dist/rules/no-index-import.js.map +1 -0
- package/dist/rules/no-internal-modules.d.ts +7 -0
- package/dist/rules/no-internal-modules.d.ts.map +1 -0
- package/dist/rules/no-internal-modules.js +15 -0
- package/dist/rules/no-internal-modules.js.map +1 -0
- package/dist/rules/no-internal.d.ts +14 -0
- package/dist/rules/no-internal.d.ts.map +1 -0
- package/dist/rules/no-internal.js +113 -0
- package/dist/rules/no-internal.js.map +1 -0
- package/dist/rules/no-language-mixing.d.ts +9 -0
- package/dist/rules/no-language-mixing.d.ts.map +1 -0
- package/dist/rules/no-language-mixing.js +40 -0
- package/dist/rules/no-language-mixing.js.map +1 -0
- package/dist/rules/no-misused-generics.d.ts +10 -0
- package/dist/rules/no-misused-generics.d.ts.map +1 -0
- package/dist/rules/no-misused-generics.js +159 -0
- package/dist/rules/no-misused-generics.js.map +1 -0
- package/dist/rules/no-mixed-enums.d.ts +8 -0
- package/dist/rules/no-mixed-enums.d.ts.map +1 -0
- package/dist/rules/no-mixed-enums.js +25 -0
- package/dist/rules/no-mixed-enums.js.map +1 -0
- package/dist/rules/no-negated-conditions.d.ts +9 -0
- package/dist/rules/no-negated-conditions.d.ts.map +1 -0
- package/dist/rules/no-negated-conditions.js +42 -0
- package/dist/rules/no-negated-conditions.js.map +1 -0
- package/dist/rules/no-nodejs-modules.d.ts +7 -0
- package/dist/rules/no-nodejs-modules.d.ts.map +1 -0
- package/dist/rules/no-nodejs-modules.js +11 -0
- package/dist/rules/no-nodejs-modules.js.map +1 -0
- package/dist/rules/no-param-reassign.d.ts +10 -0
- package/dist/rules/no-param-reassign.d.ts.map +1 -0
- package/dist/rules/no-param-reassign.js +102 -0
- package/dist/rules/no-param-reassign.js.map +1 -0
- package/dist/rules/no-relative-parent-import.d.ts +11 -0
- package/dist/rules/no-relative-parent-import.d.ts.map +1 -0
- package/dist/rules/no-relative-parent-import.js +42 -0
- package/dist/rules/no-relative-parent-import.js.map +1 -0
- package/dist/rules/no-restricted-syntax.d.ts +18 -0
- package/dist/rules/no-restricted-syntax.d.ts.map +1 -0
- package/dist/rules/no-restricted-syntax.js +100 -0
- package/dist/rules/no-restricted-syntax.js.map +1 -0
- package/dist/rules/no-secret.d.ts +8 -0
- package/dist/rules/no-secret.d.ts.map +1 -0
- package/dist/rules/no-secret.js +37 -0
- package/dist/rules/no-secret.js.map +1 -0
- package/dist/rules/no-self-import.d.ts +13 -0
- package/dist/rules/no-self-import.d.ts.map +1 -0
- package/dist/rules/no-self-import.js +86 -0
- package/dist/rules/no-self-import.js.map +1 -0
- package/dist/rules/no-shadow.d.ts +14 -0
- package/dist/rules/no-shadow.d.ts.map +1 -0
- package/dist/rules/no-shadow.js +92 -0
- package/dist/rules/no-shadow.js.map +1 -0
- package/dist/rules/no-sibling-import.d.ts +7 -0
- package/dist/rules/no-sibling-import.d.ts.map +1 -0
- package/dist/rules/no-sibling-import.js +11 -0
- package/dist/rules/no-sibling-import.js.map +1 -0
- package/dist/rules/no-single-line-comment.d.ts +13 -0
- package/dist/rules/no-single-line-comment.d.ts.map +1 -0
- package/dist/rules/no-single-line-comment.js +88 -0
- package/dist/rules/no-single-line-comment.js.map +1 -0
- package/dist/rules/no-t.d.ts +16 -0
- package/dist/rules/no-t.d.ts.map +1 -0
- package/dist/rules/no-t.js +67 -0
- package/dist/rules/no-t.js.map +1 -0
- package/dist/rules/no-underscore-export.d.ts +9 -0
- package/dist/rules/no-underscore-export.d.ts.map +1 -0
- package/dist/rules/no-underscore-export.js +39 -0
- package/dist/rules/no-underscore-export.js.map +1 -0
- package/dist/rules/no-unnecessary-as-const.d.ts +9 -0
- package/dist/rules/no-unnecessary-as-const.d.ts.map +1 -0
- package/dist/rules/no-unnecessary-as-const.js +53 -0
- package/dist/rules/no-unnecessary-as-const.js.map +1 -0
- package/dist/rules/no-unnecessary-break.d.ts +9 -0
- package/dist/rules/no-unnecessary-break.d.ts.map +1 -0
- package/dist/rules/no-unnecessary-break.js +66 -0
- package/dist/rules/no-unnecessary-break.js.map +1 -0
- package/dist/rules/no-unnecessary-initialization.d.ts +9 -0
- package/dist/rules/no-unnecessary-initialization.d.ts.map +1 -0
- package/dist/rules/no-unnecessary-initialization.js +63 -0
- package/dist/rules/no-unnecessary-initialization.js.map +1 -0
- package/dist/rules/no-unnecessary-template-literal.d.ts +9 -0
- package/dist/rules/no-unnecessary-template-literal.d.ts.map +1 -0
- package/dist/rules/no-unnecessary-template-literal.js +47 -0
- package/dist/rules/no-unnecessary-template-literal.js.map +1 -0
- package/dist/rules/no-unused-disable.d.ts +11 -0
- package/dist/rules/no-unused-disable.d.ts.map +1 -0
- package/dist/rules/no-unused-disable.js +28 -0
- package/dist/rules/no-unused-disable.js.map +1 -0
- package/dist/rules/no-useless-generics.d.ts +8 -0
- package/dist/rules/no-useless-generics.d.ts.map +1 -0
- package/dist/rules/no-useless-generics.js +25 -0
- package/dist/rules/no-useless-generics.js.map +1 -0
- package/dist/rules/no-value-tostring.d.ts +8 -0
- package/dist/rules/no-value-tostring.d.ts.map +1 -0
- package/dist/rules/no-value-tostring.js +25 -0
- package/dist/rules/no-value-tostring.js.map +1 -0
- package/dist/rules/no-writeonly.d.ts +7 -0
- package/dist/rules/no-writeonly.d.ts.map +1 -0
- package/dist/rules/no-writeonly.js +9 -0
- package/dist/rules/no-writeonly.js.map +1 -0
- package/dist/rules/object-format.d.ts +13 -0
- package/dist/rules/object-format.d.ts.map +1 -0
- package/dist/rules/object-format.js +61 -0
- package/dist/rules/object-format.js.map +1 -0
- package/dist/rules/only-export-name.d.ts +13 -0
- package/dist/rules/only-export-name.d.ts.map +1 -0
- package/dist/rules/only-export-name.js +104 -0
- package/dist/rules/only-export-name.js.map +1 -0
- package/dist/rules/prefer-arrow-function-property.d.ts +9 -0
- package/dist/rules/prefer-arrow-function-property.d.ts.map +1 -0
- package/dist/rules/prefer-arrow-function-property.js +35 -0
- package/dist/rules/prefer-arrow-function-property.js.map +1 -0
- package/dist/rules/prefer-const-require.d.ts +9 -0
- package/dist/rules/prefer-const-require.d.ts.map +1 -0
- package/dist/rules/prefer-const-require.js +35 -0
- package/dist/rules/prefer-const-require.js.map +1 -0
- package/dist/rules/prefer-includes.d.ts +8 -0
- package/dist/rules/prefer-includes.d.ts.map +1 -0
- package/dist/rules/prefer-includes.js +25 -0
- package/dist/rules/prefer-includes.js.map +1 -0
- package/dist/rules/prefer-interface.d.ts +17 -0
- package/dist/rules/prefer-interface.d.ts.map +1 -0
- package/dist/rules/prefer-interface.js +190 -0
- package/dist/rules/prefer-interface.js.map +1 -0
- package/dist/rules/prefer-less-than.d.ts +8 -0
- package/dist/rules/prefer-less-than.d.ts.map +1 -0
- package/dist/rules/prefer-less-than.js +65 -0
- package/dist/rules/prefer-less-than.js.map +1 -0
- package/dist/rules/prefer-object-has-own.d.ts +8 -0
- package/dist/rules/prefer-object-has-own.d.ts.map +1 -0
- package/dist/rules/prefer-object-has-own.js +26 -0
- package/dist/rules/prefer-object-has-own.js.map +1 -0
- package/dist/rules/prefer-only-export.d.ts +9 -0
- package/dist/rules/prefer-only-export.d.ts.map +1 -0
- package/dist/rules/prefer-only-export.js +35 -0
- package/dist/rules/prefer-only-export.js.map +1 -0
- package/dist/rules/require-jsdoc.d.ts +18 -0
- package/dist/rules/require-jsdoc.d.ts.map +1 -0
- package/dist/rules/require-jsdoc.js +129 -0
- package/dist/rules/require-jsdoc.js.map +1 -0
- package/dist/rules/require-syntax.d.ts +14 -0
- package/dist/rules/require-syntax.d.ts.map +1 -0
- package/dist/rules/require-syntax.js +106 -0
- package/dist/rules/require-syntax.js.map +1 -0
- package/dist/rules/restrict-identifier-characters.d.ts +9 -0
- package/dist/rules/restrict-identifier-characters.d.ts.map +1 -0
- package/dist/rules/restrict-identifier-characters.js +36 -0
- package/dist/rules/restrict-identifier-characters.js.map +1 -0
- package/dist/rules/sort-array.d.ts +9 -0
- package/dist/rules/sort-array.d.ts.map +1 -0
- package/dist/rules/sort-array.js +73 -0
- package/dist/rules/sort-array.js.map +1 -0
- package/dist/rules/sort-call-signature.d.ts +9 -0
- package/dist/rules/sort-call-signature.d.ts.map +1 -0
- package/dist/rules/sort-call-signature.js +35 -0
- package/dist/rules/sort-call-signature.js.map +1 -0
- package/dist/rules/sort-class-members.d.ts +13 -0
- package/dist/rules/sort-class-members.d.ts.map +1 -0
- package/dist/rules/sort-class-members.js +90 -0
- package/dist/rules/sort-class-members.js.map +1 -0
- package/dist/rules/sort-construct-signature.d.ts +9 -0
- package/dist/rules/sort-construct-signature.d.ts.map +1 -0
- package/dist/rules/sort-construct-signature.js +35 -0
- package/dist/rules/sort-construct-signature.js.map +1 -0
- package/dist/rules/sort-export-specifiers.d.ts +9 -0
- package/dist/rules/sort-export-specifiers.d.ts.map +1 -0
- package/dist/rules/sort-export-specifiers.js +62 -0
- package/dist/rules/sort-export-specifiers.js.map +1 -0
- package/dist/rules/sort-keys.d.ts +9 -0
- package/dist/rules/sort-keys.d.ts.map +1 -0
- package/dist/rules/sort-keys.js +84 -0
- package/dist/rules/sort-keys.js.map +1 -0
- package/dist/rules/sort-top-comments.d.ts +9 -0
- package/dist/rules/sort-top-comments.d.ts.map +1 -0
- package/dist/rules/sort-top-comments.js +66 -0
- package/dist/rules/sort-top-comments.js.map +1 -0
- package/dist/rules/switch-case-spacing.d.ts +13 -0
- package/dist/rules/switch-case-spacing.d.ts.map +1 -0
- package/dist/rules/switch-case-spacing.js +72 -0
- package/dist/rules/switch-case-spacing.js.map +1 -0
- package/dist/rules/template-literal-format.d.ts +9 -0
- package/dist/rules/template-literal-format.d.ts.map +1 -0
- package/dist/rules/template-literal-format.js +70 -0
- package/dist/rules/template-literal-format.js.map +1 -0
- package/dist/rules/throw-error.d.ts +9 -0
- package/dist/rules/throw-error.d.ts.map +1 -0
- package/dist/rules/throw-error.js +123 -0
- package/dist/rules/throw-error.js.map +1 -0
- package/dist/rules/throw-new-error.d.ts +8 -0
- package/dist/rules/throw-new-error.d.ts.map +1 -0
- package/dist/rules/throw-new-error.js +25 -0
- package/dist/rules/throw-new-error.js.map +1 -0
- package/dist/rules/typescript-array-callback-return-type.d.ts +9 -0
- package/dist/rules/typescript-array-callback-return-type.d.ts.map +1 -0
- package/dist/rules/typescript-array-callback-return-type.js +80 -0
- package/dist/rules/typescript-array-callback-return-type.js.map +1 -0
- package/dist/rules/typescript-class-methods-use-this.d.ts +13 -0
- package/dist/rules/typescript-class-methods-use-this.d.ts.map +1 -0
- package/dist/rules/typescript-class-methods-use-this.js +99 -0
- package/dist/rules/typescript-class-methods-use-this.js.map +1 -0
- package/dist/rules/typescript-consistent-array-type-name.d.ts +9 -0
- package/dist/rules/typescript-consistent-array-type-name.d.ts.map +1 -0
- package/dist/rules/typescript-consistent-array-type-name.js +36 -0
- package/dist/rules/typescript-consistent-array-type-name.js.map +1 -0
- package/dist/rules/typescript-define-function-in-one-statement.d.ts +9 -0
- package/dist/rules/typescript-define-function-in-one-statement.d.ts.map +1 -0
- package/dist/rules/typescript-define-function-in-one-statement.js +35 -0
- package/dist/rules/typescript-define-function-in-one-statement.js.map +1 -0
- package/dist/rules/typescript-exhaustive-switch.d.ts +13 -0
- package/dist/rules/typescript-exhaustive-switch.d.ts.map +1 -0
- package/dist/rules/typescript-exhaustive-switch.js +55 -0
- package/dist/rules/typescript-exhaustive-switch.js.map +1 -0
- package/dist/rules/typescript-no-boolean-literal-type.d.ts +9 -0
- package/dist/rules/typescript-no-boolean-literal-type.d.ts.map +1 -0
- package/dist/rules/typescript-no-boolean-literal-type.js +43 -0
- package/dist/rules/typescript-no-boolean-literal-type.js.map +1 -0
- package/dist/rules/typescript-no-complex-declarator-type.d.ts +9 -0
- package/dist/rules/typescript-no-complex-declarator-type.d.ts.map +1 -0
- package/dist/rules/typescript-no-complex-declarator-type.js +35 -0
- package/dist/rules/typescript-no-complex-declarator-type.js.map +1 -0
- package/dist/rules/typescript-no-complex-return-type.d.ts +9 -0
- package/dist/rules/typescript-no-complex-return-type.d.ts.map +1 -0
- package/dist/rules/typescript-no-complex-return-type.js +35 -0
- package/dist/rules/typescript-no-complex-return-type.js.map +1 -0
- package/dist/rules/typescript-no-empty-interfaces.d.ts +10 -0
- package/dist/rules/typescript-no-empty-interfaces.d.ts.map +1 -0
- package/dist/rules/typescript-no-empty-interfaces.js +55 -0
- package/dist/rules/typescript-no-empty-interfaces.js.map +1 -0
- package/dist/rules/typescript-no-inferrable-types.d.ts +13 -0
- package/dist/rules/typescript-no-inferrable-types.d.ts.map +1 -0
- package/dist/rules/typescript-no-inferrable-types.js +58 -0
- package/dist/rules/typescript-no-inferrable-types.js.map +1 -0
- package/dist/rules/typescript-no-multi-type-tuples.d.ts +9 -0
- package/dist/rules/typescript-no-multi-type-tuples.d.ts.map +1 -0
- package/dist/rules/typescript-no-multi-type-tuples.js +35 -0
- package/dist/rules/typescript-no-multi-type-tuples.js.map +1 -0
- package/dist/rules/typescript-no-never.d.ts +9 -0
- package/dist/rules/typescript-no-never.d.ts.map +1 -0
- package/dist/rules/typescript-no-never.js +50 -0
- package/dist/rules/typescript-no-never.js.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-const.d.ts +10 -0
- package/dist/rules/typescript-no-redundant-undefined-const.d.ts.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-const.js +130 -0
- package/dist/rules/typescript-no-redundant-undefined-const.js.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-default-parameter.d.ts +10 -0
- package/dist/rules/typescript-no-redundant-undefined-default-parameter.d.ts.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-default-parameter.js +165 -0
- package/dist/rules/typescript-no-redundant-undefined-default-parameter.js.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-let.d.ts +10 -0
- package/dist/rules/typescript-no-redundant-undefined-let.d.ts.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-let.js +134 -0
- package/dist/rules/typescript-no-redundant-undefined-let.js.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-optional.d.ts +10 -0
- package/dist/rules/typescript-no-redundant-undefined-optional.d.ts.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-optional.js +77 -0
- package/dist/rules/typescript-no-redundant-undefined-optional.js.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-promise-return-type.d.ts +10 -0
- package/dist/rules/typescript-no-redundant-undefined-promise-return-type.d.ts.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-promise-return-type.js +179 -0
- package/dist/rules/typescript-no-redundant-undefined-promise-return-type.js.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-readonly-property.d.ts +10 -0
- package/dist/rules/typescript-no-redundant-undefined-readonly-property.d.ts.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-readonly-property.js +125 -0
- package/dist/rules/typescript-no-redundant-undefined-readonly-property.js.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-return-type.d.ts +10 -0
- package/dist/rules/typescript-no-redundant-undefined-return-type.d.ts.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-return-type.js +154 -0
- package/dist/rules/typescript-no-redundant-undefined-return-type.js.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-var.d.ts +10 -0
- package/dist/rules/typescript-no-redundant-undefined-var.d.ts.map +1 -0
- package/dist/rules/typescript-no-redundant-undefined-var.js +134 -0
- package/dist/rules/typescript-no-redundant-undefined-var.js.map +1 -0
- package/dist/rules/typescript-no-restricted-syntax.d.ts +11 -0
- package/dist/rules/typescript-no-restricted-syntax.d.ts.map +1 -0
- package/dist/rules/typescript-no-restricted-syntax.js +40 -0
- package/dist/rules/typescript-no-restricted-syntax.js.map +1 -0
- package/dist/rules/typescript-no-unsafe-object-assign.d.ts +9 -0
- package/dist/rules/typescript-no-unsafe-object-assign.d.ts.map +1 -0
- package/dist/rules/typescript-no-unsafe-object-assign.js +53 -0
- package/dist/rules/typescript-no-unsafe-object-assign.js.map +1 -0
- package/dist/rules/typescript-no-unsafe-object-assignment.d.ts +7 -0
- package/dist/rules/typescript-no-unsafe-object-assignment.d.ts.map +1 -0
- package/dist/rules/typescript-no-unsafe-object-assignment.js +20 -0
- package/dist/rules/typescript-no-unsafe-object-assignment.js.map +1 -0
- package/dist/rules/typescript-prefer-array-type-alias.d.ts +9 -0
- package/dist/rules/typescript-prefer-array-type-alias.d.ts.map +1 -0
- package/dist/rules/typescript-prefer-array-type-alias.js +36 -0
- package/dist/rules/typescript-prefer-array-type-alias.js.map +1 -0
- package/dist/rules/typescript-prefer-class-method.d.ts +9 -0
- package/dist/rules/typescript-prefer-class-method.d.ts.map +1 -0
- package/dist/rules/typescript-prefer-class-method.js +35 -0
- package/dist/rules/typescript-prefer-class-method.js.map +1 -0
- package/dist/rules/typescript-prefer-enum.d.ts +9 -0
- package/dist/rules/typescript-prefer-enum.d.ts.map +1 -0
- package/dist/rules/typescript-prefer-enum.js +132 -0
- package/dist/rules/typescript-prefer-enum.js.map +1 -0
- package/dist/rules/typescript-prefer-named-tuple-members.d.ts +9 -0
- package/dist/rules/typescript-prefer-named-tuple-members.d.ts.map +1 -0
- package/dist/rules/typescript-prefer-named-tuple-members.js +108 -0
- package/dist/rules/typescript-prefer-named-tuple-members.js.map +1 -0
- package/dist/rules/typescript-prefer-readonly-array-parameter.d.ts +9 -0
- package/dist/rules/typescript-prefer-readonly-array-parameter.d.ts.map +1 -0
- package/dist/rules/typescript-prefer-readonly-array-parameter.js +123 -0
- package/dist/rules/typescript-prefer-readonly-array-parameter.js.map +1 -0
- package/dist/rules/typescript-prefer-readonly-array.d.ts +9 -0
- package/dist/rules/typescript-prefer-readonly-array.d.ts.map +1 -0
- package/dist/rules/typescript-prefer-readonly-array.js +51 -0
- package/dist/rules/typescript-prefer-readonly-array.js.map +1 -0
- package/dist/rules/typescript-prefer-readonly-index-signature.d.ts +9 -0
- package/dist/rules/typescript-prefer-readonly-index-signature.d.ts.map +1 -0
- package/dist/rules/typescript-prefer-readonly-index-signature.js +40 -0
- package/dist/rules/typescript-prefer-readonly-index-signature.js.map +1 -0
- package/dist/rules/typescript-prefer-readonly-map.d.ts +9 -0
- package/dist/rules/typescript-prefer-readonly-map.d.ts.map +1 -0
- package/dist/rules/typescript-prefer-readonly-map.js +40 -0
- package/dist/rules/typescript-prefer-readonly-map.js.map +1 -0
- package/dist/rules/typescript-prefer-readonly-property.d.ts +9 -0
- package/dist/rules/typescript-prefer-readonly-property.d.ts.map +1 -0
- package/dist/rules/typescript-prefer-readonly-property.js +58 -0
- package/dist/rules/typescript-prefer-readonly-property.js.map +1 -0
- package/dist/rules/typescript-prefer-readonly-record.d.ts +9 -0
- package/dist/rules/typescript-prefer-readonly-record.d.ts.map +1 -0
- package/dist/rules/typescript-prefer-readonly-record.js +60 -0
- package/dist/rules/typescript-prefer-readonly-record.js.map +1 -0
- package/dist/rules/typescript-prefer-readonly-set.d.ts +9 -0
- package/dist/rules/typescript-prefer-readonly-set.d.ts.map +1 -0
- package/dist/rules/typescript-prefer-readonly-set.js +40 -0
- package/dist/rules/typescript-prefer-readonly-set.js.map +1 -0
- package/dist/rules/typescript-require-prop-type-annotation.d.ts +9 -0
- package/dist/rules/typescript-require-prop-type-annotation.d.ts.map +1 -0
- package/dist/rules/typescript-require-prop-type-annotation.js +58 -0
- package/dist/rules/typescript-require-prop-type-annotation.js.map +1 -0
- package/dist/rules/typescript-require-readonly-array-property-type.d.ts +9 -0
- package/dist/rules/typescript-require-readonly-array-property-type.d.ts.map +1 -0
- package/dist/rules/typescript-require-readonly-array-property-type.js +91 -0
- package/dist/rules/typescript-require-readonly-array-property-type.js.map +1 -0
- package/dist/rules/typescript-require-readonly-array-return-type.d.ts +9 -0
- package/dist/rules/typescript-require-readonly-array-return-type.d.ts.map +1 -0
- package/dist/rules/typescript-require-readonly-array-return-type.js +93 -0
- package/dist/rules/typescript-require-readonly-array-return-type.js.map +1 -0
- package/dist/rules/typescript-require-readonly-array-type-alias.d.ts +9 -0
- package/dist/rules/typescript-require-readonly-array-type-alias.d.ts.map +1 -0
- package/dist/rules/typescript-require-readonly-array-type-alias.js +73 -0
- package/dist/rules/typescript-require-readonly-array-type-alias.js.map +1 -0
- package/dist/rules/typescript-require-readonly-map-parameter-type.d.ts +9 -0
- package/dist/rules/typescript-require-readonly-map-parameter-type.d.ts.map +1 -0
- package/dist/rules/typescript-require-readonly-map-parameter-type.js +109 -0
- package/dist/rules/typescript-require-readonly-map-parameter-type.js.map +1 -0
- package/dist/rules/typescript-require-readonly-map-property-type.d.ts +9 -0
- package/dist/rules/typescript-require-readonly-map-property-type.d.ts.map +1 -0
- package/dist/rules/typescript-require-readonly-map-property-type.js +77 -0
- package/dist/rules/typescript-require-readonly-map-property-type.js.map +1 -0
- package/dist/rules/typescript-require-readonly-map-return-type.d.ts +9 -0
- package/dist/rules/typescript-require-readonly-map-return-type.d.ts.map +1 -0
- package/dist/rules/typescript-require-readonly-map-return-type.js +79 -0
- package/dist/rules/typescript-require-readonly-map-return-type.js.map +1 -0
- package/dist/rules/typescript-require-readonly-map-type-alias.d.ts +9 -0
- package/dist/rules/typescript-require-readonly-map-type-alias.d.ts.map +1 -0
- package/dist/rules/typescript-require-readonly-map-type-alias.js +59 -0
- package/dist/rules/typescript-require-readonly-map-type-alias.js.map +1 -0
- package/dist/rules/typescript-require-readonly-record-parameter-type.d.ts +9 -0
- package/dist/rules/typescript-require-readonly-record-parameter-type.d.ts.map +1 -0
- package/dist/rules/typescript-require-readonly-record-parameter-type.js +124 -0
- package/dist/rules/typescript-require-readonly-record-parameter-type.js.map +1 -0
- package/dist/rules/typescript-require-readonly-record-property-type.d.ts +9 -0
- package/dist/rules/typescript-require-readonly-record-property-type.d.ts.map +1 -0
- package/dist/rules/typescript-require-readonly-record-property-type.js +92 -0
- package/dist/rules/typescript-require-readonly-record-property-type.js.map +1 -0
- package/dist/rules/typescript-require-readonly-record-return-type.d.ts +9 -0
- package/dist/rules/typescript-require-readonly-record-return-type.d.ts.map +1 -0
- package/dist/rules/typescript-require-readonly-record-return-type.js +94 -0
- package/dist/rules/typescript-require-readonly-record-return-type.js.map +1 -0
- package/dist/rules/typescript-require-readonly-record-type-alias.d.ts +9 -0
- package/dist/rules/typescript-require-readonly-record-type-alias.d.ts.map +1 -0
- package/dist/rules/typescript-require-readonly-record-type-alias.js +74 -0
- package/dist/rules/typescript-require-readonly-record-type-alias.js.map +1 -0
- package/dist/rules/typescript-require-readonly-set-parameter-type.d.ts +9 -0
- package/dist/rules/typescript-require-readonly-set-parameter-type.d.ts.map +1 -0
- package/dist/rules/typescript-require-readonly-set-parameter-type.js +109 -0
- package/dist/rules/typescript-require-readonly-set-parameter-type.js.map +1 -0
- package/dist/rules/typescript-require-readonly-set-property-type.d.ts +9 -0
- package/dist/rules/typescript-require-readonly-set-property-type.d.ts.map +1 -0
- package/dist/rules/typescript-require-readonly-set-property-type.js +77 -0
- package/dist/rules/typescript-require-readonly-set-property-type.js.map +1 -0
- package/dist/rules/typescript-require-readonly-set-return-type.d.ts +9 -0
- package/dist/rules/typescript-require-readonly-set-return-type.d.ts.map +1 -0
- package/dist/rules/typescript-require-readonly-set-return-type.js +79 -0
- package/dist/rules/typescript-require-readonly-set-return-type.js.map +1 -0
- package/dist/rules/typescript-require-readonly-set-type-alias.d.ts +9 -0
- package/dist/rules/typescript-require-readonly-set-type-alias.d.ts.map +1 -0
- package/dist/rules/typescript-require-readonly-set-type-alias.js +59 -0
- package/dist/rules/typescript-require-readonly-set-type-alias.js.map +1 -0
- package/dist/rules/typescript-require-this-void.d.ts +9 -0
- package/dist/rules/typescript-require-this-void.d.ts.map +1 -0
- package/dist/rules/typescript-require-this-void.js +71 -0
- package/dist/rules/typescript-require-this-void.js.map +1 -0
- package/dist/rules/underscore-internal.d.ts +8 -0
- package/dist/rules/underscore-internal.d.ts.map +1 -0
- package/dist/rules/underscore-internal.js +116 -0
- package/dist/rules/underscore-internal.js.map +1 -0
- package/dist/rules/unused-internal-properties.d.ts +11 -0
- package/dist/rules/unused-internal-properties.d.ts.map +1 -0
- package/dist/rules/unused-internal-properties.js +28 -0
- package/dist/rules/unused-internal-properties.js.map +1 -0
- package/dist/rules/uppercase-iife.d.ts +11 -0
- package/dist/rules/uppercase-iife.d.ts.map +1 -0
- package/dist/rules/uppercase-iife.js +28 -0
- package/dist/rules/uppercase-iife.js.map +1 -0
- package/dist/rules/words.d.ts +11 -0
- package/dist/rules/words.d.ts.map +1 -0
- package/dist/rules/words.js +28 -0
- package/dist/rules/words.js.map +1 -0
- package/dist/rules.d.ts +21 -0
- package/dist/rules.d.ts.map +1 -0
- package/dist/rules.js +355 -0
- package/dist/rules.js.map +1 -0
- package/docs/docusaurus/blog/2026-03-09-docs-site-online.md +19 -0
- package/docs/docusaurus/blog/2026-03-11-adr-driven-docs-roadmap.md +31 -0
- package/docs/docusaurus/blog/authors.yml +18 -0
- package/docs/docusaurus/docusaurus.config.ts +457 -0
- package/docs/docusaurus/package.json +116 -0
- package/docs/docusaurus/sidebars.rules.ts +379 -0
- package/docs/docusaurus/sidebars.ts +136 -0
- package/docs/docusaurus/site-docs/architecture/adr/0001-flat-config-first-plugin-shape.md +41 -0
- package/docs/docusaurus/site-docs/architecture/adr/0002-rule-docs-coverage-enforcement.md +42 -0
- package/docs/docusaurus/site-docs/architecture/adr/0003-unified-etc-misc-curation-strategy.md +55 -0
- package/docs/docusaurus/site-docs/architecture/adr/0004-generated-rule-catalog-source-of-truth.md +50 -0
- package/docs/docusaurus/site-docs/architecture/adr/0005-risk-tiered-recommended-preset-strategy.md +50 -0
- package/docs/docusaurus/site-docs/architecture/adr/index.md +24 -0
- package/docs/docusaurus/site-docs/getting-started.md +48 -0
- package/docs/docusaurus/site-docs/guides/blog-post-backlog.md +28 -0
- package/docs/docusaurus/site-docs/guides/docs-maintenance-playbook.md +49 -0
- package/docs/docusaurus/site-docs/guides/migration-from-etc-and-misc.md +88 -0
- package/docs/docusaurus/site-docs/intro.md +39 -0
- package/docs/docusaurus/site-docs/releasing.md +95 -0
- package/docs/docusaurus/src/components/GitHubStats.jsx +72 -0
- package/docs/docusaurus/src/css/custom.css +570 -0
- package/docs/docusaurus/src/css/custom.css.d.ts +22 -0
- package/docs/docusaurus/src/js/modernEnhancements.ts +219 -0
- package/docs/docusaurus/src/pages/index.jsx +201 -0
- package/docs/docusaurus/src/pages/index.module.css +588 -0
- package/docs/docusaurus/src/pages/index.module.css.d.ts +48 -0
- package/docs/docusaurus/static/img/apple-touch-icon.png +0 -0
- package/docs/docusaurus/static/img/favicon-96x96.png +0 -0
- package/docs/docusaurus/static/img/favicon.ico +0 -0
- package/docs/docusaurus/static/img/favicon.svg +1 -0
- package/docs/docusaurus/static/img/logo-128x128.svg +401 -0
- package/docs/docusaurus/static/img/logo.png +0 -0
- package/docs/docusaurus/static/img/logo.svg +399 -0
- package/docs/docusaurus/static/img/logo_128x128.png +0 -0
- package/docs/docusaurus/static/img/logo_192x192.png +0 -0
- package/docs/docusaurus/static/img/site.webmanifest +21 -0
- package/docs/docusaurus/static/img/web-app-manifest-192x192.png +0 -0
- package/docs/docusaurus/static/img/web-app-manifest-512x512.png +0 -0
- package/docs/docusaurus/static/manifest.json +22 -0
- package/docs/docusaurus/tsconfig.json +30 -0
- package/docs/docusaurus/tsconfig.typedoc.json +20 -0
- package/docs/docusaurus/typedoc-plugins/hashToBangLinks.mjs +61 -0
- package/docs/docusaurus/typedoc-plugins/hashToBangLinksCore.d.mts +31 -0
- package/docs/docusaurus/typedoc-plugins/hashToBangLinksCore.mjs +154 -0
- package/docs/docusaurus/typedoc-plugins/prefixDocLinks.mjs +46 -0
- package/docs/docusaurus/typedoc-plugins/prefixDocLinksCore.d.mts +18 -0
- package/docs/docusaurus/typedoc-plugins/prefixDocLinksCore.mjs +410 -0
- package/docs/docusaurus/typedoc.config.json +610 -0
- package/docs/docusaurus/typedoc.local.config.json +610 -0
- package/docs/rules/array-type.md +82 -0
- package/docs/rules/class-match-filename.md +95 -0
- package/docs/rules/comment-spacing.md +131 -0
- package/docs/rules/consistent-empty-lines.md +104 -0
- package/docs/rules/consistent-enum-members.md +112 -0
- package/docs/rules/consistent-filename.md +116 -0
- package/docs/rules/consistent-import.md +128 -0
- package/docs/rules/consistent-optional-props.md +114 -0
- package/docs/rules/consistent-source-extension.md +106 -0
- package/docs/rules/consistent-symbol-description.md +91 -0
- package/docs/rules/default-case.md +95 -0
- package/docs/rules/disallow-import.md +108 -0
- package/docs/rules/export-matching-filename-only.md +115 -0
- package/docs/rules/getting-started.md +66 -0
- package/docs/rules/guides/adoption-checklist.md +37 -0
- package/docs/rules/guides/rollout-and-fix-safety.md +42 -0
- package/docs/rules/match-filename.md +119 -0
- package/docs/rules/max-identifier-blocks.md +94 -0
- package/docs/rules/no-assign-mutated-array.md +119 -0
- package/docs/rules/no-at-sign-import.md +97 -0
- package/docs/rules/no-at-sign-internal-import.md +98 -0
- package/docs/rules/no-chain-coalescence-mixture.md +93 -0
- package/docs/rules/no-commented-out-code.md +126 -0
- package/docs/rules/no-const-enum.md +109 -0
- package/docs/rules/no-deprecated.md +175 -0
- package/docs/rules/no-enum.md +98 -0
- package/docs/rules/no-expression-empty-lines.md +100 -0
- package/docs/rules/no-foreach.md +108 -0
- package/docs/rules/no-implicit-any-catch.md +159 -0
- package/docs/rules/no-index-import.md +101 -0
- package/docs/rules/no-internal-modules.md +111 -0
- package/docs/rules/no-internal.md +168 -0
- package/docs/rules/no-language-mixing.md +89 -0
- package/docs/rules/no-misused-generics.md +105 -0
- package/docs/rules/no-mixed-enums.md +96 -0
- package/docs/rules/no-negated-conditions.md +98 -0
- package/docs/rules/no-nodejs-modules.md +103 -0
- package/docs/rules/no-param-reassign.md +110 -0
- package/docs/rules/no-relative-parent-import.md +118 -0
- package/docs/rules/no-restricted-syntax.md +140 -0
- package/docs/rules/no-secret.md +86 -0
- package/docs/rules/no-self-import.md +107 -0
- package/docs/rules/no-shadow.md +109 -0
- package/docs/rules/no-sibling-import.md +109 -0
- package/docs/rules/no-single-line-comment.md +109 -0
- package/docs/rules/no-t.md +128 -0
- package/docs/rules/no-underscore-export.md +93 -0
- package/docs/rules/no-unnecessary-as-const.md +96 -0
- package/docs/rules/no-unnecessary-break.md +99 -0
- package/docs/rules/no-unnecessary-initialization.md +93 -0
- package/docs/rules/no-unnecessary-template-literal.md +92 -0
- package/docs/rules/no-unused-disable.md +88 -0
- package/docs/rules/no-useless-generics.md +95 -0
- package/docs/rules/no-value-tostring.md +90 -0
- package/docs/rules/no-writeonly.md +102 -0
- package/docs/rules/object-format.md +118 -0
- package/docs/rules/only-export-name.md +120 -0
- package/docs/rules/overview.md +46 -0
- package/docs/rules/prefer-arrow-function-property.md +108 -0
- package/docs/rules/prefer-const-require.md +91 -0
- package/docs/rules/prefer-includes.md +83 -0
- package/docs/rules/prefer-interface.md +156 -0
- package/docs/rules/prefer-less-than.md +98 -0
- package/docs/rules/prefer-object-has-own.md +82 -0
- package/docs/rules/prefer-only-export.md +89 -0
- package/docs/rules/presets/all-strict.md +160 -0
- package/docs/rules/presets/all.md +177 -0
- package/docs/rules/presets/recommended.md +55 -0
- package/docs/rules/presets/strict-type-checked.md +66 -0
- package/docs/rules/presets/strict.md +51 -0
- package/docs/rules/require-jsdoc.md +151 -0
- package/docs/rules/require-syntax.md +129 -0
- package/docs/rules/restrict-identifier-characters.md +88 -0
- package/docs/rules/rule-catalog-map.json +912 -0
- package/docs/rules/sort-array.md +91 -0
- package/docs/rules/sort-call-signature.md +98 -0
- package/docs/rules/sort-class-members.md +115 -0
- package/docs/rules/sort-construct-signature.md +96 -0
- package/docs/rules/sort-export-specifiers.md +89 -0
- package/docs/rules/sort-keys.md +107 -0
- package/docs/rules/sort-top-comments.md +92 -0
- package/docs/rules/switch-case-spacing.md +110 -0
- package/docs/rules/template-literal-format.md +100 -0
- package/docs/rules/throw-error.md +110 -0
- package/docs/rules/throw-new-error.md +81 -0
- package/docs/rules/typescript-array-callback-return-type.md +127 -0
- package/docs/rules/typescript-class-methods-use-this.md +120 -0
- package/docs/rules/typescript-consistent-array-type-name.md +93 -0
- package/docs/rules/typescript-define-function-in-one-statement.md +90 -0
- package/docs/rules/typescript-exhaustive-switch.md +114 -0
- package/docs/rules/typescript-no-boolean-literal-type.md +94 -0
- package/docs/rules/typescript-no-complex-declarator-type.md +96 -0
- package/docs/rules/typescript-no-complex-return-type.md +90 -0
- package/docs/rules/typescript-no-empty-interfaces.md +99 -0
- package/docs/rules/typescript-no-inferrable-types.md +102 -0
- package/docs/rules/typescript-no-multi-type-tuples.md +87 -0
- package/docs/rules/typescript-no-never.md +93 -0
- package/docs/rules/typescript-no-redundant-undefined-const.md +101 -0
- package/docs/rules/typescript-no-redundant-undefined-default-parameter.md +117 -0
- package/docs/rules/typescript-no-redundant-undefined-let.md +106 -0
- package/docs/rules/typescript-no-redundant-undefined-optional.md +106 -0
- package/docs/rules/typescript-no-redundant-undefined-promise-return-type.md +134 -0
- package/docs/rules/typescript-no-redundant-undefined-readonly-property.md +110 -0
- package/docs/rules/typescript-no-redundant-undefined-return-type.md +131 -0
- package/docs/rules/typescript-no-redundant-undefined-var.md +106 -0
- package/docs/rules/typescript-no-restricted-syntax.md +119 -0
- package/docs/rules/typescript-no-unsafe-object-assign.md +91 -0
- package/docs/rules/typescript-no-unsafe-object-assignment.md +93 -0
- package/docs/rules/typescript-prefer-array-type-alias.md +87 -0
- package/docs/rules/typescript-prefer-class-method.md +87 -0
- package/docs/rules/typescript-prefer-enum.md +99 -0
- package/docs/rules/typescript-prefer-named-tuple-members.md +104 -0
- package/docs/rules/typescript-prefer-readonly-array-parameter.md +106 -0
- package/docs/rules/typescript-prefer-readonly-array.md +86 -0
- package/docs/rules/typescript-prefer-readonly-index-signature.md +94 -0
- package/docs/rules/typescript-prefer-readonly-map.md +83 -0
- package/docs/rules/typescript-prefer-readonly-property.md +91 -0
- package/docs/rules/typescript-prefer-readonly-record.md +84 -0
- package/docs/rules/typescript-prefer-readonly-set.md +82 -0
- package/docs/rules/typescript-require-prop-type-annotation.md +91 -0
- package/docs/rules/typescript-require-readonly-array-property-type.md +111 -0
- package/docs/rules/typescript-require-readonly-array-return-type.md +113 -0
- package/docs/rules/typescript-require-readonly-array-type-alias.md +102 -0
- package/docs/rules/typescript-require-readonly-map-parameter-type.md +99 -0
- package/docs/rules/typescript-require-readonly-map-property-type.md +103 -0
- package/docs/rules/typescript-require-readonly-map-return-type.md +105 -0
- package/docs/rules/typescript-require-readonly-map-type-alias.md +92 -0
- package/docs/rules/typescript-require-readonly-record-parameter-type.md +100 -0
- package/docs/rules/typescript-require-readonly-record-property-type.md +102 -0
- package/docs/rules/typescript-require-readonly-record-return-type.md +108 -0
- package/docs/rules/typescript-require-readonly-record-type-alias.md +93 -0
- package/docs/rules/typescript-require-readonly-set-parameter-type.md +99 -0
- package/docs/rules/typescript-require-readonly-set-property-type.md +103 -0
- package/docs/rules/typescript-require-readonly-set-return-type.md +105 -0
- package/docs/rules/typescript-require-readonly-set-type-alias.md +92 -0
- package/docs/rules/typescript-require-this-void.md +95 -0
- package/docs/rules/underscore-internal.md +112 -0
- package/docs/rules/unused-internal-properties.md +100 -0
- package/docs/rules/uppercase-iife.md +82 -0
- package/docs/rules/words.md +83 -0
- package/package.json +546 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { getImportSourceFromNode, shouldReportImportSource, } from "./import-patterns.js";
|
|
2
|
+
import { ruleCreator } from "./rule-creator.js";
|
|
3
|
+
const createImportVisitors = (context, defaultDisallowPatterns) => ({
|
|
4
|
+
"ImportDeclaration, ExportNamedDeclaration[source], ExportAllDeclaration, ImportExpression": (node) => {
|
|
5
|
+
const sourceText = getImportSourceFromNode(node);
|
|
6
|
+
if (sourceText === undefined) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const [options = {}] = context.options;
|
|
10
|
+
if (!shouldReportImportSource(sourceText, options, defaultDisallowPatterns)) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
context.report({
|
|
14
|
+
data: {
|
|
15
|
+
source: sourceText,
|
|
16
|
+
},
|
|
17
|
+
messageId: "disallowedSource",
|
|
18
|
+
node,
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Creates a rule that disallows import/export sources by glob pattern.
|
|
24
|
+
*
|
|
25
|
+
* @param options - Rule creation options.
|
|
26
|
+
*
|
|
27
|
+
* @returns ESLint rule module.
|
|
28
|
+
*/
|
|
29
|
+
export const createImportPatternRule = ({ defaultDisallowPatterns, description, name, }) => ruleCreator({
|
|
30
|
+
create: (context) => createImportVisitors(context, defaultDisallowPatterns),
|
|
31
|
+
defaultOptions: [{}],
|
|
32
|
+
meta: {
|
|
33
|
+
defaultOptions: [{}],
|
|
34
|
+
docs: {
|
|
35
|
+
description,
|
|
36
|
+
recommended: false,
|
|
37
|
+
url: `https://nick2bad4u.github.io/eslint-plugin-etc-misc/docs/rules/${name.replaceAll("/", "-")}`,
|
|
38
|
+
},
|
|
39
|
+
hasSuggestions: false,
|
|
40
|
+
messages: {
|
|
41
|
+
disallowedSource: "Import source `{{ source }}` is disallowed by this rule.",
|
|
42
|
+
},
|
|
43
|
+
schema: [
|
|
44
|
+
{
|
|
45
|
+
additionalProperties: false,
|
|
46
|
+
properties: {
|
|
47
|
+
allow: {
|
|
48
|
+
items: {
|
|
49
|
+
type: "string",
|
|
50
|
+
},
|
|
51
|
+
type: "array",
|
|
52
|
+
},
|
|
53
|
+
disallow: {
|
|
54
|
+
items: {
|
|
55
|
+
type: "string",
|
|
56
|
+
},
|
|
57
|
+
type: "array",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
type: "object",
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
type: "problem",
|
|
64
|
+
},
|
|
65
|
+
name,
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=create-import-pattern-rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-import-pattern-rule.js","sourceRoot":"","sources":["../../src/_internal/create-import-pattern-rule.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,uBAAuB,EACvB,wBAAwB,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAiChD,MAAM,oBAAoB,GAAG,CACzB,OAOI,EACJ,uBAA0C,EACiB,EAAE,CAAC,CAAC;IAC/D,2FAA2F,EACvF,CAAC,IAAuB,EAAQ,EAAE;QAC9B,MAAM,UAAU,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO;QACX,CAAC;QAED,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;QACvC,IACI,CAAC,wBAAwB,CACrB,UAAU,EACV,OAAO,EACP,uBAAuB,CAC1B,EACH,CAAC;YACC,OAAO;QACX,CAAC;QAED,OAAO,CAAC,MAAM,CAAC;YACX,IAAI,EAAE;gBACF,MAAM,EAAE,UAAU;aACrB;YACD,SAAS,EAAE,kBAAkB;YAC7B,IAAI;SACP,CAAC,CAAC;IACP,CAAC;CACR,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACpC,uBAAuB,EACvB,WAAW,EACX,IAAI,GACmC,EAEzC,EAAE,CACA,WAAW,CAAoD;IAC3D,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAChB,oBAAoB,CAAC,OAAO,EAAE,uBAAuB,CAAC;IAC1D,cAAc,EAAE,CAAC,EAAE,CAAC;IACpB,IAAI,EAAE;QACF,cAAc,EAAE,CAAC,EAAE,CAAC;QACpB,IAAI,EAAE;YACF,WAAW;YACX,WAAW,EAAE,KAAK;YAClB,GAAG,EAAE,kEAAkE,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE;SACrG;QACD,cAAc,EAAE,KAAK;QACrB,QAAQ,EAAE;YACN,gBAAgB,EACZ,0DAA0D;SACjE;QACD,MAAM,EAAE;YACJ;gBACI,oBAAoB,EAAE,KAAK;gBAC3B,UAAU,EAAE;oBACR,KAAK,EAAE;wBACH,KAAK,EAAE;4BACH,IAAI,EAAE,QAAQ;yBACjB;wBACD,IAAI,EAAE,OAAO;qBAChB;oBACD,QAAQ,EAAE;wBACN,KAAK,EAAE;4BACH,IAAI,EAAE,QAAQ;yBACjB;wBACD,IAAI,EAAE,OAAO;qBAChB;iBACJ;gBACD,IAAI,EAAE,QAAQ;aACjB;SACJ;QACD,IAAI,EAAE,SAAS;KAClB;IACD,IAAI;CACP,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ruleCreator } from "./rule-creator.js";
|
|
2
|
+
type CreateSelectorRuleInput = Readonly<{
|
|
3
|
+
readonly description: string;
|
|
4
|
+
readonly message: string;
|
|
5
|
+
readonly messageId: string;
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly selector: string;
|
|
8
|
+
readonly type: "problem" | "suggestion";
|
|
9
|
+
readonly url: string;
|
|
10
|
+
}>;
|
|
11
|
+
type Options = readonly [];
|
|
12
|
+
/**
|
|
13
|
+
* Create a no-options rule that reports every node matching the provided
|
|
14
|
+
* selector.
|
|
15
|
+
*/
|
|
16
|
+
export declare const createSelectorRule: (input: CreateSelectorRuleInput) => ReturnType<typeof ruleCreator<Options, string>>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=create-selector-rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-selector-rule.d.ts","sourceRoot":"","sources":["../../src/_internal/create-selector-rule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,KAAK,uBAAuB,GAAG,QAAQ,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,YAAY,CAAC;IACxC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACxB,CAAC,CAAC;AAEH,KAAK,OAAO,GAAG,SAAS,EAAE,CAAC;AAE3B;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAC3B,OAAO,uBAAuB,KAC/B,UAAU,CAAC,OAAO,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAyB3C,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ruleCreator } from "./rule-creator.js";
|
|
2
|
+
/**
|
|
3
|
+
* Create a no-options rule that reports every node matching the provided
|
|
4
|
+
* selector.
|
|
5
|
+
*/
|
|
6
|
+
export const createSelectorRule = (input) => ruleCreator({
|
|
7
|
+
create: (context) => ({
|
|
8
|
+
[input.selector]: (node) => {
|
|
9
|
+
context.report({
|
|
10
|
+
messageId: input.messageId,
|
|
11
|
+
node,
|
|
12
|
+
});
|
|
13
|
+
},
|
|
14
|
+
}),
|
|
15
|
+
defaultOptions: [],
|
|
16
|
+
meta: {
|
|
17
|
+
docs: {
|
|
18
|
+
description: input.description,
|
|
19
|
+
recommended: false,
|
|
20
|
+
url: input.url,
|
|
21
|
+
},
|
|
22
|
+
hasSuggestions: false,
|
|
23
|
+
messages: {
|
|
24
|
+
[input.messageId]: input.message,
|
|
25
|
+
},
|
|
26
|
+
schema: [],
|
|
27
|
+
type: input.type,
|
|
28
|
+
},
|
|
29
|
+
name: input.name,
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=create-selector-rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-selector-rule.js","sourceRoot":"","sources":["../../src/_internal/create-selector-rule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAchD;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAC9B,KAA8B,EACiB,EAAE,CACjD,WAAW,CAAkB;IACzB,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAClB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAuB,EAAQ,EAAE;YAChD,OAAO,CAAC,MAAM,CAAC;gBACX,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,IAAI;aACP,CAAC,CAAC;QACP,CAAC;KACJ,CAAC;IACF,cAAc,EAAE,EAAE;IAClB,IAAI,EAAE;QACF,IAAI,EAAE;YACF,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,WAAW,EAAE,KAAK;YAClB,GAAG,EAAE,KAAK,CAAC,GAAG;SACjB;QACD,cAAc,EAAE,KAAK;QACrB,QAAQ,EAAE;YACN,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,OAAO;SACnC;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,KAAK,CAAC,IAAI;KACnB;IACD,IAAI,EAAE,KAAK,CAAC,IAAI;CACnB,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TSESLint } from "@typescript-eslint/utils";
|
|
2
|
+
type RuleModule = TSESLint.RuleModule<string, readonly unknown[]>;
|
|
3
|
+
/**
|
|
4
|
+
* Resolve a core ESLint rule module by rule ID.
|
|
5
|
+
*/
|
|
6
|
+
export declare const getCoreRule: (ruleId: string) => RuleModule;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=get-core-rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-core-rule.d.ts","sourceRoot":"","sources":["../../src/_internal/get-core-rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAKzD,KAAK,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,KAAG,UAQ5C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// eslint-disable-next-line import-x/no-deprecated -- ESLint currently exposes core rules through this compatibility entrypoint.
|
|
2
|
+
import { builtinRules } from "eslint/use-at-your-own-risk";
|
|
3
|
+
/**
|
|
4
|
+
* Resolve a core ESLint rule module by rule ID.
|
|
5
|
+
*/
|
|
6
|
+
export const getCoreRule = (ruleId) => {
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated, etc/no-deprecated, import-x/no-deprecated -- ESLint currently exposes core rule modules through this entrypoint.
|
|
8
|
+
const coreRule = builtinRules.get(ruleId);
|
|
9
|
+
if (coreRule === undefined) {
|
|
10
|
+
throw new Error(`Missing core ESLint rule "${ruleId}".`);
|
|
11
|
+
}
|
|
12
|
+
return coreRule;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=get-core-rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-core-rule.js","sourceRoot":"","sources":["../../src/_internal/get-core-rule.ts"],"names":[],"mappings":"AAEA,gIAAgI;AAChI,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAI3D;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAc,EAAc,EAAE;IACtD,8KAA8K;IAC9K,MAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1C,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,6BAA6B,MAAM,IAAI,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,QAAiC,CAAC;AAC7C,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Split identifier-like text into non-empty blocks while preserving original
|
|
3
|
+
* block casing.
|
|
4
|
+
*/
|
|
5
|
+
export declare const splitIdentifierBlocks: (value: string) => readonly string[];
|
|
6
|
+
/**
|
|
7
|
+
* Count non-empty identifier blocks after casing/punctuation normalization.
|
|
8
|
+
*/
|
|
9
|
+
export declare const countIdentifierBlocks: (value: string) => number;
|
|
10
|
+
//# sourceMappingURL=identifier-blocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identifier-blocks.d.ts","sourceRoot":"","sources":["../../src/_internal/identifier-blocks.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,OAAO,MAAM,KAAG,SAAS,MAAM,EAapE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,OAAO,MAAM,KAAG,MACf,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const camelCaseBoundaryPattern = /(?<=[\da-z])(?=[A-Z])/gu;
|
|
2
|
+
const nonAlphanumericPattern = /[^0-9A-Za-z]+/gu;
|
|
3
|
+
const whitespacePattern = /\s+/u;
|
|
4
|
+
/**
|
|
5
|
+
* Split identifier-like text into non-empty blocks while preserving original
|
|
6
|
+
* block casing.
|
|
7
|
+
*/
|
|
8
|
+
export const splitIdentifierBlocks = (value) => {
|
|
9
|
+
const normalized = value
|
|
10
|
+
.replaceAll(camelCaseBoundaryPattern, " ")
|
|
11
|
+
.replaceAll(nonAlphanumericPattern, " ")
|
|
12
|
+
.trim();
|
|
13
|
+
if (normalized.length === 0) {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
return normalized
|
|
17
|
+
.split(whitespacePattern)
|
|
18
|
+
.filter((segment) => segment.length > 0);
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Count non-empty identifier blocks after casing/punctuation normalization.
|
|
22
|
+
*/
|
|
23
|
+
export const countIdentifierBlocks = (value) => splitIdentifierBlocks(value).length;
|
|
24
|
+
//# sourceMappingURL=identifier-blocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identifier-blocks.js","sourceRoot":"","sources":["../../src/_internal/identifier-blocks.ts"],"names":[],"mappings":"AAAA,MAAM,wBAAwB,GAAG,yBAAyB,CAAC;AAC3D,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AACjD,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAEjC;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAa,EAAqB,EAAE;IACtE,MAAM,UAAU,GAAG,KAAK;SACnB,UAAU,CAAC,wBAAwB,EAAE,GAAG,CAAC;SACzC,UAAU,CAAC,sBAAsB,EAAE,GAAG,CAAC;SACvC,IAAI,EAAE,CAAC;IAEZ,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAC;IACd,CAAC;IAED,OAAO,UAAU;SACZ,KAAK,CAAC,iBAAiB,CAAC;SACxB,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAa,EAAU,EAAE,CAC3D,qBAAqB,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compiled ignore-pattern result grouped by mode with invalid entries tracked.
|
|
3
|
+
*/
|
|
4
|
+
export type CompiledIgnorePatterns = Readonly<{
|
|
5
|
+
readonly invalidPatterns: readonly string[];
|
|
6
|
+
readonly patterns: IgnorePatternBuckets;
|
|
7
|
+
}>;
|
|
8
|
+
/**
|
|
9
|
+
* Supported matching modes for symbol-ignore configuration.
|
|
10
|
+
*/
|
|
11
|
+
export type IgnoreMode = "name" | "path";
|
|
12
|
+
/**
|
|
13
|
+
* Compiled regex buckets for name- and path-based ignores.
|
|
14
|
+
*/
|
|
15
|
+
export type IgnorePatternBuckets = Readonly<{
|
|
16
|
+
readonly name: readonly RegExp[];
|
|
17
|
+
readonly path: readonly RegExp[];
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Compile ignore-option regex patterns into mode buckets.
|
|
21
|
+
*
|
|
22
|
+
* Invalid regex patterns are returned for caller-side reporting so rule
|
|
23
|
+
* configuration issues are never swallowed silently.
|
|
24
|
+
*/
|
|
25
|
+
export declare const compileIgnorePatterns: (ignored: Readonly<Record<string, IgnoreMode>>) => CompiledIgnorePatterns;
|
|
26
|
+
//# sourceMappingURL=ignore-patterns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignore-patterns.d.ts","sourceRoot":"","sources":["../../src/_internal/ignore-patterns.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC1C,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC;CAC3C,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IACxC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC,CAAC,CAAC;AAGH;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAC9B,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,KAC9C,sBAyBF,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* eslint-disable security/detect-non-literal-regexp -- Rule options intentionally accept user-provided regex strings. */
|
|
2
|
+
/**
|
|
3
|
+
* Compile ignore-option regex patterns into mode buckets.
|
|
4
|
+
*
|
|
5
|
+
* Invalid regex patterns are returned for caller-side reporting so rule
|
|
6
|
+
* configuration issues are never swallowed silently.
|
|
7
|
+
*/
|
|
8
|
+
export const compileIgnorePatterns = (ignored) => {
|
|
9
|
+
let namePatterns = [];
|
|
10
|
+
let pathPatterns = [];
|
|
11
|
+
let invalidPatterns = [];
|
|
12
|
+
for (const [pattern, mode] of Object.entries(ignored)) {
|
|
13
|
+
try {
|
|
14
|
+
const regularExpression = new RegExp(pattern, "u");
|
|
15
|
+
if (mode === "name") {
|
|
16
|
+
namePatterns = [...namePatterns, regularExpression];
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
pathPatterns = [...pathPatterns, regularExpression];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
invalidPatterns = [...invalidPatterns, pattern];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
invalidPatterns,
|
|
28
|
+
patterns: {
|
|
29
|
+
name: namePatterns,
|
|
30
|
+
path: pathPatterns,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
/* eslint-enable security/detect-non-literal-regexp -- Re-enable dynamic-regex checks outside option pattern compilation. */
|
|
35
|
+
//# sourceMappingURL=ignore-patterns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignore-patterns.js","sourceRoot":"","sources":["../../src/_internal/ignore-patterns.ts"],"names":[],"mappings":"AAqBA,yHAAyH;AACzH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACjC,OAA6C,EACvB,EAAE;IACxB,IAAI,YAAY,GAAsB,EAAE,CAAC;IACzC,IAAI,YAAY,GAAsB,EAAE,CAAC;IACzC,IAAI,eAAe,GAAsB,EAAE,CAAC;IAE5C,KAAK,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACpD,IAAI,CAAC;YACD,MAAM,iBAAiB,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;YACnD,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;gBAClB,YAAY,GAAG,CAAC,GAAG,YAAY,EAAE,iBAAiB,CAAC,CAAC;YACxD,CAAC;iBAAM,CAAC;gBACJ,YAAY,GAAG,CAAC,GAAG,YAAY,EAAE,iBAAiB,CAAC,CAAC;YACxD,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACL,eAAe,GAAG,CAAC,GAAG,eAAe,EAAE,OAAO,CAAC,CAAC;QACpD,CAAC;IACL,CAAC;IAED,OAAO;QACH,eAAe;QACf,QAAQ,EAAE;YACN,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,YAAY;SACrB;KACJ,CAAC;AACN,CAAC,CAAC;AACF,4HAA4H"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { TSESTree as es } from "@typescript-eslint/utils";
|
|
2
|
+
/**
|
|
3
|
+
* Allow/disallow glob options for import source checks.
|
|
4
|
+
*/
|
|
5
|
+
type ImportPathOptions = Readonly<{
|
|
6
|
+
readonly allow?: readonly string[];
|
|
7
|
+
readonly disallow?: readonly string[];
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* Determines whether an import source should be reported.
|
|
11
|
+
*
|
|
12
|
+
* @param sourceText - Source text from an import/export node.
|
|
13
|
+
* @param options - Rule options for allow/disallow overrides.
|
|
14
|
+
* @param defaultDisallowPatterns - Rule-specific default disallow patterns.
|
|
15
|
+
*
|
|
16
|
+
* @returns `true` when the source matches a disallow pattern and no allow
|
|
17
|
+
* pattern.
|
|
18
|
+
*/
|
|
19
|
+
export declare const shouldReportImportSource: (sourceText: string, options: Readonly<ImportPathOptions> | undefined, defaultDisallowPatterns: readonly string[]) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Gets import source text from supported import/export AST nodes.
|
|
22
|
+
*
|
|
23
|
+
* @param node - AST node to inspect.
|
|
24
|
+
*
|
|
25
|
+
* @returns Source text when present and string-literal based, otherwise
|
|
26
|
+
* `undefined`.
|
|
27
|
+
*/
|
|
28
|
+
export declare const getImportSourceFromNode: (node: Readonly<es.Node>) => string | undefined;
|
|
29
|
+
export type { ImportPathOptions };
|
|
30
|
+
//# sourceMappingURL=import-patterns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-patterns.d.ts","sourceRoot":"","sources":["../../src/_internal/import-patterns.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAI/D;;GAEG;AACH,KAAK,iBAAiB,GAAG,QAAQ,CAAC;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC,CAAC,CAAC;AA2CH;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,GACjC,YAAY,MAAM,EAClB,SAAS,QAAQ,CAAC,iBAAiB,CAAC,GAAG,SAAS,EAChD,yBAAyB,SAAS,MAAM,EAAE,KAC3C,OAOF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAChC,MAAM,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,KACxB,MAAM,GAAG,SAAsC,CAAC;AAEnD,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { minimatch } from "minimatch";
|
|
2
|
+
const matchesAnyPattern = (value, patterns) => patterns.some((pattern) => minimatch(value, pattern, {
|
|
3
|
+
dot: true,
|
|
4
|
+
nocase: false,
|
|
5
|
+
}));
|
|
6
|
+
const getImportSourceText = (node) => {
|
|
7
|
+
if (node.type === "ExportAllDeclaration" ||
|
|
8
|
+
node.type === "ImportDeclaration") {
|
|
9
|
+
return node.source.value;
|
|
10
|
+
}
|
|
11
|
+
if (node.type === "ExportNamedDeclaration") {
|
|
12
|
+
return node.source?.value;
|
|
13
|
+
}
|
|
14
|
+
if (node.type === "ImportExpression") {
|
|
15
|
+
return node.source.type === "Literal" &&
|
|
16
|
+
typeof node.source.value === "string"
|
|
17
|
+
? node.source.value
|
|
18
|
+
: undefined;
|
|
19
|
+
}
|
|
20
|
+
return undefined;
|
|
21
|
+
};
|
|
22
|
+
const toMergedOptions = (options, defaultDisallowPatterns) => ({
|
|
23
|
+
allow: options?.allow ?? [],
|
|
24
|
+
disallow: options?.disallow ?? defaultDisallowPatterns,
|
|
25
|
+
});
|
|
26
|
+
/**
|
|
27
|
+
* Determines whether an import source should be reported.
|
|
28
|
+
*
|
|
29
|
+
* @param sourceText - Source text from an import/export node.
|
|
30
|
+
* @param options - Rule options for allow/disallow overrides.
|
|
31
|
+
* @param defaultDisallowPatterns - Rule-specific default disallow patterns.
|
|
32
|
+
*
|
|
33
|
+
* @returns `true` when the source matches a disallow pattern and no allow
|
|
34
|
+
* pattern.
|
|
35
|
+
*/
|
|
36
|
+
export const shouldReportImportSource = (sourceText, options, defaultDisallowPatterns) => {
|
|
37
|
+
const mergedOptions = toMergedOptions(options, defaultDisallowPatterns);
|
|
38
|
+
if (!matchesAnyPattern(sourceText, mergedOptions.disallow)) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
return !matchesAnyPattern(sourceText, mergedOptions.allow);
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Gets import source text from supported import/export AST nodes.
|
|
45
|
+
*
|
|
46
|
+
* @param node - AST node to inspect.
|
|
47
|
+
*
|
|
48
|
+
* @returns Source text when present and string-literal based, otherwise
|
|
49
|
+
* `undefined`.
|
|
50
|
+
*/
|
|
51
|
+
export const getImportSourceFromNode = (node) => getImportSourceText(node);
|
|
52
|
+
//# sourceMappingURL=import-patterns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-patterns.js","sourceRoot":"","sources":["../../src/_internal/import-patterns.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAUtC,MAAM,iBAAiB,GAAG,CACtB,KAAa,EACb,QAA2B,EACpB,EAAE,CACT,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CACtB,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE;IACtB,GAAG,EAAE,IAAI;IACT,MAAM,EAAE,KAAK;CAChB,CAAC,CACL,CAAC;AAEN,MAAM,mBAAmB,GAAG,CAAC,IAAuB,EAAsB,EAAE;IACxE,IACI,IAAI,CAAC,IAAI,KAAK,sBAAsB;QACpC,IAAI,CAAC,IAAI,KAAK,mBAAmB,EACnC,CAAC;QACC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC7B,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,KAAK,wBAAwB,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;YACjC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,KAAK,QAAQ;YACrC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;YACnB,CAAC,CAAC,SAAS,CAAC;IACpB,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CACpB,OAAgD,EAChD,uBAA0C,EACf,EAAE,CAAC,CAAC;IAC/B,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE;IAC3B,QAAQ,EAAE,OAAO,EAAE,QAAQ,IAAI,uBAAuB;CACzD,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACpC,UAAkB,EAClB,OAAgD,EAChD,uBAA0C,EACnC,EAAE;IACT,MAAM,aAAa,GAAG,eAAe,CAAC,OAAO,EAAE,uBAAuB,CAAC,CAAC;IACxE,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzD,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,OAAO,CAAC,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACnC,IAAuB,EACL,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Immutable metadata describing this ESLint plugin package.
|
|
3
|
+
*/
|
|
4
|
+
export declare const pluginMeta: {
|
|
5
|
+
readonly name: "eslint-plugin-etc-misc";
|
|
6
|
+
readonly namespace: "etc-misc";
|
|
7
|
+
readonly version: "1.0.0";
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Static type representation of {@link pluginMeta}.
|
|
11
|
+
*/
|
|
12
|
+
export type PluginMeta = typeof pluginMeta;
|
|
13
|
+
//# sourceMappingURL=plugin-meta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-meta.d.ts","sourceRoot":"","sources":["../../src/_internal/plugin-meta.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-meta.js","sourceRoot":"","sources":["../../src/_internal/plugin-meta.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,IAAI,EAAE,wBAAwB;IAC9B,SAAS,EAAE,UAAU;IACrB,OAAO,EAAE,OAAO;CACV,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global rule catalog indexed by rule name and documentation id.
|
|
3
|
+
*/
|
|
4
|
+
type RuleCatalog = Readonly<{
|
|
5
|
+
readonly byDocId: Readonly<Record<string, RuleCatalogEntry>>;
|
|
6
|
+
readonly byRuleName: Readonly<Record<string, RuleCatalogEntry>>;
|
|
7
|
+
readonly ordered: readonly RuleCatalogEntry[];
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* Single rule entry in the global catalog.
|
|
11
|
+
*/
|
|
12
|
+
type RuleCatalogEntry = Readonly<{
|
|
13
|
+
readonly catalogId: string;
|
|
14
|
+
readonly catalogIndex: number;
|
|
15
|
+
readonly docId: string;
|
|
16
|
+
readonly isTypeScriptRule: boolean;
|
|
17
|
+
readonly ruleName: string;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Format a catalog index as an ID like `R001`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const toRuleCatalogId: (catalogIndex: number) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Convert a rule name to its documentation page id.
|
|
25
|
+
*/
|
|
26
|
+
export declare const toRuleDocId: (ruleName: string) => string;
|
|
27
|
+
/**
|
|
28
|
+
* Sort rules so core rules come first, then TypeScript-scoped rules.
|
|
29
|
+
*/
|
|
30
|
+
export declare const compareRuleNamesForCatalog: (leftRuleName: string, rightRuleName: string) => number;
|
|
31
|
+
/**
|
|
32
|
+
* Build a globally ordered rule catalog map keyed by both rule name and doc id.
|
|
33
|
+
*/
|
|
34
|
+
export declare const buildRuleCatalog: (ruleNames: readonly string[]) => RuleCatalog;
|
|
35
|
+
export type { RuleCatalog, RuleCatalogEntry };
|
|
36
|
+
//# sourceMappingURL=rule-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-catalog.d.ts","sourceRoot":"","sources":["../../src/_internal/rule-catalog.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,KAAK,WAAW,GAAG,QAAQ,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC7D,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAChE,QAAQ,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAC;CACjD,CAAC,CAAC;AAEH;;GAEG;AACH,KAAK,gBAAgB,GAAG,QAAQ,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC7B,CAAC,CAAC;AAKH;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,cAAc,MAAM,KAAG,MACX,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,KAAG,MACd,CAAC;AAElC;;GAEG;AACH,eAAO,MAAM,0BAA0B,GACnC,cAAc,MAAM,EACpB,eAAe,MAAM,KACtB,MASF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,WAAW,SAAS,MAAM,EAAE,KAAG,WA2B/D,CAAC;AAEF,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const toCatalogNumericPart = (catalogIndex) => `${catalogIndex}`.padStart(3, "0");
|
|
2
|
+
/**
|
|
3
|
+
* Format a catalog index as an ID like `R001`.
|
|
4
|
+
*/
|
|
5
|
+
export const toRuleCatalogId = (catalogIndex) => `R${toCatalogNumericPart(catalogIndex)}`;
|
|
6
|
+
/**
|
|
7
|
+
* Convert a rule name to its documentation page id.
|
|
8
|
+
*/
|
|
9
|
+
export const toRuleDocId = (ruleName) => ruleName.replaceAll("/", "-");
|
|
10
|
+
/**
|
|
11
|
+
* Sort rules so core rules come first, then TypeScript-scoped rules.
|
|
12
|
+
*/
|
|
13
|
+
export const compareRuleNamesForCatalog = (leftRuleName, rightRuleName) => {
|
|
14
|
+
const leftIsTypeScriptRule = leftRuleName.startsWith("typescript/");
|
|
15
|
+
const rightIsTypeScriptRule = rightRuleName.startsWith("typescript/");
|
|
16
|
+
if (leftIsTypeScriptRule !== rightIsTypeScriptRule) {
|
|
17
|
+
return leftIsTypeScriptRule ? 1 : -1;
|
|
18
|
+
}
|
|
19
|
+
return leftRuleName.localeCompare(rightRuleName);
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Build a globally ordered rule catalog map keyed by both rule name and doc id.
|
|
23
|
+
*/
|
|
24
|
+
export const buildRuleCatalog = (ruleNames) => {
|
|
25
|
+
const sortedRuleNames = ruleNames.toSorted(compareRuleNamesForCatalog);
|
|
26
|
+
let ordered = [];
|
|
27
|
+
let byRuleName = {};
|
|
28
|
+
let byDocId = {};
|
|
29
|
+
for (const [zeroBasedIndex, ruleName] of sortedRuleNames.entries()) {
|
|
30
|
+
const catalogIndex = zeroBasedIndex + 1;
|
|
31
|
+
const docId = toRuleDocId(ruleName);
|
|
32
|
+
const entry = {
|
|
33
|
+
catalogId: toRuleCatalogId(catalogIndex),
|
|
34
|
+
catalogIndex,
|
|
35
|
+
docId,
|
|
36
|
+
isTypeScriptRule: ruleName.startsWith("typescript/"),
|
|
37
|
+
ruleName,
|
|
38
|
+
};
|
|
39
|
+
ordered = [...ordered, entry];
|
|
40
|
+
byRuleName = { ...byRuleName, [ruleName]: entry };
|
|
41
|
+
byDocId = { ...byDocId, [docId]: entry };
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
byDocId,
|
|
45
|
+
byRuleName,
|
|
46
|
+
ordered,
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=rule-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-catalog.js","sourceRoot":"","sources":["../../src/_internal/rule-catalog.ts"],"names":[],"mappings":"AAoBA,MAAM,oBAAoB,GAAG,CAAC,YAAoB,EAAU,EAAE,CAC1D,GAAG,YAAY,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,YAAoB,EAAU,EAAE,CAC5D,IAAI,oBAAoB,CAAC,YAAY,CAAC,EAAE,CAAC;AAE7C;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAgB,EAAU,EAAE,CACpD,QAAQ,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACtC,YAAoB,EACpB,aAAqB,EACf,EAAE;IACR,MAAM,oBAAoB,GAAG,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACpE,MAAM,qBAAqB,GAAG,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAEtE,IAAI,oBAAoB,KAAK,qBAAqB,EAAE,CAAC;QACjD,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,YAAY,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAA4B,EAAe,EAAE;IAC1E,MAAM,eAAe,GAAG,SAAS,CAAC,QAAQ,CAAC,0BAA0B,CAAC,CAAC;IACvE,IAAI,OAAO,GAAgC,EAAE,CAAC;IAC9C,IAAI,UAAU,GAA+C,EAAE,CAAC;IAChE,IAAI,OAAO,GAA+C,EAAE,CAAC;IAE7D,KAAK,MAAM,CAAC,cAAc,EAAE,QAAQ,CAAC,IAAI,eAAe,CAAC,OAAO,EAAE,EAAE,CAAC;QACjE,MAAM,YAAY,GAAG,cAAc,GAAG,CAAC,CAAC;QACxC,MAAM,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;QACpC,MAAM,KAAK,GAAqB;YAC5B,SAAS,EAAE,eAAe,CAAC,YAAY,CAAC;YACxC,YAAY;YACZ,KAAK;YACL,gBAAgB,EAAE,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC;YACpD,QAAQ;SACX,CAAC;QAEF,OAAO,GAAG,CAAC,GAAG,OAAO,EAAE,KAAK,CAAC,CAAC;QAC9B,UAAU,GAAG,EAAE,GAAG,UAAU,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;QAClD,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;IAC7C,CAAC;IAED,OAAO;QACH,OAAO;QACP,UAAU;QACV,OAAO;KACV,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { TSESLint } from "@typescript-eslint/utils";
|
|
2
|
+
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
3
|
+
/**
|
|
4
|
+
* Broad rule-module type used by incrementally migrated rule files.
|
|
5
|
+
*/
|
|
6
|
+
export type AnyRuleModule = TSESLint.RuleModule<string, readonly unknown[]>;
|
|
7
|
+
type RuleCreatorFactory = ReturnType<typeof ESLintUtils.RuleCreator<RuleDocsMetadata>>;
|
|
8
|
+
type RuleDocsMetadata = {
|
|
9
|
+
readonly catalogId?: string;
|
|
10
|
+
readonly catalogIndex?: number;
|
|
11
|
+
readonly deprecated?: boolean;
|
|
12
|
+
readonly frozen?: boolean;
|
|
13
|
+
readonly recommended: boolean;
|
|
14
|
+
readonly requiresTypeChecking?: boolean;
|
|
15
|
+
readonly ruleName?: string;
|
|
16
|
+
readonly suggestion?: boolean;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Shared rule factory for plugin rules.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Typed factory for defining plugin rules with consistent docs URLs.
|
|
23
|
+
*/
|
|
24
|
+
export declare const ruleCreator: RuleCreatorFactory;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=rule-creator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-creator.d.ts","sourceRoot":"","sources":["../../src/_internal/rule-creator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,UAAU,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC,CAAC;AAE5E,KAAK,kBAAkB,GAAG,UAAU,CAChC,OAAO,WAAW,CAAC,WAAW,CAAC,gBAAgB,CAAC,CACnD,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACpB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IACxC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,kBAKpB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable total-functions/no-hidden-type-assertions -- @typescript-eslint RuleCreator requires an explicit docs metadata generic for typed docs fields. */
|
|
2
|
+
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
3
|
+
/**
|
|
4
|
+
* Shared rule factory for plugin rules.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Typed factory for defining plugin rules with consistent docs URLs.
|
|
8
|
+
*/
|
|
9
|
+
export const ruleCreator = ESLintUtils.RuleCreator((name) => {
|
|
10
|
+
const docsPathName = name.replaceAll("/", "-");
|
|
11
|
+
return `https://nick2bad4u.github.io/eslint-plugin-etc-misc/docs/rules/${docsPathName}`;
|
|
12
|
+
});
|
|
13
|
+
/* eslint-enable total-functions/no-hidden-type-assertions -- Re-enable hidden assertion checks outside this required generic factory declaration. */
|
|
14
|
+
//# sourceMappingURL=rule-creator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-creator.js","sourceRoot":"","sources":["../../src/_internal/rule-creator.ts"],"names":[],"mappings":"AAAA,kKAAkK;AAIlK,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAsBvD;;GAEG;AACH;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GACpB,WAAW,CAAC,WAAW,CAAmB,CAAC,IAAI,EAAE,EAAE;IAC/C,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAE/C,OAAO,kEAAkE,YAAY,EAAE,CAAC;AAC5F,CAAC,CAAC,CAAC;AAEP,qJAAqJ"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { TSESLint } from "@typescript-eslint/utils";
|
|
2
|
+
type DeprecatedInfo = Exclude<TSESLint.RuleMetaData<string>["deprecated"], boolean | undefined>;
|
|
3
|
+
type ReplacedByInfo = NonNullable<DeprecatedInfo["replacedBy"]>[number];
|
|
4
|
+
type RuleDeprecationOptions = Readonly<{
|
|
5
|
+
readonly message: string;
|
|
6
|
+
readonly replacedBy?: readonly ReplacedByInfo[];
|
|
7
|
+
readonly ruleId: string;
|
|
8
|
+
}>;
|
|
9
|
+
type RuleModule = TSESLint.RuleModule<string, readonly unknown[]>;
|
|
10
|
+
/**
|
|
11
|
+
* Create a replacement descriptor for deprecation metadata.
|
|
12
|
+
*/
|
|
13
|
+
export declare const createReplacementRuleInfo: (replacement: Readonly<{
|
|
14
|
+
readonly plugin?: Readonly<{
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly url?: string;
|
|
17
|
+
}>;
|
|
18
|
+
readonly rule?: Readonly<{
|
|
19
|
+
readonly name: string;
|
|
20
|
+
readonly url?: string;
|
|
21
|
+
}>;
|
|
22
|
+
}>) => ReplacedByInfo;
|
|
23
|
+
/**
|
|
24
|
+
* Create standardized deprecation metadata for this plugin.
|
|
25
|
+
*/
|
|
26
|
+
export declare const createDeprecatedRuleInfo: ({ message, replacedBy, ruleId, }: RuleDeprecationOptions) => DeprecatedInfo;
|
|
27
|
+
/**
|
|
28
|
+
* Apply deprecated+frozen lifecycle metadata to a rule module.
|
|
29
|
+
*/
|
|
30
|
+
export declare const withDeprecatedRuleLifecycle: <TRule extends RuleModule>(rule: TRule, options: RuleDeprecationOptions) => TRule;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=rule-deprecation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-deprecation.d.ts","sourceRoot":"","sources":["../../src/_internal/rule-deprecation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,KAAK,cAAc,GAAG,OAAO,CACzB,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,EAC3C,OAAO,GAAG,SAAS,CACtB,CAAC;AACF,KAAK,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,KAAK,sBAAsB,GAAG,QAAQ,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B,CAAC,CAAC;AAEH,KAAK,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC,CAAC;AAKlE;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAClC,aAAa,QAAQ,CAAC;IAClB,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC;QACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC,CAAC;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC;QACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC,CAAC;CACN,CAAC,KACH,cAGD,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,kCAItC,sBAAsB,KAAG,cAM1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,2BAA2B,GAAI,KAAK,SAAS,UAAU,EAChE,MAAM,KAAK,EACX,SAAS,sBAAsB,KAChC,KAeD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const docsBaseUrl = "https://nick2bad4u.github.io/eslint-plugin-etc-misc/docs/rules";
|
|
2
|
+
/**
|
|
3
|
+
* Create a replacement descriptor for deprecation metadata.
|
|
4
|
+
*/
|
|
5
|
+
export const createReplacementRuleInfo = (replacement) => ({
|
|
6
|
+
...(replacement.plugin === undefined ? {} : { plugin: replacement.plugin }),
|
|
7
|
+
...(replacement.rule === undefined ? {} : { rule: replacement.rule }),
|
|
8
|
+
});
|
|
9
|
+
/**
|
|
10
|
+
* Create standardized deprecation metadata for this plugin.
|
|
11
|
+
*/
|
|
12
|
+
export const createDeprecatedRuleInfo = ({ message, replacedBy = [], ruleId, }) => ({
|
|
13
|
+
availableUntil: "2.0.0",
|
|
14
|
+
deprecatedSince: "1.0.0",
|
|
15
|
+
message,
|
|
16
|
+
...(replacedBy.length === 0 ? {} : { replacedBy: [...replacedBy] }),
|
|
17
|
+
url: `${docsBaseUrl}/${ruleId.replaceAll("/", "-")}`,
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Apply deprecated+frozen lifecycle metadata to a rule module.
|
|
21
|
+
*/
|
|
22
|
+
export const withDeprecatedRuleLifecycle = (rule, options) => ({
|
|
23
|
+
...rule,
|
|
24
|
+
meta: {
|
|
25
|
+
...rule.meta,
|
|
26
|
+
deprecated: createDeprecatedRuleInfo(options),
|
|
27
|
+
...(rule.meta.docs === undefined
|
|
28
|
+
? {}
|
|
29
|
+
: {
|
|
30
|
+
docs: {
|
|
31
|
+
...rule.meta.docs,
|
|
32
|
+
deprecated: true,
|
|
33
|
+
frozen: true,
|
|
34
|
+
},
|
|
35
|
+
}),
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=rule-deprecation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-deprecation.js","sourceRoot":"","sources":["../../src/_internal/rule-deprecation.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,GACb,gEAAgE,CAAC;AAErE;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACrC,WASE,EACY,EAAE,CAAC,CAAC;IAClB,GAAG,CAAC,WAAW,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC;IAC3E,GAAG,CAAC,WAAW,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC;CACxE,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACrC,OAAO,EACP,UAAU,GAAG,EAAE,EACf,MAAM,GACe,EAAkB,EAAE,CAAC,CAAC;IAC3C,cAAc,EAAE,OAAO;IACvB,eAAe,EAAE,OAAO;IACxB,OAAO;IACP,GAAG,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,UAAU,CAAC,EAAE,CAAC;IACnE,GAAG,EAAE,GAAG,WAAW,IAAI,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE;CACvD,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACvC,IAAW,EACX,OAA+B,EAC1B,EAAE,CAAC,CAAC;IACT,GAAG,IAAI;IACP,IAAI,EAAE;QACF,GAAG,IAAI,CAAC,IAAI;QACZ,UAAU,EAAE,wBAAwB,CAAC,OAAO,CAAC;QAC7C,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS;YAC5B,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC;gBACI,IAAI,EAAE;oBACF,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI;oBACjB,UAAU,EAAE,IAAI;oBAChB,MAAM,EAAE,IAAI;iBACf;aACJ,CAAC;KACX;CACJ,CAAC,CAAC"}
|