@thethracian/oxlint-config 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/codemods/no-ternary.d.ts.map +1 -1
- package/dist/codemods/no-ternary.js +12 -2
- package/dist/codemods/no-ternary.js.map +1 -1
- package/dist/rules/acronym-case.d.ts +1 -1
- package/dist/rules/acronym-case.d.ts.map +1 -1
- package/dist/rules/acronym-case.js +161 -76
- package/dist/rules/acronym-case.js.map +1 -1
- package/dist/rules/camel-case-identifiers.d.ts.map +1 -1
- package/dist/rules/camel-case-identifiers.js +47 -14
- package/dist/rules/camel-case-identifiers.js.map +1 -1
- package/dist/rules/effect-ast-scope-stack.d.ts +20 -0
- package/dist/rules/effect-ast-scope-stack.d.ts.map +1 -0
- package/dist/rules/effect-ast-scope-stack.js +232 -0
- package/dist/rules/effect-ast-scope-stack.js.map +1 -0
- package/dist/rules/effect-ast-scope.d.ts +1 -0
- package/dist/rules/effect-ast-scope.d.ts.map +1 -1
- package/dist/rules/effect-ast-scope.js +59 -31
- package/dist/rules/effect-ast-scope.js.map +1 -1
- package/dist/rules/effect-ast-stack-safe-walker.d.ts +24 -0
- package/dist/rules/effect-ast-stack-safe-walker.d.ts.map +1 -0
- package/dist/rules/effect-ast-stack-safe-walker.js +68 -0
- package/dist/rules/effect-ast-stack-safe-walker.js.map +1 -0
- package/dist/rules/effect-boundary-ast-shared.d.ts.map +1 -1
- package/dist/rules/effect-boundary-ast-shared.js +2 -8
- package/dist/rules/effect-boundary-ast-shared.js.map +1 -1
- package/dist/rules/effect-default-boundary-ast.d.ts.map +1 -1
- package/dist/rules/effect-default-boundary-ast.js +16 -24
- package/dist/rules/effect-default-boundary-ast.js.map +1 -1
- package/dist/rules/effect-default-fiber-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-fiber-helpers.js +284 -38
- package/dist/rules/effect-default-fiber-helpers.js.map +1 -1
- package/dist/rules/effect-default-floating-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-floating-helpers.js +85 -37
- package/dist/rules/effect-default-floating-helpers.js.map +1 -1
- package/dist/rules/effect-default-scan-helpers.d.ts +6 -0
- package/dist/rules/effect-default-scan-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-scan-helpers.js +79 -27
- package/dist/rules/effect-default-scan-helpers.js.map +1 -1
- package/dist/rules/effect-default-schema-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-schema-helpers.js +172 -39
- package/dist/rules/effect-default-schema-helpers.js.map +1 -1
- package/dist/rules/effect-default-test-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-test-helpers.js +69 -25
- package/dist/rules/effect-default-test-helpers.js.map +1 -1
- package/dist/rules/effect-default-workflow-helpers.d.ts.map +1 -1
- package/dist/rules/effect-default-workflow-helpers.js +53 -7
- package/dist/rules/effect-default-workflow-helpers.js.map +1 -1
- package/dist/rules/effect-export-binding-pattern-index.d.ts +23 -0
- package/dist/rules/effect-export-binding-pattern-index.d.ts.map +1 -0
- package/dist/rules/effect-export-binding-pattern-index.js +366 -0
- package/dist/rules/effect-export-binding-pattern-index.js.map +1 -0
- package/dist/rules/effect-export-binding-patterns.d.ts.map +1 -1
- package/dist/rules/effect-export-binding-patterns.js +74 -107
- package/dist/rules/effect-export-binding-patterns.js.map +1 -1
- package/dist/rules/effect-export-source-code.d.ts +5 -0
- package/dist/rules/effect-export-source-code.d.ts.map +1 -0
- package/dist/rules/effect-export-source-code.js +66 -0
- package/dist/rules/effect-export-source-code.js.map +1 -0
- package/dist/rules/effect-exported-declaration-projection.d.ts +26 -0
- package/dist/rules/effect-exported-declaration-projection.d.ts.map +1 -0
- package/dist/rules/effect-exported-declaration-projection.js +73 -0
- package/dist/rules/effect-exported-declaration-projection.js.map +1 -0
- package/dist/rules/effect-exported-declarations.d.ts.map +1 -1
- package/dist/rules/effect-exported-declarations.js +52 -51
- package/dist/rules/effect-exported-declarations.js.map +1 -1
- package/dist/rules/effect-global-fetch-ast-traversal.d.ts +14 -0
- package/dist/rules/effect-global-fetch-ast-traversal.d.ts.map +1 -0
- package/dist/rules/effect-global-fetch-ast-traversal.js +105 -0
- package/dist/rules/effect-global-fetch-ast-traversal.js.map +1 -0
- package/dist/rules/effect-global-fetch-ast.d.ts.map +1 -1
- package/dist/rules/effect-global-fetch-ast.js +85 -82
- package/dist/rules/effect-global-fetch-ast.js.map +1 -1
- package/dist/rules/effect-imported-call-matcher.d.ts.map +1 -1
- package/dist/rules/effect-imported-call-matcher.js +61 -26
- package/dist/rules/effect-imported-call-matcher.js.map +1 -1
- package/dist/rules/effect-path-options.d.ts.map +1 -1
- package/dist/rules/effect-path-options.js +39 -12
- package/dist/rules/effect-path-options.js.map +1 -1
- package/dist/rules/effect-prefer-all-discard.d.ts.map +1 -1
- package/dist/rules/effect-prefer-all-discard.js +25 -37
- package/dist/rules/effect-prefer-all-discard.js.map +1 -1
- package/dist/rules/effect-prefer-andthen-over-flatmap-discarded-value.d.ts.map +1 -1
- package/dist/rules/effect-prefer-andthen-over-flatmap-discarded-value.js +9 -3
- package/dist/rules/effect-prefer-andthen-over-flatmap-discarded-value.js.map +1 -1
- package/dist/rules/effect-prefer-as-over-map-constant.d.ts.map +1 -1
- package/dist/rules/effect-prefer-as-over-map-constant.js +17 -3
- package/dist/rules/effect-prefer-as-over-map-constant.js.map +1 -1
- package/dist/rules/effect-prefer-as-some.d.ts.map +1 -1
- package/dist/rules/effect-prefer-as-some.js +21 -28
- package/dist/rules/effect-prefer-as-some.js.map +1 -1
- package/dist/rules/effect-prefer-catchif-over-conditional-catch.d.ts.map +1 -1
- package/dist/rules/effect-prefer-catchif-over-conditional-catch.js +12 -2
- package/dist/rules/effect-prefer-catchif-over-conditional-catch.js.map +1 -1
- package/dist/rules/effect-prefer-collection-discard-over-asvoid.d.ts.map +1 -1
- package/dist/rules/effect-prefer-collection-discard-over-asvoid.js +24 -33
- package/dist/rules/effect-prefer-collection-discard-over-asvoid.js.map +1 -1
- package/dist/rules/effect-prefer-filter-or-fail-over-flatmap-guard.d.ts.map +1 -1
- package/dist/rules/effect-prefer-filter-or-fail-over-flatmap-guard.js +69 -23
- package/dist/rules/effect-prefer-filter-or-fail-over-flatmap-guard.js.map +1 -1
- package/dist/rules/effect-prefer-foreach-discard.d.ts.map +1 -1
- package/dist/rules/effect-prefer-foreach-discard.js +25 -37
- package/dist/rules/effect-prefer-foreach-discard.js.map +1 -1
- package/dist/rules/effect-prefer-layer-sync.d.ts.map +1 -1
- package/dist/rules/effect-prefer-layer-sync.js +15 -4
- package/dist/rules/effect-prefer-layer-sync.js.map +1 -1
- package/dist/rules/effect-prefer-map-both.d.ts.map +1 -1
- package/dist/rules/effect-prefer-map-both.js +12 -3
- package/dist/rules/effect-prefer-map-both.js.map +1 -1
- package/dist/rules/effect-prefer-map-over-flatmap-succeed.d.ts.map +1 -1
- package/dist/rules/effect-prefer-map-over-flatmap-succeed.js +45 -21
- package/dist/rules/effect-prefer-map-over-flatmap-succeed.js.map +1 -1
- package/dist/rules/effect-prefer-option-get-or-else.d.ts.map +1 -1
- package/dist/rules/effect-prefer-option-get-or-else.js +15 -4
- package/dist/rules/effect-prefer-option-get-or-else.js.map +1 -1
- package/dist/rules/effect-prefer-option-nullish-getters.d.ts.map +1 -1
- package/dist/rules/effect-prefer-option-nullish-getters.js +35 -48
- package/dist/rules/effect-prefer-option-nullish-getters.js.map +1 -1
- package/dist/rules/effect-prefer-option-or-else-some.d.ts.map +1 -1
- package/dist/rules/effect-prefer-option-or-else-some.js +15 -4
- package/dist/rules/effect-prefer-option-or-else-some.js.map +1 -1
- package/dist/rules/effect-prefer-ref-get-and-update.d.ts.map +1 -1
- package/dist/rules/effect-prefer-ref-get-and-update.js +46 -14
- package/dist/rules/effect-prefer-ref-get-and-update.js.map +1 -1
- package/dist/rules/effect-prefer-succeed-for-stable-values.d.ts.map +1 -1
- package/dist/rules/effect-prefer-succeed-for-stable-values.js +19 -42
- package/dist/rules/effect-prefer-succeed-for-stable-values.js.map +1 -1
- package/dist/rules/effect-prefer-succeed-none.d.ts.map +1 -1
- package/dist/rules/effect-prefer-succeed-none.js +12 -6
- package/dist/rules/effect-prefer-succeed-none.js.map +1 -1
- package/dist/rules/effect-prefer-succeed-some.d.ts.map +1 -1
- package/dist/rules/effect-prefer-succeed-some.js +21 -9
- package/dist/rules/effect-prefer-succeed-some.js.map +1 -1
- package/dist/rules/effect-prefer-tap-over-flatmap-as.d.ts.map +1 -1
- package/dist/rules/effect-prefer-tap-over-flatmap-as.js +9 -3
- package/dist/rules/effect-prefer-tap-over-flatmap-as.js.map +1 -1
- package/dist/rules/effect-prefer-yieldable-error-over-fail-ast.d.ts +39 -0
- package/dist/rules/effect-prefer-yieldable-error-over-fail-ast.d.ts.map +1 -0
- package/dist/rules/effect-prefer-yieldable-error-over-fail-ast.js +135 -0
- package/dist/rules/effect-prefer-yieldable-error-over-fail-ast.js.map +1 -0
- package/dist/rules/effect-prefer-yieldable-error-over-fail.d.ts.map +1 -1
- package/dist/rules/effect-prefer-yieldable-error-over-fail.js +94 -132
- package/dist/rules/effect-prefer-yieldable-error-over-fail.js.map +1 -1
- package/dist/rules/effect-promise-callable-scopes.d.ts +10 -1
- package/dist/rules/effect-promise-callable-scopes.d.ts.map +1 -1
- package/dist/rules/effect-promise-callable-scopes.js +186 -2
- package/dist/rules/effect-promise-callable-scopes.js.map +1 -1
- package/dist/rules/effect-promise-callables.d.ts +1 -1
- package/dist/rules/effect-promise-callables.d.ts.map +1 -1
- package/dist/rules/effect-promise-callables.js +1 -1
- package/dist/rules/effect-promise-callables.js.map +1 -1
- package/dist/rules/effect-promise-environment-values.d.ts.map +1 -1
- package/dist/rules/effect-promise-environment-values.js +2 -8
- package/dist/rules/effect-promise-environment-values.js.map +1 -1
- package/dist/rules/effect-promise-execution-flow.d.ts.map +1 -1
- package/dist/rules/effect-promise-execution-flow.js +7 -3
- package/dist/rules/effect-promise-execution-flow.js.map +1 -1
- package/dist/rules/effect-promise-execution-values.d.ts.map +1 -1
- package/dist/rules/effect-promise-execution-values.js +2 -8
- package/dist/rules/effect-promise-execution-values.js.map +1 -1
- package/dist/rules/effect-promise-program-traversal.d.ts.map +1 -1
- package/dist/rules/effect-promise-program-traversal.js +38 -25
- package/dist/rules/effect-promise-program-traversal.js.map +1 -1
- package/dist/rules/effect-promise-runtime-expressions.d.ts.map +1 -1
- package/dist/rules/effect-promise-runtime-expressions.js +58 -12
- package/dist/rules/effect-promise-runtime-expressions.js.map +1 -1
- package/dist/rules/effect-promise-runtime-interpreter.d.ts.map +1 -1
- package/dist/rules/effect-promise-runtime-interpreter.js +3 -2
- package/dist/rules/effect-promise-runtime-interpreter.js.map +1 -1
- package/dist/rules/effect-promise-runtime-model.d.ts +7 -0
- package/dist/rules/effect-promise-runtime-model.d.ts.map +1 -1
- package/dist/rules/effect-promise-runtime-model.js +15 -0
- package/dist/rules/effect-promise-runtime-model.js.map +1 -1
- package/dist/rules/effect-promise-runtime-statement-sequence.d.ts +11 -0
- package/dist/rules/effect-promise-runtime-statement-sequence.d.ts.map +1 -0
- package/dist/rules/effect-promise-runtime-statement-sequence.js +155 -0
- package/dist/rules/effect-promise-runtime-statement-sequence.js.map +1 -0
- package/dist/rules/effect-promise-runtime-statements.d.ts.map +1 -1
- package/dist/rules/effect-promise-runtime-statements.js +114 -31
- package/dist/rules/effect-promise-runtime-statements.js.map +1 -1
- package/dist/rules/effect-promise-runtime-structures.d.ts.map +1 -1
- package/dist/rules/effect-promise-runtime-structures.js +92 -7
- package/dist/rules/effect-promise-runtime-structures.js.map +1 -1
- package/dist/rules/effect-promise-runtime-values.d.ts.map +1 -1
- package/dist/rules/effect-promise-runtime-values.js +19 -3
- package/dist/rules/effect-promise-runtime-values.js.map +1 -1
- package/dist/rules/effect-recursion-execution.d.ts.map +1 -1
- package/dist/rules/effect-recursion-execution.js +79 -25
- package/dist/rules/effect-recursion-execution.js.map +1 -1
- package/dist/rules/effect-recursion-local-bindings.d.ts.map +1 -1
- package/dist/rules/effect-recursion-local-bindings.js +19 -11
- package/dist/rules/effect-recursion-local-bindings.js.map +1 -1
- package/dist/rules/effect-recursion-source-copy.d.ts +7 -0
- package/dist/rules/effect-recursion-source-copy.d.ts.map +1 -0
- package/dist/rules/effect-recursion-source-copy.js +15 -0
- package/dist/rules/effect-recursion-source-copy.js.map +1 -0
- package/dist/rules/effect-recursion-source-deferred.d.ts +24 -0
- package/dist/rules/effect-recursion-source-deferred.d.ts.map +1 -0
- package/dist/rules/effect-recursion-source-deferred.js +155 -0
- package/dist/rules/effect-recursion-source-deferred.js.map +1 -0
- package/dist/rules/effect-recursion-source.d.ts.map +1 -1
- package/dist/rules/effect-recursion-source.js +372 -97
- package/dist/rules/effect-recursion-source.js.map +1 -1
- package/dist/rules/effect-rule-aliases.d.ts.map +1 -1
- package/dist/rules/effect-rule-aliases.js +57 -30
- package/dist/rules/effect-rule-aliases.js.map +1 -1
- package/dist/rules/effect-rule-core.d.ts.map +1 -1
- package/dist/rules/effect-rule-core.js +116 -59
- package/dist/rules/effect-rule-core.js.map +1 -1
- package/dist/rules/effect-source-cache-weights.d.ts +98 -0
- package/dist/rules/effect-source-cache-weights.d.ts.map +1 -0
- package/dist/rules/effect-source-cache-weights.js +130 -0
- package/dist/rules/effect-source-cache-weights.js.map +1 -0
- package/dist/rules/effect-source-comments.d.ts +5 -1
- package/dist/rules/effect-source-comments.d.ts.map +1 -1
- package/dist/rules/effect-source-comments.js +44 -160
- package/dist/rules/effect-source-comments.js.map +1 -1
- package/dist/rules/effect-source-jsx-lexer-base.d.ts +46 -0
- package/dist/rules/effect-source-jsx-lexer-base.d.ts.map +1 -0
- package/dist/rules/effect-source-jsx-lexer-base.js +266 -0
- package/dist/rules/effect-source-jsx-lexer-base.js.map +1 -0
- package/dist/rules/effect-source-jsx-lexical.d.ts +320 -0
- package/dist/rules/effect-source-jsx-lexical.d.ts.map +1 -0
- package/dist/rules/effect-source-jsx-lexical.js +609 -0
- package/dist/rules/effect-source-jsx-lexical.js.map +1 -0
- package/dist/rules/effect-source-jsx-scanner.d.ts +13 -0
- package/dist/rules/effect-source-jsx-scanner.d.ts.map +1 -0
- package/dist/rules/effect-source-jsx-scanner.js +302 -0
- package/dist/rules/effect-source-jsx-scanner.js.map +1 -0
- package/dist/rules/effect-source-line-terminators.d.ts +30 -0
- package/dist/rules/effect-source-line-terminators.d.ts.map +1 -0
- package/dist/rules/effect-source-line-terminators.js +58 -0
- package/dist/rules/effect-source-line-terminators.js.map +1 -0
- package/dist/rules/effect-source-navigation-index.d.ts +21 -0
- package/dist/rules/effect-source-navigation-index.d.ts.map +1 -0
- package/dist/rules/effect-source-navigation-index.js +264 -0
- package/dist/rules/effect-source-navigation-index.js.map +1 -0
- package/dist/rules/effect-source-navigation-lexer.d.ts.map +1 -1
- package/dist/rules/effect-source-navigation-lexer.js +100 -33
- package/dist/rules/effect-source-navigation-lexer.js.map +1 -1
- package/dist/rules/effect-source-navigation.d.ts.map +1 -1
- package/dist/rules/effect-source-navigation.js +52 -109
- package/dist/rules/effect-source-navigation.js.map +1 -1
- package/dist/rules/effect-source-regex-lexer-context.d.ts +86 -0
- package/dist/rules/effect-source-regex-lexer-context.d.ts.map +1 -0
- package/dist/rules/effect-source-regex-lexer-context.js +471 -0
- package/dist/rules/effect-source-regex-lexer-context.js.map +1 -0
- package/dist/rules/effect-source-regex-lexer-state.d.ts +15 -0
- package/dist/rules/effect-source-regex-lexer-state.d.ts.map +1 -0
- package/dist/rules/effect-source-regex-lexer-state.js +260 -0
- package/dist/rules/effect-source-regex-lexer-state.js.map +1 -0
- package/dist/rules/effect-source-regex-lexer.d.ts +61 -0
- package/dist/rules/effect-source-regex-lexer.d.ts.map +1 -0
- package/dist/rules/effect-source-regex-lexer.js +366 -0
- package/dist/rules/effect-source-regex-lexer.js.map +1 -0
- package/dist/rules/effect-source-regex-literal.d.ts +11 -0
- package/dist/rules/effect-source-regex-literal.d.ts.map +1 -0
- package/dist/rules/effect-source-regex-literal.js +101 -0
- package/dist/rules/effect-source-regex-literal.js.map +1 -0
- package/dist/rules/effect-source-regex-scan.d.ts +12 -4
- package/dist/rules/effect-source-regex-scan.d.ts.map +1 -1
- package/dist/rules/effect-source-regex-scan.js +48 -109
- package/dist/rules/effect-source-regex-scan.js.map +1 -1
- package/dist/rules/effect-source-scan.d.ts +15 -3
- package/dist/rules/effect-source-scan.d.ts.map +1 -1
- package/dist/rules/effect-source-scan.js +57 -269
- package/dist/rules/effect-source-scan.js.map +1 -1
- package/dist/rules/effect-strict-core-specs.d.ts.map +1 -1
- package/dist/rules/effect-strict-core-specs.js +3 -1
- package/dist/rules/effect-strict-core-specs.js.map +1 -1
- package/dist/rules/effect-strict-external-helpers.d.ts.map +1 -1
- package/dist/rules/effect-strict-external-helpers.js +2 -1
- package/dist/rules/effect-strict-external-helpers.js.map +1 -1
- package/dist/rules/effect-strict-segment-helpers.d.ts.map +1 -1
- package/dist/rules/effect-strict-segment-helpers.js +62 -30
- package/dist/rules/effect-strict-segment-helpers.js.map +1 -1
- package/dist/rules/effect-strict-server-handler-ast.d.ts +11 -0
- package/dist/rules/effect-strict-server-handler-ast.d.ts.map +1 -0
- package/dist/rules/effect-strict-server-handler-ast.js +226 -0
- package/dist/rules/effect-strict-server-handler-ast.js.map +1 -0
- package/dist/rules/effect-strict-server-handler-imports.d.ts +11 -0
- package/dist/rules/effect-strict-server-handler-imports.d.ts.map +1 -0
- package/dist/rules/effect-strict-server-handler-imports.js +122 -0
- package/dist/rules/effect-strict-server-handler-imports.js.map +1 -0
- package/dist/rules/effect-strict-server-handler-index.d.ts +71 -0
- package/dist/rules/effect-strict-server-handler-index.d.ts.map +1 -0
- package/dist/rules/effect-strict-server-handler-index.js +245 -0
- package/dist/rules/effect-strict-server-handler-index.js.map +1 -0
- package/dist/rules/effect-strict-server-handler-shadow.d.ts +43 -0
- package/dist/rules/effect-strict-server-handler-shadow.d.ts.map +1 -0
- package/dist/rules/effect-strict-server-handler-shadow.js +270 -0
- package/dist/rules/effect-strict-server-handler-shadow.js.map +1 -0
- package/dist/rules/effect-strict-server-handler-source.d.ts +10 -0
- package/dist/rules/effect-strict-server-handler-source.d.ts.map +1 -0
- package/dist/rules/effect-strict-server-handler-source.js +216 -0
- package/dist/rules/effect-strict-server-handler-source.js.map +1 -0
- package/dist/rules/effect-strict-server-handler-types.d.ts +31 -0
- package/dist/rules/effect-strict-server-handler-types.d.ts.map +1 -0
- package/dist/rules/effect-strict-server-handler-types.js +5 -0
- package/dist/rules/effect-strict-server-handler-types.js.map +1 -0
- package/dist/rules/effect-strict-source-predicates.d.ts.map +1 -1
- package/dist/rules/effect-strict-source-predicates.js +3 -20
- package/dist/rules/effect-strict-source-predicates.js.map +1 -1
- package/dist/rules/effect-strict-wrapper-index.d.ts +16 -0
- package/dist/rules/effect-strict-wrapper-index.d.ts.map +1 -0
- package/dist/rules/effect-strict-wrapper-index.js +160 -0
- package/dist/rules/effect-strict-wrapper-index.js.map +1 -0
- package/dist/rules/effect-sync-promise-scope-index.d.ts.map +1 -1
- package/dist/rules/effect-sync-promise-scope-index.js +105 -41
- package/dist/rules/effect-sync-promise-scope-index.js.map +1 -1
- package/dist/rules/effect-yieldable-schema-superclass.d.ts.map +1 -1
- package/dist/rules/effect-yieldable-schema-superclass.js +15 -4
- package/dist/rules/effect-yieldable-schema-superclass.js.map +1 -1
- package/dist/rules/max-import-depth.d.ts.map +1 -1
- package/dist/rules/max-import-depth.js +13 -11
- package/dist/rules/max-import-depth.js.map +1 -1
- package/dist/rules/max-line-length.d.ts.map +1 -1
- package/dist/rules/max-line-length.js +26 -18
- package/dist/rules/max-line-length.js.map +1 -1
- package/dist/rules/no-commented-out-code.d.ts.map +1 -1
- package/dist/rules/no-commented-out-code.js +135 -53
- package/dist/rules/no-commented-out-code.js.map +1 -1
- package/dist/rules/pascal-case-types.d.ts.map +1 -1
- package/dist/rules/pascal-case-types.js +58 -16
- package/dist/rules/pascal-case-types.js.map +1 -1
- package/dist/rules/plugin-commented-out-code-source-scanner.d.ts.map +1 -1
- package/dist/rules/plugin-commented-out-code-source-scanner.js +110 -39
- package/dist/rules/plugin-commented-out-code-source-scanner.js.map +1 -1
- package/dist/rules/require-file-doc.d.ts.map +1 -1
- package/dist/rules/require-file-doc.js +41 -24
- package/dist/rules/require-file-doc.js.map +1 -1
- package/dist/rules/require-function-doc-ignored-text.d.ts +17 -1
- package/dist/rules/require-function-doc-ignored-text.d.ts.map +1 -1
- package/dist/rules/require-function-doc-ignored-text.js +124 -43
- package/dist/rules/require-function-doc-ignored-text.js.map +1 -1
- package/dist/rules/require-function-doc.d.ts.map +1 -1
- package/dist/rules/require-function-doc.js +218 -167
- package/dist/rules/require-function-doc.js.map +1 -1
- package/dist/rules/source-cache.d.ts +16 -0
- package/dist/rules/source-cache.d.ts.map +1 -1
- package/dist/rules/source-cache.js +65 -11
- package/dist/rules/source-cache.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,609 @@
|
|
|
1
|
+
/* -------------------------------------------------------------------------- */
|
|
2
|
+
/* Character, context, and token primitives for JSX scanning. */
|
|
3
|
+
/* -------------------------------------------------------------------------- */
|
|
4
|
+
import { CHAR_CLASS, CLS_LOWER, CLS_UPPER } from './char-class.js';
|
|
5
|
+
import { findLineTerminatorIndex, indexAfterLineTerminator, isLineTerminatorCode, } from './effect-source-line-terminators.js';
|
|
6
|
+
/**
|
|
7
|
+
* UTF-16 code unit for a JavaScript backslash.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export const CHAR_CODE_BACKSLASH = 92;
|
|
12
|
+
/**
|
|
13
|
+
* UTF-16 code unit for an asterisk.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export const CHAR_CODE_BLOCK_COMMENT = 42;
|
|
18
|
+
/**
|
|
19
|
+
* UTF-16 code unit for a closing brace.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export const CHAR_CODE_BRACE_CLOSE = 125;
|
|
24
|
+
/**
|
|
25
|
+
* UTF-16 code unit for an opening brace.
|
|
26
|
+
*
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export const CHAR_CODE_BRACE_OPEN = 123;
|
|
30
|
+
/**
|
|
31
|
+
* UTF-16 code unit for a comma.
|
|
32
|
+
*
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export const CHAR_CODE_COMMA = 44;
|
|
36
|
+
/**
|
|
37
|
+
* UTF-16 code unit for a dollar sign.
|
|
38
|
+
*
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export const CHAR_CODE_DOLLAR = 36;
|
|
42
|
+
/**
|
|
43
|
+
* UTF-16 code unit for a double quote.
|
|
44
|
+
*
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export const CHAR_CODE_DOUBLE_QUOTE = 34;
|
|
48
|
+
/**
|
|
49
|
+
* UTF-16 code unit for an equals sign.
|
|
50
|
+
*
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
export const CHAR_CODE_EQUALS = 61;
|
|
54
|
+
/**
|
|
55
|
+
* UTF-16 code unit for a greater-than sign.
|
|
56
|
+
*
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
export const CHAR_CODE_GREATER_THAN = 62;
|
|
60
|
+
/**
|
|
61
|
+
* UTF-16 code unit for a less-than sign.
|
|
62
|
+
*
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
export const CHAR_CODE_LESS_THAN = 60;
|
|
66
|
+
/**
|
|
67
|
+
* UTF-16 code unit for a slash.
|
|
68
|
+
*
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
export const CHAR_CODE_LINE_COMMENT = 47;
|
|
72
|
+
/**
|
|
73
|
+
* UTF-16 code unit for a single quote.
|
|
74
|
+
*
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
export const CHAR_CODE_SINGLE_QUOTE = 39;
|
|
78
|
+
/**
|
|
79
|
+
* UTF-16 code unit for a slash.
|
|
80
|
+
*
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
export const CHAR_CODE_SLASH = 47;
|
|
84
|
+
/**
|
|
85
|
+
* UTF-16 code unit for a template quote.
|
|
86
|
+
*
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
export const CHAR_CODE_TEMPLATE_QUOTE = 96;
|
|
90
|
+
/**
|
|
91
|
+
* UTF-16 code unit for a closing bracket.
|
|
92
|
+
*
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
95
|
+
export const CHAR_CODE_CLOSE_BRACKET = 93;
|
|
96
|
+
/**
|
|
97
|
+
* UTF-16 code unit for a closing parenthesis.
|
|
98
|
+
*
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
export const CHAR_CODE_CLOSE_PAREN = 41;
|
|
102
|
+
/**
|
|
103
|
+
* UTF-16 code unit for an exclamation mark.
|
|
104
|
+
*
|
|
105
|
+
* @internal
|
|
106
|
+
*/
|
|
107
|
+
export const CHAR_CODE_EXCLAMATION = 33;
|
|
108
|
+
/**
|
|
109
|
+
* UTF-16 code unit for a hash sign.
|
|
110
|
+
*
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
export const CHAR_CODE_HASH = 35;
|
|
114
|
+
/**
|
|
115
|
+
* UTF-16 code unit for an opening parenthesis.
|
|
116
|
+
*
|
|
117
|
+
* @internal
|
|
118
|
+
*/
|
|
119
|
+
export const CHAR_CODE_OPEN_PAREN = 40;
|
|
120
|
+
/**
|
|
121
|
+
* Closing punctuation that follows a JavaScript value.
|
|
122
|
+
*
|
|
123
|
+
* @internal
|
|
124
|
+
*/
|
|
125
|
+
export const CLOSING_CODES = new Set([CHAR_CODE_CLOSE_BRACKET, CHAR_CODE_CLOSE_PAREN]);
|
|
126
|
+
/**
|
|
127
|
+
* Two-character operators recognized by the source projection.
|
|
128
|
+
*
|
|
129
|
+
* @internal
|
|
130
|
+
*/
|
|
131
|
+
export const PAIR_OPERATORS = new Set([
|
|
132
|
+
'!=',
|
|
133
|
+
'&&',
|
|
134
|
+
'+=',
|
|
135
|
+
'-=',
|
|
136
|
+
'++',
|
|
137
|
+
'*=',
|
|
138
|
+
'**',
|
|
139
|
+
'/=',
|
|
140
|
+
'<<',
|
|
141
|
+
'>>',
|
|
142
|
+
'>=',
|
|
143
|
+
'<=',
|
|
144
|
+
'==',
|
|
145
|
+
'=>',
|
|
146
|
+
'||',
|
|
147
|
+
'??',
|
|
148
|
+
'--',
|
|
149
|
+
]);
|
|
150
|
+
const LETTER_MASK = CLS_LOWER | CLS_UPPER;
|
|
151
|
+
const DIGIT_MASK = 4;
|
|
152
|
+
const CHAR_CODE_COLON = 58;
|
|
153
|
+
const CHAR_CODE_DOT = 46;
|
|
154
|
+
const CHAR_CODE_HYPHEN = 45;
|
|
155
|
+
const CHAR_CODE_SPACE = 32;
|
|
156
|
+
const CHAR_CODE_TAB = 9;
|
|
157
|
+
const CHAR_CODE_VERTICAL_TAB = 11;
|
|
158
|
+
const CHAR_CODE_FORM_FEED = 12;
|
|
159
|
+
const CHAR_CODE_UNDERSCORE = 95;
|
|
160
|
+
const CHAR_CODE_UNICODE = 128;
|
|
161
|
+
const JSX_NAME_START_PUNCTUATION = new Set([CHAR_CODE_HYPHEN, CHAR_CODE_DOT, CHAR_CODE_COLON]);
|
|
162
|
+
const JSX_PREFIX_OPERATORS = new Set([
|
|
163
|
+
'!',
|
|
164
|
+
'&&',
|
|
165
|
+
'??',
|
|
166
|
+
'||',
|
|
167
|
+
'(',
|
|
168
|
+
'[',
|
|
169
|
+
'{',
|
|
170
|
+
',',
|
|
171
|
+
':',
|
|
172
|
+
';',
|
|
173
|
+
'=',
|
|
174
|
+
'=>',
|
|
175
|
+
'?',
|
|
176
|
+
'return',
|
|
177
|
+
]);
|
|
178
|
+
const JSX_PREFIX_WORDS = new Set(['case', 'default', 'else', 'return', 'throw', 'yield']);
|
|
179
|
+
const REGEX_PREFIX_WORDS = new Set([
|
|
180
|
+
'case',
|
|
181
|
+
'delete',
|
|
182
|
+
'else',
|
|
183
|
+
'in',
|
|
184
|
+
'instanceof',
|
|
185
|
+
'new',
|
|
186
|
+
'of',
|
|
187
|
+
'return',
|
|
188
|
+
'throw',
|
|
189
|
+
'typeof',
|
|
190
|
+
'void',
|
|
191
|
+
'yield',
|
|
192
|
+
]);
|
|
193
|
+
const REGEX_AFTER_WORDS = new Set([
|
|
194
|
+
...REGEX_PREFIX_WORDS,
|
|
195
|
+
'await',
|
|
196
|
+
'break',
|
|
197
|
+
'continue',
|
|
198
|
+
'debugger',
|
|
199
|
+
'default',
|
|
200
|
+
'do',
|
|
201
|
+
'export',
|
|
202
|
+
'extends',
|
|
203
|
+
'implements',
|
|
204
|
+
]);
|
|
205
|
+
const REGEX_PREFIX_OPERATORS = new Set([
|
|
206
|
+
'!',
|
|
207
|
+
'&&',
|
|
208
|
+
'&&=',
|
|
209
|
+
'&',
|
|
210
|
+
'&=',
|
|
211
|
+
'(',
|
|
212
|
+
'[',
|
|
213
|
+
'{',
|
|
214
|
+
',',
|
|
215
|
+
':',
|
|
216
|
+
';',
|
|
217
|
+
'=',
|
|
218
|
+
'==',
|
|
219
|
+
'=>',
|
|
220
|
+
'>=',
|
|
221
|
+
'>',
|
|
222
|
+
'??',
|
|
223
|
+
'??=',
|
|
224
|
+
'?',
|
|
225
|
+
'|',
|
|
226
|
+
'|=',
|
|
227
|
+
'||',
|
|
228
|
+
'||=',
|
|
229
|
+
'^',
|
|
230
|
+
'^=',
|
|
231
|
+
'+',
|
|
232
|
+
'+=',
|
|
233
|
+
'-',
|
|
234
|
+
'-=',
|
|
235
|
+
'*',
|
|
236
|
+
'*=',
|
|
237
|
+
'**',
|
|
238
|
+
'/',
|
|
239
|
+
'/=',
|
|
240
|
+
'%',
|
|
241
|
+
'%=',
|
|
242
|
+
'!=',
|
|
243
|
+
'<<',
|
|
244
|
+
'<<=',
|
|
245
|
+
'<=',
|
|
246
|
+
'<',
|
|
247
|
+
'>>',
|
|
248
|
+
'>>=',
|
|
249
|
+
]);
|
|
250
|
+
const KEYWORDS = new Set([
|
|
251
|
+
...REGEX_PREFIX_WORDS,
|
|
252
|
+
'await',
|
|
253
|
+
'break',
|
|
254
|
+
'continue',
|
|
255
|
+
'default',
|
|
256
|
+
'do',
|
|
257
|
+
'extends',
|
|
258
|
+
'finally',
|
|
259
|
+
'for',
|
|
260
|
+
'function',
|
|
261
|
+
'if',
|
|
262
|
+
'import',
|
|
263
|
+
'interface',
|
|
264
|
+
'let',
|
|
265
|
+
'switch',
|
|
266
|
+
'try',
|
|
267
|
+
'type',
|
|
268
|
+
'var',
|
|
269
|
+
'while',
|
|
270
|
+
'with',
|
|
271
|
+
]);
|
|
272
|
+
const controlFlowHeader = (word) => {
|
|
273
|
+
switch (word) {
|
|
274
|
+
case 'for': {
|
|
275
|
+
return 'for';
|
|
276
|
+
}
|
|
277
|
+
case 'if': {
|
|
278
|
+
return 'if';
|
|
279
|
+
}
|
|
280
|
+
case 'while': {
|
|
281
|
+
return 'while';
|
|
282
|
+
}
|
|
283
|
+
case 'with': {
|
|
284
|
+
return 'with';
|
|
285
|
+
}
|
|
286
|
+
default: {
|
|
287
|
+
return undefined;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
/**
|
|
292
|
+
* Return whether a UTF-16 code unit can start a JavaScript identifier.
|
|
293
|
+
*
|
|
294
|
+
* @internal
|
|
295
|
+
*/
|
|
296
|
+
export const isIdentifierStart = (charCode) => charCode === CHAR_CODE_DOLLAR ||
|
|
297
|
+
charCode === CHAR_CODE_UNDERSCORE ||
|
|
298
|
+
(charCode < CHAR_CLASS.length && (CHAR_CLASS[charCode] & LETTER_MASK) !== 0) ||
|
|
299
|
+
charCode >= CHAR_CODE_UNICODE;
|
|
300
|
+
/**
|
|
301
|
+
* Return whether a UTF-16 code unit can continue a JavaScript identifier.
|
|
302
|
+
*
|
|
303
|
+
* @internal
|
|
304
|
+
*/
|
|
305
|
+
export const isIdentifierPart = (charCode) => isIdentifierStart(charCode) ||
|
|
306
|
+
(charCode < CHAR_CLASS.length && (CHAR_CLASS[charCode] & DIGIT_MASK) !== 0);
|
|
307
|
+
/**
|
|
308
|
+
* Return whether a UTF-16 code unit can continue a JSX name.
|
|
309
|
+
*
|
|
310
|
+
* @internal
|
|
311
|
+
*/
|
|
312
|
+
export const isJSXNamePart = (charCode) => isIdentifierPart(charCode) || JSX_NAME_START_PUNCTUATION.has(charCode);
|
|
313
|
+
/**
|
|
314
|
+
* Return whether a UTF-16 code unit is JavaScript or JSX whitespace.
|
|
315
|
+
*
|
|
316
|
+
* @internal
|
|
317
|
+
*/
|
|
318
|
+
export const isWhitespace = (charCode) => charCode === CHAR_CODE_TAB ||
|
|
319
|
+
charCode === CHAR_CODE_VERTICAL_TAB ||
|
|
320
|
+
charCode === CHAR_CODE_FORM_FEED ||
|
|
321
|
+
charCode === CHAR_CODE_SPACE ||
|
|
322
|
+
isLineTerminatorCode(charCode);
|
|
323
|
+
/**
|
|
324
|
+
* Find the first unescaped closing quote, or the source length.
|
|
325
|
+
*
|
|
326
|
+
* @internal
|
|
327
|
+
*/
|
|
328
|
+
export const quotedEnd = (source, startIndex, quoteCode) => {
|
|
329
|
+
let index = startIndex + 1;
|
|
330
|
+
while (index < source.length) {
|
|
331
|
+
const charCode = source.charCodeAt(index);
|
|
332
|
+
if (charCode === CHAR_CODE_BACKSLASH) {
|
|
333
|
+
index += 2;
|
|
334
|
+
}
|
|
335
|
+
else if (charCode === quoteCode) {
|
|
336
|
+
return index + 1;
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
index += 1;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return source.length;
|
|
343
|
+
};
|
|
344
|
+
/**
|
|
345
|
+
* Return the exclusive end of quoted content for a quote scan result.
|
|
346
|
+
*
|
|
347
|
+
* @internal
|
|
348
|
+
*/
|
|
349
|
+
export const quotedContentEnd = (source, endIndex) => {
|
|
350
|
+
if (endIndex < source.length) {
|
|
351
|
+
return endIndex - 1;
|
|
352
|
+
}
|
|
353
|
+
return endIndex;
|
|
354
|
+
};
|
|
355
|
+
const isJSXNameStart = (charCode) => charCode === CHAR_CODE_GREATER_THAN ||
|
|
356
|
+
(isJSXNamePart(charCode) && !JSX_NAME_START_PUNCTUATION.has(charCode));
|
|
357
|
+
/**
|
|
358
|
+
* Return whether the less-than at an index begins a JSX opening tag.
|
|
359
|
+
*
|
|
360
|
+
* @internal
|
|
361
|
+
*/
|
|
362
|
+
export const isJSXTagStart = (source, index) => {
|
|
363
|
+
const nextCode = source.charCodeAt(index + 1);
|
|
364
|
+
return nextCode === CHAR_CODE_GREATER_THAN || isJSXNameStart(nextCode);
|
|
365
|
+
};
|
|
366
|
+
/**
|
|
367
|
+
* Return whether the less-than at an index begins a JSX closing tag.
|
|
368
|
+
*
|
|
369
|
+
* @internal
|
|
370
|
+
*/
|
|
371
|
+
export const isJSXClosingTagStart = (source, index) => {
|
|
372
|
+
const nextCode = source.charCodeAt(index + 1);
|
|
373
|
+
const nameCode = source.charCodeAt(index + 2);
|
|
374
|
+
return (nextCode === CHAR_CODE_SLASH &&
|
|
375
|
+
(nameCode === CHAR_CODE_GREATER_THAN || isJSXNameStart(nameCode)));
|
|
376
|
+
};
|
|
377
|
+
/**
|
|
378
|
+
* Return whether a word occurs at an identifier boundary.
|
|
379
|
+
*
|
|
380
|
+
* @internal
|
|
381
|
+
*/
|
|
382
|
+
export const startsWithWord = (source, index, word) => {
|
|
383
|
+
if (!source.startsWith(word, index)) {
|
|
384
|
+
return false;
|
|
385
|
+
}
|
|
386
|
+
const beforeCode = source.charCodeAt(index - 1);
|
|
387
|
+
const afterCode = source.charCodeAt(index + word.length);
|
|
388
|
+
return !isIdentifierPart(beforeCode) && !isIdentifierPart(afterCode);
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* Find the exclusive end of an identifier beginning at an index.
|
|
392
|
+
*
|
|
393
|
+
* @internal
|
|
394
|
+
*/
|
|
395
|
+
export const wordEnd = (source, startIndex) => {
|
|
396
|
+
let index = startIndex + 1;
|
|
397
|
+
while (index < source.length && isIdentifierPart(source.charCodeAt(index))) {
|
|
398
|
+
index += 1;
|
|
399
|
+
}
|
|
400
|
+
return index;
|
|
401
|
+
};
|
|
402
|
+
/**
|
|
403
|
+
* Return whether the current JavaScript token position can begin JSX.
|
|
404
|
+
*
|
|
405
|
+
* @internal
|
|
406
|
+
*/
|
|
407
|
+
export const canStartJSX = (context) => {
|
|
408
|
+
if (context.isControlFlowBody) {
|
|
409
|
+
return true;
|
|
410
|
+
}
|
|
411
|
+
if (context.lastToken === 'start') {
|
|
412
|
+
return true;
|
|
413
|
+
}
|
|
414
|
+
if (context.lastToken === 'keyword') {
|
|
415
|
+
return JSX_PREFIX_WORDS.has(context.lastWord);
|
|
416
|
+
}
|
|
417
|
+
if (context.lastToken !== 'operator') {
|
|
418
|
+
return false;
|
|
419
|
+
}
|
|
420
|
+
return JSX_PREFIX_OPERATORS.has(context.lastOperator);
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* Return whether the current JavaScript token position can begin a regex.
|
|
424
|
+
*
|
|
425
|
+
* @internal
|
|
426
|
+
*/
|
|
427
|
+
export const canStartREGEX = (context) => {
|
|
428
|
+
if (context.isControlFlowBody || context.lastToken === 'start') {
|
|
429
|
+
return true;
|
|
430
|
+
}
|
|
431
|
+
if (context.lastToken === 'keyword') {
|
|
432
|
+
return REGEX_AFTER_WORDS.has(context.lastWord);
|
|
433
|
+
}
|
|
434
|
+
return context.lastToken === 'operator' && REGEX_PREFIX_OPERATORS.has(context.lastOperator);
|
|
435
|
+
};
|
|
436
|
+
const isKeyword = (word) => KEYWORDS.has(word);
|
|
437
|
+
/**
|
|
438
|
+
* Create a fresh JavaScript context for a nested expression.
|
|
439
|
+
*
|
|
440
|
+
* @internal
|
|
441
|
+
*/
|
|
442
|
+
export const createJavaScriptContext = (returnMode) => ({
|
|
443
|
+
braceDepth: 0,
|
|
444
|
+
controlFlowHeader: undefined,
|
|
445
|
+
controlFlowParenDepth: 0,
|
|
446
|
+
isControlFlowBody: false,
|
|
447
|
+
lastOperator: '',
|
|
448
|
+
lastToken: 'start',
|
|
449
|
+
lastWord: '',
|
|
450
|
+
parenDepth: 0,
|
|
451
|
+
returnMode,
|
|
452
|
+
});
|
|
453
|
+
const isStatementPosition = (context) => context.isControlFlowBody ||
|
|
454
|
+
context.lastToken === 'start' ||
|
|
455
|
+
(context.lastToken === 'operator' &&
|
|
456
|
+
(context.lastOperator === ';' ||
|
|
457
|
+
context.lastOperator === ':' ||
|
|
458
|
+
context.lastOperator === '{')) ||
|
|
459
|
+
(context.lastToken === 'keyword' && context.lastWord === 'else');
|
|
460
|
+
const controlFlowState = (context) => {
|
|
461
|
+
if (context.controlFlowParenDepth > 0) {
|
|
462
|
+
return {
|
|
463
|
+
controlFlowHeader: context.controlFlowHeader,
|
|
464
|
+
controlFlowParenDepth: context.controlFlowParenDepth,
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
return { controlFlowHeader: undefined, controlFlowParenDepth: 0 };
|
|
468
|
+
};
|
|
469
|
+
/**
|
|
470
|
+
* Return a context whose latest token is an operator.
|
|
471
|
+
*
|
|
472
|
+
* @internal
|
|
473
|
+
*/
|
|
474
|
+
export const setOperator = (context, operator) => {
|
|
475
|
+
const nextControlFlowState = controlFlowState(context);
|
|
476
|
+
return {
|
|
477
|
+
...context,
|
|
478
|
+
...nextControlFlowState,
|
|
479
|
+
isControlFlowBody: false,
|
|
480
|
+
lastOperator: operator,
|
|
481
|
+
lastToken: 'operator',
|
|
482
|
+
lastWord: '',
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
/**
|
|
486
|
+
* Return a context whose latest token is a value.
|
|
487
|
+
*
|
|
488
|
+
* @internal
|
|
489
|
+
*/
|
|
490
|
+
export const setValue = (context) => {
|
|
491
|
+
const nextControlFlowState = controlFlowState(context);
|
|
492
|
+
return {
|
|
493
|
+
...context,
|
|
494
|
+
...nextControlFlowState,
|
|
495
|
+
isControlFlowBody: false,
|
|
496
|
+
lastOperator: '',
|
|
497
|
+
lastToken: 'value',
|
|
498
|
+
lastWord: '',
|
|
499
|
+
};
|
|
500
|
+
};
|
|
501
|
+
const wordToken = (word) => {
|
|
502
|
+
if (isKeyword(word)) {
|
|
503
|
+
return 'keyword';
|
|
504
|
+
}
|
|
505
|
+
return 'value';
|
|
506
|
+
};
|
|
507
|
+
const nextControlFlowStateForWord = (context, word) => {
|
|
508
|
+
const header = controlFlowHeader(word);
|
|
509
|
+
if (header !== undefined && isStatementPosition(context)) {
|
|
510
|
+
return { controlFlowHeader: header, controlFlowParenDepth: context.controlFlowParenDepth };
|
|
511
|
+
}
|
|
512
|
+
if (context.controlFlowParenDepth > 0 ||
|
|
513
|
+
(context.controlFlowHeader === 'for' && context.controlFlowParenDepth === 0 && word === 'await')) {
|
|
514
|
+
return {
|
|
515
|
+
controlFlowHeader: context.controlFlowHeader,
|
|
516
|
+
controlFlowParenDepth: context.controlFlowParenDepth,
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
return { controlFlowHeader: undefined, controlFlowParenDepth: 0 };
|
|
520
|
+
};
|
|
521
|
+
/**
|
|
522
|
+
* Return a context whose latest token is an identifier or keyword.
|
|
523
|
+
*
|
|
524
|
+
* @internal
|
|
525
|
+
*/
|
|
526
|
+
export const setWord = (context, word) => {
|
|
527
|
+
const nextControlFlowState = nextControlFlowStateForWord(context, word);
|
|
528
|
+
return {
|
|
529
|
+
...context,
|
|
530
|
+
...nextControlFlowState,
|
|
531
|
+
isControlFlowBody: word === 'do' && isStatementPosition(context),
|
|
532
|
+
lastOperator: '',
|
|
533
|
+
lastToken: wordToken(word),
|
|
534
|
+
lastWord: word,
|
|
535
|
+
};
|
|
536
|
+
};
|
|
537
|
+
/**
|
|
538
|
+
* Return a context after an opening JavaScript parenthesis.
|
|
539
|
+
*
|
|
540
|
+
* @internal
|
|
541
|
+
*/
|
|
542
|
+
export const setOpenParenthesis = (context) => {
|
|
543
|
+
const { controlFlowHeader: pendingControlFlowHeader, controlFlowParenDepth: currentControlFlowParenDepth, parenDepth: currentParenDepth, } = context;
|
|
544
|
+
const parenDepth = currentParenDepth + 1;
|
|
545
|
+
let controlFlowParenDepth = currentControlFlowParenDepth;
|
|
546
|
+
if (pendingControlFlowHeader !== undefined && controlFlowParenDepth === 0) {
|
|
547
|
+
controlFlowParenDepth = parenDepth;
|
|
548
|
+
}
|
|
549
|
+
return {
|
|
550
|
+
...context,
|
|
551
|
+
controlFlowParenDepth,
|
|
552
|
+
isControlFlowBody: false,
|
|
553
|
+
lastOperator: '(',
|
|
554
|
+
lastToken: 'operator',
|
|
555
|
+
lastWord: '',
|
|
556
|
+
parenDepth,
|
|
557
|
+
};
|
|
558
|
+
};
|
|
559
|
+
/**
|
|
560
|
+
* Return a context after a closing JavaScript parenthesis.
|
|
561
|
+
*
|
|
562
|
+
* @internal
|
|
563
|
+
*/
|
|
564
|
+
export const setCloseParenthesis = (context) => {
|
|
565
|
+
const { controlFlowHeader: currentControlFlowHeader, controlFlowParenDepth: currentControlFlowParenDepth, parenDepth: currentParenDepth, } = context;
|
|
566
|
+
const isControlFlowConditionClose = currentControlFlowHeader !== undefined &&
|
|
567
|
+
currentControlFlowParenDepth > 0 &&
|
|
568
|
+
currentControlFlowParenDepth === currentParenDepth;
|
|
569
|
+
const nextContext = setValue(context);
|
|
570
|
+
let { controlFlowHeader: nextControlFlowHeader, controlFlowParenDepth: nextControlFlowParenDepth, } = nextContext;
|
|
571
|
+
let isControlFlowBody = false;
|
|
572
|
+
if (isControlFlowConditionClose) {
|
|
573
|
+
nextControlFlowHeader = undefined;
|
|
574
|
+
nextControlFlowParenDepth = 0;
|
|
575
|
+
isControlFlowBody = true;
|
|
576
|
+
}
|
|
577
|
+
return {
|
|
578
|
+
...nextContext,
|
|
579
|
+
controlFlowHeader: nextControlFlowHeader,
|
|
580
|
+
controlFlowParenDepth: nextControlFlowParenDepth,
|
|
581
|
+
isControlFlowBody,
|
|
582
|
+
parenDepth: Math.max(0, currentParenDepth - 1),
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
/**
|
|
586
|
+
* Skip a line comment and emit its source span.
|
|
587
|
+
*
|
|
588
|
+
* @internal
|
|
589
|
+
*/
|
|
590
|
+
export const skipLineComment = (source, startIndex, handlers) => {
|
|
591
|
+
const lineEnd = findLineTerminatorIndex(source, startIndex + 2);
|
|
592
|
+
handlers.onComment(startIndex, lineEnd);
|
|
593
|
+
return indexAfterLineTerminator(source, lineEnd);
|
|
594
|
+
};
|
|
595
|
+
/**
|
|
596
|
+
* Skip a block comment and emit its source span.
|
|
597
|
+
*
|
|
598
|
+
* @internal
|
|
599
|
+
*/
|
|
600
|
+
export const skipBlockComment = (source, startIndex, handlers) => {
|
|
601
|
+
const closeIndex = source.indexOf('*/', startIndex + 2);
|
|
602
|
+
let endIndex = source.length;
|
|
603
|
+
if (closeIndex !== -1) {
|
|
604
|
+
endIndex = closeIndex + 2;
|
|
605
|
+
}
|
|
606
|
+
handlers.onComment(startIndex, endIndex);
|
|
607
|
+
return endIndex;
|
|
608
|
+
};
|
|
609
|
+
//# sourceMappingURL=effect-source-jsx-lexical.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effect-source-jsx-lexical.js","sourceRoot":"","sources":["../../src/rules/effect-source-jsx-lexical.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,kCAAkC,CAAC;AAE1C;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;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AK,CAAC,CAAC,EAAE,CAAC;QACtB,QAAQ,GAAG,UAAU,GAAG,CAAC,CAAC;IAC5B,CAAC;IACD,QAAQ,CAAC,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IACzC,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SourceScanHandlers } from './effect-source-jsx-lexical';
|
|
2
|
+
/**
|
|
3
|
+
* Scan source once from left to right, recognizing JavaScript comments and literals as well as JSX
|
|
4
|
+
* text, tags, attributes, and expression containers.
|
|
5
|
+
*
|
|
6
|
+
* @param source - Complete source text.
|
|
7
|
+
* @param handlers - Projection callbacks for each opaque source region.
|
|
8
|
+
* @returns Nothing.
|
|
9
|
+
* @throws Does not throw.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const scanSource: (source: string, handlers: SourceScanHandlers) => void;
|
|
13
|
+
//# sourceMappingURL=effect-source-jsx-scanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effect-source-jsx-scanner.d.ts","sourceRoot":"","sources":["../../src/rules/effect-source-jsx-scanner.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAIV,kBAAkB,EACnB,MAAM,6BAA6B,CAAC;AAgUrC;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,EAAE,UAAU,kBAAkB,KAAG,IAEzE,CAAC"}
|