@kasoa/vite-plus-config 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -113
- package/dist/{compose-XJvIUwAG.d.mts → compose-DcbEF5Mv.d.mts} +1 -3
- package/dist/compose-DcbEF5Mv.d.mts.map +1 -0
- package/dist/{constants-D3UBePrC.mjs → constants-BYglvKjm.mjs} +2 -3
- package/dist/{constants-D3UBePrC.mjs.map → constants-BYglvKjm.mjs.map} +1 -1
- package/dist/src/cloudflare-workers/index.d.mts +2 -3
- package/dist/src/cloudflare-workers/index.d.mts.map +1 -1
- package/dist/src/cloudflare-workers/index.mjs +2 -3
- package/dist/src/index.d.mts +2 -9
- package/dist/src/index.d.mts.map +1 -1
- package/dist/src/index.mjs +42 -43
- package/dist/src/index.mjs.map +1 -1
- package/dist/src/lint/plugin/index.d.mts +4 -0
- package/dist/src/lint/plugin/index.d.mts.map +1 -0
- package/dist/src/lint/plugin/index.mjs +315 -0
- package/dist/src/lint/plugin/index.mjs.map +1 -0
- package/package.json +10 -6
- package/dist/compose-XJvIUwAG.d.mts.map +0 -1
package/dist/src/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["nodeTestLintConfig","browserTestLintConfig","cloudflareWorkerTestLintConfig","reactNativeTestLintConfig","nodeTestLintSettings","browserTestLintSettings","cloudflareWorkerTestLintSettings","reactNativeTestLintSettings"],"sources":["../../src/compose.ts","../../src/format.ts","../../src/lint/rules/browser.ts","../../src/lint/rules/jest.ts","../../src/lint/rules/node.ts","../../src/lint/rules/react-core.ts","../../src/lint/rules/react-dom.ts","../../src/lint/rules/universal.ts","../../src/lint/rules/react-native.ts","../../src/lint/rules/vitest.ts","../../src/lint/profiles.ts","../../src/lint/configs.ts","../../src/fragments.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport { defineConfig, mergeConfig } from \"vite-plus\";\n\ninterface NamedPlugin {\n readonly name: string;\n}\n\ntype PluginValue = NamedPlugin | false | null | undefined;\n\nexport type PluginInput = PluginValue | Promise<PluginInput> | readonly PluginInput[];\n\nexport type ConfigFragment = Omit<UserConfig, \"plugins\"> & {\n readonly plugins?: readonly PluginInput[];\n};\n\nfunction toUserConfig(config: ConfigFragment): UserConfig {\n // eslint-disable-next-line typescript/no-unsafe-type-assertion -- Vite's recursive PluginOption overflows TypeScript 7 when consumers pass an ordinary Plugin; ConfigFragment preserves the named-plugin boundary without recursive comparison.\n return config as UserConfig;\n}\n\nexport function composeConfig(...fragments: readonly ConfigFragment[]): UserConfig {\n let config: UserConfig = {};\n\n for (const fragment of fragments) {\n config = mergeConfig(config, toUserConfig(fragment));\n }\n\n return defineConfig(config);\n}\n","import type { UserConfig } from \"vite-plus\";\nimport {\n CLOUDFLARE_WORKER_IGNORE_PATTERNS,\n DEFAULT_IGNORE_PATTERNS,\n REACT_NATIVE_IGNORE_PATTERNS,\n} from \"./constants.ts\";\n\ntype FormatConfig = NonNullable<UserConfig[\"fmt\"]>;\n\nexport const baseFormatConfig: FormatConfig = {\n ignorePatterns: [...DEFAULT_IGNORE_PATTERNS],\n sortImports: {\n internalPattern: [\"#\", \"@/\"],\n newlinesBetween: false,\n groups: [\n \"type-import\",\n [\"value-builtin\", \"value-external\"],\n \"type-internal\",\n \"value-internal\",\n [\"type-parent\", \"type-sibling\", \"type-index\"],\n [\"value-parent\", \"value-sibling\", \"value-index\"],\n \"unknown\",\n ],\n },\n};\n\nexport const reactFormatConfig: FormatConfig = {\n sortTailwindcss: {\n functions: [\"tv\"],\n },\n};\n\nexport const reactNativeFormatConfig: FormatConfig = {\n ignorePatterns: [...REACT_NATIVE_IGNORE_PATTERNS],\n};\n\nexport const cloudflareWorkerFormatConfig: FormatConfig = {\n ignorePatterns: [...CLOUDFLARE_WORKER_IGNORE_PATTERNS],\n};\n","import type { LintRules } from \"../types.ts\";\n\nexport const browserRules: LintRules = {\n \"no-alert\": \"error\",\n \"unicorn/prefer-classlist-toggle\": \"error\",\n \"unicorn/prefer-dom-node-append\": \"error\",\n \"unicorn/prefer-dom-node-dataset\": \"error\",\n \"unicorn/prefer-dom-node-remove\": \"error\",\n \"unicorn/prefer-dom-node-text-content\": \"error\",\n \"unicorn/prefer-keyboard-event-key\": \"error\",\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n};\n","import type { LintRules } from \"../types.ts\";\n\nexport const jestRules: LintRules = {\n \"max-nested-callbacks\": [\n \"error\",\n {\n max: 4,\n },\n ],\n \"jest/consistent-test-it\": [\n \"error\",\n {\n fn: \"test\",\n withinDescribe: \"it\",\n },\n ],\n \"jest/max-nested-describe\": [\n \"error\",\n {\n max: 3,\n },\n ],\n \"jest/no-alias-methods\": \"error\",\n \"jest/no-duplicate-hooks\": \"error\",\n \"jest/no-identical-title\": \"error\",\n \"jest/no-interpolation-in-snapshots\": \"error\",\n \"jest/no-large-snapshots\": \"error\",\n \"jest/no-mocks-import\": \"error\",\n \"jest/no-restricted-jest-methods\": [\n \"error\",\n {\n doMock: \"Use a maintained implementation, spy, or injected owned dependency.\",\n mock: \"Use a maintained implementation, spy, or injected owned dependency.\",\n unstable_mockModule: \"Use a maintained implementation, spy, or injected owned dependency.\",\n },\n ],\n \"jest/no-test-prefixes\": \"error\",\n \"jest/no-test-return-statement\": \"error\",\n \"jest/no-unneeded-async-expect-function\": \"error\",\n \"jest/padding-around-after-all-blocks\": \"error\",\n \"jest/padding-around-test-blocks\": \"error\",\n \"jest/prefer-called-with\": \"error\",\n \"jest/prefer-comparison-matcher\": \"error\",\n \"jest/prefer-each\": \"error\",\n \"jest/prefer-equality-matcher\": \"error\",\n \"jest/prefer-hooks-in-order\": \"error\",\n \"jest/prefer-hooks-on-top\": \"error\",\n \"jest/prefer-importing-jest-globals\": \"error\",\n \"jest/prefer-mock-promise-shorthand\": \"error\",\n \"jest/prefer-mock-return-shorthand\": \"error\",\n \"jest/prefer-spy-on\": \"error\",\n \"jest/prefer-to-be\": \"error\",\n \"jest/prefer-to-contain\": \"error\",\n \"jest/prefer-to-have-been-called-times\": \"error\",\n \"jest/prefer-to-have-length\": \"error\",\n \"jest/prefer-todo\": \"error\",\n};\n","import type { LintRules } from \"../types.ts\";\n\nexport const nodeRules: LintRules = {\n \"node/exports-style\": \"error\",\n \"node/global-require\": \"error\",\n \"node/no-exports-assign\": \"error\",\n \"node/no-mixed-requires\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n};\n","import type { LintRules } from \"../types.ts\";\n\nexport const reactCoreRules: LintRules = {\n \"react/display-name\": \"error\",\n \"react/function-component-definition\": [\n \"error\",\n {\n namedComponents: \"function-declaration\",\n unnamedComponents: [\"arrow-function\", \"function-expression\"],\n },\n ],\n \"react/hook-use-state\": \"error\",\n \"react/jsx-boolean-value\": \"error\",\n \"react/jsx-curly-brace-presence\": \"error\",\n \"react/jsx-fragments\": \"error\",\n \"react/jsx-max-depth\": [\n \"error\",\n {\n max: 6,\n },\n ],\n \"react/jsx-no-constructed-context-values\": \"error\",\n \"react/jsx-no-useless-fragment\": \"error\",\n \"react/jsx-pascal-case\": \"error\",\n \"react/no-array-index-key\": \"error\",\n \"react/no-object-type-as-default-prop\": \"error\",\n \"react/no-redundant-should-component-update\": \"error\",\n \"react/no-set-state\": \"error\",\n \"react/prefer-es6-class\": \"error\",\n \"react/rules-of-hooks\": \"error\",\n \"react/self-closing-comp\": \"error\",\n \"react/state-in-constructor\": \"error\",\n \"react/exhaustive-deps\": \"error\",\n \"react/error-boundaries\": \"error\",\n \"react/globals\": \"error\",\n \"react/immutability\": \"error\",\n \"react/incompatible-library\": \"error\",\n \"react/preserve-manual-memoization\": \"error\",\n \"react/purity\": \"error\",\n \"react/refs\": \"error\",\n \"react/set-state-in-effect\": \"error\",\n \"react/set-state-in-render\": \"error\",\n \"react/static-components\": \"error\",\n \"react/unsupported-syntax\": \"error\",\n \"react/use-memo\": \"error\",\n \"react/void-use-memo\": \"error\",\n \"react/react-in-jsx-scope\": \"off\",\n \"react/jsx-key\": \"error\",\n \"react/jsx-no-duplicate-props\": \"error\",\n \"react/jsx-no-undef\": \"error\",\n \"react/no-children-prop\": \"error\",\n \"react/no-clone-element\": \"error\",\n \"react/no-direct-mutation-state\": \"error\",\n \"react/no-react-children\": \"error\",\n \"react/no-string-refs\": \"error\",\n \"react/no-unsafe\": \"error\",\n \"react/style-prop-object\": \"off\",\n};\n","import type { LintRules } from \"../types.ts\";\n\nexport const reactDomRules: LintRules = {\n \"react/checked-requires-onchange-or-readonly\": \"error\",\n \"react/jsx-no-target-blank\": \"error\",\n \"react/no-unescaped-entities\": \"error\",\n \"react/no-danger\": \"error\",\n \"react/no-danger-with-children\": \"error\",\n \"react/no-find-dom-node\": \"error\",\n \"react/no-unknown-property\": \"error\",\n \"react/void-dom-elements-no-children\": \"error\",\n};\n","import type { LintRules } from \"../types.ts\";\n\nexport const universalRestrictedProperties = [\n {\n object: \"Reflect\",\n property: \"get\",\n },\n {\n object: \"Reflect\",\n property: \"apply\",\n },\n] as const;\n\nexport const universalRules: LintRules = {\n \"accessor-pairs\": \"error\",\n \"array-callback-return\": \"error\",\n \"arrow-body-style\": \"error\",\n curly: [\"error\", \"multi-line\", \"consistent\"],\n \"default-case-last\": \"error\",\n \"default-param-last\": \"error\",\n eqeqeq: \"error\",\n \"func-name-matching\": \"error\",\n \"func-names\": \"error\",\n \"grouped-accessor-pairs\": [\"error\", \"getBeforeSet\"],\n \"guard-for-in\": \"error\",\n \"import/consistent-type-specifier-style\": \"error\",\n \"import/first\": \"error\",\n \"import/newline-after-import\": \"error\",\n \"import/no-duplicates\": \"error\",\n \"import/no-mutable-exports\": \"error\",\n \"import/no-named-default\": \"error\",\n \"logical-assignment-operators\": \"error\",\n \"max-depth\": [\n \"error\",\n {\n max: 3,\n },\n ],\n \"max-nested-callbacks\": [\n \"error\",\n {\n max: 3,\n },\n ],\n \"max-params\": [\n \"error\",\n {\n max: 3,\n },\n ],\n \"no-array-constructor\": \"error\",\n \"no-await-in-loop\": \"error\",\n \"no-case-declarations\": \"error\",\n \"no-constructor-return\": \"error\",\n \"no-else-return\": \"error\",\n \"no-empty\": \"error\",\n \"no-extra-label\": \"error\",\n \"no-fallthrough\": \"error\",\n \"no-implicit-coercion\": \"error\",\n \"no-inline-comments\": \"error\",\n \"no-inner-declarations\": \"error\",\n \"no-label-var\": \"error\",\n \"no-labels\": \"error\",\n \"no-lone-blocks\": \"error\",\n \"no-lonely-if\": \"error\",\n \"no-loop-func\": \"error\",\n \"no-multi-assign\": \"error\",\n \"no-multi-str\": \"error\",\n \"no-nested-ternary\": \"error\",\n \"no-new-func\": \"error\",\n \"no-new-wrappers\": \"error\",\n \"no-object-constructor\": \"error\",\n \"no-promise-executor-return\": \"error\",\n \"no-prototype-builtins\": \"error\",\n \"no-redeclare\": \"error\",\n \"no-restricted-properties\": [\"error\", ...universalRestrictedProperties],\n \"no-return-assign\": \"error\",\n \"no-script-url\": \"error\",\n \"no-self-compare\": \"error\",\n \"no-template-curly-in-string\": \"error\",\n \"no-useless-call\": \"error\",\n \"no-useless-computed-key\": \"error\",\n \"no-useless-return\": \"error\",\n \"no-warning-comments\": \"error\",\n \"object-shorthand\": \"error\",\n \"operator-assignment\": \"error\",\n \"oxc/branches-sharing-code\": \"error\",\n \"oxc/no-accumulating-spread\": \"error\",\n \"oxc/no-map-spread\": \"error\",\n \"prefer-arrow-callback\": \"error\",\n \"prefer-const\": \"error\",\n \"prefer-destructuring\": \"error\",\n \"prefer-exponentiation-operator\": \"error\",\n \"prefer-named-capture-group\": \"error\",\n \"prefer-numeric-literals\": \"error\",\n \"prefer-object-has-own\": \"error\",\n \"prefer-object-spread\": \"error\",\n \"prefer-regex-literals\": \"error\",\n \"prefer-rest-params\": \"error\",\n \"prefer-spread\": \"error\",\n \"prefer-template\": \"error\",\n \"promise/no-nesting\": \"error\",\n \"promise/no-return-wrap\": \"error\",\n \"promise/param-names\": \"error\",\n \"promise/prefer-catch\": \"error\",\n radix: \"error\",\n \"symbol-description\": \"error\",\n \"typescript/adjacent-overload-signatures\": \"error\",\n \"typescript/array-type\": \"error\",\n \"typescript/ban-ts-comment\": [\n \"error\",\n {\n minimumDescriptionLength: 10,\n },\n ],\n \"typescript/ban-tslint-comment\": \"error\",\n \"typescript/class-literal-property-style\": \"error\",\n \"typescript/consistent-generic-constructors\": \"error\",\n \"typescript/consistent-indexed-object-style\": \"error\",\n \"typescript/consistent-type-assertions\": \"error\",\n \"typescript/consistent-type-exports\": \"error\",\n \"typescript/consistent-type-imports\": [\n \"error\",\n {\n prefer: \"type-imports\",\n fixStyle: \"separate-type-imports\",\n },\n ],\n \"typescript/dot-notation\": \"error\",\n \"typescript/method-signature-style\": \"error\",\n \"typescript/no-confusing-void-expression\": \"error\",\n \"typescript/no-deprecated\": \"error\",\n \"typescript/no-empty-object-type\": \"error\",\n \"typescript/no-inferrable-types\": \"error\",\n \"typescript/no-misused-promises\": \"error\",\n \"typescript/no-mixed-enums\": \"error\",\n \"typescript/no-unnecessary-qualifier\": \"error\",\n \"typescript/no-unsafe-argument\": \"error\",\n \"typescript/no-unsafe-assignment\": \"error\",\n \"typescript/no-unsafe-call\": \"error\",\n \"typescript/no-unsafe-function-type\": \"error\",\n \"typescript/no-unsafe-member-access\": \"error\",\n \"typescript/no-unsafe-return\": \"error\",\n \"typescript/no-unsafe-type-assertion\": \"error\",\n \"typescript/no-wrapper-object-types\": \"error\",\n \"typescript/only-throw-error\": \"error\",\n \"typescript/parameter-properties\": \"error\",\n \"typescript/prefer-enum-initializers\": \"error\",\n \"typescript/prefer-find\": \"error\",\n \"typescript/prefer-for-of\": \"error\",\n \"typescript/prefer-function-type\": \"error\",\n \"typescript/prefer-includes\": \"error\",\n \"typescript/prefer-nullish-coalescing\": \"error\",\n \"typescript/prefer-promise-reject-errors\": \"error\",\n \"typescript/prefer-readonly\": \"error\",\n \"typescript/prefer-reduce-type-parameter\": \"error\",\n \"typescript/prefer-regexp-exec\": \"error\",\n \"typescript/prefer-return-this-type\": \"error\",\n \"typescript/prefer-string-starts-ends-with\": \"error\",\n \"typescript/related-getter-setter-pairs\": \"error\",\n \"typescript/restrict-plus-operands\": \"error\",\n \"typescript/return-await\": \"error\",\n \"typescript/strict-boolean-expressions\": \"error\",\n \"typescript/strict-void-return\": \"error\",\n \"typescript/switch-exhaustiveness-check\": \"error\",\n \"typescript/unified-signatures\": \"error\",\n \"unicorn/catch-error-name\": \"error\",\n \"unicorn/consistent-assert\": \"error\",\n \"unicorn/consistent-date-clone\": \"error\",\n \"unicorn/consistent-empty-array-spread\": \"error\",\n \"unicorn/consistent-existence-index-check\": \"error\",\n \"unicorn/consistent-template-literal-escape\": \"error\",\n \"unicorn/custom-error-definition\": \"error\",\n \"unicorn/error-message\": \"error\",\n \"unicorn/escape-case\": \"error\",\n \"unicorn/explicit-length-check\": \"error\",\n \"unicorn/explicit-timer-delay\": \"error\",\n \"unicorn/filename-case\": [\n \"error\",\n {\n case: \"kebabCase\",\n },\n ],\n \"unicorn/max-nested-calls\": [\n \"error\",\n {\n max: 5,\n },\n ],\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-array-callback-reference\": \"error\",\n \"unicorn/no-array-method-this-argument\": \"error\",\n \"unicorn/no-console-spaces\": \"error\",\n \"unicorn/no-hex-escape\": \"error\",\n \"unicorn/no-immediate-mutation\": \"error\",\n \"unicorn/no-instanceof-array\": \"error\",\n \"unicorn/no-negation-in-equality-check\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-static-only-class\": \"error\",\n \"unicorn/no-this-assignment\": \"error\",\n \"unicorn/no-typeof-undefined\": \"error\",\n \"unicorn/no-unnecessary-array-flat-depth\": \"error\",\n \"unicorn/no-unnecessary-array-splice-count\": \"error\",\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n \"unicorn/no-unreadable-iife\": \"error\",\n \"unicorn/no-useless-collection-argument\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": \"error\",\n \"unicorn/no-useless-switch-case\": \"error\",\n \"unicorn/no-useless-undefined\": \"error\",\n \"unicorn/no-zero-fractions\": \"error\",\n \"unicorn/number-literal-case\": \"error\",\n \"unicorn/numeric-separators-style\": \"error\",\n \"unicorn/prefer-array-find\": \"error\",\n \"unicorn/prefer-array-flat\": \"error\",\n \"unicorn/prefer-array-flat-map\": \"error\",\n \"unicorn/prefer-array-index-of\": \"error\",\n \"unicorn/prefer-array-some\": \"error\",\n \"unicorn/prefer-at\": \"error\",\n \"unicorn/prefer-bigint-literals\": \"error\",\n \"unicorn/prefer-blob-reading-methods\": \"error\",\n \"unicorn/prefer-class-fields\": \"error\",\n \"unicorn/prefer-code-point\": \"error\",\n \"unicorn/prefer-date-now\": \"error\",\n \"unicorn/prefer-default-parameters\": \"error\",\n \"unicorn/prefer-export-from\": \"error\",\n \"unicorn/prefer-global-this\": \"error\",\n \"unicorn/prefer-import-meta-properties\": \"error\",\n \"unicorn/prefer-includes\": \"error\",\n \"unicorn/prefer-logical-operator-over-ternary\": \"error\",\n \"unicorn/prefer-math-min-max\": \"error\",\n \"unicorn/prefer-math-trunc\": \"error\",\n \"unicorn/prefer-native-coercion-functions\": \"error\",\n \"unicorn/prefer-negative-index\": \"error\",\n \"unicorn/prefer-number-coercion\": \"error\",\n \"unicorn/prefer-object-from-entries\": \"error\",\n \"unicorn/prefer-optional-catch-binding\": \"error\",\n \"unicorn/prefer-prototype-methods\": \"error\",\n \"unicorn/prefer-regexp-test\": \"error\",\n \"unicorn/prefer-response-static-json\": \"error\",\n \"unicorn/prefer-set-has\": \"error\",\n \"unicorn/prefer-single-call\": \"error\",\n \"unicorn/prefer-spread\": \"error\",\n \"unicorn/prefer-string-raw\": \"error\",\n \"unicorn/prefer-string-replace-all\": \"error\",\n \"unicorn/prefer-string-slice\": \"error\",\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n \"unicorn/prefer-structured-clone\": \"error\",\n \"unicorn/prefer-ternary\": [\"error\", \"only-single-line\"],\n \"unicorn/prefer-type-error\": \"error\",\n \"unicorn/relative-url-style\": \"error\",\n \"unicorn/require-array-join-separator\": \"error\",\n \"unicorn/require-module-attributes\": \"error\",\n \"unicorn/require-number-to-fixed-digits-argument\": \"error\",\n \"unicorn/switch-case-braces\": \"error\",\n \"unicorn/switch-case-break-position\": \"error\",\n \"unicorn/text-encoding-identifier-case\": \"error\",\n \"unicorn/throw-new-error\": \"error\",\n yoda: \"error\",\n complexity: [\n \"error\",\n {\n max: 20,\n },\n ],\n \"getter-return\": \"error\",\n \"no-bitwise\": \"error\",\n \"no-console\": [\n \"error\",\n {\n allow: [\"info\", \"warn\", \"error\"],\n },\n ],\n \"no-param-reassign\": [\n \"error\",\n {\n props: true,\n },\n ],\n \"no-plusplus\": \"error\",\n \"no-undef\": \"error\",\n \"no-unneeded-ternary\": \"error\",\n \"no-unreachable\": \"error\",\n \"import/no-cycle\": \"error\",\n \"import/no-unassigned-import\": \"off\",\n \"oxc/bad-match-all-arg\": \"error\",\n \"typescript/consistent-return\": \"error\",\n \"typescript/no-dynamic-delete\": \"error\",\n \"typescript/no-explicit-any\": \"error\",\n \"typescript/no-floating-promises\": \"error\",\n \"typescript/no-misused-spread\": \"error\",\n \"typescript/no-non-null-assertion\": \"error\",\n \"typescript/no-require-imports\": \"error\",\n \"typescript/no-unnecessary-condition\": \"error\",\n \"typescript/no-unnecessary-type-arguments\": \"error\",\n \"typescript/no-unnecessary-type-assertion\": \"error\",\n \"typescript/no-unnecessary-type-parameters\": \"error\",\n \"typescript/no-useless-default-assignment\": \"error\",\n \"typescript/non-nullable-type-assertion-style\": \"error\",\n \"typescript/prefer-optional-chain\": \"error\",\n \"typescript/require-array-sort-compare\": \"error\",\n \"typescript/restrict-template-expressions\": \"error\",\n \"typescript/unbound-method\": \"error\",\n \"typescript/use-unknown-in-catch-callback-variable\": \"error\",\n \"unicorn/no-abusive-eslint-disable\": \"error\",\n};\n","import type { LintRules } from \"../types.ts\";\nimport { universalRestrictedProperties } from \"./universal.ts\";\n\nexport const reactNativeRules: LintRules = {\n \"no-restricted-properties\": [\n \"error\",\n ...universalRestrictedProperties,\n {\n property: \"toSorted\",\n message: \"Hermes lacks toSorted; copy the array before sorting.\",\n },\n {\n object: \"Intl\",\n property: \"RelativeTimeFormat\",\n message: \"Hermes lacks Intl.RelativeTimeFormat; use a supported formatter.\",\n },\n {\n object: \"Intl\",\n property: \"PluralRules\",\n message: \"Hermes lacks Intl.PluralRules; choose plural forms explicitly.\",\n },\n {\n object: \"Intl\",\n property: \"ListFormat\",\n message: \"Hermes lacks Intl.ListFormat; join lists explicitly.\",\n },\n {\n object: \"Intl\",\n property: \"Segmenter\",\n message: \"Hermes lacks Intl.Segmenter; split text explicitly.\",\n },\n {\n object: \"Intl\",\n property: \"DisplayNames\",\n message: \"Hermes lacks Intl.DisplayNames; map codes to names explicitly.\",\n },\n {\n object: \"Array\",\n property: \"fromAsync\",\n message: \"Hermes lacks Array.fromAsync; collect async values in a loop.\",\n },\n {\n object: \"RegExp\",\n property: \"escape\",\n message: \"Hermes lacks RegExp.escape; escape patterns explicitly.\",\n },\n ],\n \"no-restricted-globals\": [\n \"error\",\n { name: \"Temporal\", message: \"Hermes lacks Temporal; use Date.\" },\n ],\n \"react/iframe-missing-sandbox\": \"off\",\n \"react/jsx-no-script-url\": \"off\",\n \"react/no-unknown-property\": \"off\",\n \"react/no-unescaped-entities\": \"off\",\n \"react/no-unstable-nested-components\": [\n \"error\",\n {\n allowAsProps: true,\n },\n ],\n \"react/void-dom-elements-no-children\": \"off\",\n \"unicorn/no-array-reverse\": \"error\",\n \"unicorn/no-array-sort\": [\n \"error\",\n {\n allowAfterSpread: true,\n },\n ],\n};\n","import type { LintRules } from \"../types.ts\";\n\nexport const vitestRules: LintRules = {\n \"max-nested-callbacks\": [\n \"error\",\n {\n max: 4,\n },\n ],\n \"vitest/consistent-each-for\": \"error\",\n \"vitest/consistent-test-it\": [\n \"error\",\n {\n fn: \"test\",\n withinDescribe: \"it\",\n },\n ],\n \"vitest/consistent-vitest-vi\": \"error\",\n \"vitest/max-nested-describe\": [\n \"error\",\n {\n max: 3,\n },\n ],\n \"vitest/no-alias-methods\": \"error\",\n \"vitest/no-duplicate-hooks\": \"error\",\n \"vitest/no-identical-title\": \"error\",\n \"vitest/no-import-node-test\": \"error\",\n \"vitest/no-interpolation-in-snapshots\": \"error\",\n \"vitest/no-large-snapshots\": \"error\",\n \"vitest/no-mocks-import\": \"error\",\n \"vitest/no-restricted-vi-methods\": [\n \"error\",\n {\n doMock: \"Use a maintained implementation, spy, or injected owned dependency.\",\n mock: \"Use a maintained implementation, spy, or injected owned dependency.\",\n },\n ],\n \"vitest/no-test-prefixes\": \"error\",\n \"vitest/no-test-return-statement\": \"error\",\n \"vitest/no-unneeded-async-expect-function\": \"error\",\n \"vitest/padding-around-after-all-blocks\": \"error\",\n \"vitest/padding-around-test-blocks\": \"error\",\n \"vitest/prefer-called-exactly-once-with\": \"error\",\n \"vitest/prefer-called-once\": \"error\",\n \"vitest/prefer-called-with\": \"error\",\n \"vitest/prefer-comparison-matcher\": \"error\",\n \"vitest/prefer-each\": \"error\",\n \"vitest/prefer-equality-matcher\": \"error\",\n \"vitest/prefer-expect-resolves\": \"error\",\n \"vitest/prefer-expect-type-of\": \"error\",\n \"vitest/prefer-hooks-in-order\": \"error\",\n \"vitest/prefer-hooks-on-top\": \"error\",\n \"vitest/prefer-import-in-mock\": \"error\",\n \"vitest/prefer-importing-vitest-globals\": \"error\",\n \"vitest/prefer-mock-promise-shorthand\": \"error\",\n \"vitest/prefer-mock-return-shorthand\": \"error\",\n \"vitest/prefer-spy-on\": \"error\",\n \"vitest/prefer-strict-boolean-matchers\": \"error\",\n \"vitest/prefer-strict-equal\": \"error\",\n \"vitest/prefer-to-be\": \"error\",\n \"vitest/prefer-to-be-object\": \"error\",\n \"vitest/prefer-to-contain\": \"error\",\n \"vitest/prefer-to-have-been-called-times\": \"error\",\n \"vitest/prefer-to-have-length\": \"error\",\n \"vitest/prefer-todo\": \"error\",\n};\n","import type { LintConfig, LintProfile } from \"./types.ts\";\nimport { browserRules } from \"./rules/browser.ts\";\nimport { jestRules } from \"./rules/jest.ts\";\nimport { nodeRules } from \"./rules/node.ts\";\nimport { reactCoreRules } from \"./rules/react-core.ts\";\nimport { reactDomRules } from \"./rules/react-dom.ts\";\nimport { reactNativeRules } from \"./rules/react-native.ts\";\nimport { vitestRules } from \"./rules/vitest.ts\";\n\nexport const BASE_LINT_PLUGINS = [\"typescript\", \"unicorn\", \"oxc\", \"import\", \"promise\"] as const;\n\nexport const neutralEnvironment: NonNullable<LintConfig[\"env\"]> = {\n browser: false,\n node: false,\n serviceworker: false,\n worker: false,\n} as const;\n\nexport const nodeEnvironment: NonNullable<LintConfig[\"env\"]> = {\n ...neutralEnvironment,\n node: true,\n} as const;\n\nexport const browserEnvironment: NonNullable<LintConfig[\"env\"]> = {\n ...neutralEnvironment,\n browser: true,\n} as const;\n\nexport const reactNativeEnvironment: NonNullable<LintConfig[\"env\"]> = {\n ...neutralEnvironment,\n} as const;\n\nconst reactNativeJestEnvironment: NonNullable<LintConfig[\"env\"]> = {\n ...reactNativeEnvironment,\n jest: true,\n} as const;\n\nexport const cloudflareWorkerEnvironment: NonNullable<LintConfig[\"env\"]> = {\n ...neutralEnvironment,\n serviceworker: true,\n worker: true,\n} as const;\n\nconst platformGlobalsOff = {\n __DEV__: \"off\",\n Cloudflare: \"off\",\n DigestStream: \"off\",\n FixedLengthStream: \"off\",\n HTMLRewriter: \"off\",\n IdentityTransformStream: \"off\",\n process: \"off\",\n WebSocketPair: \"off\",\n WebSocketRequestResponsePair: \"off\",\n} as const;\n\nconst nodeGlobals = {\n ...platformGlobalsOff,\n console: \"readonly\",\n process: \"readonly\",\n} as const;\n\nconst cloudflareWorkerGlobals = {\n ...platformGlobalsOff,\n Cloudflare: \"readonly\",\n DigestStream: \"readonly\",\n FixedLengthStream: \"readonly\",\n HTMLRewriter: \"readonly\",\n IdentityTransformStream: \"readonly\",\n WebSocketPair: \"readonly\",\n WebSocketRequestResponsePair: \"readonly\",\n} as const;\n\nexport const neutralLint: LintProfile = {\n env: neutralEnvironment,\n globals: platformGlobalsOff,\n plugins: [...BASE_LINT_PLUGINS],\n};\n\nexport const nodeLint: LintProfile = {\n env: nodeEnvironment,\n globals: nodeGlobals,\n plugins: [...BASE_LINT_PLUGINS, \"node\"],\n rules: nodeRules,\n};\n\nexport const browserLint: LintProfile = {\n env: browserEnvironment,\n globals: platformGlobalsOff,\n plugins: [...BASE_LINT_PLUGINS],\n rules: browserRules,\n};\n\nexport const reactCoreLint: LintProfile = {\n plugins: [...BASE_LINT_PLUGINS, \"react\"],\n rules: reactCoreRules,\n};\n\nexport const reactDomLint: LintProfile = {\n plugins: [...BASE_LINT_PLUGINS, \"react\", \"jsx-a11y\"],\n rules: reactDomRules,\n};\n\nconst reactNativeGlobals = {\n ...platformGlobalsOff,\n __BUNDLE_START_TIME__: \"readonly\",\n __DEV__: \"readonly\",\n AbortController: \"readonly\",\n AbortSignal: \"readonly\",\n alert: \"readonly\",\n Blob: \"readonly\",\n cancelAnimationFrame: \"readonly\",\n clearImmediate: \"readonly\",\n clearInterval: \"readonly\",\n clearTimeout: \"readonly\",\n console: \"readonly\",\n crypto: \"readonly\",\n DOMRect: \"readonly\",\n ErrorUtils: \"readonly\",\n Event: \"readonly\",\n EventTarget: \"readonly\",\n fetch: \"readonly\",\n fetchBundle: \"readonly\",\n File: \"readonly\",\n FileReader: \"readonly\",\n FormData: \"readonly\",\n Headers: \"readonly\",\n HermesInternal: \"readonly\",\n navigator: \"readonly\",\n originalXMLHttpRequest: \"readonly\",\n performance: \"readonly\",\n process: \"readonly\",\n queueMicrotask: \"readonly\",\n requestAnimationFrame: \"readonly\",\n Request: \"readonly\",\n require: \"readonly\",\n Response: \"readonly\",\n setImmediate: \"readonly\",\n setInterval: \"readonly\",\n setTimeout: \"readonly\",\n URL: \"readonly\",\n URLSearchParams: \"readonly\",\n WebSocket: \"readonly\",\n XMLHttpRequest: \"readonly\",\n XMLHttpRequestUpload: \"readonly\",\n} as const;\n\nexport const reactNativeRuntimeLint: LintProfile = {\n env: reactNativeEnvironment,\n globals: reactNativeGlobals,\n plugins: [...BASE_LINT_PLUGINS, \"react\"],\n rules: reactNativeRules,\n};\n\nexport const reactWebLint: LintProfile = {\n env: browserEnvironment,\n globals: platformGlobalsOff,\n plugins: [...BASE_LINT_PLUGINS, \"react\", \"jsx-a11y\"],\n rules: {\n ...browserRules,\n ...reactCoreRules,\n ...reactDomRules,\n },\n};\n\nexport const reactNativeLint: LintProfile = {\n env: reactNativeEnvironment,\n globals: reactNativeGlobals,\n plugins: [...BASE_LINT_PLUGINS, \"react\"],\n rules: {\n ...reactCoreRules,\n ...reactNativeRules,\n },\n};\n\nexport const reactNativeJestTestLint: LintProfile = {\n env: reactNativeJestEnvironment,\n globals: reactNativeGlobals,\n plugins: [...BASE_LINT_PLUGINS, \"react\", \"jest\"],\n rules: {\n ...reactCoreRules,\n ...reactNativeRules,\n ...jestRules,\n },\n};\n\nexport const cloudflareWorkerLint: LintProfile = {\n env: cloudflareWorkerEnvironment,\n globals: cloudflareWorkerGlobals,\n plugins: [...BASE_LINT_PLUGINS],\n};\n\nexport const nodeTestLint: LintProfile = {\n ...nodeLint,\n plugins: [...BASE_LINT_PLUGINS, \"node\", \"vitest\"],\n rules: {\n ...nodeRules,\n ...vitestRules,\n },\n};\n\nexport const browserTestLint: LintProfile = {\n ...browserLint,\n plugins: [...BASE_LINT_PLUGINS, \"vitest\"],\n rules: {\n ...browserRules,\n ...vitestRules,\n },\n};\n\nexport const cloudflareWorkerTestLint: LintProfile = {\n ...cloudflareWorkerLint,\n plugins: [...BASE_LINT_PLUGINS, \"vitest\"],\n rules: vitestRules,\n};\n","import type { LintConfig } from \"./types.ts\";\nimport {\n CLOUDFLARE_WORKER_IGNORE_PATTERNS,\n CODE_FILES,\n COMMONJS_FILES,\n CONFIG_FILES,\n DEFAULT_IGNORE_PATTERNS,\n REACT_NATIVE_IGNORE_PATTERNS,\n REACT_NATIVE_JEST_SETUP_FILES,\n REACT_NATIVE_JEST_TEST_FILES,\n RUNTIME_OVERRIDE_EXCLUDE_FILES,\n TEST_FILES,\n VITEST_SETUP_FILES,\n} from \"../constants.ts\";\nimport {\n BASE_LINT_PLUGINS,\n browserEnvironment,\n browserTestLint,\n cloudflareWorkerEnvironment,\n cloudflareWorkerLint,\n cloudflareWorkerTestLint,\n neutralEnvironment,\n neutralLint,\n nodeEnvironment,\n nodeLint,\n nodeTestLint,\n reactNativeJestTestLint,\n reactNativeRuntimeLint,\n} from \"./profiles.ts\";\nimport { browserRules } from \"./rules/browser.ts\";\nimport { nodeRules } from \"./rules/node.ts\";\nimport { reactCoreRules } from \"./rules/react-core.ts\";\nimport { reactDomRules } from \"./rules/react-dom.ts\";\nimport { reactNativeRules } from \"./rules/react-native.ts\";\nimport { universalRules } from \"./rules/universal.ts\";\n\nexport const baseLintConfig: LintConfig = {\n plugins: [...BASE_LINT_PLUGINS],\n ignorePatterns: [...DEFAULT_IGNORE_PATTERNS],\n env: neutralEnvironment,\n globals: neutralLint.globals,\n options: {\n reportUnusedDisableDirectives: \"error\",\n typeAware: true,\n typeCheck: true,\n },\n categories: {\n correctness: \"error\",\n suspicious: \"error\",\n },\n extends: [{ rules: universalRules }],\n overrides: [\n {\n files: [...COMMONJS_FILES],\n ...nodeLint,\n rules: {\n ...nodeRules,\n \"typescript/no-require-imports\": \"off\",\n },\n },\n {\n files: [...CONFIG_FILES],\n ...nodeLint,\n rules: {\n ...nodeRules,\n \"func-names\": \"off\",\n },\n },\n {\n files: [\"**/*.d.ts\"],\n rules: {\n \"typescript/no-empty-object-type\": \"off\",\n },\n },\n ],\n};\n\nexport const nodeRuntimeLintConfig: LintConfig = {\n env: nodeEnvironment,\n globals: nodeLint.globals,\n plugins: [\"node\"],\n extends: [{ rules: nodeRules }],\n};\n\nexport const browserRuntimeLintConfig: LintConfig = {\n env: browserEnvironment,\n globals: neutralLint.globals,\n overrides: [\n {\n files: [...CODE_FILES],\n excludeFiles: [...RUNTIME_OVERRIDE_EXCLUDE_FILES],\n rules: browserRules,\n },\n ],\n};\n\nexport const reactCoreLintConfig: LintConfig = {\n plugins: [\"react\"],\n extends: [{ rules: reactCoreRules }],\n};\n\nexport const reactDomLintConfig: LintConfig = {\n plugins: [\"jsx-a11y\"],\n extends: [{ rules: reactDomRules }],\n};\n\nexport const reactNativeRuntimeLintConfig: LintConfig = {\n env: reactNativeRuntimeLint.env,\n globals: reactNativeRuntimeLint.globals,\n extends: [{ rules: reactNativeRules }],\n};\n\nexport const cloudflareWorkerRuntimeLintConfig: LintConfig = {\n env: cloudflareWorkerEnvironment,\n globals: cloudflareWorkerLint.globals,\n};\n\nexport const reactNativeGeneratedLintConfig: LintConfig = {\n ignorePatterns: [...REACT_NATIVE_IGNORE_PATTERNS],\n};\n\nexport const cloudflareWorkerGeneratedLintConfig: LintConfig = {\n ignorePatterns: [...CLOUDFLARE_WORKER_IGNORE_PATTERNS],\n};\n\nexport const nodeTestLintConfig: LintConfig = {\n overrides: [\n {\n files: [...TEST_FILES],\n ...nodeTestLint,\n },\n ],\n};\n\nexport const browserTestLintConfig: LintConfig = {\n overrides: [\n {\n files: [...TEST_FILES],\n ...browserTestLint,\n },\n ],\n};\n\nexport const cloudflareWorkerTestLintConfig: LintConfig = {\n overrides: [\n {\n files: [...TEST_FILES],\n ...cloudflareWorkerTestLint,\n },\n ],\n};\n\nexport const reactNativeTestLintConfig: LintConfig = {\n overrides: [\n {\n files: [...TEST_FILES],\n excludeFiles: [\n ...VITEST_SETUP_FILES,\n ...REACT_NATIVE_JEST_TEST_FILES,\n ...REACT_NATIVE_JEST_SETUP_FILES,\n ],\n ...nodeTestLint,\n },\n {\n files: [...VITEST_SETUP_FILES],\n excludeFiles: [...REACT_NATIVE_JEST_TEST_FILES, ...REACT_NATIVE_JEST_SETUP_FILES],\n ...nodeTestLint,\n rules: {\n ...nodeTestLint.rules,\n \"vitest/no-restricted-vi-methods\": \"off\",\n },\n },\n {\n files: [...REACT_NATIVE_JEST_TEST_FILES],\n excludeFiles: [...VITEST_SETUP_FILES, ...REACT_NATIVE_JEST_SETUP_FILES],\n ...reactNativeJestTestLint,\n },\n {\n files: [...REACT_NATIVE_JEST_SETUP_FILES],\n excludeFiles: [...VITEST_SETUP_FILES, ...REACT_NATIVE_JEST_TEST_FILES],\n ...reactNativeJestTestLint,\n rules: {\n ...reactNativeJestTestLint.rules,\n \"jest/no-restricted-jest-methods\": \"off\",\n },\n },\n ],\n};\n","import type { UserConfig } from \"vite-plus\";\nimport type { ConfigFragment } from \"./compose.ts\";\nimport {\n DEFAULT_STAGED_CHECK_COMMAND,\n DEFAULT_STAGED_CHECK_GLOB,\n DEFAULT_STAGED_FORMAT_COMMAND,\n DEFAULT_STAGED_FORMAT_GLOB,\n} from \"./constants.ts\";\nimport {\n baseFormatConfig,\n cloudflareWorkerFormatConfig,\n reactFormatConfig,\n reactNativeFormatConfig,\n} from \"./format.ts\";\nimport {\n baseLintConfig,\n browserRuntimeLintConfig,\n browserTestLintConfig as browserTestLintSettings,\n cloudflareWorkerGeneratedLintConfig,\n cloudflareWorkerRuntimeLintConfig,\n cloudflareWorkerTestLintConfig as cloudflareWorkerTestLintSettings,\n nodeRuntimeLintConfig,\n nodeTestLintConfig as nodeTestLintSettings,\n reactCoreLintConfig,\n reactDomLintConfig,\n reactNativeGeneratedLintConfig,\n reactNativeRuntimeLintConfig,\n reactNativeTestLintConfig as reactNativeTestLintSettings,\n} from \"./lint/configs.ts\";\n\ntype PackConfig = Exclude<UserConfig[\"pack\"], readonly unknown[] | undefined>;\n\nexport const baseToolingConfig: ConfigFragment = {\n fmt: baseFormatConfig,\n lint: baseLintConfig,\n staged: {\n [DEFAULT_STAGED_CHECK_GLOB]: DEFAULT_STAGED_CHECK_COMMAND,\n [DEFAULT_STAGED_FORMAT_GLOB]: DEFAULT_STAGED_FORMAT_COMMAND,\n },\n};\n\nexport const nodeRuntimeConfig: ConfigFragment = {\n lint: nodeRuntimeLintConfig,\n};\n\nexport const browserRuntimeConfig: ConfigFragment = {\n lint: browserRuntimeLintConfig,\n};\n\nexport const reactCoreConfig: ConfigFragment = {\n fmt: reactFormatConfig,\n lint: reactCoreLintConfig,\n};\n\nexport const reactDomConfig: ConfigFragment = {\n lint: reactDomLintConfig,\n};\n\nexport const reactNativeRuntimeConfig: ConfigFragment = {\n lint: reactNativeRuntimeLintConfig,\n};\n\nexport const reactNativeGeneratedConfig: ConfigFragment = {\n fmt: reactNativeFormatConfig,\n lint: reactNativeGeneratedLintConfig,\n};\n\nexport const cloudflareWorkerRuntimeConfig: ConfigFragment = {\n lint: cloudflareWorkerRuntimeLintConfig,\n};\n\nexport const cloudflareWorkerGeneratedConfig: ConfigFragment = {\n fmt: cloudflareWorkerFormatConfig,\n lint: cloudflareWorkerGeneratedLintConfig,\n};\n\nexport const nodeTestLintConfig: ConfigFragment = {\n lint: nodeTestLintSettings,\n};\n\nexport const browserTestLintConfig: ConfigFragment = {\n lint: browserTestLintSettings,\n};\n\nexport const cloudflareWorkerTestLintConfig: ConfigFragment = {\n lint: cloudflareWorkerTestLintSettings,\n};\n\nexport const reactNativeTestLintConfig: ConfigFragment = {\n lint: reactNativeTestLintSettings,\n};\n\nexport const libraryPackDefaults: PackConfig = {\n attw: {\n level: \"error\",\n profile: \"esm-only\",\n },\n clean: true,\n dts: true,\n format: [\"esm\"],\n publint: {\n strict: true,\n },\n sourcemap: true,\n};\n\nexport const libraryPackConfig: ConfigFragment = {\n pack: libraryPackDefaults,\n};\n\nexport const workspaceRunConfig: ConfigFragment = {\n run: {\n cache: {\n scripts: true,\n tasks: true,\n },\n enablePrePostScripts: true,\n },\n};\n"],"mappings":";;;AAeA,SAAS,aAAa,QAAoC;CAExD,OAAO;AACT;AAEA,SAAgB,cAAc,GAAG,WAAkD;CACjF,IAAI,SAAqB,CAAC;CAE1B,KAAK,MAAM,YAAY,WACrB,SAAS,YAAY,QAAQ,aAAa,QAAQ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AC,GAAG,6BAA6B;EACxC,cAAc,CAAC,GAAG,oBAAoB,GAAG,4BAA4B;EACrE,GAAG;EACH,OAAO;GACL,GAAG,wBAAwB;GAC3B,mCAAmC;EACrC;CACF;AACF,EACF;;;AC3JA,MAAa,oBAAoC;CAC/C,KAAK;CACL,MAAM;CACN,QAAQ;GACL,4BAA4B;GAC5B,6BAA6B;CAChC;AACF;AAEA,MAAa,oBAAoC,EAC/C,MAAM,sBACR;AAEA,MAAa,uBAAuC,EAClD,MAAM,yBACR;AAEA,MAAa,kBAAkC;CAC7C,KAAK;CACL,MAAM;AACR;AAEA,MAAa,iBAAiC,EAC5C,MAAM,mBACR;AAEA,MAAa,2BAA2C,EACtD,MAAM,6BACR;AAEA,MAAa,6BAA6C;CACxD,KAAK;CACL,MAAM;AACR;AAEA,MAAa,gCAAgD,EAC3D,MAAM,kCACR;AAEA,MAAa,kCAAkD;CAC7D,KAAK;CACL,MAAM;AACR;AAEA,MAAa,qBAAqC,EAChD,MAAMC,qBACR;AAEA,MAAa,wBAAwC,EACnD,MAAMC,wBACR;AAEA,MAAa,iCAAiD,EAC5D,MAAMC,iCACR;AAEA,MAAa,4BAA4C,EACvD,MAAMC,4BACR;AAEA,MAAa,sBAAkC;CAC7C,MAAM;EACJ,OAAO;EACP,SAAS;CACX;CACA,OAAO;CACP,KAAK;CACL,QAAQ,CAAC,KAAK;CACd,SAAS,EACP,QAAQ,KACV;CACA,WAAW;AACb;AAEA,MAAa,oBAAoC,EAC/C,MAAM,oBACR;AAEA,MAAa,qBAAqC,EAChD,KAAK;CACH,OAAO;EACL,SAAS;EACT,OAAO;CACT;CACA,sBAAsB;AACxB,EACF"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["nodeTestLintConfig","browserTestLintConfig","cloudflareWorkerTestLintConfig","reactNativeTestLintConfig","nodeTestLintSettings","browserTestLintSettings","cloudflareWorkerTestLintSettings","reactNativeTestLintSettings"],"sources":["../../src/compose.ts","../../src/format.ts","../../src/lint/plugin-file.ts","../../src/lint/rules/browser.ts","../../src/lint/rules/jest.ts","../../src/lint/rules/node.ts","../../src/lint/rules/react-core.ts","../../src/lint/rules/react-dom.ts","../../src/lint/rules/universal.ts","../../src/lint/rules/react-native.ts","../../src/lint/rules/vitest.ts","../../src/lint/profiles.ts","../../src/lint/configs.ts","../../src/fragments.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport { defineConfig, mergeConfig } from \"vite-plus\";\n\ninterface NamedPlugin {\n readonly name: string;\n}\n\ntype PluginValue = NamedPlugin | false | null | undefined;\n\nexport type PluginInput = PluginValue | Promise<PluginInput> | readonly PluginInput[];\n\nexport type ConfigFragment = Omit<UserConfig, \"plugins\"> & {\n readonly plugins?: readonly PluginInput[];\n};\n\nfunction toUserConfig(config: ConfigFragment): UserConfig {\n // eslint-disable-next-line typescript/no-unsafe-type-assertion -- Vite's recursive PluginOption overflows TypeScript 7 when consumers pass an ordinary Plugin; ConfigFragment preserves the named-plugin boundary without recursive comparison.\n return config as UserConfig;\n}\n\nexport function composeConfig(...fragments: readonly ConfigFragment[]): UserConfig {\n let config: UserConfig = {};\n\n for (const fragment of fragments) {\n config = mergeConfig(config, toUserConfig(fragment));\n }\n\n return defineConfig(config);\n}\n","import type { UserConfig } from \"vite-plus\";\nimport {\n CLOUDFLARE_WORKER_IGNORE_PATTERNS,\n DEFAULT_IGNORE_PATTERNS,\n REACT_NATIVE_IGNORE_PATTERNS,\n} from \"./constants.ts\";\n\ntype FormatConfig = NonNullable<UserConfig[\"fmt\"]>;\n\nexport const baseFormatConfig: FormatConfig = {\n ignorePatterns: [...DEFAULT_IGNORE_PATTERNS],\n sortImports: {\n internalPattern: [\"#\", \"@/\"],\n newlinesBetween: false,\n groups: [\n \"type-import\",\n [\"value-builtin\", \"value-external\"],\n \"type-internal\",\n \"value-internal\",\n [\"type-parent\", \"type-sibling\", \"type-index\"],\n [\"value-parent\", \"value-sibling\", \"value-index\"],\n \"unknown\",\n ],\n },\n};\n\nexport const reactFormatConfig: FormatConfig = {\n sortTailwindcss: {\n functions: [\"tv\"],\n },\n};\n\nexport const reactNativeFormatConfig: FormatConfig = {\n ignorePatterns: [...REACT_NATIVE_IGNORE_PATTERNS],\n};\n\nexport const cloudflareWorkerFormatConfig: FormatConfig = {\n ignorePatterns: [...CLOUDFLARE_WORKER_IGNORE_PATTERNS],\n};\n","import { URL, fileURLToPath } from \"node:url\";\n\n// Oxlint loads a JS plugin from its file. Run from source, that is the TypeScript entry beside this\n// module (Node strips its types); from the published package, the built entry the package exports.\nexport const kasoaPluginFile: string = fileURLToPath(\n import.meta.url.endsWith(\".ts\")\n ? new URL(\"plugin/index.ts\", import.meta.url)\n : import.meta.resolve(\"@kasoa/vite-plus-config/oxlint-plugin\"),\n);\n","import type { LintRules } from \"../types.ts\";\n\nexport const browserRules: LintRules = {\n \"no-alert\": \"error\",\n \"unicorn/prefer-classlist-toggle\": \"error\",\n \"unicorn/prefer-dom-node-append\": \"error\",\n \"unicorn/prefer-dom-node-dataset\": \"error\",\n \"unicorn/prefer-dom-node-remove\": \"error\",\n \"unicorn/prefer-dom-node-text-content\": \"error\",\n \"unicorn/prefer-keyboard-event-key\": \"error\",\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n};\n","import type { LintRules } from \"../types.ts\";\n\nexport const jestRules: LintRules = {\n \"max-nested-callbacks\": [\n \"error\",\n {\n max: 4,\n },\n ],\n \"jest/consistent-test-it\": [\n \"error\",\n {\n fn: \"test\",\n withinDescribe: \"it\",\n },\n ],\n \"jest/max-nested-describe\": [\n \"error\",\n {\n max: 3,\n },\n ],\n \"jest/no-alias-methods\": \"error\",\n \"jest/no-duplicate-hooks\": \"error\",\n \"jest/no-identical-title\": \"error\",\n \"jest/no-interpolation-in-snapshots\": \"error\",\n \"jest/no-large-snapshots\": \"error\",\n \"jest/no-mocks-import\": \"error\",\n \"jest/no-restricted-jest-methods\": [\n \"error\",\n {\n doMock: \"Use a maintained implementation, spy, or injected owned dependency.\",\n mock: \"Use a maintained implementation, spy, or injected owned dependency.\",\n unstable_mockModule: \"Use a maintained implementation, spy, or injected owned dependency.\",\n },\n ],\n \"jest/no-test-prefixes\": \"error\",\n \"jest/no-test-return-statement\": \"error\",\n \"jest/no-unneeded-async-expect-function\": \"error\",\n \"jest/padding-around-after-all-blocks\": \"error\",\n \"jest/padding-around-test-blocks\": \"error\",\n \"jest/prefer-called-with\": \"error\",\n \"jest/prefer-comparison-matcher\": \"error\",\n \"jest/prefer-each\": \"error\",\n \"jest/prefer-equality-matcher\": \"error\",\n \"jest/prefer-hooks-in-order\": \"error\",\n \"jest/prefer-hooks-on-top\": \"error\",\n \"jest/prefer-importing-jest-globals\": \"error\",\n \"jest/prefer-mock-promise-shorthand\": \"error\",\n \"jest/prefer-mock-return-shorthand\": \"error\",\n \"jest/prefer-spy-on\": \"error\",\n \"jest/prefer-to-be\": \"error\",\n \"jest/prefer-to-contain\": \"error\",\n \"jest/prefer-to-have-been-called-times\": \"error\",\n \"jest/prefer-to-have-length\": \"error\",\n \"jest/prefer-todo\": \"error\",\n};\n","import type { LintRules } from \"../types.ts\";\n\nexport const nodeRules: LintRules = {\n \"node/exports-style\": \"error\",\n \"node/global-require\": \"error\",\n \"node/no-exports-assign\": \"error\",\n \"node/no-mixed-requires\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n};\n","import type { LintRules } from \"../types.ts\";\n\nexport const reactCoreRules: LintRules = {\n \"kasoa/effects-in-hooks\": \"error\",\n \"react/display-name\": \"error\",\n \"react/function-component-definition\": [\n \"error\",\n {\n namedComponents: \"function-declaration\",\n unnamedComponents: [\"arrow-function\", \"function-expression\"],\n },\n ],\n \"react/hook-use-state\": \"error\",\n \"react/jsx-boolean-value\": \"error\",\n \"react/jsx-curly-brace-presence\": \"error\",\n \"react/jsx-fragments\": \"error\",\n \"react/jsx-max-depth\": [\n \"error\",\n {\n max: 6,\n },\n ],\n \"react/jsx-no-constructed-context-values\": \"error\",\n \"react/jsx-no-useless-fragment\": \"error\",\n \"react/jsx-pascal-case\": \"error\",\n \"react/no-array-index-key\": \"error\",\n \"react/no-object-type-as-default-prop\": \"error\",\n \"react/no-redundant-should-component-update\": \"error\",\n \"react/no-set-state\": \"error\",\n \"react/prefer-es6-class\": \"error\",\n \"react/rules-of-hooks\": \"error\",\n \"react/self-closing-comp\": \"error\",\n \"react/state-in-constructor\": \"error\",\n \"react/exhaustive-deps\": \"error\",\n \"react/error-boundaries\": \"error\",\n \"react/globals\": \"error\",\n \"react/immutability\": \"error\",\n \"react/incompatible-library\": \"error\",\n \"react/preserve-manual-memoization\": \"error\",\n \"react/purity\": \"error\",\n \"react/refs\": \"error\",\n \"react/set-state-in-effect\": \"error\",\n \"react/set-state-in-render\": \"error\",\n \"react/static-components\": \"error\",\n \"react/unsupported-syntax\": \"error\",\n \"react/use-memo\": \"error\",\n \"react/void-use-memo\": \"error\",\n \"react/react-in-jsx-scope\": \"off\",\n \"react/jsx-key\": \"error\",\n \"react/jsx-no-duplicate-props\": \"error\",\n \"react/jsx-no-undef\": \"error\",\n \"react/no-children-prop\": \"error\",\n \"react/no-clone-element\": \"error\",\n \"react/no-direct-mutation-state\": \"error\",\n \"react/no-react-children\": \"error\",\n \"react/no-string-refs\": \"error\",\n \"react/no-unsafe\": \"error\",\n \"react/style-prop-object\": \"off\",\n};\n","import type { LintRules } from \"../types.ts\";\n\nexport const reactDomRules: LintRules = {\n \"react/checked-requires-onchange-or-readonly\": \"error\",\n \"react/jsx-no-target-blank\": \"error\",\n \"react/no-unescaped-entities\": \"error\",\n \"react/no-danger\": \"error\",\n \"react/no-danger-with-children\": \"error\",\n \"react/no-find-dom-node\": \"error\",\n \"react/no-unknown-property\": \"error\",\n \"react/void-dom-elements-no-children\": \"error\",\n};\n","import type { LintRules } from \"../types.ts\";\n\nexport const universalRestrictedProperties = [\n {\n object: \"Reflect\",\n property: \"get\",\n },\n {\n object: \"Reflect\",\n property: \"apply\",\n },\n] as const;\n\nexport const universalRules: LintRules = {\n \"kasoa/disable-reason\": \"error\",\n \"kasoa/no-shadowed-globals\": \"error\",\n \"accessor-pairs\": \"error\",\n \"array-callback-return\": \"error\",\n \"arrow-body-style\": \"error\",\n curly: [\"error\", \"multi-line\", \"consistent\"],\n \"default-case-last\": \"error\",\n \"default-param-last\": \"error\",\n eqeqeq: \"error\",\n \"func-name-matching\": \"error\",\n \"func-names\": \"error\",\n \"grouped-accessor-pairs\": [\"error\", \"getBeforeSet\"],\n \"guard-for-in\": \"error\",\n \"import/consistent-type-specifier-style\": \"error\",\n \"import/first\": \"error\",\n \"import/newline-after-import\": \"error\",\n \"import/no-duplicates\": \"error\",\n \"import/no-mutable-exports\": \"error\",\n \"import/no-named-default\": \"error\",\n \"logical-assignment-operators\": \"error\",\n \"max-depth\": [\n \"error\",\n {\n max: 3,\n },\n ],\n \"max-nested-callbacks\": [\n \"error\",\n {\n max: 3,\n },\n ],\n \"max-params\": [\n \"error\",\n {\n max: 3,\n },\n ],\n \"no-array-constructor\": \"error\",\n \"no-await-in-loop\": \"error\",\n \"no-case-declarations\": \"error\",\n \"no-constructor-return\": \"error\",\n \"no-else-return\": \"error\",\n \"no-empty\": \"error\",\n \"no-extra-label\": \"error\",\n \"no-fallthrough\": \"error\",\n \"no-implicit-coercion\": \"error\",\n \"no-inline-comments\": \"error\",\n \"no-inner-declarations\": \"error\",\n \"no-label-var\": \"error\",\n \"no-labels\": \"error\",\n \"no-lone-blocks\": \"error\",\n \"no-lonely-if\": \"error\",\n \"no-loop-func\": \"error\",\n \"no-multi-assign\": \"error\",\n \"no-multi-str\": \"error\",\n \"no-nested-ternary\": \"error\",\n \"no-new-func\": \"error\",\n \"no-new-wrappers\": \"error\",\n \"no-object-constructor\": \"error\",\n \"no-promise-executor-return\": \"error\",\n \"no-prototype-builtins\": \"error\",\n \"no-redeclare\": \"error\",\n \"no-restricted-properties\": [\"error\", ...universalRestrictedProperties],\n \"no-return-assign\": \"error\",\n \"no-script-url\": \"error\",\n \"no-self-compare\": \"error\",\n \"no-template-curly-in-string\": \"error\",\n \"no-useless-call\": \"error\",\n \"no-useless-computed-key\": \"error\",\n \"no-useless-return\": \"error\",\n \"no-warning-comments\": \"error\",\n \"object-shorthand\": \"error\",\n \"operator-assignment\": \"error\",\n \"oxc/branches-sharing-code\": \"error\",\n \"oxc/no-accumulating-spread\": \"error\",\n \"oxc/no-map-spread\": \"error\",\n \"prefer-arrow-callback\": \"error\",\n \"prefer-const\": \"error\",\n \"prefer-destructuring\": \"error\",\n \"prefer-exponentiation-operator\": \"error\",\n \"prefer-named-capture-group\": \"error\",\n \"prefer-numeric-literals\": \"error\",\n \"prefer-object-has-own\": \"error\",\n \"prefer-object-spread\": \"error\",\n \"prefer-regex-literals\": \"error\",\n \"prefer-rest-params\": \"error\",\n \"prefer-spread\": \"error\",\n \"prefer-template\": \"error\",\n \"promise/no-nesting\": \"error\",\n \"promise/no-return-wrap\": \"error\",\n \"promise/param-names\": \"error\",\n \"promise/prefer-catch\": \"error\",\n radix: \"error\",\n \"symbol-description\": \"error\",\n \"typescript/adjacent-overload-signatures\": \"error\",\n \"typescript/array-type\": \"error\",\n \"typescript/ban-ts-comment\": [\n \"error\",\n {\n minimumDescriptionLength: 10,\n },\n ],\n \"typescript/ban-tslint-comment\": \"error\",\n \"typescript/class-literal-property-style\": \"error\",\n \"typescript/consistent-generic-constructors\": \"error\",\n \"typescript/consistent-indexed-object-style\": \"error\",\n \"typescript/consistent-type-assertions\": \"error\",\n \"typescript/consistent-type-exports\": \"error\",\n \"typescript/consistent-type-imports\": [\n \"error\",\n {\n prefer: \"type-imports\",\n fixStyle: \"separate-type-imports\",\n },\n ],\n \"typescript/dot-notation\": \"error\",\n \"typescript/method-signature-style\": \"error\",\n \"typescript/no-confusing-void-expression\": \"error\",\n \"typescript/no-deprecated\": \"error\",\n \"typescript/no-empty-object-type\": \"error\",\n \"typescript/no-inferrable-types\": \"error\",\n \"typescript/no-misused-promises\": \"error\",\n \"typescript/no-mixed-enums\": \"error\",\n \"typescript/no-unnecessary-qualifier\": \"error\",\n \"typescript/no-unsafe-argument\": \"error\",\n \"typescript/no-unsafe-assignment\": \"error\",\n \"typescript/no-unsafe-call\": \"error\",\n \"typescript/no-unsafe-function-type\": \"error\",\n \"typescript/no-unsafe-member-access\": \"error\",\n \"typescript/no-unsafe-return\": \"error\",\n \"typescript/no-unsafe-type-assertion\": \"error\",\n \"typescript/no-wrapper-object-types\": \"error\",\n \"typescript/only-throw-error\": \"error\",\n \"typescript/parameter-properties\": \"error\",\n \"typescript/prefer-enum-initializers\": \"error\",\n \"typescript/prefer-find\": \"error\",\n \"typescript/prefer-for-of\": \"error\",\n \"typescript/prefer-function-type\": \"error\",\n \"typescript/prefer-includes\": \"error\",\n \"typescript/prefer-nullish-coalescing\": \"error\",\n \"typescript/prefer-promise-reject-errors\": \"error\",\n \"typescript/prefer-readonly\": \"error\",\n \"typescript/prefer-reduce-type-parameter\": \"error\",\n \"typescript/prefer-regexp-exec\": \"error\",\n \"typescript/prefer-return-this-type\": \"error\",\n \"typescript/prefer-string-starts-ends-with\": \"error\",\n \"typescript/related-getter-setter-pairs\": \"error\",\n \"typescript/restrict-plus-operands\": \"error\",\n \"typescript/return-await\": \"error\",\n \"typescript/strict-boolean-expressions\": \"error\",\n \"typescript/strict-void-return\": \"error\",\n \"typescript/switch-exhaustiveness-check\": \"error\",\n \"typescript/unified-signatures\": \"error\",\n \"unicorn/catch-error-name\": \"error\",\n \"unicorn/consistent-assert\": \"error\",\n \"unicorn/consistent-date-clone\": \"error\",\n \"unicorn/consistent-empty-array-spread\": \"error\",\n \"unicorn/consistent-existence-index-check\": \"error\",\n \"unicorn/consistent-template-literal-escape\": \"error\",\n \"unicorn/custom-error-definition\": \"error\",\n \"unicorn/error-message\": \"error\",\n \"unicorn/escape-case\": \"error\",\n \"unicorn/explicit-length-check\": \"error\",\n \"unicorn/explicit-timer-delay\": \"error\",\n \"unicorn/filename-case\": [\n \"error\",\n {\n case: \"kebabCase\",\n },\n ],\n \"unicorn/max-nested-calls\": [\n \"error\",\n {\n max: 5,\n },\n ],\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-array-callback-reference\": \"error\",\n \"unicorn/no-array-method-this-argument\": \"error\",\n \"unicorn/no-console-spaces\": \"error\",\n \"unicorn/no-hex-escape\": \"error\",\n \"unicorn/no-immediate-mutation\": \"error\",\n \"unicorn/no-instanceof-array\": \"error\",\n \"unicorn/no-negation-in-equality-check\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-static-only-class\": \"error\",\n \"unicorn/no-this-assignment\": \"error\",\n \"unicorn/no-typeof-undefined\": \"error\",\n \"unicorn/no-unnecessary-array-flat-depth\": \"error\",\n \"unicorn/no-unnecessary-array-splice-count\": \"error\",\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n \"unicorn/no-unreadable-iife\": \"error\",\n \"unicorn/no-useless-collection-argument\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": \"error\",\n \"unicorn/no-useless-switch-case\": \"error\",\n \"unicorn/no-useless-undefined\": \"error\",\n \"unicorn/no-zero-fractions\": \"error\",\n \"unicorn/number-literal-case\": \"error\",\n \"unicorn/numeric-separators-style\": \"error\",\n \"unicorn/prefer-array-find\": \"error\",\n \"unicorn/prefer-array-flat\": \"error\",\n \"unicorn/prefer-array-flat-map\": \"error\",\n \"unicorn/prefer-array-index-of\": \"error\",\n \"unicorn/prefer-array-some\": \"error\",\n \"unicorn/prefer-at\": \"error\",\n \"unicorn/prefer-bigint-literals\": \"error\",\n \"unicorn/prefer-blob-reading-methods\": \"error\",\n \"unicorn/prefer-class-fields\": \"error\",\n \"unicorn/prefer-code-point\": \"error\",\n \"unicorn/prefer-date-now\": \"error\",\n \"unicorn/prefer-default-parameters\": \"error\",\n \"unicorn/prefer-export-from\": \"error\",\n \"unicorn/prefer-global-this\": \"error\",\n \"unicorn/prefer-import-meta-properties\": \"error\",\n \"unicorn/prefer-includes\": \"error\",\n \"unicorn/prefer-logical-operator-over-ternary\": \"error\",\n \"unicorn/prefer-math-min-max\": \"error\",\n \"unicorn/prefer-math-trunc\": \"error\",\n \"unicorn/prefer-native-coercion-functions\": \"error\",\n \"unicorn/prefer-negative-index\": \"error\",\n \"unicorn/prefer-number-coercion\": \"error\",\n \"unicorn/prefer-object-from-entries\": \"error\",\n \"unicorn/prefer-optional-catch-binding\": \"error\",\n \"unicorn/prefer-prototype-methods\": \"error\",\n \"unicorn/prefer-regexp-test\": \"error\",\n \"unicorn/prefer-response-static-json\": \"error\",\n \"unicorn/prefer-set-has\": \"error\",\n \"unicorn/prefer-single-call\": \"error\",\n \"unicorn/prefer-spread\": \"error\",\n \"unicorn/prefer-string-raw\": \"error\",\n \"unicorn/prefer-string-replace-all\": \"error\",\n \"unicorn/prefer-string-slice\": \"error\",\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n \"unicorn/prefer-structured-clone\": \"error\",\n \"unicorn/prefer-ternary\": [\"error\", \"only-single-line\"],\n \"unicorn/prefer-type-error\": \"error\",\n \"unicorn/relative-url-style\": \"error\",\n \"unicorn/require-array-join-separator\": \"error\",\n \"unicorn/require-module-attributes\": \"error\",\n \"unicorn/require-number-to-fixed-digits-argument\": \"error\",\n \"unicorn/switch-case-braces\": \"error\",\n \"unicorn/switch-case-break-position\": \"error\",\n \"unicorn/text-encoding-identifier-case\": \"error\",\n \"unicorn/throw-new-error\": \"error\",\n yoda: \"error\",\n complexity: [\n \"error\",\n {\n max: 20,\n },\n ],\n \"getter-return\": \"error\",\n \"no-bitwise\": \"error\",\n \"no-console\": [\n \"error\",\n {\n allow: [\"info\", \"warn\", \"error\"],\n },\n ],\n \"no-param-reassign\": [\n \"error\",\n {\n props: true,\n },\n ],\n \"no-plusplus\": \"error\",\n \"no-undef\": \"error\",\n \"no-unneeded-ternary\": \"error\",\n \"no-unreachable\": \"error\",\n \"import/no-cycle\": \"error\",\n \"import/no-unassigned-import\": \"off\",\n \"oxc/bad-match-all-arg\": \"error\",\n \"typescript/consistent-return\": \"error\",\n \"typescript/no-dynamic-delete\": \"error\",\n \"typescript/no-explicit-any\": \"error\",\n \"typescript/no-floating-promises\": \"error\",\n \"typescript/no-misused-spread\": \"error\",\n \"typescript/no-non-null-assertion\": \"error\",\n \"typescript/no-require-imports\": \"error\",\n \"typescript/no-unnecessary-condition\": \"error\",\n \"typescript/no-unnecessary-type-arguments\": \"error\",\n \"typescript/no-unnecessary-type-assertion\": \"error\",\n \"typescript/no-unnecessary-type-parameters\": \"error\",\n \"typescript/no-useless-default-assignment\": \"error\",\n \"typescript/non-nullable-type-assertion-style\": \"error\",\n \"typescript/prefer-optional-chain\": \"error\",\n \"typescript/require-array-sort-compare\": \"error\",\n \"typescript/restrict-template-expressions\": \"error\",\n \"typescript/unbound-method\": \"error\",\n \"typescript/use-unknown-in-catch-callback-variable\": \"error\",\n \"unicorn/no-abusive-eslint-disable\": \"error\",\n};\n","import type { LintRules } from \"../types.ts\";\nimport { universalRestrictedProperties } from \"./universal.ts\";\n\nexport const reactNativeRules: LintRules = {\n \"kasoa/legend-list-only\": \"error\",\n \"kasoa/no-dynamic-import\": \"error\",\n \"kasoa/no-mapped-scrollview\": \"error\",\n \"no-restricted-properties\": [\n \"error\",\n ...universalRestrictedProperties,\n {\n property: \"toSorted\",\n message: \"Hermes lacks toSorted; copy the array before sorting.\",\n },\n {\n property: \"matchAll\",\n message: \"Hermes leaves named groups out of matchAll results; use exec or split.\",\n },\n {\n object: \"Intl\",\n property: \"RelativeTimeFormat\",\n message: \"Hermes lacks Intl.RelativeTimeFormat; use a supported formatter.\",\n },\n {\n object: \"Intl\",\n property: \"PluralRules\",\n message: \"Hermes lacks Intl.PluralRules; choose plural forms explicitly.\",\n },\n {\n object: \"Intl\",\n property: \"ListFormat\",\n message: \"Hermes lacks Intl.ListFormat; join lists explicitly.\",\n },\n {\n object: \"Intl\",\n property: \"Segmenter\",\n message: \"Hermes lacks Intl.Segmenter; split text explicitly.\",\n },\n {\n object: \"Intl\",\n property: \"DisplayNames\",\n message: \"Hermes lacks Intl.DisplayNames; map codes to names explicitly.\",\n },\n {\n object: \"Array\",\n property: \"fromAsync\",\n message: \"Hermes lacks Array.fromAsync; collect async values in a loop.\",\n },\n {\n object: \"RegExp\",\n property: \"escape\",\n message: \"Hermes lacks RegExp.escape; escape patterns explicitly.\",\n },\n ],\n \"no-restricted-globals\": [\n \"error\",\n { name: \"Temporal\", message: \"Hermes lacks Temporal; use Date.\" },\n ],\n \"react/iframe-missing-sandbox\": \"off\",\n \"react/jsx-no-script-url\": \"off\",\n \"react/no-unknown-property\": \"off\",\n \"react/no-unescaped-entities\": \"off\",\n \"react/no-unstable-nested-components\": [\n \"error\",\n {\n allowAsProps: true,\n },\n ],\n \"react/void-dom-elements-no-children\": \"off\",\n \"unicorn/no-array-reverse\": \"error\",\n \"unicorn/no-array-sort\": [\n \"error\",\n {\n allowAfterSpread: true,\n },\n ],\n};\n","import type { LintRules } from \"../types.ts\";\n\nexport const vitestRules: LintRules = {\n // Vitest names a mocked module with `import()`, and tests load modules after mocking them.\n \"kasoa/no-dynamic-import\": \"off\",\n \"max-nested-callbacks\": [\n \"error\",\n {\n max: 4,\n },\n ],\n \"vitest/consistent-each-for\": \"error\",\n \"vitest/consistent-test-it\": [\n \"error\",\n {\n fn: \"test\",\n withinDescribe: \"it\",\n },\n ],\n \"vitest/consistent-vitest-vi\": \"error\",\n \"vitest/max-nested-describe\": [\n \"error\",\n {\n max: 3,\n },\n ],\n \"vitest/no-alias-methods\": \"error\",\n \"vitest/no-duplicate-hooks\": \"error\",\n \"vitest/no-identical-title\": \"error\",\n \"vitest/no-import-node-test\": \"error\",\n \"vitest/no-interpolation-in-snapshots\": \"error\",\n \"vitest/no-large-snapshots\": \"error\",\n \"vitest/no-mocks-import\": \"error\",\n \"vitest/no-restricted-vi-methods\": [\n \"error\",\n {\n doMock: \"Use a maintained implementation, spy, or injected owned dependency.\",\n mock: \"Use a maintained implementation, spy, or injected owned dependency.\",\n },\n ],\n \"vitest/no-test-prefixes\": \"error\",\n \"vitest/no-test-return-statement\": \"error\",\n \"vitest/no-unneeded-async-expect-function\": \"error\",\n \"vitest/padding-around-after-all-blocks\": \"error\",\n \"vitest/padding-around-test-blocks\": \"error\",\n \"vitest/prefer-called-exactly-once-with\": \"error\",\n \"vitest/prefer-called-once\": \"error\",\n \"vitest/prefer-called-with\": \"error\",\n \"vitest/prefer-comparison-matcher\": \"error\",\n \"vitest/prefer-each\": \"error\",\n \"vitest/prefer-equality-matcher\": \"error\",\n \"vitest/prefer-expect-resolves\": \"error\",\n \"vitest/prefer-expect-type-of\": \"error\",\n \"vitest/prefer-hooks-in-order\": \"error\",\n \"vitest/prefer-hooks-on-top\": \"error\",\n \"vitest/prefer-import-in-mock\": \"error\",\n \"vitest/prefer-importing-vitest-globals\": \"error\",\n \"vitest/prefer-mock-promise-shorthand\": \"error\",\n \"vitest/prefer-mock-return-shorthand\": \"error\",\n \"vitest/prefer-spy-on\": \"error\",\n \"vitest/prefer-strict-boolean-matchers\": \"error\",\n \"vitest/prefer-strict-equal\": \"error\",\n \"vitest/prefer-to-be\": \"error\",\n \"vitest/prefer-to-be-object\": \"error\",\n \"vitest/prefer-to-contain\": \"error\",\n \"vitest/prefer-to-have-been-called-times\": \"error\",\n \"vitest/prefer-to-have-length\": \"error\",\n \"vitest/prefer-todo\": \"error\",\n};\n","import type { LintConfig, LintProfile } from \"./types.ts\";\nimport { browserRules } from \"./rules/browser.ts\";\nimport { jestRules } from \"./rules/jest.ts\";\nimport { nodeRules } from \"./rules/node.ts\";\nimport { reactCoreRules } from \"./rules/react-core.ts\";\nimport { reactDomRules } from \"./rules/react-dom.ts\";\nimport { reactNativeRules } from \"./rules/react-native.ts\";\nimport { vitestRules } from \"./rules/vitest.ts\";\n\nexport const BASE_LINT_PLUGINS = [\"typescript\", \"unicorn\", \"oxc\", \"import\", \"promise\"] as const;\n\nexport const neutralEnvironment: NonNullable<LintConfig[\"env\"]> = {\n browser: false,\n node: false,\n serviceworker: false,\n worker: false,\n} as const;\n\nexport const nodeEnvironment: NonNullable<LintConfig[\"env\"]> = {\n ...neutralEnvironment,\n node: true,\n} as const;\n\nexport const browserEnvironment: NonNullable<LintConfig[\"env\"]> = {\n ...neutralEnvironment,\n browser: true,\n} as const;\n\nexport const reactNativeEnvironment: NonNullable<LintConfig[\"env\"]> = {\n ...neutralEnvironment,\n} as const;\n\nconst reactNativeJestEnvironment: NonNullable<LintConfig[\"env\"]> = {\n ...reactNativeEnvironment,\n jest: true,\n} as const;\n\nexport const cloudflareWorkerEnvironment: NonNullable<LintConfig[\"env\"]> = {\n ...neutralEnvironment,\n serviceworker: true,\n worker: true,\n} as const;\n\nconst platformGlobalsOff = {\n __DEV__: \"off\",\n Cloudflare: \"off\",\n DigestStream: \"off\",\n FixedLengthStream: \"off\",\n HTMLRewriter: \"off\",\n IdentityTransformStream: \"off\",\n process: \"off\",\n WebSocketPair: \"off\",\n WebSocketRequestResponsePair: \"off\",\n} as const;\n\nconst nodeGlobals = {\n ...platformGlobalsOff,\n console: \"readonly\",\n process: \"readonly\",\n} as const;\n\nconst cloudflareWorkerGlobals = {\n ...platformGlobalsOff,\n Cloudflare: \"readonly\",\n DigestStream: \"readonly\",\n FixedLengthStream: \"readonly\",\n HTMLRewriter: \"readonly\",\n IdentityTransformStream: \"readonly\",\n WebSocketPair: \"readonly\",\n WebSocketRequestResponsePair: \"readonly\",\n} as const;\n\nexport const neutralLint: LintProfile = {\n env: neutralEnvironment,\n globals: platformGlobalsOff,\n plugins: [...BASE_LINT_PLUGINS],\n};\n\nexport const nodeLint: LintProfile = {\n env: nodeEnvironment,\n globals: nodeGlobals,\n plugins: [...BASE_LINT_PLUGINS, \"node\"],\n rules: nodeRules,\n};\n\nexport const browserLint: LintProfile = {\n env: browserEnvironment,\n globals: platformGlobalsOff,\n plugins: [...BASE_LINT_PLUGINS],\n rules: browserRules,\n};\n\nexport const reactCoreLint: LintProfile = {\n plugins: [...BASE_LINT_PLUGINS, \"react\"],\n rules: reactCoreRules,\n};\n\nexport const reactDomLint: LintProfile = {\n plugins: [...BASE_LINT_PLUGINS, \"react\", \"jsx-a11y\"],\n rules: reactDomRules,\n};\n\nconst reactNativeGlobals = {\n ...platformGlobalsOff,\n __BUNDLE_START_TIME__: \"readonly\",\n __DEV__: \"readonly\",\n AbortController: \"readonly\",\n AbortSignal: \"readonly\",\n alert: \"readonly\",\n Blob: \"readonly\",\n cancelAnimationFrame: \"readonly\",\n clearImmediate: \"readonly\",\n clearInterval: \"readonly\",\n clearTimeout: \"readonly\",\n console: \"readonly\",\n crypto: \"readonly\",\n DOMRect: \"readonly\",\n ErrorUtils: \"readonly\",\n Event: \"readonly\",\n EventTarget: \"readonly\",\n fetch: \"readonly\",\n fetchBundle: \"readonly\",\n File: \"readonly\",\n FileReader: \"readonly\",\n FormData: \"readonly\",\n Headers: \"readonly\",\n HermesInternal: \"readonly\",\n navigator: \"readonly\",\n originalXMLHttpRequest: \"readonly\",\n performance: \"readonly\",\n process: \"readonly\",\n queueMicrotask: \"readonly\",\n requestAnimationFrame: \"readonly\",\n Request: \"readonly\",\n require: \"readonly\",\n Response: \"readonly\",\n setImmediate: \"readonly\",\n setInterval: \"readonly\",\n setTimeout: \"readonly\",\n URL: \"readonly\",\n URLSearchParams: \"readonly\",\n WebSocket: \"readonly\",\n XMLHttpRequest: \"readonly\",\n XMLHttpRequestUpload: \"readonly\",\n} as const;\n\nexport const reactNativeRuntimeLint: LintProfile = {\n env: reactNativeEnvironment,\n globals: reactNativeGlobals,\n plugins: [...BASE_LINT_PLUGINS, \"react\"],\n rules: reactNativeRules,\n};\n\nexport const reactWebLint: LintProfile = {\n env: browserEnvironment,\n globals: platformGlobalsOff,\n plugins: [...BASE_LINT_PLUGINS, \"react\", \"jsx-a11y\"],\n rules: {\n ...browserRules,\n ...reactCoreRules,\n ...reactDomRules,\n },\n};\n\nexport const reactNativeLint: LintProfile = {\n env: reactNativeEnvironment,\n globals: reactNativeGlobals,\n plugins: [...BASE_LINT_PLUGINS, \"react\"],\n rules: {\n ...reactCoreRules,\n ...reactNativeRules,\n },\n};\n\nexport const reactNativeJestTestLint: LintProfile = {\n env: reactNativeJestEnvironment,\n globals: reactNativeGlobals,\n plugins: [...BASE_LINT_PLUGINS, \"react\", \"jest\"],\n rules: {\n ...reactCoreRules,\n ...reactNativeRules,\n ...jestRules,\n },\n};\n\nexport const cloudflareWorkerLint: LintProfile = {\n env: cloudflareWorkerEnvironment,\n globals: cloudflareWorkerGlobals,\n plugins: [...BASE_LINT_PLUGINS],\n};\n\nexport const nodeTestLint: LintProfile = {\n ...nodeLint,\n plugins: [...BASE_LINT_PLUGINS, \"node\", \"vitest\"],\n rules: {\n ...nodeRules,\n ...vitestRules,\n },\n};\n\n// Node can't load React Native or Expo's native modules, so Vitest tests of React Native code\n// stand them in with module mocks.\nexport const reactNativeTestLint: LintProfile = {\n ...nodeTestLint,\n rules: {\n ...nodeTestLint.rules,\n \"vitest/no-restricted-vi-methods\": \"off\",\n },\n};\n\nexport const browserTestLint: LintProfile = {\n ...browserLint,\n plugins: [...BASE_LINT_PLUGINS, \"vitest\"],\n rules: {\n ...browserRules,\n ...vitestRules,\n },\n};\n\nexport const cloudflareWorkerTestLint: LintProfile = {\n ...cloudflareWorkerLint,\n plugins: [...BASE_LINT_PLUGINS, \"vitest\"],\n rules: vitestRules,\n};\n","import type { LintConfig } from \"./types.ts\";\nimport {\n CLOUDFLARE_WORKER_IGNORE_PATTERNS,\n CODE_FILES,\n COMMONJS_FILES,\n CONFIG_FILES,\n DEFAULT_IGNORE_PATTERNS,\n REACT_NATIVE_IGNORE_PATTERNS,\n REACT_NATIVE_JEST_SETUP_FILES,\n REACT_NATIVE_JEST_TEST_FILES,\n RUNTIME_OVERRIDE_EXCLUDE_FILES,\n TEST_FILES,\n VITEST_SETUP_FILES,\n} from \"../constants.ts\";\nimport { kasoaPluginFile } from \"./plugin-file.ts\";\nimport {\n BASE_LINT_PLUGINS,\n browserEnvironment,\n browserTestLint,\n cloudflareWorkerEnvironment,\n cloudflareWorkerLint,\n cloudflareWorkerTestLint,\n neutralEnvironment,\n neutralLint,\n nodeEnvironment,\n nodeLint,\n nodeTestLint,\n reactNativeJestTestLint,\n reactNativeRuntimeLint,\n reactNativeTestLint,\n} from \"./profiles.ts\";\nimport { browserRules } from \"./rules/browser.ts\";\nimport { nodeRules } from \"./rules/node.ts\";\nimport { reactCoreRules } from \"./rules/react-core.ts\";\nimport { reactDomRules } from \"./rules/react-dom.ts\";\nimport { reactNativeRules } from \"./rules/react-native.ts\";\nimport { universalRules } from \"./rules/universal.ts\";\n\nexport const baseLintConfig: LintConfig = {\n plugins: [...BASE_LINT_PLUGINS],\n jsPlugins: [{ name: \"kasoa\", specifier: kasoaPluginFile }],\n ignorePatterns: [...DEFAULT_IGNORE_PATTERNS],\n env: neutralEnvironment,\n globals: neutralLint.globals,\n options: {\n reportUnusedDisableDirectives: \"error\",\n typeAware: true,\n typeCheck: true,\n },\n categories: {\n correctness: \"error\",\n suspicious: \"error\",\n },\n extends: [{ rules: universalRules }],\n overrides: [\n {\n files: [...COMMONJS_FILES],\n ...nodeLint,\n rules: {\n ...nodeRules,\n \"typescript/no-require-imports\": \"off\",\n },\n },\n {\n files: [...CONFIG_FILES],\n ...nodeLint,\n rules: {\n ...nodeRules,\n \"func-names\": \"off\",\n },\n },\n {\n files: [\"**/*.d.ts\"],\n rules: {\n \"typescript/no-empty-object-type\": \"off\",\n },\n },\n ],\n};\n\nexport const nodeRuntimeLintConfig: LintConfig = {\n env: nodeEnvironment,\n globals: nodeLint.globals,\n plugins: [\"node\"],\n extends: [{ rules: nodeRules }],\n};\n\nexport const browserRuntimeLintConfig: LintConfig = {\n env: browserEnvironment,\n globals: neutralLint.globals,\n overrides: [\n {\n files: [...CODE_FILES],\n excludeFiles: [...RUNTIME_OVERRIDE_EXCLUDE_FILES],\n rules: browserRules,\n },\n ],\n};\n\nexport const reactCoreLintConfig: LintConfig = {\n plugins: [\"react\"],\n extends: [{ rules: reactCoreRules }],\n};\n\nexport const reactDomLintConfig: LintConfig = {\n plugins: [\"jsx-a11y\"],\n extends: [{ rules: reactDomRules }],\n};\n\nexport const reactNativeRuntimeLintConfig: LintConfig = {\n env: reactNativeRuntimeLint.env,\n globals: reactNativeRuntimeLint.globals,\n extends: [{ rules: reactNativeRules }],\n};\n\nexport const cloudflareWorkerRuntimeLintConfig: LintConfig = {\n env: cloudflareWorkerEnvironment,\n globals: cloudflareWorkerLint.globals,\n};\n\nexport const reactNativeGeneratedLintConfig: LintConfig = {\n ignorePatterns: [...REACT_NATIVE_IGNORE_PATTERNS],\n};\n\nexport const cloudflareWorkerGeneratedLintConfig: LintConfig = {\n ignorePatterns: [...CLOUDFLARE_WORKER_IGNORE_PATTERNS],\n};\n\nexport const nodeTestLintConfig: LintConfig = {\n overrides: [\n {\n files: [...TEST_FILES],\n ...nodeTestLint,\n },\n ],\n};\n\nexport const browserTestLintConfig: LintConfig = {\n overrides: [\n {\n files: [...TEST_FILES],\n ...browserTestLint,\n },\n ],\n};\n\nexport const cloudflareWorkerTestLintConfig: LintConfig = {\n overrides: [\n {\n files: [...TEST_FILES],\n ...cloudflareWorkerTestLint,\n },\n ],\n};\n\nexport const reactNativeTestLintConfig: LintConfig = {\n overrides: [\n {\n files: [...TEST_FILES, ...VITEST_SETUP_FILES],\n excludeFiles: [...REACT_NATIVE_JEST_TEST_FILES, ...REACT_NATIVE_JEST_SETUP_FILES],\n ...reactNativeTestLint,\n },\n {\n files: [...REACT_NATIVE_JEST_TEST_FILES],\n excludeFiles: [...VITEST_SETUP_FILES, ...REACT_NATIVE_JEST_SETUP_FILES],\n ...reactNativeJestTestLint,\n },\n {\n files: [...REACT_NATIVE_JEST_SETUP_FILES],\n excludeFiles: [...VITEST_SETUP_FILES, ...REACT_NATIVE_JEST_TEST_FILES],\n ...reactNativeJestTestLint,\n rules: {\n ...reactNativeJestTestLint.rules,\n \"jest/no-restricted-jest-methods\": \"off\",\n },\n },\n ],\n};\n","import type { UserConfig } from \"vite-plus\";\nimport type { ConfigFragment } from \"./compose.ts\";\nimport {\n DEFAULT_STAGED_CHECK_COMMAND,\n DEFAULT_STAGED_CHECK_GLOB,\n DEFAULT_STAGED_FORMAT_COMMAND,\n DEFAULT_STAGED_FORMAT_GLOB,\n} from \"./constants.ts\";\nimport {\n baseFormatConfig,\n cloudflareWorkerFormatConfig,\n reactFormatConfig,\n reactNativeFormatConfig,\n} from \"./format.ts\";\nimport {\n baseLintConfig,\n browserRuntimeLintConfig,\n browserTestLintConfig as browserTestLintSettings,\n cloudflareWorkerGeneratedLintConfig,\n cloudflareWorkerRuntimeLintConfig,\n cloudflareWorkerTestLintConfig as cloudflareWorkerTestLintSettings,\n nodeRuntimeLintConfig,\n nodeTestLintConfig as nodeTestLintSettings,\n reactCoreLintConfig,\n reactDomLintConfig,\n reactNativeGeneratedLintConfig,\n reactNativeRuntimeLintConfig,\n reactNativeTestLintConfig as reactNativeTestLintSettings,\n} from \"./lint/configs.ts\";\n\ntype PackConfig = Exclude<UserConfig[\"pack\"], readonly unknown[] | undefined>;\n\nexport const baseToolingConfig: ConfigFragment = {\n fmt: baseFormatConfig,\n lint: baseLintConfig,\n staged: {\n [DEFAULT_STAGED_CHECK_GLOB]: DEFAULT_STAGED_CHECK_COMMAND,\n [DEFAULT_STAGED_FORMAT_GLOB]: DEFAULT_STAGED_FORMAT_COMMAND,\n },\n};\n\nexport const nodeRuntimeConfig: ConfigFragment = {\n lint: nodeRuntimeLintConfig,\n};\n\nexport const browserRuntimeConfig: ConfigFragment = {\n lint: browserRuntimeLintConfig,\n};\n\nexport const reactCoreConfig: ConfigFragment = {\n fmt: reactFormatConfig,\n lint: reactCoreLintConfig,\n};\n\nexport const reactDomConfig: ConfigFragment = {\n lint: reactDomLintConfig,\n};\n\nexport const reactNativeRuntimeConfig: ConfigFragment = {\n lint: reactNativeRuntimeLintConfig,\n};\n\nexport const reactNativeGeneratedConfig: ConfigFragment = {\n fmt: reactNativeFormatConfig,\n lint: reactNativeGeneratedLintConfig,\n};\n\nexport const cloudflareWorkerRuntimeConfig: ConfigFragment = {\n lint: cloudflareWorkerRuntimeLintConfig,\n};\n\nexport const cloudflareWorkerGeneratedConfig: ConfigFragment = {\n fmt: cloudflareWorkerFormatConfig,\n lint: cloudflareWorkerGeneratedLintConfig,\n};\n\nexport const nodeTestLintConfig: ConfigFragment = {\n lint: nodeTestLintSettings,\n};\n\nexport const browserTestLintConfig: ConfigFragment = {\n lint: browserTestLintSettings,\n};\n\nexport const cloudflareWorkerTestLintConfig: ConfigFragment = {\n lint: cloudflareWorkerTestLintSettings,\n};\n\nexport const reactNativeTestLintConfig: ConfigFragment = {\n lint: reactNativeTestLintSettings,\n};\n\nexport const libraryPackDefaults: PackConfig = {\n attw: {\n level: \"error\",\n profile: \"esm-only\",\n },\n clean: true,\n dts: true,\n format: [\"esm\"],\n publint: {\n strict: true,\n },\n sourcemap: true,\n};\n\nexport const libraryPackConfig: ConfigFragment = {\n pack: libraryPackDefaults,\n};\n\nexport const workspaceRunConfig: ConfigFragment = {\n run: {\n cache: {\n scripts: true,\n tasks: true,\n },\n enablePrePostScripts: true,\n },\n};\n"],"mappings":";;;;AAeA,SAAS,aAAa,QAAoC;CAExD,OAAO;AACT;AAEA,SAAgB,cAAc,GAAG,WAAkD;CACjF,IAAI,SAAqB,CAAC;CAE1B,KAAK,MAAM,YAAY,WACrB,SAAS,YAAY,QAAQ,aAAa,QAAQ,CAAC;CAGrD,OAAO,aAAa,MAAM;AAC5B;;ACnBA,MAAa,mBAAiC;CAC5C,gBAAgB,CAAC,GAAG,uBAAuB;CAC3C,aAAa;EACX,iBAAiB,CAAC,KAAK,IAAI;EAC3B,iBAAiB;EACjB,QAAQ;GACN;GACA,CAAC,iBAAiB,gBAAgB;GAClC;GACA;GACA;IAAC;IAAe;IAAgB;GAAY;GAC5C;IAAC;IAAgB;IAAiB;GAAa;GAC/C;EACF;CACF;AACF;AAEA,MAAa,oBAAkC,EAC7C,iBAA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EACH,OAAO;GACL,GAAG,wBAAwB;GAC3B,mCAAmC;EACrC;CACF;AACF,EACF;;ACjJA,MAAa,oBAAoC;CAC/C,KAAK;CACL,MAAM;CACN,QAAQ;GACL,4BAA4B;GAC5B,6BAA6B;CAChC;AACF;AAEA,MAAa,oBAAoC,EAC/C,MAAM,sBACR;AAEA,MAAa,uBAAuC,EAClD,MAAM,yBACR;AAEA,MAAa,kBAAkC;CAC7C,KAAK;CACL,MAAM;AACR;AAEA,MAAa,iBAAiC,EAC5C,MAAM,mBACR;AAEA,MAAa,2BAA2C,EACtD,MAAM,6BACR;AAEA,MAAa,6BAA6C;CACxD,KAAK;CACL,MAAM;AACR;AAEA,MAAa,gCAAgD,EAC3D,MAAM,kCACR;AAEA,MAAa,kCAAkD;CAC7D,KAAK;CACL,MAAM;AACR;AAEA,MAAa,qBAAqC,EAChD,MAAMC,qBACR;AAEA,MAAa,wBAAwC,EACnD,MAAMC,wBACR;AAEA,MAAa,iCAAiD,EAC5D,MAAMC,iCACR;AAEA,MAAa,4BAA4C,EACvD,MAAMC,4BACR;AAEA,MAAa,sBAAkC;CAC7C,MAAM;EACJ,OAAO;EACP,SAAS;CACX;CACA,OAAO;CACP,KAAK;CACL,QAAQ,CAAC,KAAK;CACd,SAAS,EACP,QAAQ,KACV;CACA,WAAW;AACb;AAEA,MAAa,oBAAoC,EAC/C,MAAM,oBACR;AAEA,MAAa,qBAAqC,EAChD,KAAK;CACH,OAAO;EACL,SAAS;EACT,OAAO;CACT;CACA,sBAAsB;AACxB,EACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/lint/plugin/index.ts"],"mappings":";cASM,aAAa"}
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { definePlugin, defineRule } from "vite-plus/lint/plugins";
|
|
2
|
+
import { runInNewContext } from "node:vm";
|
|
3
|
+
// src/lint/plugin/rules/disable-reason.ts
|
|
4
|
+
const directive = /^\s*(?:oxlint|eslint)-(?<kind>disable-next-line|disable-line|disable|enable)(?<rest>(?:\s.*)?)$/su;
|
|
5
|
+
/** A directive's kind, the rules it names (none means every rule), and the reason after ` -- `. */
|
|
6
|
+
const parseDirective = (comment) => {
|
|
7
|
+
const { kind, rest = "" } = directive.exec(comment)?.groups ?? {};
|
|
8
|
+
const [names = "", ...after] = rest.split(" -- ");
|
|
9
|
+
const rules = names.split(",").map((name) => name.trim()).filter((name) => name !== "");
|
|
10
|
+
return kind === void 0 ? void 0 : {
|
|
11
|
+
kind,
|
|
12
|
+
rules,
|
|
13
|
+
reason: after.join(" -- ").trim()
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
/** Closes what an `oxlint-enable` names in every open block; naming nothing closes them all. */
|
|
17
|
+
const enable = (open, rules) => {
|
|
18
|
+
for (const block of open) {
|
|
19
|
+
if (rules.length === 0) block.rules.clear();
|
|
20
|
+
for (const rule of rules) block.rules.delete(rule);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const disableReason = defineRule({
|
|
24
|
+
meta: { messages: {
|
|
25
|
+
reason: "Say why after ` -- `, in at least 10 characters.",
|
|
26
|
+
unclosed: "Close this with `oxlint-enable {{rules}}`, so it covers only the lines that need it."
|
|
27
|
+
} },
|
|
28
|
+
create(context) {
|
|
29
|
+
return { Program() {
|
|
30
|
+
const open = [];
|
|
31
|
+
for (const comment of context.sourceCode.getAllComments()) {
|
|
32
|
+
const parsed = parseDirective(comment.value);
|
|
33
|
+
if (parsed === void 0) continue;
|
|
34
|
+
if (parsed.kind === "enable") {
|
|
35
|
+
enable(open, parsed.rules);
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
if (parsed.reason.length < 10) context.report({
|
|
39
|
+
node: comment,
|
|
40
|
+
messageId: "reason"
|
|
41
|
+
});
|
|
42
|
+
if (parsed.kind === "disable") open.push({
|
|
43
|
+
comment,
|
|
44
|
+
rules: new Set(parsed.rules.length > 0 ? parsed.rules : ["*"])
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
for (const { comment, rules } of open) if (rules.size > 0) {
|
|
48
|
+
const names = [...rules].filter((rule) => rule !== "*").join(", ");
|
|
49
|
+
context.report({
|
|
50
|
+
node: comment,
|
|
51
|
+
messageId: "unclosed",
|
|
52
|
+
data: { rules: names }
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
} };
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
// src/lint/plugin/rules/effects-in-hooks.ts
|
|
59
|
+
const effects = /* @__PURE__ */ new Set([
|
|
60
|
+
"useEffect",
|
|
61
|
+
"useLayoutEffect",
|
|
62
|
+
"useInsertionEffect"
|
|
63
|
+
]);
|
|
64
|
+
const hookName = /^use[A-Z0-9]/u;
|
|
65
|
+
/** The name a function is known by: its own, or the variable it's assigned to. */
|
|
66
|
+
function functionName(fn) {
|
|
67
|
+
if ((fn.type === "FunctionDeclaration" || fn.type === "FunctionExpression") && fn.id !== null) return fn.id.name;
|
|
68
|
+
const { parent } = fn;
|
|
69
|
+
return parent?.type === "VariableDeclarator" && parent.id.type === "Identifier" ? parent.id.name : void 0;
|
|
70
|
+
}
|
|
71
|
+
const isFunction$1 = (node) => node.type === "ArrowFunctionExpression" || node.type === "FunctionExpression" || node.type === "FunctionDeclaration";
|
|
72
|
+
const effectsInHooks = defineRule({
|
|
73
|
+
meta: { messages: { effect: "Call {{name}} in a custom hook named for what it syncs with (`useSomething`), not in a component or plain function." } },
|
|
74
|
+
create(context) {
|
|
75
|
+
/** The React effect this identifier names, when it's bound to an import from React. */
|
|
76
|
+
const effectNamed = (identifier) => {
|
|
77
|
+
if (identifier.type !== "Identifier") return void 0;
|
|
78
|
+
const definition = (context.sourceCode.getScope(identifier).references.find((reference) => reference.identifier === identifier)?.resolved)?.defs.find(({ type }) => type === "ImportBinding");
|
|
79
|
+
if (definition?.parent?.type !== "ImportDeclaration") return void 0;
|
|
80
|
+
if (definition.parent.source.value !== "react") return void 0;
|
|
81
|
+
const { node } = definition;
|
|
82
|
+
if (node.type !== "ImportSpecifier") return void 0;
|
|
83
|
+
const imported = node.imported.type === "Identifier" ? node.imported.name : node.imported.value;
|
|
84
|
+
return effects.has(imported) ? imported : void 0;
|
|
85
|
+
};
|
|
86
|
+
/** `React.useEffect`, where `React` is React's default or namespace import. */
|
|
87
|
+
const memberEffect = (callee) => {
|
|
88
|
+
const { object, property } = callee;
|
|
89
|
+
if (object.type !== "Identifier" || property.type !== "Identifier" || callee.computed) return;
|
|
90
|
+
if (!effects.has(property.name)) return void 0;
|
|
91
|
+
const definition = (context.sourceCode.getScope(object).references.find((reference) => reference.identifier === object)?.resolved)?.defs.find(({ type }) => type === "ImportBinding");
|
|
92
|
+
return definition?.parent?.type === "ImportDeclaration" && definition.parent.source.value === "react" && definition.node.type !== "ImportSpecifier" ? property.name : void 0;
|
|
93
|
+
};
|
|
94
|
+
return { CallExpression(call) {
|
|
95
|
+
const name = call.callee.type === "MemberExpression" ? memberEffect(call.callee) : effectNamed(call.callee);
|
|
96
|
+
if (name === void 0) return;
|
|
97
|
+
let owner = call.parent;
|
|
98
|
+
while (owner !== null && !isFunction$1(owner)) owner = owner.parent;
|
|
99
|
+
const ownerName = owner === null ? void 0 : functionName(owner);
|
|
100
|
+
if (ownerName === void 0 || !hookName.test(ownerName)) context.report({
|
|
101
|
+
node: call,
|
|
102
|
+
messageId: "effect",
|
|
103
|
+
data: { name }
|
|
104
|
+
});
|
|
105
|
+
} };
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
// src/lint/plugin/key-name.ts
|
|
109
|
+
/** A property's name as written, or undefined where it's computed from a variable. */
|
|
110
|
+
const keyName = (key, computed) => {
|
|
111
|
+
if (key.type === "Literal") return String(key.value);
|
|
112
|
+
if (key.type === "TemplateLiteral" && key.expressions.length === 0) return key.quasis[0]?.value.cooked ?? void 0;
|
|
113
|
+
return !computed && key.type === "Identifier" ? key.name : void 0;
|
|
114
|
+
};
|
|
115
|
+
// src/lint/plugin/rules/legend-list-only.ts
|
|
116
|
+
const engines = /* @__PURE__ */ new Set([
|
|
117
|
+
"FlatList",
|
|
118
|
+
"SectionList",
|
|
119
|
+
"VirtualizedList",
|
|
120
|
+
"VirtualizedSectionList"
|
|
121
|
+
]);
|
|
122
|
+
const owners = /* @__PURE__ */ new Set([
|
|
123
|
+
"react-native",
|
|
124
|
+
"react-native-gesture-handler",
|
|
125
|
+
"react-native-reanimated"
|
|
126
|
+
]);
|
|
127
|
+
const legendListOnly = defineRule({
|
|
128
|
+
meta: { messages: { engine: "Every list of data is a Legend List (@legendapp/list): LegendList or AnimatedLegendList, or its SectionList for sections." } },
|
|
129
|
+
create(context) {
|
|
130
|
+
/** Whether the name is bound to an import from a list engine's owner. */
|
|
131
|
+
const fromOwner = (object) => {
|
|
132
|
+
if (object.type !== "Identifier" && object.type !== "JSXIdentifier") return false;
|
|
133
|
+
const declaration = (context.sourceCode.getScope(object).references.find(({ identifier }) => identifier.start === object.start)?.resolved)?.defs.find(({ type }) => type === "ImportBinding")?.parent;
|
|
134
|
+
return declaration?.type === "ImportDeclaration" && owners.has(declaration.source.value);
|
|
135
|
+
};
|
|
136
|
+
return {
|
|
137
|
+
ImportSpecifier(node) {
|
|
138
|
+
const imported = node.imported.type === "Identifier" ? node.imported.name : node.imported.value;
|
|
139
|
+
if (engines.has(imported) && node.parent.type === "ImportDeclaration" && owners.has(node.parent.source.value)) context.report({
|
|
140
|
+
node,
|
|
141
|
+
messageId: "engine"
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
MemberExpression(node) {
|
|
145
|
+
const name = keyName(node.property, node.computed);
|
|
146
|
+
if (name !== void 0 && engines.has(name) && fromOwner(node.object)) context.report({
|
|
147
|
+
node,
|
|
148
|
+
messageId: "engine"
|
|
149
|
+
});
|
|
150
|
+
},
|
|
151
|
+
JSXMemberExpression(node) {
|
|
152
|
+
if (engines.has(node.property.name) && fromOwner(node.object)) context.report({
|
|
153
|
+
node,
|
|
154
|
+
messageId: "engine"
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
// src/lint/plugin/rules/no-dynamic-import.ts
|
|
161
|
+
const noDynamicImport = defineRule({
|
|
162
|
+
meta: { messages: { dynamic: "Import statically, so the import rules see what's imported." } },
|
|
163
|
+
create(context) {
|
|
164
|
+
return { ImportExpression(node) {
|
|
165
|
+
context.report({
|
|
166
|
+
node,
|
|
167
|
+
messageId: "dynamic"
|
|
168
|
+
});
|
|
169
|
+
} };
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
// src/lint/plugin/rules/no-mapped-scrollview.ts
|
|
173
|
+
const scrollViews = /* @__PURE__ */ new Map([
|
|
174
|
+
["react-native", "ScrollView"],
|
|
175
|
+
["react-native-gesture-handler", "ScrollView"],
|
|
176
|
+
["react-native-keyboard-controller", "KeyboardAwareScrollView"]
|
|
177
|
+
]);
|
|
178
|
+
/** The `constantModules` option: modules whose exports are constants written in code. */
|
|
179
|
+
function constantModulesOf(options) {
|
|
180
|
+
if (typeof options !== "object" || options === null || !("constantModules" in options)) return [];
|
|
181
|
+
const { constantModules } = options;
|
|
182
|
+
return Array.isArray(constantModules) ? constantModules.filter((pattern) => typeof pattern === "string").map((pattern) => new RegExp(pattern, "u")) : [];
|
|
183
|
+
}
|
|
184
|
+
const isNode = (value) => typeof value === "object" && value !== null && "type" in value && typeof value.type === "string";
|
|
185
|
+
/** Whether JSX is rendered anywhere in the node (a `.map` that renders, not one that computes). */
|
|
186
|
+
function rendersJsx(node) {
|
|
187
|
+
if (node.type === "JSXElement" || node.type === "JSXFragment") return true;
|
|
188
|
+
return Object.entries(node).some(([key, value]) => key !== "parent" && (Array.isArray(value) ? value : [value]).some((child) => isNode(child) && rendersJsx(child)));
|
|
189
|
+
}
|
|
190
|
+
function mapped(call) {
|
|
191
|
+
const { callee } = call;
|
|
192
|
+
const [callback] = call.arguments;
|
|
193
|
+
return callee.type === "MemberExpression" && keyName(callee.property, callee.computed) === "map" && callback !== void 0 && rendersJsx(callback) ? callee.object : void 0;
|
|
194
|
+
}
|
|
195
|
+
const isFunction = (node) => node.type === "ArrowFunctionExpression" || node.type === "FunctionExpression" || node.type === "FunctionDeclaration";
|
|
196
|
+
function renderedAt(context, fn) {
|
|
197
|
+
const declared = fn.parent?.type === "VariableDeclarator" ? fn.parent : fn;
|
|
198
|
+
return context.sourceCode.getDeclaredVariables(declared).filter(({ defs }) => defs.every(({ type }) => type !== "Parameter")).filter(({ name }) => /^[A-Z]/u.test(name)).flatMap(({ references }) => references).flatMap(({ identifier }) => {
|
|
199
|
+
const opening = identifier.parent;
|
|
200
|
+
return opening.type === "JSXOpeningElement" && opening.parent.type === "JSXElement" ? [opening.parent] : [];
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
/** Where a JSX element's name was imported from, and under what name, if it was imported. */
|
|
204
|
+
function importOf(context, element) {
|
|
205
|
+
const { name } = element;
|
|
206
|
+
const { node, parent } = (name.type === "JSXIdentifier" ? context.sourceCode.getScope(element).references.find(({ identifier }) => identifier.start === name.start)?.resolved : void 0)?.defs.find(({ type }) => type === "ImportBinding") ?? {};
|
|
207
|
+
let imported = "default";
|
|
208
|
+
if (node?.type === "ImportSpecifier") imported = node.imported.type === "Identifier" ? node.imported.name : node.imported.value;
|
|
209
|
+
return parent?.type === "ImportDeclaration" ? {
|
|
210
|
+
from: parent.source.value,
|
|
211
|
+
imported
|
|
212
|
+
} : void 0;
|
|
213
|
+
}
|
|
214
|
+
const noMappedScrollview = defineRule({
|
|
215
|
+
meta: {
|
|
216
|
+
defaultOptions: [{}],
|
|
217
|
+
schema: [{
|
|
218
|
+
type: "object",
|
|
219
|
+
properties: { constantModules: {
|
|
220
|
+
type: "array",
|
|
221
|
+
items: { type: "string" }
|
|
222
|
+
} },
|
|
223
|
+
additionalProperties: false
|
|
224
|
+
}],
|
|
225
|
+
messages: { data: "This maps data inside a {{view}}. Use a Legend List, with the rest of the {{view}} as its ListHeaderComponent or ListFooterComponent." }
|
|
226
|
+
},
|
|
227
|
+
create(context) {
|
|
228
|
+
const constantModules = constantModulesOf(context.options[0]);
|
|
229
|
+
const isConstant = (array) => {
|
|
230
|
+
if (array.type !== "Identifier") return false;
|
|
231
|
+
const variable = context.sourceCode.getScope(array).references.find(({ identifier }) => identifier === array)?.resolved;
|
|
232
|
+
const definition = variable?.defs[0];
|
|
233
|
+
const declaration = definition?.parent;
|
|
234
|
+
if (definition?.type === "ImportBinding") return declaration?.type === "ImportDeclaration" && constantModules.some((pattern) => pattern.test(declaration.source.value));
|
|
235
|
+
return variable?.scope.type === "module" && definition?.type === "Variable" && declaration?.type === "VariableDeclaration" && declaration.kind === "const";
|
|
236
|
+
};
|
|
237
|
+
const readsOf = (declarator) => context.sourceCode.getDeclaredVariables(declarator).flatMap(({ references }) => references).filter((reference) => reference.isRead()).map(({ identifier }) => identifier);
|
|
238
|
+
/** The element's name, when it's a library's scroll view. */
|
|
239
|
+
const scrollViewNamed = (element) => {
|
|
240
|
+
const origin = importOf(context, element.openingElement);
|
|
241
|
+
return origin !== void 0 && scrollViews.get(origin.from) === origin.imported ? origin.imported : void 0;
|
|
242
|
+
};
|
|
243
|
+
/** The scroll view this node is rendered in, through components written in this file. */
|
|
244
|
+
const scrollViewAround = (node, seen) => {
|
|
245
|
+
for (let at = node.parent; at !== null; at = at.parent) {
|
|
246
|
+
const view = at.type === "JSXElement" ? scrollViewNamed(at) : void 0;
|
|
247
|
+
if (view !== void 0) return view;
|
|
248
|
+
if (at.type === "VariableDeclarator" && !seen.has(at)) {
|
|
249
|
+
seen.add(at);
|
|
250
|
+
const renderedIn = readsOf(at).map((identifier) => scrollViewAround(identifier, seen)).find((each) => each !== void 0);
|
|
251
|
+
if (renderedIn !== void 0) return renderedIn;
|
|
252
|
+
}
|
|
253
|
+
if (isFunction(at) && !seen.has(at)) {
|
|
254
|
+
seen.add(at);
|
|
255
|
+
const renderedIn = renderedAt(context, at).map((element) => scrollViewAround(element, seen)).find((each) => each !== void 0);
|
|
256
|
+
if (renderedIn !== void 0) return renderedIn;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
return { CallExpression(call) {
|
|
261
|
+
const array = mapped(call);
|
|
262
|
+
if (array === void 0 || isConstant(array)) return;
|
|
263
|
+
const view = scrollViewAround(call, /* @__PURE__ */ new Set());
|
|
264
|
+
if (view !== void 0) context.report({
|
|
265
|
+
node: call,
|
|
266
|
+
messageId: "data",
|
|
267
|
+
data: { view }
|
|
268
|
+
});
|
|
269
|
+
} };
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
// src/lint/plugin/rules/no-shadowed-globals.ts
|
|
273
|
+
const languageGlobals = new Set(Object.getOwnPropertyNames(runInNewContext("globalThis")));
|
|
274
|
+
const noShadowedGlobals = defineRule({
|
|
275
|
+
meta: { messages: { shadowed: "`{{name}}` is a language global: code in this scope, and the React Compiler's output, would read this binding instead. Name it differently." } },
|
|
276
|
+
create(context) {
|
|
277
|
+
const reported = /* @__PURE__ */ new Set();
|
|
278
|
+
const check = (node) => {
|
|
279
|
+
for (const variable of context.sourceCode.getDeclaredVariables(node)) {
|
|
280
|
+
const [identifier = node] = variable.identifiers;
|
|
281
|
+
if (languageGlobals.has(variable.name) && !reported.has(identifier)) {
|
|
282
|
+
reported.add(identifier);
|
|
283
|
+
context.report({
|
|
284
|
+
node: identifier,
|
|
285
|
+
messageId: "shadowed",
|
|
286
|
+
data: { name: variable.name }
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
return {
|
|
292
|
+
VariableDeclarator: check,
|
|
293
|
+
FunctionDeclaration: check,
|
|
294
|
+
ClassDeclaration: check,
|
|
295
|
+
ImportSpecifier: check,
|
|
296
|
+
ImportDefaultSpecifier: check,
|
|
297
|
+
ImportNamespaceSpecifier: check
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
// src/lint/plugin/index.ts
|
|
302
|
+
const kasoaPlugin = definePlugin({
|
|
303
|
+
meta: { name: "kasoa" },
|
|
304
|
+
rules: {
|
|
305
|
+
"disable-reason": disableReason,
|
|
306
|
+
"effects-in-hooks": effectsInHooks,
|
|
307
|
+
"legend-list-only": legendListOnly,
|
|
308
|
+
"no-dynamic-import": noDynamicImport,
|
|
309
|
+
"no-mapped-scrollview": noMappedScrollview,
|
|
310
|
+
"no-shadowed-globals": noShadowedGlobals
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
export { kasoaPlugin as default };
|
|
314
|
+
|
|
315
|
+
//# sourceMappingURL=index.mjs.map
|