@qq99/eslint-plugin-solid 0.18.0-no-reactive-read-in-effect-callback.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.
Files changed (90) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +289 -0
  3. package/dist/chunk-4UZNJ5MS.mjs +32 -0
  4. package/dist/chunk-4UZNJ5MS.mjs.map +1 -0
  5. package/dist/chunk-EBU4C5NV.mjs +77 -0
  6. package/dist/chunk-EBU4C5NV.mjs.map +1 -0
  7. package/dist/chunk-LE6SW2M3.mjs +6231 -0
  8. package/dist/chunk-LE6SW2M3.mjs.map +1 -0
  9. package/dist/chunk-MHDQJMLE.mjs +39 -0
  10. package/dist/chunk-MHDQJMLE.mjs.map +1 -0
  11. package/dist/configs/recommended.d.mts +109 -0
  12. package/dist/configs/recommended.d.ts +109 -0
  13. package/dist/configs/recommended.js +5877 -0
  14. package/dist/configs/recommended.js.map +1 -0
  15. package/dist/configs/recommended.mjs +5 -0
  16. package/dist/configs/recommended.mjs.map +1 -0
  17. package/dist/configs/typescript.d.mts +103 -0
  18. package/dist/configs/typescript.d.ts +103 -0
  19. package/dist/configs/typescript.js +6246 -0
  20. package/dist/configs/typescript.js.map +1 -0
  21. package/dist/configs/typescript.mjs +6 -0
  22. package/dist/configs/typescript.mjs.map +1 -0
  23. package/dist/configs/v2-strict.d.mts +130 -0
  24. package/dist/configs/v2-strict.d.ts +130 -0
  25. package/dist/configs/v2-strict.js +6317 -0
  26. package/dist/configs/v2-strict.js.map +1 -0
  27. package/dist/configs/v2-strict.mjs +7 -0
  28. package/dist/configs/v2-strict.mjs.map +1 -0
  29. package/dist/configs/v2.d.mts +127 -0
  30. package/dist/configs/v2.d.ts +127 -0
  31. package/dist/configs/v2.js +6289 -0
  32. package/dist/configs/v2.js.map +1 -0
  33. package/dist/configs/v2.mjs +6 -0
  34. package/dist/configs/v2.mjs.map +1 -0
  35. package/dist/index.d.mts +740 -0
  36. package/dist/index.d.ts +740 -0
  37. package/dist/index.js +6365 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/index.mjs +42 -0
  40. package/dist/index.mjs.map +1 -0
  41. package/package.json +109 -0
  42. package/src/compat.ts +53 -0
  43. package/src/configs/recommended.ts +48 -0
  44. package/src/configs/typescript.ts +21 -0
  45. package/src/configs/v2-strict.ts +28 -0
  46. package/src/configs/v2.ts +68 -0
  47. package/src/deps.d.ts +1 -0
  48. package/src/index.ts +29 -0
  49. package/src/plugin.ts +92 -0
  50. package/src/rules/components-return-once.ts +209 -0
  51. package/src/rules/event-handlers.ts +397 -0
  52. package/src/rules/imports.ts +338 -0
  53. package/src/rules/jsx-no-duplicate-props.ts +110 -0
  54. package/src/rules/jsx-no-script-url.ts +61 -0
  55. package/src/rules/jsx-no-undef.ts +230 -0
  56. package/src/rules/jsx-uses-vars.ts +66 -0
  57. package/src/rules/no-accessor-as-prop.ts +147 -0
  58. package/src/rules/no-array-handlers.ts +57 -0
  59. package/src/rules/no-boolean-enumerated-attribute.ts +209 -0
  60. package/src/rules/no-browser-globals-in-server-function.ts +108 -0
  61. package/src/rules/no-destructure.ts +245 -0
  62. package/src/rules/no-innerhtml.ts +143 -0
  63. package/src/rules/no-invalid-server-capture.ts +104 -0
  64. package/src/rules/no-module-scope-reactive-primitive.ts +69 -0
  65. package/src/rules/no-proxy-apis.ts +96 -0
  66. package/src/rules/no-react-deps.ts +68 -0
  67. package/src/rules/no-react-specific-props.ts +60 -0
  68. package/src/rules/no-reactive-read-in-effect-callback.ts +570 -0
  69. package/src/rules/no-restated-default-options.ts +96 -0
  70. package/src/rules/no-single-arg-create-effect.ts +56 -0
  71. package/src/rules/no-store-mutation-outside-setter.ts +137 -0
  72. package/src/rules/no-unknown-namespaces.ts +140 -0
  73. package/src/rules/no-unused-signal.ts +119 -0
  74. package/src/rules/no-write-in-pure-computation.ts +231 -0
  75. package/src/rules/prefer-classlist.ts +93 -0
  76. package/src/rules/prefer-for.ts +93 -0
  77. package/src/rules/prefer-onSettled-for-side-effects.ts +101 -0
  78. package/src/rules/prefer-show.ts +102 -0
  79. package/src/rules/prefer-structured-class.ts +117 -0
  80. package/src/rules/reactivity.ts +1730 -0
  81. package/src/rules/removed-api.ts +212 -0
  82. package/src/rules/require-async-server-function.ts +122 -0
  83. package/src/rules/self-closing-comp.ts +150 -0
  84. package/src/rules/style-prop.ts +140 -0
  85. package/src/rules/valid-use-server.ts +192 -0
  86. package/src/rules/validate-jsx-nesting.ts +1 -0
  87. package/src/utils/reactive-imports.ts +382 -0
  88. package/src/utils/reactive-types.ts +272 -0
  89. package/src/utils/reactive-values.ts +162 -0
  90. package/src/utils.ts +442 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/compat.ts","../src/utils.ts","../src/rules/components-return-once.ts","../src/rules/event-handlers.ts","../src/rules/imports.ts","../src/rules/jsx-no-duplicate-props.ts","../src/rules/jsx-no-script-url.ts","../src/rules/jsx-no-undef.ts","../src/rules/jsx-uses-vars.ts","../src/rules/no-accessor-as-prop.ts","../src/rules/no-boolean-enumerated-attribute.ts","../src/rules/no-browser-globals-in-server-function.ts","../src/rules/no-destructure.ts","../src/rules/no-innerhtml.ts","../src/rules/no-invalid-server-capture.ts","../src/rules/no-module-scope-reactive-primitive.ts","../src/rules/no-proxy-apis.ts","../src/rules/no-react-deps.ts","../src/rules/no-react-specific-props.ts","../src/utils/reactive-types.ts","../src/utils/reactive-values.ts","../src/utils/reactive-imports.ts","../src/rules/no-reactive-read-in-effect-callback.ts","../src/rules/no-restated-default-options.ts","../src/rules/no-single-arg-create-effect.ts","../src/rules/no-store-mutation-outside-setter.ts","../src/rules/no-unknown-namespaces.ts","../src/rules/no-unused-signal.ts","../src/rules/no-write-in-pure-computation.ts","../src/rules/prefer-classlist.ts","../src/rules/prefer-for.ts","../src/rules/prefer-onSettled-for-side-effects.ts","../src/rules/prefer-show.ts","../src/rules/prefer-structured-class.ts","../src/rules/reactivity.ts","../src/rules/removed-api.ts","../src/rules/require-async-server-function.ts","../src/rules/self-closing-comp.ts","../src/rules/style-prop.ts","../src/rules/valid-use-server.ts","../src/rules/no-array-handlers.ts","../package.json","../src/plugin.ts","../src/configs/recommended.ts"],"sourcesContent":["import { type TSESLint, type TSESTree, ASTUtils } from \"@typescript-eslint/utils\";\n\nexport type CompatContext =\n | {\n sourceCode: Readonly<TSESLint.SourceCode>;\n getSourceCode: undefined;\n getScope: undefined;\n markVariableAsUsed: undefined;\n }\n | {\n sourceCode?: Readonly<TSESLint.SourceCode>;\n getSourceCode: () => Readonly<TSESLint.SourceCode>;\n getScope: () => TSESLint.Scope.Scope;\n markVariableAsUsed: (name: string) => void;\n };\n\nexport function getSourceCode(context: CompatContext) {\n if (typeof context.getSourceCode === \"function\") {\n return context.getSourceCode();\n }\n return context.sourceCode;\n}\n\nexport function getScope(context: CompatContext, node: TSESTree.Node): TSESLint.Scope.Scope {\n const sourceCode = getSourceCode(context);\n\n if (typeof sourceCode.getScope === \"function\") {\n return sourceCode.getScope(node); // >= v8, I think\n }\n if (typeof context.getScope === \"function\") {\n return context.getScope();\n }\n return context.sourceCode.getScope(node);\n}\n\nexport function findVariable(\n context: CompatContext,\n node: TSESTree.Identifier\n): TSESLint.Scope.Variable | null {\n return ASTUtils.findVariable(getScope(context, node), node);\n}\n\nexport function markVariableAsUsed(\n context: CompatContext,\n name: string,\n node: TSESTree.Node\n): void {\n if (typeof context.markVariableAsUsed === \"function\") {\n context.markVariableAsUsed(name);\n } else {\n getSourceCode(context).markVariableAsUsed(name, node);\n }\n}\n","import { TSESTree as T, TSESLint } from \"@typescript-eslint/utils\";\nimport { CompatContext, findVariable } from \"./compat\";\n\nconst domElementRegex = /^[a-z]/;\nexport const isDOMElementName = (name: string): boolean => domElementRegex.test(name);\n\ninterface HasSettings {\n settings?: TSESLint.SharedConfigurationSettings;\n}\n\n/**\n * Read the targeted Solid version from `settings: { solid: { version: 2 } }`.\n * Returns the major version number, or `null` when unset — meaning rules should\n * use permissive dual-version behavior (accept both 1.x and 2.x patterns).\n */\nexport function getSolidVersion(context: HasSettings): number | null {\n const solidSettings = context.settings?.solid;\n if (solidSettings && typeof solidSettings === \"object\" && \"version\" in solidSettings) {\n const version = (solidSettings as { version: unknown }).version;\n if (typeof version === \"number\" && Number.isInteger(version) && version > 0) {\n return version;\n }\n if (typeof version === \"string\") {\n const major = parseInt(version, 10);\n if (Number.isInteger(major) && major > 0) return major;\n }\n }\n return null;\n}\n\n/** Whether the targeted Solid version is 2.x or later. */\nexport const isSolidV2 = (context: HasSettings): boolean => (getSolidVersion(context) ?? 0) >= 2;\n\n// Matches \"solid-js\", its submodules (\"solid-js/store\", etc.), and the Solid 2.0\n// \"@solidjs/signals\" package, which re-exports the core reactive primitives.\nconst DEFAULT_SOURCE_REGEX = /^(?:solid-js(?:\\/?|\\b)|@solidjs\\/signals(?:\\/?|\\b))/;\n\n/**\n * The module sources whose exports are treated as Solid's primitives. Custom\n * renderers and re-exporting wrappers can register their own module names via\n * `settings.solid.moduleSources` (exact names, matched whole) so import-gated\n * rules recognize `import { createSignal } from \"my-renderer\"` (#183).\n */\nexport const getSolidSourceRegex = (context: HasSettings): RegExp => {\n const solidSettings = context.settings?.solid;\n const raw =\n solidSettings && typeof solidSettings === \"object\" && \"moduleSources\" in solidSettings\n ? (solidSettings as { moduleSources: unknown }).moduleSources\n : undefined;\n if (!Array.isArray(raw)) return DEFAULT_SOURCE_REGEX;\n const escaped = raw\n .filter((source): source is string => typeof source === \"string\")\n .map((source) => source.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\"));\n if (!escaped.length) return DEFAULT_SOURCE_REGEX;\n return new RegExp(`${DEFAULT_SOURCE_REGEX.source}|^(?:${escaped.join(\"|\")})$`);\n};\n\nconst propsRegex = /[pP]rops/;\nexport const isPropsByName = (name: string): boolean => propsRegex.test(name);\n\nexport const formatList = (strings: Array<string>): string => {\n if (strings.length === 0) {\n return \"\";\n } else if (strings.length === 1) {\n return `'${strings[0]}'`;\n } else if (strings.length === 2) {\n return `'${strings[0]}' and '${strings[1]}'`;\n } else {\n const last = strings.length - 1;\n return `${strings\n .slice(0, last)\n .map((s) => `'${s}'`)\n .join(\", \")}, and '${strings[last]}'`;\n }\n};\n\nexport const find = (node: T.Node, predicate: (node: T.Node) => boolean): T.Node | null => {\n let n: T.Node | undefined = node;\n while (n) {\n const result = predicate(n);\n if (result) {\n return n;\n }\n n = n.parent;\n }\n return null;\n};\nexport function findParent<Guard extends T.Node>(\n node: T.Node,\n predicate: (node: T.Node) => node is Guard\n): Guard | null;\nexport function findParent(node: T.Node, predicate: (node: T.Node) => boolean): T.Node | null;\nexport function findParent(node: T.Node, predicate: (node: T.Node) => boolean): T.Node | null {\n return node.parent ? find(node.parent, predicate) : null;\n}\n\n// Try to resolve a variable to its definition\nexport function trace(node: T.Node, context: CompatContext): T.Node {\n if (node.type === \"Identifier\") {\n const variable = findVariable(context, node);\n if (!variable) return node;\n\n const def = variable.defs[0];\n\n // def is `undefined` for Identifier `undefined`\n switch (def?.type) {\n case \"FunctionName\":\n case \"ClassName\":\n case \"ImportBinding\":\n return def.node;\n case \"Variable\":\n if (\n ((def.node.parent as T.VariableDeclaration).kind === \"const\" ||\n variable.references.every((ref) => ref.init || ref.isReadOnly())) &&\n def.node.id.type === \"Identifier\" &&\n def.node.init\n ) {\n return trace(def.node.init, context);\n }\n }\n }\n return node;\n}\n\n/** Get the relevant node when wrapped by a node that doesn't change the behavior */\nexport function ignoreTransparentWrappers(node: T.Node, up = false): T.Node {\n if (\n node.type === \"TSAsExpression\" ||\n node.type === \"TSNonNullExpression\" ||\n node.type === \"TSSatisfiesExpression\"\n ) {\n const next = up ? node.parent : node.expression;\n if (next) {\n return ignoreTransparentWrappers(next, up);\n }\n }\n return node;\n}\n\nexport type FunctionNode = T.FunctionExpression | T.ArrowFunctionExpression | T.FunctionDeclaration;\nconst FUNCTION_TYPES = [\"FunctionExpression\", \"ArrowFunctionExpression\", \"FunctionDeclaration\"];\nexport const isFunctionNode = (node: T.Node | null | undefined): node is FunctionNode =>\n !!node && FUNCTION_TYPES.includes(node.type);\n\nexport type ProgramOrFunctionNode = FunctionNode | T.Program;\nconst PROGRAM_OR_FUNCTION_TYPES = [\"Program\"].concat(FUNCTION_TYPES);\nexport const isProgramOrFunctionNode = (\n node: T.Node | null | undefined\n): node is ProgramOrFunctionNode => !!node && PROGRAM_OR_FUNCTION_TYPES.includes(node.type);\n\nexport const isJSXElementOrFragment = (\n node: T.Node | null | undefined\n): node is T.JSXElement | T.JSXFragment =>\n node?.type === \"JSXElement\" || node?.type === \"JSXFragment\";\n\nexport const getFunctionName = (node: FunctionNode): string | null => {\n if (\n (node.type === \"FunctionDeclaration\" || node.type === \"FunctionExpression\") &&\n node.id != null\n ) {\n return node.id.name;\n }\n if (node.parent?.type === \"VariableDeclarator\" && node.parent.id.type === \"Identifier\") {\n return node.parent.id.name;\n }\n return null;\n};\n\nexport function findInScope(\n node: T.Node,\n scope: ProgramOrFunctionNode,\n predicate: (node: T.Node) => boolean\n): T.Node | null {\n const found = find(node, (node) => node === scope || predicate(node));\n return found === scope && !predicate(node) ? null : found;\n}\n\n// The next two functions were adapted from \"eslint-plugin-import\" under the MIT license.\n\n// Checks whether `node` has a comment (that ends) on the previous line or on\n// the same line as `node` (starts).\nexport const getCommentBefore = (\n node: T.Node,\n sourceCode: TSESLint.SourceCode\n): T.Comment | undefined =>\n sourceCode\n .getCommentsBefore(node)\n .find((comment) => comment.loc!.end.line >= node.loc!.start.line - 1);\n\n// Checks whether `node` has a comment (that starts) on the same line as `node`\n// (ends).\nexport const getCommentAfter = (\n node: T.Node,\n sourceCode: TSESLint.SourceCode\n): T.Comment | undefined =>\n sourceCode\n .getCommentsAfter(node)\n .find((comment) => comment.loc!.start.line === node.loc!.end.line);\n\n/**\n * The leading string-literal expression statements of a program or function\n * body — the directive prologue. Only statements here are directives; a\n * `\"use server\"` string anywhere else is an ordinary expression.\n */\nexport const getDirectivePrologue = (body: T.Statement[]): T.ExpressionStatement[] => {\n const prologue: T.ExpressionStatement[] = [];\n for (const statement of body) {\n if (\n statement.type === \"ExpressionStatement\" &&\n statement.expression.type === \"Literal\" &&\n typeof statement.expression.value === \"string\"\n ) {\n prologue.push(statement);\n } else {\n break;\n }\n }\n return prologue;\n};\n\nconst prologueHasDirective = (body: T.Statement[], directive: string): boolean =>\n getDirectivePrologue(body).some(\n (statement) => (statement.expression as T.StringLiteral).value === directive\n );\n\n/** Whether a function has a `\"use server\"` directive in its body's prologue. */\nexport const hasUseServerDirective = (fn: FunctionNode): boolean =>\n fn.body?.type === \"BlockStatement\" && prologueHasDirective(fn.body.body, \"use server\");\n\n/** Whether a program has a module-level `\"use server\"` directive. */\nexport const programHasUseServerDirective = (program: T.Program): boolean =>\n prologueHasDirective(program.body, \"use server\");\n\n/**\n * Whether the `\"use server\"` transform would extract this function. Mirrors\n * the compiler: object-literal methods, getters/setters, and class methods\n * are never extracted, so directives inside them are silently ignored.\n */\nexport type UseServerEligibility = \"eligible\" | \"objectMethod\" | \"accessor\" | \"classMethod\";\nexport const getUseServerEligibility = (fn: FunctionNode): UseServerEligibility => {\n const parent = fn.parent;\n if (parent?.type === \"Property\" && parent.value === fn) {\n if (parent.kind !== \"init\") return \"accessor\";\n if (parent.method) return \"objectMethod\";\n }\n if (parent?.type === \"MethodDefinition\") {\n return parent.kind === \"get\" || parent.kind === \"set\" ? \"accessor\" : \"classMethod\";\n }\n return \"eligible\";\n};\n\n/**\n * Whether `fn` is nested inside another function carrying a `\"use server\"`\n * directive. The transform extracts the outermost marked function only;\n * directives inside it are ignored (the code already runs on the server).\n */\nexport const isInsideUseServerFunction = (fn: FunctionNode): boolean => {\n let parent = findParent(fn, isFunctionNode);\n while (parent) {\n if (isFunctionNode(parent) && hasUseServerDirective(parent)) return true;\n parent = findParent(parent, isFunctionNode);\n }\n return false;\n};\n\n/**\n * Compiles a list of user-provided name patterns into a matcher. Entries may\n * be exact names, glob-ish patterns using `*` wildcards (\"watch*\"), or\n * regexes written as \"/pattern/\" strings. Invalid regexes fall back to exact\n * string comparison.\n */\nexport const createNameMatcher = (patterns: string[]): ((name: string) => boolean) => {\n const matchers: (string | RegExp)[] = patterns.map((entry) => {\n if (entry.length > 2 && entry.startsWith(\"/\") && entry.endsWith(\"/\")) {\n try {\n return new RegExp(entry.slice(1, -1));\n } catch {\n return entry;\n }\n }\n if (entry.includes(\"*\")) {\n const escaped = entry\n .split(\"*\")\n .map((part) => part.replace(/[.+?^${}()|[\\]\\\\]/g, \"\\\\$&\"))\n .join(\"[a-zA-Z0-9_$]*\");\n return new RegExp(`^${escaped}$`);\n }\n return entry;\n });\n return (name: string): boolean =>\n matchers.some((matcher) =>\n typeof matcher === \"string\" ? matcher === name : matcher.test(name)\n );\n};\n\n/**\n * Tracks imports from Solid's module sources (see DEFAULT_SOURCE_REGEX /\n * getSolidSourceRegex), handling aliases. Pass `getSolidSourceRegex(context)`\n * to honor the `settings.solid.moduleSources` escape.\n */\nexport const trackImports = (fromModule: RegExp = DEFAULT_SOURCE_REGEX) => {\n const importMap = new Map<string, string>();\n const handleImportDeclaration = (node: T.ImportDeclaration) => {\n if (fromModule.test(node.source.value)) {\n for (const specifier of node.specifiers) {\n if (specifier.type === \"ImportSpecifier\") {\n const importedName =\n specifier.imported.type === \"Identifier\"\n ? specifier.imported.name\n : specifier.imported.value;\n importMap.set(importedName, specifier.local.name);\n }\n }\n }\n };\n const matchImport = (imports: string | Array<string>, str: string): string | undefined => {\n const importArr = Array.isArray(imports) ? imports : [imports];\n return importArr.find((i) => importMap.get(i) === str);\n };\n return { matchImport, handleImportDeclaration };\n};\n\nexport function appendImports(\n fixer: TSESLint.RuleFixer,\n sourceCode: TSESLint.SourceCode,\n importNode: T.ImportDeclaration,\n identifiers: Array<string>\n): TSESLint.RuleFix | null {\n const identifiersString = identifiers.join(\", \");\n const reversedSpecifiers = importNode.specifiers.slice().reverse();\n const lastSpecifier = reversedSpecifiers.find((s) => s.type === \"ImportSpecifier\");\n if (lastSpecifier) {\n // import A, { B } from 'source' => import A, { B, C, D } from 'source'\n // import { B } from 'source' => import { B, C, D } from 'source'\n return fixer.insertTextAfter(lastSpecifier, `, ${identifiersString}`);\n }\n const otherSpecifier = importNode.specifiers.find(\n (s) => s.type === \"ImportDefaultSpecifier\" || s.type === \"ImportNamespaceSpecifier\"\n );\n if (otherSpecifier) {\n // import A from 'source' => import A, { B, C, D } from 'source'\n return fixer.insertTextAfter(otherSpecifier, `, { ${identifiersString} }`);\n }\n if (importNode.specifiers.length === 0) {\n const [importToken, maybeBrace] = sourceCode.getFirstTokens(importNode, { count: 2 });\n if (maybeBrace?.value === \"{\") {\n // import {} from 'source' => import { B, C, D } from 'source'\n return fixer.insertTextAfter(maybeBrace, ` ${identifiersString} `);\n } else {\n // import 'source' => import { B, C, D } from 'source'\n return importToken\n ? fixer.insertTextAfter(importToken, ` { ${identifiersString} } from`)\n : null;\n }\n }\n return null;\n}\nexport function insertImports(\n fixer: TSESLint.RuleFixer,\n sourceCode: TSESLint.SourceCode,\n source: string,\n identifiers: Array<string>,\n aboveImport?: T.ImportDeclaration,\n isType = false\n): TSESLint.RuleFix {\n const identifiersString = identifiers.join(\", \");\n const programNode: T.Program = sourceCode.ast;\n\n // insert `import { missing, identifiers } from \"source\"` above given node or at top of module\n const firstImport = aboveImport ?? programNode.body.find((n) => n.type === \"ImportDeclaration\");\n if (firstImport) {\n return fixer.insertTextBeforeRange(\n (getCommentBefore(firstImport, sourceCode) ?? firstImport).range,\n `import ${isType ? \"type \" : \"\"}{ ${identifiersString} } from \"${source}\";\\n`\n );\n }\n return fixer.insertTextBeforeRange(\n [0, 0],\n `import ${isType ? \"type \" : \"\"}{ ${identifiersString} } from \"${source}\";\\n`\n );\n}\n\nexport function removeSpecifier(\n fixer: TSESLint.RuleFixer,\n sourceCode: TSESLint.SourceCode,\n specifier: T.ImportSpecifier,\n pure = true\n) {\n const declaration = specifier.parent as T.ImportDeclaration;\n if (declaration.specifiers.length === 1 && pure) {\n return fixer.remove(declaration);\n }\n const maybeComma = sourceCode.getTokenAfter(specifier);\n if (maybeComma?.value === \",\") {\n return fixer.removeRange([specifier.range[0], maybeComma.range[1]]);\n }\n return fixer.remove(specifier);\n}\n\nexport function jsxPropName(prop: T.JSXAttribute) {\n if (prop.name.type === \"JSXNamespacedName\") {\n return `${prop.name.namespace.name}:${prop.name.name.name}`;\n }\n\n return prop.name.name;\n}\n\ntype Props = T.JSXOpeningElement[\"attributes\"];\n\n/** Iterate through both attributes and spread object props, yielding the name and the node. */\nexport function* jsxGetAllProps(props: Props): Generator<[string, T.Node]> {\n for (const attr of props) {\n if (attr.type === \"JSXSpreadAttribute\" && attr.argument.type === \"ObjectExpression\") {\n for (const property of attr.argument.properties) {\n if (property.type === \"Property\") {\n if (property.key.type === \"Identifier\") {\n yield [property.key.name, property.key];\n } else if (property.key.type === \"Literal\") {\n yield [String(property.key.value), property.key];\n }\n }\n }\n } else if (attr.type === \"JSXAttribute\") {\n yield [jsxPropName(attr), attr.name];\n }\n }\n}\n\n/** Returns whether an element has a prop, checking spread object props. */\nexport function jsxHasProp(props: Props, prop: string) {\n for (const [p] of jsxGetAllProps(props)) {\n if (p === prop) return true;\n }\n return false;\n}\n\n/** Get a JSXAttribute, excluding spread props. */\nexport function jsxGetProp(props: Props, prop: string) {\n return props.find(\n (attribute) => attribute.type !== \"JSXSpreadAttribute\" && prop === jsxPropName(attribute)\n ) as T.JSXAttribute | undefined;\n}\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { getFunctionName, type FunctionNode } from \"../utils\";\nimport { getSourceCode } from \"../compat\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\nconst isNothing = (node?: T.Node): boolean => {\n if (!node) {\n return true;\n }\n switch (node.type) {\n case \"Literal\":\n return ([null, undefined, false, \"\"] as Array<unknown>).includes(node.value);\n case \"JSXFragment\":\n return !node.children || node.children.every(isNothing);\n default:\n return false;\n }\n};\n\nconst getLineLength = (loc: T.SourceLocation) => loc.end.line - loc.start.line + 1;\n\nexport default createRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow early returns in components. Solid components only run once, and so conditionals should be inside JSX.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/components-return-once.md\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n noEarlyReturn:\n \"Solid components run once, so an early return breaks reactivity. Move the condition inside a JSX element, such as a fragment or <Show />.\",\n noConditionalReturn:\n \"Solid components run once, so a conditional return breaks reactivity. Move the condition inside a JSX element, such as a fragment or <Show />.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const functionStack: Array<{\n /** switched to true by :exit if the current function is detected to be a component */\n isComponent: boolean;\n lastReturn: T.ReturnStatement | undefined;\n earlyReturns: Array<T.ReturnStatement>;\n }> = [];\n const putIntoJSX = (node: T.Node): string => {\n const text = getSourceCode(context).getText(node);\n return node.type === \"JSXElement\" || node.type === \"JSXFragment\" ? text : `{${text}}`;\n };\n const currentFunction = () => functionStack[functionStack.length - 1];\n const onFunctionEnter = (node: FunctionNode) => {\n let lastReturn: T.ReturnStatement | undefined;\n if (node.body.type === \"BlockStatement\") {\n // find last statement, ignoring function/class/variable declarations (hoisting)\n const last = node.body.body.findLast((node) => !node.type.endsWith(\"Declaration\"));\n // if it's a return, store it\n if (last && last.type === \"ReturnStatement\") {\n lastReturn = last;\n }\n }\n functionStack.push({ isComponent: false, lastReturn, earlyReturns: [] });\n };\n\n const onFunctionExit = (node: FunctionNode) => {\n if (\n // \"render props\" aren't components\n getFunctionName(node)?.match(/^[a-z]/) ||\n node.parent?.type === \"JSXExpressionContainer\" ||\n // ignore createMemo(() => conditional JSX), report HOC(() => conditional JSX)\n (node.parent?.type === \"CallExpression\" &&\n node.parent.arguments.some((n) => n === node) &&\n !(node.parent.callee as T.Identifier).name?.match(/^[A-Z]/))\n ) {\n currentFunction().isComponent = false;\n }\n if (currentFunction().isComponent) {\n // Warn on each early return\n currentFunction().earlyReturns.forEach((earlyReturn) => {\n context.report({\n node: earlyReturn,\n messageId: \"noEarlyReturn\",\n });\n });\n\n const argument = currentFunction().lastReturn?.argument;\n if (argument?.type === \"ConditionalExpression\") {\n const sourceCode = getSourceCode(context);\n context.report({\n node: argument.parent!,\n messageId: \"noConditionalReturn\",\n fix: (fixer) => {\n const { test, consequent, alternate } = argument;\n const conditions = [{ test, consequent }];\n let fallback = alternate;\n\n while (fallback.type === \"ConditionalExpression\") {\n conditions.push({ test: fallback.test, consequent: fallback.consequent });\n fallback = fallback.alternate;\n }\n\n if (conditions.length >= 2) {\n // we have a nested ternary, use <Switch><Match /></Switch>\n const fallbackStr = !isNothing(fallback)\n ? ` fallback={${sourceCode.getText(fallback)}}`\n : \"\";\n return fixer.replaceText(\n argument,\n `<Switch${fallbackStr}>\\n${conditions\n .map(\n ({ test, consequent }) =>\n `<Match when={${sourceCode.getText(test)}}>${putIntoJSX(\n consequent\n )}</Match>`\n )\n .join(\"\\n\")}\\n</Switch>`\n );\n }\n if (isNothing(consequent)) {\n // we have a single ternary and the consequent is nothing. Negate the condition and use a <Show>.\n return fixer.replaceText(\n argument,\n `<Show when={!(${sourceCode.getText(test)})}>${putIntoJSX(alternate)}</Show>`\n );\n }\n if (\n isNothing(fallback) ||\n getLineLength(consequent.loc) >= getLineLength(alternate.loc) * 1.5\n ) {\n // we have a standard ternary, and the alternate is a bit shorter in LOC than the consequent, which\n // should be enough to tell that it's logically a fallback instead of an equal branch.\n const fallbackStr = !isNothing(fallback)\n ? ` fallback={${sourceCode.getText(fallback)}}`\n : \"\";\n return fixer.replaceText(\n argument,\n `<Show when={${sourceCode.getText(test)}}${fallbackStr}>${putIntoJSX(\n consequent\n )}</Show>`\n );\n }\n\n // we have a standard ternary, but no signal from the user as to which branch is the \"fallback\" and\n // which is the children. Move the whole conditional inside a JSX fragment.\n return fixer.replaceText(argument, `<>${putIntoJSX(argument)}</>`);\n },\n });\n } else if (argument?.type === \"LogicalExpression\") {\n if (argument.operator === \"&&\") {\n const sourceCode = getSourceCode(context);\n // we have a `return condition && expression`--put that in a <Show />\n context.report({\n node: argument,\n messageId: \"noConditionalReturn\",\n fix: (fixer) => {\n const { left: test, right: consequent } = argument;\n return fixer.replaceText(\n argument,\n `<Show when={${sourceCode.getText(test)}}>${putIntoJSX(consequent)}</Show>`\n );\n },\n });\n } else {\n // we have some other kind of conditional, warn\n context.report({\n node: argument,\n messageId: \"noConditionalReturn\",\n });\n }\n }\n }\n\n // Pop on exit\n functionStack.pop();\n };\n return {\n FunctionDeclaration: onFunctionEnter,\n FunctionExpression: onFunctionEnter,\n ArrowFunctionExpression: onFunctionEnter,\n \"FunctionDeclaration:exit\": onFunctionExit,\n \"FunctionExpression:exit\": onFunctionExit,\n \"ArrowFunctionExpression:exit\": onFunctionExit,\n JSXElement() {\n if (functionStack.length) {\n currentFunction().isComponent = true;\n }\n },\n JSXFragment() {\n if (functionStack.length) {\n currentFunction().isComponent = true;\n }\n },\n ReturnStatement(node) {\n if (functionStack.length && node !== currentFunction().lastReturn) {\n currentFunction().earlyReturns.push(node);\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils, ASTUtils } from \"@typescript-eslint/utils\";\nimport { isDOMElementName, isSolidV2 } from \"../utils\";\nimport { getScope, getSourceCode } from \"../compat\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\nconst { getStaticValue } = ASTUtils;\n\nconst COMMON_EVENTS = [\n \"onAnimationEnd\",\n \"onAnimationIteration\",\n \"onAnimationStart\",\n \"onBeforeInput\",\n \"onBlur\",\n \"onChange\",\n \"onClick\",\n \"onContextMenu\",\n \"onCopy\",\n \"onCut\",\n \"onDblClick\",\n \"onDrag\",\n \"onDragEnd\",\n \"onDragEnter\",\n \"onDragExit\",\n \"onDragLeave\",\n \"onDragOver\",\n \"onDragStart\",\n \"onDrop\",\n \"onError\",\n \"onFocus\",\n \"onFocusIn\",\n \"onFocusOut\",\n \"onGotPointerCapture\",\n \"onInput\",\n \"onInvalid\",\n \"onKeyDown\",\n \"onKeyPress\",\n \"onKeyUp\",\n \"onLoad\",\n \"onLostPointerCapture\",\n \"onMouseDown\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"onMouseMove\",\n \"onMouseOut\",\n \"onMouseOver\",\n \"onMouseUp\",\n \"onPaste\",\n \"onPointerCancel\",\n \"onPointerDown\",\n \"onPointerEnter\",\n \"onPointerLeave\",\n \"onPointerMove\",\n \"onPointerOut\",\n \"onPointerOver\",\n \"onPointerUp\",\n \"onReset\",\n \"onScroll\",\n \"onSelect\",\n \"onSubmit\",\n \"onToggle\",\n \"onTouchCancel\",\n \"onTouchEnd\",\n \"onTouchMove\",\n \"onTouchStart\",\n \"onTransitionEnd\",\n \"onWheel\",\n] as const;\ntype CommonEvent = (typeof COMMON_EVENTS)[number];\n\nconst COMMON_EVENTS_MAP = new Map<string, CommonEvent>(\n (function* () {\n for (const event of COMMON_EVENTS) {\n yield [event.toLowerCase(), event] as const;\n }\n })()\n);\n\nconst NONSTANDARD_EVENTS_MAP = {\n ondoubleclick: \"onDblClick\",\n};\n\nconst isCommonHandlerName = (\n lowercaseHandlerName: string\n): lowercaseHandlerName is Lowercase<CommonEvent> => COMMON_EVENTS_MAP.has(lowercaseHandlerName);\nconst getCommonEventHandlerName = (lowercaseHandlerName: Lowercase<CommonEvent>): CommonEvent =>\n COMMON_EVENTS_MAP.get(lowercaseHandlerName)!;\n\nconst isNonstandardEventName = (\n lowercaseEventName: string\n): lowercaseEventName is keyof typeof NONSTANDARD_EVENTS_MAP =>\n Boolean((NONSTANDARD_EVENTS_MAP as Record<string, string>)[lowercaseEventName]);\nconst getStandardEventHandlerName = (lowercaseEventName: keyof typeof NONSTANDARD_EVENTS_MAP) =>\n NONSTANDARD_EVENTS_MAP[lowercaseEventName];\n\ntype MessageIds =\n | \"naming\"\n | \"capitalization\"\n | \"nonstandard\"\n | \"make-handler\"\n | \"make-attr\"\n | \"detected-attr\"\n | \"spread-handler\"\n | \"lowercase-attribute-v2\"\n | \"static-handler-v2\";\ntype Options = [{ ignoreCase?: boolean; warnOnSpread?: boolean }?];\n\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Enforce naming DOM element event handlers consistently and prevent Solid's analysis from misunderstanding whether a prop should be an event handler.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/event-handlers.md\",\n },\n fixable: \"code\",\n hasSuggestions: true,\n schema: [\n {\n type: \"object\",\n properties: {\n ignoreCase: {\n type: \"boolean\",\n description:\n \"if true, don't warn on ambiguously named event handlers like `onclick` or `onchange`\",\n default: false,\n },\n warnOnSpread: {\n type: \"boolean\",\n description:\n \"if true, warn when spreading event handlers onto JSX. Enable for Solid < v1.6.\",\n default: false,\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n \"detected-attr\":\n 'The {{name}} prop is named as an event handler (starts with \"on\"), but Solid knows its value ({{staticValue}}) is a string or number, so it will be treated as an attribute. If this is intentional, name this prop attr:{{name}}.',\n naming:\n \"The {{name}} prop is ambiguous. If it is an event handler, change it to {{handlerName}}. If it is an attribute, change it to {{attrName}}.\",\n capitalization: \"The {{name}} prop should be renamed to {{fixedName}} for readability.\",\n nonstandard:\n \"The {{name}} prop should be renamed to {{fixedName}}, because it's not a standard event handler.\",\n \"make-handler\": \"Change the {{name}} prop to {{handlerName}}.\",\n \"make-attr\": \"Change the {{name}} prop to {{attrName}}.\",\n \"spread-handler\":\n \"The {{name}} prop should be added as a JSX attribute, not spread in. Solid doesn't add listeners when spreading into JSX.\",\n \"lowercase-attribute-v2\":\n \"In Solid 2.0, {{name}} is a literal attribute, not an event handler — this listener will never fire. Rename it to {{fixedName}}.\",\n \"static-handler-v2\":\n \"In Solid 2.0, {{name}} is an event handler and must be a function, but its value is the static value {{staticValue}}. For a literal attribute, use lowercase {{attrName}}.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const sourceCode = getSourceCode(context);\n const v2 = isSolidV2(context);\n\n return {\n JSXAttribute(node) {\n const openingElement = node.parent as T.JSXOpeningElement;\n if (\n openingElement.name.type !== \"JSXIdentifier\" ||\n !isDOMElementName(openingElement.name.name)\n ) {\n return; // bail if this is not a DOM/SVG element or web component\n }\n\n if (node.name.type === \"JSXNamespacedName\") {\n return; // bail early on attr:, on:, oncapture:, etc. props\n }\n\n // string name of the name node\n const { name } = node.name;\n\n if (!/^on[a-zA-Z]/.test(name)) {\n return; // bail if Solid doesn't consider the prop name an event handler\n }\n\n if (v2) {\n // In Solid 2.0 only the camelCase form (`onClick`) is an event handler;\n // lowercase names (`onclick`) are literal attributes.\n const isCamelCase = name[2] === name[2].toUpperCase();\n const lowercaseName = name.toLowerCase();\n\n if (isCamelCase) {\n // Event handler position: a static string/number value is a bug.\n let camelStaticValue: ReturnType<typeof getStaticValue> = null;\n if (\n node.value?.type === \"JSXExpressionContainer\" &&\n node.value.expression.type !== \"JSXEmptyExpression\" &&\n node.value.expression.type !== \"ArrayExpression\"\n ) {\n camelStaticValue = getStaticValue(node.value.expression, getScope(context, node));\n }\n if (node.value === null || node.value?.type === \"Literal\") {\n camelStaticValue = { value: node.value !== null ? node.value.value : true };\n }\n if (\n camelStaticValue !== null &&\n (typeof camelStaticValue.value === \"string\" ||\n typeof camelStaticValue.value === \"number\" ||\n typeof camelStaticValue.value === \"boolean\")\n ) {\n context.report({\n node,\n messageId: \"static-handler-v2\",\n data: { name, staticValue: camelStaticValue.value, attrName: lowercaseName },\n });\n } else if (isNonstandardEventName(lowercaseName)) {\n // e.g. onDoubleClick — lowercasing yields no real DOM event, so\n // the listener would silently never fire.\n const fixedName = getStandardEventHandlerName(lowercaseName);\n context.report({\n node: node.name,\n messageId: \"nonstandard\",\n data: { name, fixedName },\n fix: (fixer) => fixer.replaceText(node.name, fixedName),\n });\n }\n } else {\n // Literal attribute position: string values are fine, functions are\n // a near-certain intended event handler that will never fire.\n const isStaticAttributeValue =\n node.value === null ||\n node.value.type === \"Literal\" ||\n (node.value.type === \"JSXExpressionContainer\" &&\n node.value.expression.type !== \"JSXEmptyExpression\" &&\n node.value.expression.type !== \"ArrayExpression\" &&\n getStaticValue(node.value.expression, getScope(context, node)) !== null);\n if (!isStaticAttributeValue) {\n const fixedName = isNonstandardEventName(lowercaseName)\n ? getStandardEventHandlerName(lowercaseName)\n : isCommonHandlerName(lowercaseName)\n ? getCommonEventHandlerName(lowercaseName)\n : `on${name[2].toUpperCase()}${name.slice(3)}`;\n const known =\n isNonstandardEventName(lowercaseName) || isCommonHandlerName(lowercaseName);\n context.report({\n node: node.name,\n messageId: \"lowercase-attribute-v2\",\n data: { name, fixedName },\n // Autofix when the event is a known DOM event; suggest otherwise.\n fix: known ? (fixer) => fixer.replaceText(node.name, fixedName) : undefined,\n suggest: known\n ? undefined\n : [\n {\n messageId: \"make-handler\",\n data: { name, handlerName: fixedName },\n fix: (fixer) => fixer.replaceText(node.name, fixedName),\n },\n ],\n });\n }\n }\n return;\n }\n\n let staticValue: ReturnType<typeof getStaticValue>;\n if (\n node.value?.type === \"JSXExpressionContainer\" &&\n node.value.expression.type !== \"JSXEmptyExpression\" &&\n node.value.expression.type !== \"ArrayExpression\" && // array syntax prevents inlining\n (staticValue = getStaticValue(node.value.expression, getScope(context, node))) !== null &&\n (typeof staticValue.value === \"string\" || typeof staticValue.value === \"number\")\n ) {\n // One of the first things Solid (actually babel-plugin-dom-expressions) does with an\n // attribute is determine if it can be inlined into a template string instead of\n // injected programmatically. It runs\n // `attribute.get(\"value\").get(\"expression\").evaluate().value` on attributes with\n // JSXExpressionContainers, and if the statically evaluated value is a string or number,\n // it inlines it. This runs even for attributes that follow the naming convention for\n // event handlers. By starting an attribute name with \"on\", the user has signalled that\n // they intend the attribute to be an event handler. If the attribute value would be\n // inlined, report that.\n // https://github.com/ryansolid/dom-expressions/blob/cb3be7558c731e2a442e9c7e07d25373c40cf2be/packages/babel-plugin-jsx-dom-expressions/src/dom/element.js#L347\n context.report({\n node,\n messageId: \"detected-attr\",\n data: {\n name,\n staticValue: staticValue.value,\n },\n });\n } else if (node.value === null || node.value?.type === \"Literal\") {\n // Check for same as above for literal values\n context.report({\n node,\n messageId: \"detected-attr\",\n data: {\n name,\n staticValue: node.value !== null ? node.value.value : true,\n },\n });\n } else if (!context.options[0]?.ignoreCase) {\n const lowercaseHandlerName = name.toLowerCase();\n if (isNonstandardEventName(lowercaseHandlerName)) {\n const fixedName = getStandardEventHandlerName(lowercaseHandlerName);\n context.report({\n node: node.name,\n messageId: \"nonstandard\",\n data: { name, fixedName },\n fix: (fixer) => fixer.replaceText(node.name, fixedName),\n });\n } else if (isCommonHandlerName(lowercaseHandlerName)) {\n const fixedName = getCommonEventHandlerName(lowercaseHandlerName);\n if (fixedName !== name) {\n // For common DOM event names, we know the user intended the prop to be an event handler.\n // Fix it to have an uppercase third letter and be properly camel-cased.\n context.report({\n node: node.name,\n messageId: \"capitalization\",\n data: { name, fixedName },\n fix: (fixer) => fixer.replaceText(node.name, fixedName),\n });\n }\n } else if (name[2] === name[2].toLowerCase()) {\n // this includes words like `only` and `ongoing` as well as unknown handlers like `onfoobar`.\n // Enforce using either /^on[A-Z]/ (event handler) or /^attr:on[a-z]/ (forced regular attribute)\n // to make user intent clear and code maximally readable\n const handlerName = `on${name[2].toUpperCase()}${name.slice(3)}`;\n const attrName = `attr:${name}`;\n context.report({\n node: node.name,\n messageId: \"naming\",\n data: { name, attrName, handlerName },\n suggest: [\n {\n messageId: \"make-handler\",\n data: { name, handlerName },\n fix: (fixer) => fixer.replaceText(node.name, handlerName),\n },\n {\n messageId: \"make-attr\",\n data: { name, attrName },\n fix: (fixer) => fixer.replaceText(node.name, attrName),\n },\n ],\n });\n }\n }\n },\n Property(node: T.Property) {\n if (\n context.options[0]?.warnOnSpread &&\n node.parent?.type === \"ObjectExpression\" &&\n node.parent.parent?.type === \"JSXSpreadAttribute\" &&\n node.parent.parent.parent?.type === \"JSXOpeningElement\"\n ) {\n const openingElement = node.parent.parent.parent;\n if (\n openingElement.name.type === \"JSXIdentifier\" &&\n isDOMElementName(openingElement.name.name)\n ) {\n if (node.key.type === \"Identifier\" && /^on/.test(node.key.name)) {\n const handlerName = node.key.name;\n // An event handler is being spread in (ex. <button {...{ onClick }} />), which doesn't\n // actually add an event listener, just a plain attribute.\n context.report({\n node,\n messageId: \"spread-handler\",\n data: {\n name: node.key.name,\n },\n *fix(fixer) {\n const commaAfter = sourceCode.getTokenAfter(node);\n yield fixer.remove(\n (node.parent as T.ObjectExpression).properties.length === 1\n ? node.parent!.parent!\n : node\n );\n if (commaAfter?.value === \",\") {\n yield fixer.remove(commaAfter);\n }\n yield fixer.insertTextAfter(\n node.parent!.parent!,\n ` ${handlerName}={${sourceCode.getText(node.value)}}`\n );\n },\n });\n }\n }\n }\n },\n };\n },\n});\n","import { TSESTree as T, TSESLint, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { appendImports, insertImports, isSolidV2, removeSpecifier } from \"../utils\";\nimport { getSourceCode } from \"../compat\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\n// Below: create maps of imports and types to designated import source.\n// We could mess with `Object.keys(require(\"solid-js\"))` to generate this, but requiring it from\n// node activates the \"node\" export condition, which doesn't necessarily match what users will\n// receive i.e. through bundlers. Instead, we're manually listing all of the public exports that\n// should be imported from \"solid-js\", etc.\n// ==============\n\ntype Source = \"solid-js\" | \"solid-js/web\" | \"solid-js/store\";\n\n// Set up map of imports to module\nconst primitiveMap = new Map<string, Source>();\nfor (const primitive of [\n \"createSignal\",\n \"createEffect\",\n \"createMemo\",\n \"createResource\",\n \"onMount\",\n \"onCleanup\",\n \"onError\",\n \"untrack\",\n \"batch\",\n \"on\",\n \"createRoot\",\n \"getOwner\",\n \"runWithOwner\",\n \"mergeProps\",\n \"splitProps\",\n \"useTransition\",\n \"observable\",\n \"from\",\n \"mapArray\",\n \"indexArray\",\n \"createContext\",\n \"useContext\",\n \"children\",\n \"lazy\",\n \"createUniqueId\",\n \"createDeferred\",\n \"createRenderEffect\",\n \"createComputed\",\n \"createReaction\",\n \"createSelector\",\n \"DEV\",\n \"For\",\n \"Show\",\n \"Switch\",\n \"Match\",\n \"Index\",\n \"ErrorBoundary\",\n \"Suspense\",\n \"SuspenseList\",\n]) {\n primitiveMap.set(primitive, \"solid-js\");\n}\nfor (const primitive of [\n \"Portal\",\n \"render\",\n \"hydrate\",\n \"renderToString\",\n \"renderToStream\",\n \"isServer\",\n \"renderToStringAsync\",\n \"generateHydrationScript\",\n \"HydrationScript\",\n \"Dynamic\",\n]) {\n primitiveMap.set(primitive, \"solid-js/web\");\n}\nfor (const primitive of [\n \"createStore\",\n \"produce\",\n \"reconcile\",\n \"unwrap\",\n \"createMutable\",\n \"modifyMutable\",\n]) {\n primitiveMap.set(primitive, \"solid-js/store\");\n}\n\n// Set up map of type imports to module\nconst typeMap = new Map<string, Source>();\nfor (const type of [\n \"Signal\",\n \"Accessor\",\n \"Setter\",\n \"Resource\",\n \"ResourceActions\",\n \"ResourceOptions\",\n \"ResourceReturn\",\n \"ResourceFetcher\",\n \"InitializedResourceReturn\",\n \"Component\",\n \"VoidProps\",\n \"VoidComponent\",\n \"ParentProps\",\n \"ParentComponent\",\n \"FlowProps\",\n \"FlowComponent\",\n \"ValidComponent\",\n \"ComponentProps\",\n \"Ref\",\n \"MergeProps\",\n \"SplitPrips\",\n \"Context\",\n \"JSX\",\n \"ResolvedChildren\",\n \"MatchProps\",\n]) {\n typeMap.set(type, \"solid-js\");\n}\nfor (const type of [/* \"JSX\", */ \"MountableElement\"]) {\n typeMap.set(type, \"solid-js/web\");\n}\nfor (const type of [\"StoreNode\", \"Store\", \"SetStoreFunction\"]) {\n typeMap.set(type, \"solid-js/store\");\n}\n\n// Solid 2.0 moved these exports into core \"solid-js\" (and removed the old locations in\n// some cases). Don't flag them when imported from the source listed here, so the rule\n// gives correct guidance for both Solid 1.x and 2.0 projects.\nconst alternateSourceMap = new Map<string, Source>([\n [\"createStore\", \"solid-js\"],\n [\"reconcile\", \"solid-js\"],\n [\"Store\", \"solid-js\"],\n [\"StoreNode\", \"solid-js\"],\n [\"SetStoreFunction\", \"solid-js\"],\n]);\n\n// ==============\n// Solid 2.0: \"solid-js/store\" no longer exists (store exports live in core),\n// and \"solid-js/web\" became the \"@solidjs/web\" package. When `settings.solid.\n// version` is 2, the rule *requires* the 2.0 locations. Lists verified against\n// the RC source (packages/solid/src/index.ts, packages/solid-web/src/index.ts).\ntype SourceV2 = \"solid-js\" | \"@solidjs/web\";\n\nconst primitiveMapV2 = new Map<string, SourceV2>();\nfor (const primitive of [\n // reactive primitives\n \"createSignal\",\n \"createMemo\",\n \"createStore\",\n \"createEffect\",\n \"createRenderEffect\",\n \"createProjection\",\n \"createOptimistic\",\n \"createOptimisticStore\",\n \"createReaction\",\n \"createRoot\",\n \"createOwner\",\n \"createContext\",\n \"useContext\",\n \"children\",\n \"lazy\",\n \"createUniqueId\",\n \"createErrorBoundary\",\n \"createLoadingBoundary\",\n \"createRevealOrder\",\n // lifecycle and utilities\n \"onCleanup\",\n \"onSettled\",\n \"untrack\",\n \"flush\",\n \"merge\",\n \"omit\",\n \"mapArray\",\n \"repeat\",\n \"getOwner\",\n \"getObserver\",\n \"runWithOwner\",\n \"isEqual\",\n \"isPending\",\n \"latest\",\n \"action\",\n \"reconcile\",\n \"snapshot\",\n \"resolve\",\n \"refresh\",\n \"flatten\",\n \"deep\",\n \"affects\",\n \"storePath\",\n \"DEV\",\n // control flow components\n \"For\",\n \"Repeat\",\n \"Show\",\n \"Switch\",\n \"Match\",\n \"Errored\",\n \"Loading\",\n \"Reveal\",\n]) {\n primitiveMapV2.set(primitive, \"solid-js\");\n}\nfor (const primitive of [\n \"Portal\",\n \"Dynamic\",\n \"render\",\n \"hydrate\",\n \"isServer\",\n \"renderToString\",\n \"renderToStream\",\n // renderToStringAsync no longer exists in 2.0 (removed-api reports it)\n \"generateHydrationScript\",\n \"HydrationScript\",\n]) {\n primitiveMapV2.set(primitive, \"@solidjs/web\");\n}\n\nconst typeMapV2 = new Map<string, SourceV2>();\nfor (const type of [\n \"Signal\",\n \"Accessor\",\n \"Setter\",\n \"Component\",\n \"Context\",\n \"ResolvedChildren\",\n \"Store\",\n \"StoreNode\",\n \"StoreSetter\",\n \"StoreOptions\",\n \"SignalOptions\",\n \"MemoOptions\",\n \"EffectOptions\",\n \"Owner\",\n]) {\n typeMapV2.set(type, \"solid-js\");\n}\ntypeMapV2.set(\"JSX\", \"@solidjs/web\");\n\nconst sourceRegex = /^solid-js(?:\\/web|\\/store)?$/;\nconst isSource = (source: string): source is Source => sourceRegex.test(source);\n\n// The legacy \"solid-js/store\" and \"solid-js/web\" sources are deliberately\n// excluded here: in v2 mode those modules no longer exist and solid/removed-api\n// owns reporting/rewriting them, so this rule only polices specifier placement\n// between the surviving modules.\nconst sourceRegexV2 = /^(?:solid-js|@solidjs\\/web)$/;\nconst isSourceV2 = (source: string): source is Source | \"@solidjs/web\" =>\n sourceRegexV2.test(source);\n\nexport default createRule({\n meta: {\n type: \"suggestion\",\n docs: {\n description:\n 'Enforce consistent imports from \"solid-js\", \"solid-js/web\", and \"solid-js/store\".',\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/imports.md\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n \"prefer-source\": 'Prefer importing {{name}} from \"{{source}}\".',\n },\n },\n defaultOptions: [],\n create(context) {\n const v2 = isSolidV2(context);\n return {\n ImportDeclaration(node) {\n const source = node.source.value;\n if (v2 ? !isSourceV2(source) : !isSource(source)) return;\n\n for (const specifier of node.specifiers) {\n if (specifier.type === \"ImportSpecifier\") {\n const isType = specifier.importKind === \"type\" || node.importKind === \"type\";\n const map = v2\n ? isType\n ? typeMapV2\n : primitiveMapV2\n : isType\n ? typeMap\n : primitiveMap;\n const importedName =\n specifier.imported.type === \"Identifier\"\n ? specifier.imported.name\n : specifier.imported.value;\n const correctSource = map.get(importedName);\n if (\n correctSource != null &&\n correctSource !== source &&\n (v2 || alternateSourceMap.get(importedName) !== source)\n ) {\n context.report({\n node: specifier,\n messageId: \"prefer-source\",\n data: {\n name: importedName,\n source: correctSource,\n },\n fix(fixer) {\n const sourceCode = getSourceCode(context);\n const program: T.Program = sourceCode.ast;\n const correctDeclaration = program.body.find(\n (node) =>\n node.type === \"ImportDeclaration\" && node.source.value === correctSource\n ) as T.ImportDeclaration | undefined;\n\n if (correctDeclaration) {\n return [\n removeSpecifier(fixer, sourceCode, specifier),\n appendImports(fixer, sourceCode, correctDeclaration, [\n sourceCode.getText(specifier),\n ]),\n ].filter(Boolean) as Array<TSESLint.RuleFix>;\n }\n\n const firstSolidDeclaration = program.body.find(\n (node) =>\n node.type === \"ImportDeclaration\" &&\n (v2 ? isSourceV2(node.source.value) : isSource(node.source.value))\n ) as T.ImportDeclaration | undefined;\n return [\n removeSpecifier(fixer, sourceCode, specifier),\n insertImports(\n fixer,\n sourceCode,\n correctSource,\n [sourceCode.getText(specifier)],\n firstSolidDeclaration,\n node.importKind === \"type\"\n ),\n ];\n },\n });\n }\n }\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { isSolidV2, jsxGetAllProps } from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\n/*\n * This rule is adapted from eslint-plugin-react's jsx-no-duplicate-props rule under\n * the MIT license, with some enhancements. Thank you for your work!\n */\n\ntype MessageIds =\n | \"noDuplicateProps\"\n | \"noDuplicateClass\"\n | \"noDuplicateClassV2\"\n | \"noDuplicateChildren\";\ntype Options = [{ ignoreCase?: boolean }?];\n\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow passing the same prop twice in JSX.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/jsx-no-duplicate-props.md\",\n },\n schema: [\n {\n type: \"object\",\n properties: {\n ignoreCase: {\n type: \"boolean\",\n description: \"Consider two prop names differing only by case to be the same.\",\n default: false,\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n noDuplicateProps: \"Duplicate props are not allowed.\",\n noDuplicateClass:\n \"Duplicate `class` props are not allowed; while it might seem to work, it can break unexpectedly. Use `classList` instead.\",\n noDuplicateClassV2:\n \"Duplicate `class` props are not allowed; while it might seem to work, it can break unexpectedly. Merge them into one `class` — it accepts arrays and objects: `class={[base, { active: active() }]}`.\",\n noDuplicateChildren: \"Using {{used}} at the same time is not allowed.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const v2 = isSolidV2(context);\n return {\n JSXOpeningElement(node) {\n const ignoreCase = context.options[0]?.ignoreCase ?? false;\n const props = new Set();\n const checkPropName = (name: string, node: T.Node) => {\n if (ignoreCase || name.startsWith(\"on\")) {\n name = name\n .toLowerCase()\n .replace(/^on(?:capture)?:/, \"on\")\n .replace(/^(?:attr|prop):/, \"\");\n }\n if (props.has(name)) {\n context.report({\n node,\n messageId:\n // classList was removed in 2.0; `class` takes arrays/objects itself\n name === \"class\"\n ? v2\n ? \"noDuplicateClassV2\"\n : \"noDuplicateClass\"\n : \"noDuplicateProps\",\n });\n }\n props.add(name);\n };\n\n for (const [name, propNode] of jsxGetAllProps(node.attributes)) {\n checkPropName(name, propNode);\n }\n\n const hasChildrenProp = props.has(\"children\");\n const hasChildren = (node.parent as T.JSXElement | T.JSXFragment).children.length > 0;\n const hasInnerHTML = props.has(\"innerHTML\") || props.has(\"innerhtml\");\n const hasTextContent = props.has(\"textContent\") || props.has(\"textcontent\");\n const used = [\n hasChildrenProp && \"`props.children`\",\n hasChildren && \"JSX children\",\n hasInnerHTML && \"`props.innerHTML`\",\n hasTextContent && \"`props.textContent`\",\n ].filter(Boolean);\n if (used.length > 1) {\n context.report({\n node,\n messageId: \"noDuplicateChildren\",\n data: {\n used: used.join(\", \"),\n },\n });\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { ESLintUtils, ASTUtils } from \"@typescript-eslint/utils\";\nimport { getScope } from \"../compat\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\nconst { getStaticValue }: { getStaticValue: any } = ASTUtils;\n\n// A javascript: URL can contain leading C0 control or \\u0020 SPACE,\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\nconst isJavaScriptProtocol =\n /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i; // eslint-disable-line no-control-regex\n\n/**\n * This rule is adapted from eslint-plugin-react's jsx-no-script-url rule under the MIT license.\n * Thank you for your work!\n */\nexport default createRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow javascript: URLs.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/jsx-no-script-url.md\",\n },\n schema: [],\n messages: {\n noJSURL: \"For security, don't use javascript: URLs. Use event handlers instead if you can.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n JSXAttribute(node) {\n if (node.name.type === \"JSXIdentifier\" && node.value) {\n const link: { value: unknown } | null = getStaticValue(\n node.value.type === \"JSXExpressionContainer\" ? node.value.expression : node.value,\n getScope(context, node)\n );\n if (link && typeof link.value === \"string\" && isJavaScriptProtocol.test(link.value)) {\n context.report({\n node: node.value,\n messageId: \"noJSURL\",\n });\n }\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { isDOMElementName, formatList, appendImports, insertImports, isSolidV2 } from \"../utils\";\nimport { getScope, getSourceCode } from \"../compat\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\n// Currently all of the control flow components are from 'solid-js'.\nconst AUTO_COMPONENTS = [\"Show\", \"For\", \"Index\", \"Switch\", \"Match\"];\n// Solid 2.0 control flow components; `Index`, `ErrorBoundary`, `Suspense`, and\n// `SuspenseList` no longer exist (see solid/removed-api).\nconst AUTO_COMPONENTS_V2 = [\n \"For\",\n \"Repeat\",\n \"Show\",\n \"Switch\",\n \"Match\",\n \"Errored\",\n \"Loading\",\n \"Reveal\",\n];\nconst SOURCE_MODULE = \"solid-js\";\n\n/*\n * This rule is adapted from eslint-plugin-react's jsx-no-undef rule under\n * the MIT license. Thank you for your work!\n */\ntype MessageIds = \"undefined\" | \"customDirectiveUndefined\" | \"autoImport\";\ntype Options = [\n {\n allowGlobals?: boolean;\n autoImport?: boolean;\n typescriptEnabled?: boolean;\n }?\n];\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow references to undefined variables in JSX. Handles custom directives.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/jsx-no-undef.md\",\n },\n fixable: \"code\",\n schema: [\n {\n type: \"object\",\n properties: {\n allowGlobals: {\n type: \"boolean\",\n description:\n \"When true, the rule will consider the global scope when checking for defined components.\",\n default: false,\n },\n autoImport: {\n type: \"boolean\",\n description:\n 'Automatically import certain components from `\"solid-js\"` if they are undefined.',\n default: true,\n },\n typescriptEnabled: {\n type: \"boolean\",\n description: \"Adjusts behavior not to conflict with TypeScript's type checking.\",\n default: false,\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n undefined: \"'{{identifier}}' is not defined.\",\n customDirectiveUndefined: \"Custom directive '{{identifier}}' is not defined.\",\n autoImport: \"{{imports}} should be imported from '{{source}}'.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const allowGlobals = context.options[0]?.allowGlobals ?? false;\n const autoImport = context.options[0]?.autoImport !== false;\n const isTypeScriptEnabled = context.options[0]?.typescriptEnabled ?? false;\n const autoComponents = isSolidV2(context) ? AUTO_COMPONENTS_V2 : AUTO_COMPONENTS;\n\n const missingComponentsSet = new Set<string>();\n\n /**\n * Compare an identifier with the variables declared in the scope\n * @param {ASTNode} node - Identifier or JSXIdentifier node\n * @returns {void}\n */\n function checkIdentifierInJSX(\n node: T.Identifier | T.JSXIdentifier,\n {\n isComponent,\n isCustomDirective,\n }: { isComponent?: boolean; isCustomDirective?: boolean } = {}\n ) {\n let scope = getScope(context, node);\n const sourceCode = getSourceCode(context);\n const sourceType = sourceCode.ast.sourceType;\n const scopeUpperBound = !allowGlobals && sourceType === \"module\" ? \"module\" : \"global\";\n const variables = [...scope.variables];\n\n // Ignore 'this' keyword (also maked as JSXIdentifier when used in JSX)\n if (node.name === \"this\") {\n return;\n }\n\n while (scope.type !== scopeUpperBound && scope.type !== \"global\" && scope.upper) {\n scope = scope.upper;\n variables.push(...scope.variables);\n }\n if (scope.childScopes.length) {\n variables.push(...scope.childScopes[0].variables);\n // Temporary fix for babel-eslint\n if (scope.childScopes[0].childScopes.length) {\n variables.push(...scope.childScopes[0].childScopes[0].variables);\n }\n }\n\n if (variables.find((variable) => variable.name === node.name)) {\n return;\n }\n\n if (\n isComponent &&\n autoImport &&\n autoComponents.includes(node.name) &&\n !missingComponentsSet.has(node.name)\n ) {\n // track which names are undefined\n missingComponentsSet.add(node.name);\n } else if (isCustomDirective) {\n context.report({\n node,\n messageId: \"customDirectiveUndefined\",\n data: {\n identifier: node.name,\n },\n });\n } else if (!isTypeScriptEnabled) {\n context.report({\n node,\n messageId: \"undefined\",\n data: {\n identifier: node.name,\n },\n });\n }\n }\n\n return {\n JSXOpeningElement(node) {\n let n: T.Node | undefined;\n switch (node.name.type) {\n case \"JSXIdentifier\":\n if (!isDOMElementName(node.name.name)) {\n checkIdentifierInJSX(node.name, { isComponent: true });\n }\n break;\n case \"JSXMemberExpression\":\n n = node.name;\n do {\n n = (n as any).object;\n } while (n && n.type !== \"JSXIdentifier\");\n if (n) {\n checkIdentifierInJSX(n);\n }\n break;\n default:\n break;\n }\n },\n \"JSXAttribute > JSXNamespacedName\": (node: T.JSXNamespacedName) => {\n // <Element use:X /> applies the `X` custom directive to the element, where `X` must be an identifier in scope.\n if (\n node.namespace?.type === \"JSXIdentifier\" &&\n node.namespace.name === \"use\" &&\n node.name?.type === \"JSXIdentifier\"\n ) {\n checkIdentifierInJSX(node.name, { isCustomDirective: true });\n }\n },\n \"Program:exit\": (programNode: T.Program) => {\n // add in any auto import components used in the program\n const missingComponents = Array.from(missingComponentsSet.values());\n if (autoImport && missingComponents.length) {\n const importNode = programNode.body.find(\n (n) =>\n n.type === \"ImportDeclaration\" &&\n n.importKind !== \"type\" &&\n n.source.type === \"Literal\" &&\n n.source.value === SOURCE_MODULE\n ) as T.ImportDeclaration | undefined;\n if (importNode) {\n context.report({\n node: importNode,\n messageId: \"autoImport\",\n data: {\n imports: formatList(missingComponents), // \"Show, For, and Switch\"\n source: SOURCE_MODULE,\n },\n fix: (fixer) => {\n return appendImports(fixer, getSourceCode(context), importNode, missingComponents);\n },\n });\n } else {\n context.report({\n node: programNode,\n messageId: \"autoImport\",\n data: {\n imports: formatList(missingComponents),\n source: SOURCE_MODULE,\n },\n fix: (fixer) => {\n // insert `import { missing, identifiers } from \"solid-js\"` at top of module\n return insertImports(fixer, getSourceCode(context), \"solid-js\", missingComponents);\n },\n });\n }\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { markVariableAsUsed } from \"../compat\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\n/*\n * This rule is lifted almost verbatim from eslint-plugin-react's\n * jsx-uses-vars rule under the MIT license. Thank you for your work!\n * Solid's custom directives are also handled.\n */\n\nexport default createRule({\n meta: {\n type: \"problem\",\n docs: {\n // eslint-disable-next-line eslint-plugin/require-meta-docs-description\n description: \"Prevent variables used in JSX from being marked as unused.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/jsx-uses-vars.md\",\n },\n schema: [],\n // eslint-disable-next-line eslint-plugin/prefer-message-ids\n messages: {},\n },\n defaultOptions: [],\n create(context) {\n return {\n JSXOpeningElement(node) {\n let parent: T.JSXTagNameExpression;\n switch (node.name.type) {\n case \"JSXNamespacedName\": // <Foo:Bar>\n return;\n case \"JSXIdentifier\": // <Foo>\n markVariableAsUsed(context, node.name.name, node.name);\n break;\n case \"JSXMemberExpression\": // <Foo...Bar>\n parent = node.name.object;\n while (parent?.type === \"JSXMemberExpression\") {\n parent = parent.object;\n }\n if (parent.type === \"JSXIdentifier\") {\n markVariableAsUsed(context, parent.name, parent);\n }\n break;\n }\n },\n \"JSXAttribute > JSXNamespacedName\": (node: T.JSXNamespacedName) => {\n // <Element use:X /> applies the `X` custom directive to the element, where `X` must be an identifier in scope.\n if (\n node.namespace?.type === \"JSXIdentifier\" &&\n node.namespace.name === \"use\" &&\n node.name?.type === \"JSXIdentifier\"\n ) {\n markVariableAsUsed(context, node.name.name, node.name);\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { findVariable } from \"../compat\";\nimport { isDOMElementName, isFunctionNode, getSolidSourceRegex, trackImports } from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\ntype MessageIds = \"accessorAsProp\" | \"functionAsProp\";\ntype Options = [];\n\n// Attributes on DOM elements that legitimately accept a function value.\nconst FUNCTION_ATTRIBUTES = new Set([\"ref\", \"children\"]);\n\n// camelCase `onX` names are event handlers; lowercase `onx` names are literal\n// attributes in Solid 2.0 but are solid/event-handlers' territory — skip both\n// here so a single node never gets two reports.\nconst isOnPrefixed = (name: string) => name.length > 2 && name.startsWith(\"on\");\n\n/*\n * Passing an uncalled signal accessor as a DOM element attribute\n * (`<div title={count} />`) silently sets the attribute to a stringified\n * function. TypeScript flags this with a cryptic assignability error that\n * many pipelines never run (Vite builds don't typecheck); this rule is the\n * enforcement and translation layer. Unlike solid/reactivity's signal\n * tracing, any expression that resolves to a function fires here.\n */\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow passing uncalled signal accessors or other functions as value-typed DOM element attributes.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-accessor-as-prop.md\",\n },\n hasSuggestions: true,\n schema: [],\n messages: {\n accessorAsProp:\n \"'{{attribute}}' expects a value, but '{{name}}' is a signal accessor — call it: '{{name}}()'.\",\n functionAsProp:\n \"'{{attribute}}' expects a value, but this is a function; it would render as a stringified function. If it derives a value, call it.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const { matchImport, handleImportDeclaration } = trackImports(getSolidSourceRegex(context));\n\n /** Is `id` a signal accessor or plain function we can resolve statically? */\n const resolveFunctionKind = (id: T.Identifier): \"accessor\" | \"function\" | null => {\n const variable = findVariable(context, id);\n const def = variable?.defs[0];\n if (!def) return null;\n\n if (def.type === \"FunctionName\") return \"function\";\n if (def.type !== \"Variable\" || !def.node.init) return null;\n\n const { id: declId, init } = def.node;\n // const count = () => ...;\n if (declId.type === \"Identifier\" && isFunctionNode(init)) return \"function\";\n if (init.type !== \"CallExpression\" || init.callee.type !== \"Identifier\") return null;\n\n // const memo = createMemo(...)\n if (\n declId.type === \"Identifier\" &&\n matchImport([\"createMemo\", \"children\"], init.callee.name)\n ) {\n return \"accessor\";\n }\n // const [count] = createSignal(...); const [value] = createOptimistic(...)\n if (\n declId.type === \"ArrayPattern\" &&\n declId.elements[0]?.type === \"Identifier\" &&\n declId.elements[0].name === id.name &&\n matchImport([\"createSignal\", \"createOptimistic\"], init.callee.name)\n ) {\n return \"accessor\";\n }\n return null;\n };\n\n return {\n ImportDeclaration: handleImportDeclaration,\n JSXAttribute(node) {\n // Only plain attributes on native DOM elements; namespaced attributes\n // and custom elements can legitimately carry unusual values.\n if (node.name.type !== \"JSXIdentifier\") return;\n const attribute = node.name.name;\n if (FUNCTION_ATTRIBUTES.has(attribute) || isOnPrefixed(attribute)) return;\n\n const element = node.parent as T.JSXOpeningElement;\n if (\n element.name.type !== \"JSXIdentifier\" ||\n !isDOMElementName(element.name.name) ||\n element.name.name.includes(\"-\")\n ) {\n return;\n }\n\n if (node.value?.type !== \"JSXExpressionContainer\") return;\n const expression = node.value.expression;\n\n if (isFunctionNode(expression)) {\n context.report({ node: expression, messageId: \"functionAsProp\", data: { attribute } });\n return;\n }\n\n if (expression.type === \"Identifier\") {\n const kind = resolveFunctionKind(expression);\n if (kind === \"accessor\") {\n context.report({\n node: expression,\n messageId: \"accessorAsProp\",\n data: { attribute, name: expression.name },\n suggest: [\n {\n messageId: \"accessorAsProp\",\n data: { attribute, name: expression.name },\n fix: (fixer) => fixer.insertTextAfter(expression, \"()\"),\n },\n ],\n });\n } else if (kind === \"function\") {\n context.report({\n node: expression,\n messageId: \"functionAsProp\",\n data: { attribute },\n suggest: [\n {\n messageId: \"functionAsProp\",\n data: { attribute },\n fix: (fixer) => fixer.insertTextAfter(expression, \"()\"),\n },\n ],\n });\n }\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { getSourceCode } from \"../compat\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\ntype MessageIds = \"booleanValue\" | \"booleanExpression\" | \"useStrings\";\ntype Options = [];\n\ninterface AttributePolicy {\n /** The string tokens meaning on/off for this attribute. */\n tokens: [trueToken: string, falseToken: string];\n /** Why a boolean/bare `true` misbehaves; undefined when `true` is harmless. */\n trueBehavior?: string;\n /** Why a boolean `false` misbehaves; the primary hazard for every entry. */\n falseBehavior: string;\n}\n\nconst INHERITED = (token: string) =>\n `a boolean false removes the attribute, leaving the inherited state rather than \"${token}\"`;\nconst ARIA_FALSE =\n 'a boolean false removes the attribute, producing the \"undefined\" state rather than \"false\"';\nconst ARIA_TRUE =\n 'a boolean true writes an empty attribute value, which assistive technologies do not reliably treat as \"true\"';\n\n/**\n * Enumerated attributes whose boolean forms misbehave. Deliberately excludes\n * ARIA attributes that default to \"false\" (aria-disabled, aria-busy, ...):\n * for those, removing the attribute IS the false state, so a boolean false is\n * harmless and flagging it would be noise.\n */\nconst ATTRIBUTES = new Map<string, AttributePolicy>([\n [\n \"draggable\",\n {\n tokens: [\"true\", \"false\"],\n trueBehavior:\n 'a bare or boolean-true draggable writes an empty value, which is invalid and behaves as \"auto\"',\n falseBehavior: 'a boolean false removes the attribute, which behaves as \"auto\", not \"false\"',\n },\n ],\n [\"spellcheck\", { tokens: [\"true\", \"false\"], falseBehavior: INHERITED(\"false\") }],\n [\"contenteditable\", { tokens: [\"true\", \"false\"], falseBehavior: INHERITED(\"false\") }],\n [\"translate\", { tokens: [\"yes\", \"no\"], falseBehavior: INHERITED(\"no\") }],\n // ARIA tristate/undefined-default states: absence means \"undefined\" (not\n // checkable / not expandable / hidden-ness computed from the tree), which is\n // a different state from an explicit \"false\".\n [\n \"aria-checked\",\n { tokens: [\"true\", \"false\"], trueBehavior: ARIA_TRUE, falseBehavior: ARIA_FALSE },\n ],\n [\n \"aria-expanded\",\n { tokens: [\"true\", \"false\"], trueBehavior: ARIA_TRUE, falseBehavior: ARIA_FALSE },\n ],\n [\n \"aria-hidden\",\n { tokens: [\"true\", \"false\"], trueBehavior: ARIA_TRUE, falseBehavior: ARIA_FALSE },\n ],\n [\n \"aria-pressed\",\n { tokens: [\"true\", \"false\"], trueBehavior: ARIA_TRUE, falseBehavior: ARIA_FALSE },\n ],\n [\n \"aria-selected\",\n { tokens: [\"true\", \"false\"], trueBehavior: ARIA_TRUE, falseBehavior: ARIA_FALSE },\n ],\n]);\n\nconst BOOLEAN_OPERATORS = new Set([\n \"===\",\n \"!==\",\n \"==\",\n \"!=\",\n \"<\",\n \">\",\n \"<=\",\n \">=\",\n \"in\",\n \"instanceof\",\n]);\n\n/** Is this expression provably boolean-valued without type information? */\nconst isProvablyBoolean = (node: T.Node): boolean => {\n switch (node.type) {\n case \"Literal\":\n return typeof node.value === \"boolean\";\n case \"UnaryExpression\":\n return node.operator === \"!\";\n case \"BinaryExpression\":\n return BOOLEAN_OPERATORS.has(node.operator);\n case \"LogicalExpression\":\n return (\n node.operator !== \"??\" && isProvablyBoolean(node.left) && isProvablyBoolean(node.right)\n );\n default:\n return false;\n }\n};\n\n/*\n * Enumerated attributes look boolean but aren't: they want literal string\n * tokens (\"true\"/\"false\", or \"yes\"/\"no\" for translate). Solid's attribute\n * path removes the attribute entirely when the value is `false` and writes an\n * empty string for `true`, so booleans silently produce a different state\n * than the matching token would. The rule only reports values that provably\n * misbehave: boolean literals in the broken direction, bare `draggable`, and\n * expressions that are boolean by construction. Dynamic values whose type\n * can't be proven locally are left alone.\n */\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n 'Disallow boolean values on enumerated attributes like draggable and tristate aria-*, which take string tokens — a boolean false removes the attribute instead of writing \"false\".',\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-boolean-enumerated-attribute.md\",\n },\n fixable: \"code\",\n hasSuggestions: true,\n schema: [],\n messages: {\n booleanValue:\n \"'{{name}}' is an enumerated attribute, not a boolean one: {{behavior}}. Use the string \\\"{{token}}\\\".\",\n booleanExpression:\n \"'{{name}}' is an enumerated attribute, not a boolean one: {{behavior}}. Map the expression to its string tokens.\",\n useStrings: 'Write the string tokens: {expr ? \"{{trueToken}}\" : \"{{falseToken}}\"}.',\n },\n },\n defaultOptions: [],\n create(context) {\n const sourceCode = getSourceCode(context);\n\n return {\n JSXAttribute(node) {\n // Only native elements: components receive these as ordinary props.\n const element = node.parent;\n if (\n element?.type !== \"JSXOpeningElement\" ||\n element.name.type !== \"JSXIdentifier\" ||\n !/^[a-z]/.test(element.name.name)\n ) {\n return;\n }\n if (node.name.type !== \"JSXIdentifier\") return;\n const name = node.name.name;\n const policy = ATTRIBUTES.get(name);\n if (!policy) return;\n const [trueToken, falseToken] = policy.tokens;\n\n // A bare attribute compiles to `true`, i.e. an empty attribute value —\n // valid for the empty-string-means-true attributes, broken elsewhere.\n if (!node.value) {\n if (policy.trueBehavior) {\n context.report({\n node,\n messageId: \"booleanValue\",\n data: { name, behavior: policy.trueBehavior, token: trueToken },\n fix: (fixer) => fixer.insertTextAfter(node, `=\"${trueToken}\"`),\n });\n }\n return;\n }\n\n if (node.value.type !== \"JSXExpressionContainer\") return;\n const expression = node.value.expression;\n\n if (expression.type === \"Literal\" && typeof expression.value === \"boolean\") {\n const behavior = expression.value ? policy.trueBehavior : policy.falseBehavior;\n if (!behavior) return; // boolean true is harmless here\n const token = expression.value ? trueToken : falseToken;\n context.report({\n node: node.value,\n messageId: \"booleanValue\",\n data: { name, behavior, token },\n fix: (fixer) => fixer.replaceText(node.value!, `\"${token}\"`),\n });\n return;\n }\n\n if (isProvablyBoolean(expression)) {\n context.report({\n node: node.value,\n messageId: \"booleanExpression\",\n data: { name, behavior: policy.falseBehavior },\n suggest: [\n {\n messageId: \"useStrings\",\n data: { trueToken, falseToken },\n fix: (fixer) =>\n fixer.replaceText(\n node.value!,\n `{${sourceCode.getText(expression)} ? \"${trueToken}\" : \"${falseToken}\"}`\n ),\n },\n ],\n });\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, TSESLint as Lint, ESLintUtils } from \"@typescript-eslint/utils\";\nimport {\n isFunctionNode,\n hasUseServerDirective,\n getUseServerEligibility,\n isInsideUseServerFunction,\n programHasUseServerDirective,\n} from \"../utils\";\nimport { getSourceCode } from \"../compat\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\ntype MessageIds = \"browserGlobal\";\ntype Options = [];\n\n/**\n * Globals that exist only in browsers. Deliberately conservative: server\n * runtimes (Node, Deno, Bun, edge workers) provide `fetch`, `Response`,\n * `FormData`, `URL`, `crypto`, and even `navigator`, so only unambiguous\n * DOM/BOM globals are listed.\n */\nconst BROWSER_GLOBALS = new Set([\n \"window\",\n \"document\",\n \"alert\",\n \"confirm\",\n \"prompt\",\n \"localStorage\",\n \"sessionStorage\",\n \"history\",\n \"location\",\n \"matchMedia\",\n \"getComputedStyle\",\n \"requestAnimationFrame\",\n \"cancelAnimationFrame\",\n \"customElements\",\n]);\n\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow browser-only globals inside server functions, which run exclusively on the server.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-browser-globals-in-server-function.md\",\n },\n schema: [],\n messages: {\n browserGlobal:\n \"'{{name}}' is a browser global, and server functions only run on the server, where it does not exist. Read request data from the function's arguments or use server platform APIs instead.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const sourceCode = getSourceCode(context);\n let moduleLevel = false;\n\n const checkReferences = (references: Lint.Scope.Reference[]) => {\n for (const reference of references) {\n const name = reference.identifier.name;\n if (!BROWSER_GLOBALS.has(name)) continue;\n // A binding with definitions is the user's own variable; a def-less\n // resolution is a configured global (e.g. `globals.browser`).\n if (reference.resolved && reference.resolved.defs.length > 0) continue;\n // `typeof window` guards are dead code here but intentional\n const parent = reference.identifier.parent;\n if (parent?.type === \"UnaryExpression\" && parent.operator === \"typeof\") continue;\n context.report({\n node: reference.identifier,\n messageId: \"browserGlobal\",\n data: { name },\n });\n }\n };\n\n return {\n Program(node) {\n moduleLevel = programHasUseServerDirective(node);\n if (moduleLevel) {\n // The whole module runs on the server; check every reference in it.\n // References resolved to configured globals (`globals.browser`)\n // never reach a scope's `through`, so walk each scope directly.\n for (const scope of sourceCode.scopeManager?.scopes ?? []) {\n checkReferences(scope.references);\n }\n }\n },\n \":function\"(node: T.Node) {\n if (moduleLevel || !isFunctionNode(node)) return;\n if (!hasUseServerDirective(node)) return;\n if (getUseServerEligibility(node) !== \"eligible\") return;\n if (isInsideUseServerFunction(node)) return;\n const scope = sourceCode.scopeManager?.acquire(node);\n // `through` holds every reference crossing the function's boundary,\n // including refs from nested scopes that resolve to outer globals.\n if (scope) checkReferences(scope.through);\n },\n };\n },\n});\n","import { TSESTree as T, TSESLint, ESLintUtils, ASTUtils } from \"@typescript-eslint/utils\";\nimport { getFunctionName, type FunctionNode } from \"../utils\";\nimport { getSourceCode } from \"../compat\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\nconst { getStringIfConstant } = ASTUtils;\n\nconst getName = (node: T.Node): string | null => {\n switch (node.type) {\n case \"Literal\":\n return typeof node.value === \"string\" ? node.value : null;\n case \"Identifier\":\n return node.name;\n case \"AssignmentPattern\":\n return getName(node.left);\n default:\n return getStringIfConstant(node);\n }\n};\n\ninterface PropertyInfo {\n real: T.Literal | T.Identifier | T.Expression;\n var: string;\n computed: boolean;\n init: T.Expression | undefined;\n}\n\n// Given ({ 'hello-world': helloWorld = 5 }), returns { real: Literal('hello-world'), var: 'helloWorld', computed: false, init: Literal(5) }\nconst getPropertyInfo = (prop: T.Property): PropertyInfo | null => {\n const valueName = getName(prop.value);\n if (valueName !== null) {\n return {\n real: prop.key,\n var: valueName,\n computed: prop.computed,\n init: prop.value.type === \"AssignmentPattern\" ? prop.value.right : undefined,\n };\n } else {\n return null;\n }\n};\n\nexport default createRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow destructuring props. In Solid, props must be used with property accesses (`props.foo`) to preserve reactivity. This rule only tracks destructuring in the parameter list.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-destructure.md\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n noDestructure:\n \"Destructuring component props breaks Solid's reactivity; use property access instead.\",\n // noWriteToProps: \"Component props are readonly, writing to props is not supported.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const functionStack: Array<{\n /** switched to true by :exit if JSX is detected in the current function */\n hasJSX: boolean;\n }> = [];\n const currentFunction = () => functionStack[functionStack.length - 1];\n const onFunctionEnter = () => {\n functionStack.push({ hasJSX: false });\n };\n // Matches the component detection in components-return-once: containing JSX\n // isn't enough on its own, because data callbacks (`items.map(({ id }) => ...)`)\n // and lowercase-named helpers (`renderItem`) also return JSX; their object\n // param is a plain data item, not reactive props.\n const isComponent = (node: FunctionNode) =>\n !getFunctionName(node)?.match(/^[a-z]/) &&\n node.parent?.type !== \"JSXExpressionContainer\" && // \"render props\" aren't components\n !(\n // functions passed as arguments are callbacks, unless the callee is a\n // component-wrapper (PascalCase, like HOCs). A FunctionDeclaration can\n // never be a call argument, so the cast below is safe.\n (\n node.parent?.type === \"CallExpression\" &&\n node.parent.arguments.includes(node as T.CallExpressionArgument) &&\n !(node.parent.callee as T.Identifier).name?.match(/^[A-Z]/)\n )\n );\n\n const onFunctionExit = (node: FunctionNode) => {\n if (node.params.length === 1) {\n const props = node.params[0];\n if (props.type === \"ObjectPattern\" && currentFunction().hasJSX && isComponent(node)) {\n // Props are destructured in the function params, not the body. We actually don't\n // need to handle the case where props are destructured in the body, because that\n // will be a violation of \"solid/reactivity\".\n context.report({\n node: props,\n messageId: \"noDestructure\",\n fix: (fixer) => fixDestructure(node, props, fixer),\n });\n }\n }\n\n // Pop on exit\n functionStack.pop();\n };\n\n function* fixDestructure(\n func: FunctionNode,\n props: T.ObjectPattern,\n fixer: TSESLint.RuleFixer\n ): Generator<TSESLint.RuleFix> {\n const propsName = \"props\";\n const properties = props.properties;\n\n const propertyInfo: Array<PropertyInfo> = [];\n let rest: T.RestElement | null = null;\n\n for (const property of properties) {\n if (property.type === \"RestElement\") {\n rest = property;\n } else {\n const info = getPropertyInfo(property);\n if (info === null) {\n continue;\n }\n propertyInfo.push(info);\n }\n }\n\n const hasDefaults = propertyInfo.some((info) => info.init);\n\n // Replace destructured props with a `props` identifier (`_props` in case of rest params/defaults)\n const origProps = !(hasDefaults || rest) ? propsName : \"_\" + propsName;\n if (props.typeAnnotation) {\n // in `{ prop1, prop2 }: Props`, leave `: Props` alone\n const range = [props.range[0], props.typeAnnotation.range[0]] as const;\n yield fixer.replaceTextRange(range, origProps);\n } else {\n yield fixer.replaceText(props, origProps);\n }\n\n const sourceCode = getSourceCode(context);\n\n const defaultsObjectString = () =>\n propertyInfo\n .filter((info) => info.init)\n .map(\n (info) =>\n `${info.computed ? \"[\" : \"\"}${sourceCode.getText(info.real)}${\n info.computed ? \"]\" : \"\"\n }: ${sourceCode.getText(info.init)}`\n )\n .join(\", \");\n const splitPropsArray = () =>\n `[${propertyInfo\n .map((info) =>\n info.real.type === \"Identifier\"\n ? JSON.stringify(info.real.name)\n : sourceCode.getText(info.real)\n )\n .join(\", \")}]`;\n\n let lineToInsert = \"\";\n if (hasDefaults && rest) {\n // Insert a line that assigns _props\n lineToInsert = ` const [${propsName}, ${\n (rest.argument.type === \"Identifier\" && rest.argument.name) || \"rest\"\n }] = splitProps(mergeProps({ ${defaultsObjectString()} }, ${origProps}), ${splitPropsArray()});`;\n } else if (hasDefaults) {\n // Insert a line that assigns _props merged with defaults to props\n lineToInsert = ` const ${propsName} = mergeProps({ ${defaultsObjectString()} }, ${origProps});\\n`;\n } else if (rest) {\n // Insert a line that keeps named props and extracts the rest into a new reactive rest object\n lineToInsert = ` const [${propsName}, ${\n (rest.argument.type === \"Identifier\" && rest.argument.name) || \"rest\"\n }] = splitProps(${origProps}, ${splitPropsArray()});\\n`;\n }\n\n if (lineToInsert) {\n const body = func.body;\n if (body.type === \"BlockStatement\") {\n if (body.body.length > 0) {\n // Inject lines handling defaults/rest params before the first statement in the block.\n yield fixer.insertTextBefore(body.body[0], lineToInsert);\n }\n // with an empty block statement body, no need to inject code\n } else {\n // The function is an arrow function that implicitly returns an expression, possibly with wrapping parentheses.\n // These must be removed to convert the function body to a block statement for code injection.\n const maybeOpenParen = sourceCode.getTokenBefore(body);\n if (maybeOpenParen?.value === \"(\") {\n yield fixer.remove(maybeOpenParen);\n }\n const maybeCloseParen = sourceCode.getTokenAfter(body);\n if (maybeCloseParen?.value === \")\") {\n yield fixer.remove(maybeCloseParen);\n }\n\n // Inject lines handling defaults/rest params\n yield fixer.insertTextBefore(body, `{\\n${lineToInsert} return (`);\n yield fixer.insertTextAfter(body, `);\\n}`);\n }\n }\n\n const scope = sourceCode.scopeManager?.acquire(func);\n if (scope) {\n // iterate through destructured variables, associated with real node\n for (const [info, variable] of propertyInfo.map(\n (info) => [info, scope.set.get(info.var)] as const\n )) {\n if (variable) {\n // replace all usages of the variable with props accesses\n for (const reference of variable.references) {\n if (reference.isReadOnly()) {\n const access =\n info.real.type === \"Identifier\" && !info.computed\n ? `.${info.real.name}`\n : `[${sourceCode.getText(info.real)}]`;\n yield fixer.replaceText(reference.identifier, `${propsName}${access}`);\n }\n }\n }\n }\n }\n }\n\n return {\n FunctionDeclaration: onFunctionEnter,\n FunctionExpression: onFunctionEnter,\n ArrowFunctionExpression: onFunctionEnter,\n \"FunctionDeclaration:exit\": onFunctionExit,\n \"FunctionExpression:exit\": onFunctionExit,\n \"ArrowFunctionExpression:exit\": onFunctionExit,\n JSXElement() {\n if (functionStack.length) {\n currentFunction().hasJSX = true;\n }\n },\n JSXFragment() {\n if (functionStack.length) {\n currentFunction().hasJSX = true;\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { ESLintUtils, ASTUtils } from \"@typescript-eslint/utils\";\nimport isHtml from \"is-html\";\nimport { jsxPropName } from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\nconst { getStringIfConstant } = ASTUtils;\n\ntype MessageIds = \"dangerous\" | \"conflict\" | \"notHtml\" | \"useInnerText\" | \"dangerouslySetInnerHTML\";\ntype Options = [{ allowStatic?: boolean }?];\n\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow usage of the innerHTML attribute, which can often lead to security vulnerabilities.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-innerhtml.md\",\n },\n fixable: \"code\",\n hasSuggestions: true,\n schema: [\n {\n type: \"object\",\n properties: {\n allowStatic: {\n description:\n \"if the innerHTML value is guaranteed to be a static HTML string (i.e. no user input), allow it\",\n type: \"boolean\",\n default: true,\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n dangerous:\n \"The innerHTML attribute is dangerous; passing unsanitized input can lead to security vulnerabilities.\",\n conflict:\n \"The innerHTML attribute should not be used on an element with child elements; they will be overwritten.\",\n notHtml: \"The string passed to innerHTML does not appear to be valid HTML.\",\n useInnerText: \"For text content, using innerText is clearer and safer.\",\n dangerouslySetInnerHTML:\n \"The dangerouslySetInnerHTML prop is not supported; use innerHTML instead.\",\n },\n },\n defaultOptions: [{ allowStatic: true }],\n create(context) {\n const allowStatic = Boolean(context.options[0]?.allowStatic ?? true);\n return {\n JSXAttribute(node) {\n if (jsxPropName(node) === \"dangerouslySetInnerHTML\") {\n if (\n node.value?.type === \"JSXExpressionContainer\" &&\n node.value.expression.type === \"ObjectExpression\" &&\n node.value.expression.properties.length === 1\n ) {\n const htmlProp = node.value.expression.properties[0];\n if (\n htmlProp.type === \"Property\" &&\n htmlProp.key.type === \"Identifier\" &&\n htmlProp.key.name === \"__html\"\n ) {\n context.report({\n node,\n messageId: \"dangerouslySetInnerHTML\",\n fix: (fixer) => {\n const propRange = node.range;\n const valueRange = htmlProp.value.range;\n return [\n fixer.replaceTextRange([propRange[0], valueRange[0]], \"innerHTML={\"),\n fixer.replaceTextRange([valueRange[1], propRange[1]], \"}\"),\n ];\n },\n });\n } else {\n context.report({\n node,\n messageId: \"dangerouslySetInnerHTML\",\n });\n }\n } else {\n context.report({\n node,\n messageId: \"dangerouslySetInnerHTML\",\n });\n }\n return;\n } else if (jsxPropName(node) !== \"innerHTML\") {\n return;\n }\n\n if (allowStatic) {\n const innerHtmlNode =\n node.value?.type === \"JSXExpressionContainer\" ? node.value.expression : node.value;\n const innerHtml = innerHtmlNode && getStringIfConstant(innerHtmlNode);\n if (typeof innerHtml === \"string\") {\n if (isHtml(innerHtml)) {\n // go up to enclosing JSXElement and check if it has children\n if (\n node.parent?.parent?.type === \"JSXElement\" &&\n node.parent.parent.children?.length\n ) {\n context.report({\n node: node.parent.parent, // report error on JSXElement instead of JSXAttribute\n messageId: \"conflict\",\n });\n }\n } else {\n context.report({\n node,\n messageId: \"notHtml\",\n suggest: [\n {\n fix: (fixer) => fixer.replaceText(node.name, \"innerText\"),\n messageId: \"useInnerText\",\n },\n ],\n });\n }\n } else {\n context.report({\n node,\n messageId: \"dangerous\",\n });\n }\n } else {\n context.report({\n node,\n messageId: \"dangerous\",\n });\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport {\n isFunctionNode,\n hasUseServerDirective,\n getUseServerEligibility,\n isInsideUseServerFunction,\n programHasUseServerDirective,\n} from \"../utils\";\nimport { getSourceCode } from \"../compat\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\ntype MessageIds = \"invalidCapture\";\ntype Options = [];\n\n/*\n * An editor-time mirror of the compiler's closure-capture validation. An\n * extracted server function runs in a different closure environment than the\n * one it was written in: on the server it is hoisted to module top level, on\n * the client it is replaced by a network proxy. Any variable captured from an\n * intermediate scope — declared between module top level and the server\n * function itself — does not exist at runtime. The compiler rejects this at\n * build time; this rule reports the same captures as you type.\n *\n * Module-level directives are unaffected (the whole module runs on the\n * server, so its closures are intact). Eligibility mirrors the transform:\n * functions it never extracts (object/class methods, getters/setters) are\n * not validated, and directives nested inside an already-extracted server\n * function are ignored.\n */\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow server functions from capturing variables in enclosing non-module scopes, mirroring the compiler's build-time validation.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-invalid-server-capture.md\",\n },\n schema: [],\n messages: {\n invalidCapture:\n \"Server functions cannot capture '{{name}}' from an enclosing {{kind}}: on the server the function is hoisted to module level and on the client it becomes a network proxy, so the captured variable does not exist at runtime. Use parameters, module-level bindings, imports, or globals instead.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const sourceCode = getSourceCode(context);\n let moduleLevel = false;\n\n return {\n Program(node) {\n moduleLevel = programHasUseServerDirective(node);\n },\n \":function\"(node: T.Node) {\n if (!isFunctionNode(node)) return;\n if (moduleLevel) return;\n if (!hasUseServerDirective(node)) return;\n if (getUseServerEligibility(node) !== \"eligible\") return;\n if (isInsideUseServerFunction(node)) return;\n\n const scope = sourceCode.scopeManager?.acquire(node);\n if (!scope) return;\n // `through` holds every reference crossing this function's boundary,\n // including those from nested scopes.\n for (const reference of scope.through) {\n const variable = reference.resolved;\n if (!variable) continue; // a true global\n // TS type-only references are erased from the output and never captured\n const typedReference = reference as {\n isTypeReference?: boolean;\n isValueReference?: boolean;\n };\n if (typedReference.isTypeReference && !typedReference.isValueReference) continue;\n const declarationScope = variable.scope;\n if (declarationScope.type === \"module\" || declarationScope.type === \"global\") continue;\n // A named function expression referencing itself travels with the\n // extracted function and stays valid.\n if (\n declarationScope.type === \"function-expression-name\" &&\n declarationScope.block === node\n ) {\n continue;\n }\n context.report({\n node: reference.identifier,\n messageId: \"invalidCapture\",\n data: {\n name: reference.identifier.name,\n kind: declarationScope.type === \"function\" ? \"function\" : \"block\",\n },\n });\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { ESLintUtils } from \"@typescript-eslint/utils\";\nimport { findParent, isFunctionNode, getSolidSourceRegex, trackImports } from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\ntype MessageIds = \"moduleScopePrimitive\";\ntype Options = [];\n\nconst REACTIVE_PRIMITIVES = [\n \"createSignal\",\n \"createMemo\",\n \"createStore\",\n \"createEffect\",\n \"createRenderEffect\",\n \"createOptimistic\",\n \"createOptimisticStore\",\n \"createProjection\",\n];\n\n/*\n * Reactive state created at module scope is shared across every request when\n * server rendering, leaking one user's state into another's response. It is a\n * valid pattern in client-only apps, which is why this rule is only enabled\n * in the strict config. Wrapping in `createRoot` (or any function) is the\n * deliberate escape hatch and is not flagged.\n */\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow reactive primitives at module scope, where state is shared across SSR requests.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-module-scope-reactive-primitive.md\",\n },\n schema: [],\n messages: {\n moduleScopePrimitive:\n \"{{name}} at module scope creates state shared across all SSR requests. Create it inside a component or provider, or wrap it in `createRoot` if module-level state is intentional (client-only).\",\n },\n },\n defaultOptions: [],\n create(context) {\n const { matchImport, handleImportDeclaration } = trackImports(getSolidSourceRegex(context));\n\n return {\n ImportDeclaration: handleImportDeclaration,\n CallExpression(node) {\n if (node.callee.type !== \"Identifier\") return;\n const name = matchImport(REACTIVE_PRIMITIVES, node.callee.name);\n if (!name) return;\n if (findParent(node, isFunctionNode) == null) {\n context.report({\n node,\n messageId: \"moduleScopePrimitive\",\n data: { name: node.callee.name },\n });\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { isFunctionNode, getSolidSourceRegex, trackImports, isPropsByName, trace } from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\nexport default createRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow usage of APIs that use ES6 Proxies, only to target environments that don't support them.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-proxy-apis.md\",\n },\n schema: [],\n messages: {\n noStore: \"Solid Store APIs use Proxies, which are incompatible with your target environment.\",\n spreadCall:\n \"Using a function call in JSX spread makes Solid use Proxies, which are incompatible with your target environment.\",\n spreadMember:\n \"Using a property access in JSX spread makes Solid use Proxies, which are incompatible with your target environment.\",\n proxyLiteral: \"Proxies are incompatible with your target environment.\",\n mergeProps:\n \"If you pass a function to `mergeProps`, it will create a Proxy, which are incompatible with your target environment.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const { matchImport, handleImportDeclaration } = trackImports(getSolidSourceRegex(context));\n\n return {\n ImportDeclaration(node) {\n handleImportDeclaration(node); // track import aliases\n\n const source = node.source.value;\n if (source === \"solid-js/store\") {\n context.report({\n node,\n messageId: \"noStore\",\n });\n }\n },\n \"JSXSpreadAttribute MemberExpression\"(node: T.MemberExpression) {\n context.report({ node, messageId: \"spreadMember\" });\n },\n \"JSXSpreadAttribute CallExpression\"(node: T.CallExpression) {\n context.report({ node, messageId: \"spreadCall\" });\n },\n CallExpression(node) {\n if (node.callee.type === \"Identifier\") {\n if (matchImport(\"mergeProps\", node.callee.name)) {\n node.arguments\n .filter((arg) => {\n if (arg.type === \"SpreadElement\") return true;\n const traced = trace(arg, context);\n return (\n (traced.type === \"Identifier\" && !isPropsByName(traced.name)) ||\n isFunctionNode(traced)\n );\n })\n .forEach((badArg) => {\n context.report({\n node: badArg,\n messageId: \"mergeProps\",\n });\n });\n }\n } else if (node.callee.type === \"MemberExpression\") {\n if (\n node.callee.object.type === \"Identifier\" &&\n node.callee.object.name === \"Proxy\" &&\n node.callee.property.type === \"Identifier\" &&\n node.callee.property.name === \"revocable\"\n ) {\n context.report({\n node,\n messageId: \"proxyLiteral\",\n });\n }\n }\n },\n NewExpression(node) {\n if (node.callee.type === \"Identifier\" && node.callee.name === \"Proxy\") {\n context.report({ node, messageId: \"proxyLiteral\" });\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { ESLintUtils } from \"@typescript-eslint/utils\";\nimport { isFunctionNode, isSolidV2, trace, getSolidSourceRegex, trackImports } from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\nexport default createRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow usage of dependency arrays in `createEffect` and `createMemo`.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-react-deps.md\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n noUselessDep:\n \"In Solid, `{{name}}` doesn't accept a dependency array because it automatically tracks its dependencies. If you really need to override the list of dependencies, use `on`.\",\n },\n },\n defaultOptions: [],\n create(context) {\n // In Solid 2.0 the second argument of createEffect is the (required) effect\n // function, so a \"dependency array\" there is a type and runtime error already;\n // this rule's premise only exists in 1.x.\n if (isSolidV2(context)) return {};\n\n /** Tracks imports from 'solid-js', handling aliases. */\n const { matchImport, handleImportDeclaration } = trackImports(getSolidSourceRegex(context));\n\n return {\n ImportDeclaration: handleImportDeclaration,\n CallExpression(node) {\n if (\n node.callee.type === \"Identifier\" &&\n matchImport([\"createEffect\", \"createMemo\"], node.callee.name) &&\n node.arguments.length === 2 &&\n node.arguments.every((arg) => arg.type !== \"SpreadElement\")\n ) {\n // grab both arguments, tracing any variables to their actual values if possible\n const [arg0, arg1] = node.arguments.map((arg) => trace(arg, context));\n\n if (isFunctionNode(arg0) && arg0.params.length === 0 && arg1.type === \"ArrayExpression\") {\n // A second argument that looks like a dependency array was passed to\n // createEffect/createMemo, and the inline function doesn't accept a parameter, so it\n // can't just be an initial value.\n context.report({\n node: node.arguments[1], // if this is a variable, highlight the usage, not the initialization\n messageId: \"noUselessDep\",\n data: {\n name: node.callee.name,\n },\n // remove dep array if it's given inline, otherwise don't fix\n fix: arg1 === node.arguments[1] ? (fixer) => fixer.remove(arg1) : undefined,\n });\n }\n }\n },\n };\n },\n});\n","import { TSESLint, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { isDOMElementName, jsxGetProp, jsxHasProp } from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\nconst reactSpecificProps = [\n { from: \"className\", to: \"class\" },\n { from: \"htmlFor\", to: \"for\" },\n];\n\nexport default createRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow usage of React-specific `className`/`htmlFor` props, which were deprecated in v1.4.0.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-react-specific-props.md\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n prefer: \"Prefer the `{{ to }}` prop over the deprecated `{{ from }}` prop.\",\n noUselessKey: \"Elements in a <For> or <Index> list do not need a key prop.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n JSXOpeningElement(node) {\n for (const { from, to } of reactSpecificProps) {\n const classNameAttribute = jsxGetProp(node.attributes, from);\n if (classNameAttribute) {\n // only auto-fix if there is no class prop defined\n const fix = !jsxHasProp(node.attributes, to)\n ? (fixer: TSESLint.RuleFixer) => fixer.replaceText(classNameAttribute.name, to)\n : undefined;\n\n context.report({\n node: classNameAttribute,\n messageId: \"prefer\",\n data: { from, to },\n fix,\n });\n }\n }\n if (node.name.type === \"JSXIdentifier\" && isDOMElementName(node.name.name)) {\n const keyProp = jsxGetProp(node.attributes, \"key\");\n if (keyProp) {\n // no DOM element has a 'key' prop, so we can assert that this is a holdover from React.\n context.report({\n node: keyProp,\n messageId: \"noUselessKey\",\n fix: (fixer) => fixer.remove(keyProp),\n });\n }\n }\n },\n };\n },\n});\n","import ts from \"typescript\";\n\nexport interface TypeModule {\n source: ts.SourceFile;\n checker: ts.TypeChecker;\n}\n\ntype Fact = \"scalar\" | \"callback\" | \"nullish\" | \"void\" | null;\ntype TypeArgument = { module: TypeModule; node: ts.Node; env: Environment };\ntype Environment = Map<ts.Symbol, TypeArgument>;\n\n/** Only prove scalar snapshots and conventional void callback signatures.\n * Object types never establish (or disprove) reactivity. No parser services,\n * standard libraries, project type check, or execution of application code.\n */\nexport function createReactiveTypeResolver(\n filename: string,\n text: string,\n loadImport: (source: string, from: string) => TypeModule | null,\n solidSource: RegExp\n) {\n let current: TypeModule | undefined;\n const nodes = new Map<string, ts.Node>();\n const facts = new Map<string, Fact>();\n let steps = 0;\n\n const initialize = (): TypeModule => {\n if (current) return current;\n // The active buffer, not its potentially stale on-disk contents. This host\n // is intentionally in-memory so virtual inputs and the browser still work.\n const file = /\\.[cm]?[jt]sx?$/.test(filename) ? filename : \"input.tsx\";\n const source = ts.createSourceFile(file, text, ts.ScriptTarget.Latest, true);\n const program = ts.createProgram(\n [file],\n { noLib: true, noResolve: true, types: [] },\n {\n getSourceFile: (name) => (name === file ? source : undefined),\n getDefaultLibFileName: () => \"\",\n writeFile() {},\n getCurrentDirectory: () => \"/\",\n getDirectories: () => [],\n getCanonicalFileName: (name) => name,\n useCaseSensitiveFileNames: () => true,\n getNewLine: () => \"\\n\",\n fileExists: (name) => name === file,\n readFile: (name) => (name === file ? text : undefined),\n }\n );\n const visit = (node: ts.Node): void => {\n nodes.set(`${node.getStart(source)}:${node.end}`, node);\n ts.forEachChild(node, visit);\n };\n visit(source);\n return (current = { source, checker: program.getTypeChecker() });\n };\n\n const sourceOf = (node: ts.Node): string | null => {\n for (let parent: ts.Node | undefined = node; parent; parent = parent.parent) {\n if (ts.isImportDeclaration(parent) || ts.isExportDeclaration(parent)) {\n return parent.moduleSpecifier && ts.isStringLiteral(parent.moduleSpecifier)\n ? parent.moduleSpecifier.text\n : null;\n }\n }\n return null;\n };\n\n const combine = (values: Fact[]): Fact => {\n if (values.some((value) => value === null)) return null;\n const concrete = values.filter((value) => value !== \"nullish\");\n return concrete.length === 0\n ? \"nullish\"\n : concrete.every((value) => value === concrete[0])\n ? concrete[0]\n : null;\n };\n\n const exported = (\n module: TypeModule,\n name: string,\n path: string[],\n env: Environment,\n seen: Set<ts.Node>,\n args: TypeArgument[] = []\n ): Fact => {\n if (++steps > 1000) return null;\n const symbol = module.checker.getSymbolAtLocation(module.source);\n const target = symbol && module.checker.getExportsOfModule(symbol).find((s) => s.name === name);\n if (target) return declaration(module, target, path, env, seen, args);\n for (const statement of module.source.statements) {\n if (!ts.isExportDeclaration(statement) || statement.exportClause || seen.has(statement))\n continue;\n const source = sourceOf(statement);\n const next = source && loadImport(source, module.source.fileName);\n if (!next) continue;\n const fact = exported(next, name, path, env, new Set(seen).add(statement), args);\n if (fact) return fact;\n }\n return null;\n };\n\n const declaration = (\n module: TypeModule,\n symbol: ts.Symbol | undefined,\n path: string[],\n env: Environment,\n seen: Set<ts.Node>,\n args: TypeArgument[] = []\n ): Fact => {\n if (!symbol) return null;\n const substitution = env.get(symbol);\n if (substitution)\n return evaluate(substitution.module, substitution.node, path, substitution.env, seen);\n const declarations = symbol.declarations ?? [];\n // Merged declarations can disagree; never use just one to prove a scalar.\n if (declarations.length !== 1) return null;\n const node = declarations[0];\n if (ts.isTypeAliasDeclaration(node) || ts.isInterfaceDeclaration(node)) {\n const local = new Map(env);\n node.typeParameters?.forEach((param, index) => {\n const symbol = module.checker.getSymbolAtLocation(param.name);\n const value = args[index] ?? (param.default ? { module, node: param.default, env } : null);\n if (symbol && value) local.set(symbol, value);\n });\n return evaluate(module, node, path, local, seen);\n }\n return evaluate(module, node, path, env, seen, args);\n };\n\n const evaluate = (\n module: TypeModule,\n node: ts.Node,\n path: string[],\n env: Environment,\n seen: Set<ts.Node>,\n args: TypeArgument[] = []\n ): Fact => {\n if (++steps > 1000 || seen.has(node)) return null;\n const next = new Set(seen).add(node);\n const read = (node: ts.Node, keys = path): Fact => evaluate(module, node, keys, env, next);\n if (ts.isIdentifier(node))\n return declaration(module, module.checker.getSymbolAtLocation(node), path, env, next, args);\n if (ts.isTypeReferenceNode(node) || ts.isExpressionWithTypeArguments(node)) {\n const name = ts.isTypeReferenceNode(node) ? node.typeName : node.expression;\n const typeArgs = node.typeArguments?.map((node) => ({ module, node, env })) ?? [];\n if (ts.isIdentifier(name)) {\n const symbol = module.checker.getSymbolAtLocation(name);\n const imported = symbol?.declarations?.[0];\n // Solid's wrappers preserve the supplied props. Do not need to load\n // the renderer's external declaration graph just to inspect them.\n if (imported && ts.isImportSpecifier(imported)) {\n const source = sourceOf(imported);\n if (\n source &&\n solidSource.test(source) &&\n [\"ParentProps\", \"FlowProps\"].includes((imported.propertyName ?? imported.name).text)\n ) {\n return node.typeArguments?.[0] ? read(node.typeArguments[0]) : null;\n }\n }\n if (\n !symbol?.declarations?.length &&\n [\"Readonly\", \"Partial\", \"Required\"].includes(name.text)\n ) {\n return node.typeArguments?.[0] ? read(node.typeArguments[0]) : null;\n }\n return declaration(module, symbol, path, env, next, typeArgs);\n }\n if (ts.isQualifiedName(name) && ts.isIdentifier(name.left)) {\n const imported = module.checker.getSymbolAtLocation(name.left)?.declarations?.[0];\n const source = imported && ts.isNamespaceImport(imported) && sourceOf(imported);\n const target = source && loadImport(source, module.source.fileName);\n return target ? exported(target, name.right.text, path, env, next, typeArgs) : null;\n }\n return null;\n }\n if (ts.isImportSpecifier(node) || ts.isImportClause(node) || ts.isExportSpecifier(node)) {\n const source = sourceOf(node);\n if (!source && ts.isExportSpecifier(node)) {\n return declaration(\n module,\n module.checker.getExportSpecifierLocalTargetSymbol(node),\n path,\n env,\n next,\n args\n );\n }\n const target = source && loadImport(source, module.source.fileName);\n const name = ts.isImportClause(node) ? \"default\" : (node.propertyName ?? node.name).text;\n return target ? exported(target, name, path, env, next, args) : null;\n }\n if (ts.isPropertyAccessExpression(node))\n return read(node.expression, [node.name.text, ...path]);\n if (ts.isElementAccessExpression(node)) {\n const key = node.argumentExpression;\n return ts.isStringLiteralLike(key) || ts.isNumericLiteral(key)\n ? read(node.expression, [key.text, ...path])\n : null;\n }\n if (ts.isVariableDeclaration(node) || ts.isParameter(node)) {\n return node.type ? read(node.type) : node.initializer ? read(node.initializer) : null;\n }\n if (ts.isTypeAliasDeclaration(node) || ts.isParenthesizedTypeNode(node)) return read(node.type);\n if (ts.isParenthesizedExpression(node) || ts.isNonNullExpression(node))\n return read(node.expression);\n if (ts.isAsExpression(node) || ts.isTypeAssertionExpression(node)) return read(node.type);\n if (ts.isUnionTypeNode(node)) return combine(node.types.map((type) => read(type)));\n if (ts.isIntersectionTypeNode(node)) {\n const known = node.types.map((type) => read(type)).filter((value) => value !== null);\n return known.length ? combine(known) : null;\n }\n if (ts.isTypeLiteralNode(node) || ts.isInterfaceDeclaration(node)) {\n if (!path.length) return null;\n const member = node.members.find(\n (member) =>\n member.name &&\n (ts.isIdentifier(member.name) ||\n ts.isStringLiteralLike(member.name) ||\n ts.isNumericLiteral(member.name)) &&\n member.name.text === path[0]\n );\n if (member && ts.isPropertySignature(member) && member.type)\n return read(member.type, path.slice(1));\n if (member && ts.isMethodSignature(member) && path.length === 1 && member.type) {\n return read(member.type, []) === \"void\" ? \"callback\" : null;\n }\n if (ts.isInterfaceDeclaration(node)) {\n const inherited =\n node.heritageClauses\n ?.flatMap((clause) => clause.types.map((type) => read(type)))\n .filter((value) => value !== null) ?? [];\n return inherited.length ? combine(inherited) : null;\n }\n return null;\n }\n if (ts.isArrayTypeNode(node) && path.length && /^\\d+$/.test(path[0]))\n return read(node.elementType, path.slice(1));\n if (path.length) return null;\n if (ts.isFunctionTypeNode(node)) return read(node.type, []) === \"void\" ? \"callback\" : null;\n if (ts.isLiteralTypeNode(node)) return read(node.literal);\n if (node.kind === ts.SyntaxKind.NullKeyword || node.kind === ts.SyntaxKind.UndefinedKeyword)\n return \"nullish\";\n if (node.kind === ts.SyntaxKind.VoidKeyword) return \"void\";\n if (\n [\n ts.SyntaxKind.StringKeyword,\n ts.SyntaxKind.NumberKeyword,\n ts.SyntaxKind.BooleanKeyword,\n ts.SyntaxKind.BigIntKeyword,\n ts.SyntaxKind.SymbolKeyword,\n ts.SyntaxKind.TrueKeyword,\n ts.SyntaxKind.FalseKeyword,\n ].includes(node.kind) ||\n ts.isLiteralExpression(node)\n )\n return \"scalar\";\n return null;\n };\n\n return (range: readonly [number, number]): \"scalar\" | \"callback\" | null => {\n const key = `${range[0]}:${range[1]}`;\n if (!facts.has(key)) {\n const module = initialize();\n const node = nodes.get(key);\n steps = 0;\n facts.set(key, node ? evaluate(module, node, [], new Map(), new Set()) : null);\n }\n const fact = facts.get(key);\n return fact === \"nullish\" ? \"scalar\" : fact === \"scalar\" || fact === \"callback\" ? fact : null;\n };\n}\n","import type { TSESTree as T } from \"@typescript-eslint/utils\";\n\nexport type Value =\n | { kind: \"object\" | \"plain\"; properties: Map<string, Value>; array?: boolean }\n | { kind: \"accessor\" | \"promise\"; result: Value }\n | { kind: \"iterator\"; async: boolean; yielded: Value; returned: Value }\n | { kind: \"union\"; values: Value[] }\n | { kind: \"setter\" }\n | { kind: \"scalar\" }\n | null;\n\nexport const object: Value = { kind: \"object\", properties: new Map() };\nexport const setter: Value = { kind: \"setter\" };\nexport const scalar: Value = { kind: \"scalar\" };\nexport const container = (entries: Array<[string, Value]>): Value => ({\n kind: \"plain\",\n properties: new Map(entries),\n array: true,\n});\n\n// Awaiting unwraps only the outer value, never promises stored in its fields.\nexport const awaitedValue = (value: Value): Value =>\n value?.kind === \"promise\"\n ? awaitedValue(value.result)\n : value?.kind === \"union\"\n ? value.values.map(awaitedValue).reduce(mergeValues, null)\n : value;\n\nexport const promiseValue = (value: Value): Value => ({\n kind: \"promise\",\n result: awaitedValue(value),\n});\n\nexport const iteratorValue = (async: boolean, yielded: Value, returned: Value): Value => ({\n kind: \"iterator\",\n async,\n // Native async generators await each yield/return, but sync generators do not.\n yielded: async ? awaitedValue(yielded) : yielded,\n returned: async ? awaitedValue(returned) : returned,\n});\n\nexport const iterationValue = (value: Value): Value => {\n if (value?.kind === \"iterator\") return value.yielded;\n if (value?.kind === \"union\") return value.values.map(iterationValue).reduce(mergeValues, null);\n if ((value?.kind === \"object\" || value?.kind === \"plain\") && value.array)\n return [...value.properties]\n .filter(([key]) => /^\\d+$/.test(key))\n .map(([, item]) => item)\n .reduce(mergeValues, null);\n return null;\n};\n\n// The result of yield* is the delegated iterator's final return, not its yields.\nexport const iterationReturn = (value: Value): Value =>\n value?.kind === \"iterator\"\n ? value.returned\n : value?.kind === \"union\"\n ? value.values.map(iterationReturn).reduce(mergeValues, null)\n : null;\n\n// Solid settles a Promise, then consumes one AsyncIterable. It neither drains\n// ordinary sync iterators nor recursively consumes streams yielded as values.\nexport const computationValue = (value: Value): Value => {\n value = awaitedValue(value);\n if (value?.kind === \"union\") return value.values.map(computationValue).reduce(mergeValues, null);\n return value?.kind === \"iterator\" && value.async ? value.yielded : value;\n};\n\nexport const hasKind = (value: Value, kind: NonNullable<Value>[\"kind\"]): boolean =>\n value?.kind === kind ||\n (value?.kind === \"union\" && value.values.some((entry) => hasKind(entry, kind)));\n\nexport const callResult = (value: Value): Value =>\n value?.kind === \"accessor\"\n ? value.result\n : value?.kind === \"union\"\n ? value.values.map(callResult).reduce(mergeValues, null)\n : null;\n\nexport const propertiesOf = (value: Value): Map<string, Value> => {\n if (value?.kind === \"object\" || value?.kind === \"plain\") return value.properties;\n const properties = new Map<string, Value>();\n if (value?.kind === \"union\") {\n for (const entry of value.values) {\n for (const [key, field] of propertiesOf(entry)) {\n properties.set(key, mergeValues(properties.get(key) ?? null, field));\n }\n }\n }\n return properties;\n};\n\n// A store recursively wraps objects, but leaves primitive fields alone.\nexport const asStore = (value: Value): Value =>\n value?.kind === \"union\"\n ? value.values.map(asStore).reduce(mergeValues, null)\n : value?.kind === \"plain\"\n ? {\n kind: \"object\",\n properties: new Map([...value.properties].map(([key, value]) => [key, asStore(value)])),\n array: value.array,\n }\n : value ?? object;\n\nexport const propertyValue = (value: Value, key: string | null): Value => {\n if (value?.kind === \"union\")\n return value.values.map((entry) => propertyValue(entry, key)).reduce(mergeValues, null);\n if (value?.kind !== \"object\" && value?.kind !== \"plain\") return null;\n if (key !== null && value.properties.has(key)) return value.properties.get(key)!;\n return value.kind === \"object\" ? object : null;\n};\n\nexport const propertyName = (key: T.Node, computed: boolean): string | null => {\n if (!computed && key.type === \"Identifier\") return key.name;\n if (key.type === \"Literal\" && (typeof key.value === \"string\" || typeof key.value === \"number\"))\n return String(key.value);\n return null;\n};\n\nexport const mergeValues = (left: Value, right: Value): Value => {\n if (!left) return right;\n if (!right) return left;\n if (left === right) return left;\n if (left.kind === \"promise\" && right.kind === \"promise\")\n return promiseValue(mergeValues(left.result, right.result));\n if (left.kind === \"iterator\" && right.kind === \"iterator\" && left.async === right.async)\n return iteratorValue(\n left.async,\n mergeValues(left.yielded, right.yielded),\n mergeValues(left.returned, right.returned)\n );\n // Preserve wrapper/value alternatives until the consuming operation is known.\n // Collapsing them early mistakes Promise/iterator methods for reactive reads.\n if ([left.kind, right.kind].some((kind) => [\"promise\", \"iterator\", \"union\"].includes(kind))) {\n return {\n kind: \"union\",\n values: [\n ...new Set([\n ...(left.kind === \"union\" ? left.values : [left]),\n ...(right.kind === \"union\" ? right.values : [right]),\n ]),\n ],\n };\n }\n if (left.kind === \"scalar\") return right;\n if (right.kind === \"scalar\") return left;\n if (\n (left.kind === \"object\" || left.kind === \"plain\") &&\n (right.kind === \"object\" || right.kind === \"plain\")\n ) {\n const properties = new Map(left.properties);\n for (const [key, value] of right.properties) {\n properties.set(key, mergeValues(properties.get(key) ?? null, value));\n }\n return {\n kind: left.kind === \"object\" || right.kind === \"object\" ? \"object\" : \"plain\",\n properties,\n array: left.array && right.array,\n };\n }\n return left;\n};\n","import ts from \"typescript\";\nimport { createReactiveTypeResolver } from \"./reactive-types\";\nimport {\n Value,\n object,\n scalar,\n setter,\n container,\n asStore,\n propertyValue,\n mergeValues,\n awaitedValue,\n promiseValue,\n callResult,\n propertiesOf,\n iteratorValue,\n iterationValue,\n iterationReturn,\n} from \"./reactive-values\";\n\ninterface Module {\n source: ts.SourceFile;\n checker: ts.TypeChecker;\n}\n\n/**\n * Follow return values in local source modules. Each module is bound on its\n * own, without libraries or dependencies, solely to resolve lexical bindings.\n * This does not type-check a project or execute the imported code, and works\n * in Oxlint without typescript-eslint's parser services.\n *\n * Caches live for one linted file so editor runs cannot retain stale sources.\n * File/step limits bound work on cyclic or unusually large module graphs.\n */\nexport function createReactiveImportResolver(filename: string, solidSource: RegExp, text: string) {\n const modules = new Map<string, Module | null>();\n let resolutionOptions: ts.CompilerOptions | undefined;\n let steps = 0;\n\n const load = (file: string): Module | null => {\n if (modules.has(file)) return modules.get(file)!;\n if (modules.size >= 32) return null;\n modules.set(file, null);\n const options: ts.CompilerOptions = {\n allowJs: true,\n noLib: true,\n noResolve: true,\n types: [],\n target: ts.ScriptTarget.Latest,\n module: ts.ModuleKind.ESNext,\n };\n const host = ts.createCompilerHost(options);\n // No full program graph: the checker is only used for this file's symbols.\n const getSourceFile = host.getSourceFile.bind(host);\n host.getSourceFile = (name, languageVersion) =>\n name === file ? getSourceFile(name, languageVersion) : undefined;\n const program = ts.createProgram([file], options, host);\n const source = program.getSourceFile(file);\n if (!source || program.getSyntacticDiagnostics(source).length) return null;\n const module = { source, checker: program.getTypeChecker() };\n modules.set(file, module);\n return module;\n };\n\n const resolveFile = (specifier: string, from: string): string | undefined => {\n // The browser standalone build and virtual lint inputs have no file graph.\n if (!ts.sys?.fileExists || !filename || !ts.sys.fileExists(filename)) return undefined;\n if (!resolutionOptions) {\n const config = ts.findConfigFile(filename, ts.sys.fileExists);\n resolutionOptions = config\n ? ts.getParsedCommandLineOfConfigFile(\n config,\n {},\n {\n ...ts.sys,\n onUnRecoverableConfigFileDiagnostic() {},\n }\n )?.options\n : undefined;\n resolutionOptions ??= { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true };\n }\n const resolved = ts.resolveModuleName(\n specifier,\n from,\n resolutionOptions,\n ts.sys\n ).resolvedModule;\n // Library implementations are an explicit knowledge boundary. Do not crawl\n // node_modules or mistake declarations for an implementation.\n if (\n !resolved ||\n resolved.isExternalLibraryImport ||\n /(?:^|[/\\\\])node_modules[/\\\\]|\\.d\\.[cm]?ts$/.test(resolved.resolvedFileName)\n ) {\n return undefined;\n }\n return resolved.resolvedFileName;\n };\n\n const importSource = (node: ts.Node): string | null => {\n for (let parent: ts.Node | undefined = node; parent; parent = parent.parent) {\n if (ts.isImportDeclaration(parent) || ts.isExportDeclaration(parent)) {\n return parent.moduleSpecifier && ts.isStringLiteral(parent.moduleSpecifier)\n ? parent.moduleSpecifier.text\n : null;\n }\n }\n return null;\n };\n\n const imported = (\n source: string,\n name: string,\n from: string,\n args: Value[] | undefined,\n seen: Set<ts.Node>\n ): Value => {\n if (++steps > 1000) return null;\n if (\n args &&\n source === \"@tanstack/solid-query\" &&\n (name === \"useQuery\" || name === \"useInfiniteQuery\")\n )\n return object;\n if (args && solidSource.test(source)) {\n if (name === \"createSignal\" || name === \"createOptimistic\") {\n return container([\n [\"0\", { kind: \"accessor\", result: args[0] ?? null }],\n [\"1\", setter],\n ]);\n }\n if (name === \"createMemo\") return { kind: \"accessor\", result: null };\n if (name === \"createStore\" || name === \"createOptimisticStore\") {\n return container([\n [\"0\", asStore(args[0] ?? args[1] ?? null)],\n [\"1\", setter],\n ]);\n }\n if (name === \"createProjection\") return asStore(args[1] ?? null);\n if (name === \"omit\") return args[0] ?? null;\n if (name === \"merge\") return args.reduce(mergeValues, null);\n }\n const file = resolveFile(source, from);\n const module = file ? load(file) : null;\n if (!module) return null;\n const symbol = module.checker.getSymbolAtLocation(module.source);\n const exported =\n symbol && module.checker.getExportsOfModule(symbol).find((s) => s.name === name);\n if (exported) return evaluateSymbol(module, exported, args, new Map(), seen);\n // The single-file binder cannot expand export-star declarations itself.\n if (name !== \"default\") {\n for (const statement of module.source.statements) {\n if (ts.isExportDeclaration(statement) && !statement.exportClause && !statement.isTypeOnly) {\n const source = importSource(statement);\n if (!source || seen.has(statement)) continue;\n const value = imported(\n source,\n name,\n module.source.fileName,\n args,\n new Set(seen).add(statement)\n );\n if (value) return value;\n }\n }\n }\n return null;\n };\n\n const evaluateSymbol = (\n module: Module,\n symbol: ts.Symbol | undefined,\n args: Value[] | undefined,\n env: Map<ts.Symbol, Value>,\n seen: Set<ts.Node>\n ): Value => {\n if (!symbol) return null;\n if (env.has(symbol)) {\n const value = env.get(symbol)!;\n return args ? callResult(value) : value;\n }\n const declarations = symbol.declarations ?? [];\n const declaration =\n declarations.find((d) => ts.isFunctionDeclaration(d) && d.body) ?? declarations[0];\n return declaration ? evaluate(module, declaration, args, env, seen) : null;\n };\n\n const evaluate = (\n module: Module,\n node: ts.Node,\n args: Value[] | undefined,\n env: Map<ts.Symbol, Value>,\n seen: Set<ts.Node>\n ): Value => {\n if (++steps > 1000 || seen.has(node)) return null;\n const next = new Set(seen).add(node);\n const valueOf = (node: ts.Node): Value => evaluate(module, node, undefined, env, next);\n if (ts.isAwaitExpression(node)) {\n const value = awaitedValue(valueOf(node.expression));\n return args ? callResult(value) : value;\n }\n if (ts.isYieldExpression(node)) {\n let value =\n node.asteriskToken && node.expression ? iterationReturn(valueOf(node.expression)) : null;\n let parent: ts.Node | undefined = node.parent;\n while (parent && !ts.isFunctionLike(parent)) parent = parent.parent;\n if (parent && ts.getCombinedModifierFlags(parent as ts.Declaration) & ts.ModifierFlags.Async)\n value = awaitedValue(value);\n return args ? callResult(value) : value;\n }\n if (\n ts.isParenthesizedExpression(node) ||\n ts.isAsExpression(node) ||\n ts.isTypeAssertionExpression(node) ||\n ts.isNonNullExpression(node) ||\n ts.isSatisfiesExpression?.(node)\n ) {\n return evaluate(module, node.expression, args, env, next);\n }\n if (ts.isIdentifier(node))\n return evaluateSymbol(module, module.checker.getSymbolAtLocation(node), args, env, next);\n if (ts.isImportSpecifier(node) || ts.isImportClause(node) || ts.isExportSpecifier(node)) {\n if (node.isTypeOnly) return null;\n const source = importSource(node);\n if (source) {\n const name = ts.isImportClause(node) ? \"default\" : (node.propertyName ?? node.name).text;\n return imported(source, name, module.source.fileName, args, next);\n }\n if (ts.isExportSpecifier(node)) {\n return evaluateSymbol(\n module,\n module.checker.getExportSpecifierLocalTargetSymbol(node),\n args,\n env,\n next\n );\n }\n }\n if (ts.isExportAssignment(node)) return evaluate(module, node.expression, args, env, next);\n if (ts.isVariableDeclaration(node) && node.initializer) {\n if (!(node.parent.flags & ts.NodeFlags.Const)) return null;\n return evaluate(module, node.initializer, args, env, next);\n }\n if (\n ts.isBindingElement(node) &&\n ts.isArrayBindingPattern(node.parent) &&\n ts.isVariableDeclaration(node.parent.parent)\n ) {\n const tuple = valueOf(node.parent.parent);\n const value = propertyValue(tuple, String(node.parent.elements.indexOf(node)));\n return args ? callResult(value) : value;\n }\n if (\n ts.isArrowFunction(node) ||\n ts.isFunctionExpression(node) ||\n ts.isFunctionDeclaration(node)\n ) {\n if (!args || !node.body) return null;\n const async = Boolean(ts.getCombinedModifierFlags(node) & ts.ModifierFlags.Async);\n const wrap = (value: Value): Value => (async ? promiseValue(value) : value);\n const local = new Map(env);\n node.parameters.forEach((param, index) => {\n if (ts.isIdentifier(param.name)) {\n const symbol = module.checker.getSymbolAtLocation(param.name);\n if (symbol)\n local.set(\n symbol,\n args[index] ?? (param.initializer ? valueOf(param.initializer) : null)\n );\n }\n });\n if (!ts.isBlock(node.body)) return wrap(evaluate(module, node.body, undefined, local, next));\n let result: Value = null;\n let yielded: Value = null;\n const visit = (child: ts.Node): void => {\n if (ts.isFunctionLike(child) || ts.isClassLike(child)) return;\n if (ts.isReturnStatement(child) && child.expression) {\n result = mergeValues(result, evaluate(module, child.expression, undefined, local, next));\n } else if (node.asteriskToken && ts.isYieldExpression(child) && child.expression) {\n const value = evaluate(module, child.expression, undefined, local, next);\n yielded = mergeValues(yielded, child.asteriskToken ? iterationValue(value) : value);\n }\n // A return expression may itself contain yield or yield*.\n ts.forEachChild(child, visit);\n };\n visit(node.body);\n return node.asteriskToken ? iteratorValue(async, yielded, result) : wrap(result);\n }\n if (ts.isCallExpression(node)) {\n if (\n ts.isPropertyAccessExpression(node.expression) &&\n ts.isIdentifier(node.expression.expression) &&\n node.expression.expression.text === \"Promise\" &&\n node.expression.name.text === \"resolve\" &&\n !module.checker.getSymbolAtLocation(node.expression.expression)?.declarations?.length\n ) {\n return args ? null : promiseValue(node.arguments[0] ? valueOf(node.arguments[0]) : null);\n }\n const value = evaluate(module, node.expression, node.arguments.map(valueOf), env, next);\n return args ? callResult(value) : value;\n }\n if (ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node)) {\n const key = ts.isPropertyAccessExpression(node)\n ? node.name.text\n : ts.isStringLiteralLike(node.argumentExpression) ||\n ts.isNumericLiteral(node.argumentExpression)\n ? node.argumentExpression.text\n : null;\n if (key !== null && ts.isIdentifier(node.expression)) {\n const declaration = module.checker.getSymbolAtLocation(node.expression)?.declarations?.[0];\n if (declaration && ts.isNamespaceImport(declaration)) {\n const source = importSource(declaration);\n if (source) return imported(source, key, module.source.fileName, args, next);\n }\n }\n const value = propertyValue(valueOf(node.expression), key);\n return args ? callResult(value) : value;\n }\n if (args) return null;\n if (ts.isObjectLiteralExpression(node)) {\n const properties = new Map<string, Value>();\n for (const property of node.properties) {\n if (ts.isSpreadAssignment(property)) {\n const value = valueOf(property.expression);\n for (const [key, entry] of propertiesOf(value)) properties.set(key, entry);\n } else if (ts.isPropertyAssignment(property) && !ts.isComputedPropertyName(property.name)) {\n properties.set(property.name.text, valueOf(property.initializer));\n } else if (ts.isShorthandPropertyAssignment(property)) {\n properties.set(\n property.name.text,\n evaluateSymbol(\n module,\n module.checker.getShorthandAssignmentValueSymbol(property),\n undefined,\n env,\n next\n )\n );\n }\n }\n return { kind: \"plain\", properties };\n }\n if (ts.isArrayLiteralExpression(node))\n return container(node.elements.map((element, i) => [String(i), valueOf(element)]));\n if (ts.isConditionalExpression(node))\n return mergeValues(valueOf(node.whenTrue), valueOf(node.whenFalse));\n if (ts.isBinaryExpression(node)) {\n return [\n ts.SyntaxKind.AmpersandAmpersandToken,\n ts.SyntaxKind.BarBarToken,\n ts.SyntaxKind.QuestionQuestionToken,\n ].includes(node.operatorToken.kind)\n ? mergeValues(valueOf(node.left), valueOf(node.right))\n : scalar;\n }\n if (\n ts.isLiteralExpression(node) ||\n ts.isTemplateExpression(node) ||\n ts.isPrefixUnaryExpression(node) ||\n node.kind === ts.SyntaxKind.TrueKeyword ||\n node.kind === ts.SyntaxKind.FalseKeyword\n )\n return scalar;\n return null;\n };\n\n return {\n value(source: string, name: string, args?: Value[]): Value {\n steps = 0;\n return imported(source, name, filename, args, new Set());\n },\n type: createReactiveTypeResolver(\n filename,\n text,\n (source, from) => {\n const file = resolveFile(source, from);\n return file ? load(file) : null;\n },\n solidSource\n ),\n };\n}\n","import type { TSESLint } from \"@typescript-eslint/utils\";\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { findVariable } from \"../compat\";\nimport { createReactiveImportResolver } from \"../utils/reactive-imports\";\nimport {\n Value,\n object,\n scalar,\n setter,\n container,\n asStore,\n propertyValue,\n propertyName,\n mergeValues,\n awaitedValue,\n promiseValue,\n hasKind,\n callResult,\n propertiesOf,\n iteratorValue,\n iterationValue,\n iterationReturn,\n computationValue,\n} from \"../utils/reactive-values\";\nimport {\n FunctionNode,\n getSolidSourceRegex,\n ignoreTransparentWrappers,\n isFunctionNode,\n isPropsByName,\n isSolidV2,\n} from \"../utils\";\n\ntype MessageIds = \"untrackedRead\";\ntype Options = [{ reactiveObjectFactories?: string[] }];\ntype Variable = TSESLint.Scope.Variable;\ntype Bindings = Map<Variable, Value>;\n\n/**\n * Track the shape of values crossing the compute/apply boundary. Plain\n * containers can retain proxies or accessors in individual fields; copying a\n * container is not necessarily a snapshot. Imported return values are traced\n * through bounded local source analysis, not a full project type check.\n */\nexport default ESLintUtils.RuleCreator.withoutDocs<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow reading reactive values in the untracked apply callback of a Solid 2 split effect.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-reactive-read-in-effect-callback.md\",\n },\n schema: [\n {\n type: \"object\",\n properties: {\n reactiveObjectFactories: {\n type: \"array\",\n items: { type: \"string\" },\n uniqueItems: true,\n description: \"Local names of additional functions that return reactive objects.\",\n default: [],\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n untrackedRead:\n \"Reactive value '{{name}}' is read in an untracked effect callback. Read it in the compute function and pass a plain snapshot to the callback.\",\n },\n },\n defaultOptions: [{ reactiveObjectFactories: [] }],\n create(context, [options]) {\n if (!isSolidV2(context)) return {};\n\n const sourceCode = context.sourceCode;\n const solidSource = getSolidSourceRegex(context);\n const { value: importedValue, type: typeOf } = createReactiveImportResolver(\n context.physicalFilename,\n solidSource,\n sourceCode.text\n );\n const factories = new Set(options.reactiveObjectFactories);\n const reported = new Set<number>();\n const parameterReads = new WeakMap<Bindings, T.Node[]>();\n\n const unwrap = (node: T.Node): T.Node =>\n node.type === \"ChainExpression\" ? unwrap(node.expression) : ignoreTransparentWrappers(node);\n\n // Resolve only stable local aliases, with a guard for circular definitions.\n const resolve = (node: T.Node | undefined, seen = new Set<T.Node>()): T.Node | undefined => {\n if (!node) return undefined;\n node = unwrap(node);\n if (seen.has(node)) return undefined;\n seen.add(node);\n if (node.type === \"Identifier\") {\n const variable = findVariable(context, node);\n const def = variable?.defs[0];\n if (def?.type === \"FunctionName\") return def.node;\n if (\n def?.type === \"Variable\" &&\n def.node.id.type === \"Identifier\" &&\n !variable?.references.some((ref) => ref.isWrite() && !ref.init)\n ) {\n return resolve(def.node.init ?? undefined, seen);\n }\n }\n if (node.type === \"MemberExpression\") {\n const base = resolve(node.object, seen);\n const key = propertyName(node.property, node.computed);\n if (base?.type === \"ObjectExpression\" && key !== null) {\n const property = base.properties.find(\n (p) => p.type === \"Property\" && propertyName(p.key, p.computed) === key\n );\n if (property?.type === \"Property\") return resolve(property.value, seen);\n }\n }\n return node;\n };\n\n const resolveFunction = (node: T.Node | undefined): FunctionNode | null => {\n const resolved = resolve(node);\n return isFunctionNode(resolved) ? resolved : null;\n };\n\n // Resolve the binding, not just its spelling: aliases, namespaces and\n // shadowed imports must all have the same behavior.\n const importedBinding = (node: T.Node): { source: string; name: string } | null => {\n node = resolve(node) ?? node;\n const id =\n node.type === \"Identifier\"\n ? node\n : node.type === \"MemberExpression\" && node.object.type === \"Identifier\"\n ? node.object\n : null;\n if (!id) return null;\n const def = findVariable(context, id)?.defs[0];\n if (\n def?.type !== \"ImportBinding\" ||\n def.parent.type !== \"ImportDeclaration\" ||\n def.parent.importKind === \"type\"\n )\n return null;\n if (node.type === \"Identifier\" && def.node.type === \"ImportSpecifier\") {\n if (def.node.importKind === \"type\") return null;\n const name =\n def.node.imported.type === \"Identifier\"\n ? def.node.imported.name\n : def.node.imported.value;\n return { source: def.parent.source.value, name };\n }\n if (node.type === \"Identifier\" && def.node.type === \"ImportDefaultSpecifier\") {\n return { source: def.parent.source.value, name: \"default\" };\n }\n if (node.type === \"MemberExpression\" && def.node.type === \"ImportNamespaceSpecifier\") {\n const name = propertyName(node.property, node.computed);\n return name === null ? null : { source: def.parent.source.value, name };\n }\n return null;\n };\n\n const solidImport = (node: T.Node): string | null => {\n const binding = importedBinding(node);\n return binding && solidSource.test(binding.source) ? binding.name : null;\n };\n\n const isCallbackPropCall = (node: T.MemberExpression, env: Bindings): boolean => {\n // Conventional event callbacks are imperative, not dependencies. Limit\n // this to direct calls on props with a known void callback signature;\n // ordinary data props, accessor props, and store methods still warn.\n const name = propertyName(node.property, node.computed);\n if (\n !name ||\n !/^on[A-Z]/.test(name) ||\n node.parent.type !== \"CallExpression\" ||\n node.parent.callee !== node\n )\n return false;\n const base = resolve(node.object);\n if (base?.type !== \"Identifier\" || !isPropsByName(base.name)) return false;\n const variable = findVariable(context, base);\n return (\n variable?.defs[0]?.type === \"Parameter\" &&\n !env.has(variable) &&\n typeOf(node.range) === \"callback\"\n );\n };\n\n const report = (node: T.Node): void => {\n if (reported.has(node.range[0])) return;\n reported.add(node.range[0]);\n context.report({\n node,\n messageId: \"untrackedRead\",\n data: { name: sourceCode.getText(node) },\n });\n };\n\n // Parser visitor keys exclude parent links and include TS/JSX nodes.\n // Nested functions are visited only for known calls. Async helpers called\n // by apply remain untracked on both sides of their suspension points.\n const walk = (node: T.Node, visit: (node: T.Node) => void): void => {\n if (isFunctionNode(node)) return;\n visit(node);\n for (const key of sourceCode.visitorKeys[node.type] ?? []) {\n const child = (node as unknown as Record<string, unknown>)[key];\n if (Array.isArray(child)) {\n for (const item of child) if (item?.type) walk(item as T.Node, visit);\n } else if (child && typeof child === \"object\" && \"type\" in child) {\n walk(child as T.Node, visit);\n }\n }\n };\n\n const returns = (fn: FunctionNode): T.Node[] => {\n if (fn.body.type !== \"BlockStatement\") return [fn.body];\n const result: T.Node[] = [];\n walk(fn.body, (node) => {\n if (node.type === \"ReturnStatement\" && node.argument) result.push(node.argument);\n });\n return result;\n };\n\n const bind = (\n pattern: T.Node,\n value: Value,\n env: Bindings,\n check = false,\n seen = new Set<T.Node>()\n ): void => {\n if (seen.has(pattern)) return;\n const next = new Set(seen).add(pattern);\n if (pattern.type === \"Identifier\") {\n const variable = findVariable(context, pattern);\n if (variable) env.set(variable, value);\n } else if (pattern.type === \"AssignmentPattern\") {\n if (check && !value) parameterReads.get(env)?.push(pattern.right);\n bind(pattern.left, value ?? infer(pattern.right, env, next), env, check, next);\n } else if (pattern.type === \"ObjectPattern\") {\n for (const property of pattern.properties) {\n if (check && hasKind(value, \"object\")) report(property);\n if (property.type === \"RestElement\") {\n bind(\n property.argument,\n { kind: \"plain\", properties: new Map(propertiesOf(value)) },\n env,\n false,\n next\n );\n } else {\n if (check && property.computed) parameterReads.get(env)?.push(property.key);\n bind(\n property.value,\n propertyValue(value, propertyName(property.key, property.computed)),\n env,\n check,\n next\n );\n }\n }\n } else if (pattern.type === \"ArrayPattern\") {\n if (check && hasKind(value, \"object\")) report(pattern);\n pattern.elements.forEach((element, index) => {\n if (element) bind(element, propertyValue(value, String(index)), env, check, next);\n });\n } else if (pattern.type === \"RestElement\") {\n bind(pattern.argument, value, env, check, next);\n }\n };\n\n const callBindings = (\n fn: FunctionNode,\n args: Value[],\n env: Bindings,\n check = false,\n seen = new Set<T.Node>()\n ): Bindings => {\n const local = new Map(env);\n if (check) parameterReads.set(local, []);\n fn.params.forEach((param, index) => {\n const value =\n param.type === \"RestElement\"\n ? container(args.slice(index).map((arg, i) => [String(i), arg]))\n : args[index] ?? null;\n bind(param, value, local, check, seen);\n });\n return local;\n };\n\n const resultOf = (fn: FunctionNode, env: Bindings, seen: Set<T.Node>): Value => {\n if (seen.has(fn)) return null;\n const next = new Set(seen).add(fn);\n const result = returns(fn).reduce<Value>(\n (value, node) => mergeValues(value, infer(node, env, next)),\n null\n );\n if (fn.generator) {\n let yielded: Value = null;\n walk(fn.body, (node) => {\n if (node.type !== \"YieldExpression\" || !node.argument) return;\n const value = infer(node.argument, env, next);\n yielded = mergeValues(yielded, node.delegate ? iterationValue(value) : value);\n });\n return iteratorValue(fn.async, yielded, result);\n }\n return fn.async ? promiseValue(result) : result;\n };\n\n const computeValue = (\n node: T.Node | undefined,\n env: Bindings,\n seen = new Set<T.Node>()\n ): Value => {\n if (!node) return null;\n const fn = resolveFunction(node);\n if (fn) return computationValue(resultOf(fn, env, seen));\n const binding = importedBinding(node);\n return computationValue(\n binding\n ? importedValue(binding.source, binding.name, [])\n : callResult(infer(node, env, seen))\n );\n };\n\n const infer = (input: T.Node | undefined, env: Bindings, seen = new Set<T.Node>()): Value => {\n if (!input) return null;\n const node = unwrap(input);\n if (seen.has(node)) return null;\n const next = new Set(seen).add(node);\n if (node.type === \"AwaitExpression\") return awaitedValue(infer(node.argument, env, next));\n if (node.type === \"YieldExpression\") {\n if (!node.delegate) return null;\n const result = iterationReturn(infer(node.argument ?? undefined, env, next));\n let parent: T.Node | undefined = node.parent;\n while (parent && !isFunctionNode(parent)) parent = parent.parent;\n return parent && isFunctionNode(parent) && parent.async ? awaitedValue(result) : result;\n }\n if (node.type === \"Identifier\") {\n const variable = findVariable(context, node);\n if (!variable) return null;\n if (env.has(variable)) return env.get(variable)!;\n const def = variable.defs[0];\n if (def?.type === \"ImportBinding\") {\n const binding = importedBinding(node);\n return binding ? importedValue(binding.source, binding.name) : null;\n }\n if (def?.type === \"Parameter\") return isPropsByName(node.name) ? object : null;\n if (def?.type !== \"Variable\" || !def.node.init || seen.has(def.node)) return null;\n if (variable.references.some((ref) => ref.isWrite() && !ref.init)) return null;\n next.add(def.node);\n const value = infer(def.node.init, env, next);\n const bindings = new Map<Variable, Value>();\n bind(def.node.id, value, bindings, false, next);\n return bindings.get(variable) ?? null;\n }\n if (node.type === \"MemberExpression\") {\n const value = propertyValue(\n infer(node.object, env, next),\n propertyName(node.property, node.computed)\n );\n // Reading a scalar field is still reactive, but its copied result is\n // not a proxy. Refine only the value, never suppress the original read.\n return (value === null || value.kind === \"object\") && typeOf(node.range) === \"scalar\"\n ? scalar\n : value;\n }\n if (\n node.type === \"Literal\" ||\n node.type === \"TemplateLiteral\" ||\n node.type === \"BinaryExpression\" ||\n node.type === \"UnaryExpression\"\n )\n return scalar;\n if (node.type === \"ObjectExpression\") {\n const properties = new Map<string, Value>();\n for (const property of node.properties) {\n if (property.type === \"SpreadElement\") {\n const value = infer(property.argument, env, next);\n for (const [key, entry] of propertiesOf(value)) properties.set(key, entry);\n } else {\n const key = propertyName(property.key, property.computed);\n if (key !== null) properties.set(key, infer(property.value, env, next));\n }\n }\n return { kind: \"plain\", properties };\n }\n if (node.type === \"ArrayExpression\") {\n return container(\n node.elements.map((element, i) => [String(i), infer(element ?? undefined, env, next)])\n );\n }\n if (node.type === \"ConditionalExpression\") {\n return mergeValues(infer(node.consequent, env, next), infer(node.alternate, env, next));\n }\n if (node.type === \"LogicalExpression\") {\n return mergeValues(infer(node.left, env, next), infer(node.right, env, next));\n }\n if (node.type === \"CallExpression\") {\n // Only the unshadowed built-in Promise.resolve has these semantics.\n if (\n node.callee.type === \"MemberExpression\" &&\n node.callee.object.type === \"Identifier\" &&\n node.callee.object.name === \"Promise\" &&\n propertyName(node.callee.property, node.callee.computed) === \"resolve\"\n ) {\n const variable = findVariable(context, node.callee.object);\n if (!variable?.defs.length && !variable?.references.some((ref) => ref.isWrite()))\n return promiseValue(infer(node.arguments[0], env, next));\n }\n const primitive = solidImport(node.callee);\n const first = node.arguments[0];\n const fn = resolveFunction(first);\n if (\n primitive === \"createSignal\" ||\n primitive === \"createOptimistic\" ||\n primitive === \"createMemo\"\n ) {\n // Solid unwraps async computations, but a signal initialized with a\n // Promise as data still holds that Promise.\n const result = computeValue(first, env, next) ?? infer(first, env, next);\n const accessor: Value = { kind: \"accessor\", result };\n return primitive === \"createMemo\"\n ? accessor\n : container([\n [\"0\", accessor],\n [\"1\", setter],\n ]);\n }\n if (\n primitive === \"createStore\" ||\n primitive === \"createOptimisticStore\" ||\n primitive === \"createProjection\"\n ) {\n const initial = fn ? node.arguments[1] : first;\n const value = asStore(infer(initial, env, next)) ?? object;\n return primitive === \"createProjection\"\n ? value\n : container([\n [\"0\", value],\n [\"1\", setter],\n ]);\n }\n if (primitive === \"omit\") return infer(first, env, next);\n if (primitive === \"merge\") {\n return node.arguments.reduce<Value>(\n (value, arg) => mergeValues(value, infer(arg, env, next)),\n null\n );\n }\n if (node.callee.type === \"Identifier\" && factories.has(node.callee.name)) return object;\n const binding = importedBinding(node.callee);\n if (binding) {\n return importedValue(\n binding.source,\n binding.name,\n node.arguments.map((arg) => infer(arg, env, next))\n );\n }\n const callee = infer(node.callee, env, next);\n if (hasKind(callee, \"accessor\")) return callResult(callee);\n const called = resolveFunction(node.callee);\n if (called && !next.has(called)) {\n return resultOf(\n called,\n callBindings(\n called,\n node.arguments.map((arg) => infer(arg, env, next)),\n env,\n false,\n new Set(next).add(called)\n ),\n next\n );\n }\n }\n return null;\n };\n\n const analyze = (fn: FunctionNode, env: Bindings, active = new Set<FunctionNode>()): void => {\n if (active.has(fn) || fn.generator) return;\n const next = new Set(active).add(fn);\n // Default parameter expressions also execute in the apply phase.\n const visit = (node: T.Node): void => {\n if (node.type === \"VariableDeclarator\" && node.init) {\n bind(node.id, infer(node.init, env), env, true);\n } else if (node.type === \"AssignmentExpression\") {\n bind(node.left, infer(node.right, env), env, true);\n } else if (node.type === \"SpreadElement\" && hasKind(infer(node.argument, env), \"object\")) {\n report(node);\n } else if (node.type === \"MemberExpression\" && hasKind(infer(node.object, env), \"object\")) {\n const parent = node.parent;\n if (\n !isCallbackPropCall(node, env) &&\n !(\n parent?.type === \"AssignmentExpression\" &&\n parent.left === node &&\n parent.operator === \"=\"\n )\n ) {\n report(node);\n }\n }\n if (node.type !== \"CallExpression\") return;\n const callee = infer(node.callee, env);\n if (hasKind(callee, \"accessor\")) report(node);\n const called = resolveFunction(node.callee);\n if (called) {\n analyze(\n called,\n callBindings(\n called,\n node.arguments.map((arg) => infer(arg, env)),\n env,\n true\n ),\n next\n );\n } else if (hasKind(callee, \"setter\")) {\n const updater = resolveFunction(node.arguments[0]);\n // The setter's previous value/draft is safe; captured values are not.\n if (updater) analyze(updater, callBindings(updater, [], env, true), next);\n } else if (\n node.callee.type === \"MemberExpression\" &&\n [\"forEach\", \"map\", \"filter\", \"some\", \"every\", \"find\", \"findIndex\", \"flatMap\"].includes(\n propertyName(node.callee.property, node.callee.computed) ?? \"\"\n )\n ) {\n const callback = resolveFunction(node.arguments[0]);\n if (callback) {\n const item = propertyValue(infer(node.callee.object, env), \"0\");\n analyze(callback, callBindings(callback, [item], env, true), next);\n }\n }\n };\n for (const expression of parameterReads.get(env) ?? []) walk(expression, visit);\n walk(fn.body, visit);\n };\n\n const effects: T.CallExpression[] = [];\n return {\n CallExpression(node) {\n effects.push(node);\n },\n \"Program:exit\"() {\n for (const node of effects) {\n if (\n ![\"createEffect\", \"createRenderEffect\"].includes(solidImport(node.callee) ?? \"\") ||\n node.arguments.length < 2\n )\n continue;\n let apply = resolveFunction(node.arguments[1]);\n if (!apply) {\n const bundle = resolve(node.arguments[1]);\n if (bundle?.type === \"ObjectExpression\") {\n const effect = bundle.properties.find(\n (p) => p.type === \"Property\" && propertyName(p.key, p.computed) === \"effect\"\n );\n if (effect?.type === \"Property\") apply = resolveFunction(effect.value);\n }\n }\n if (!apply) continue;\n const env: Bindings = new Map();\n const value = computeValue(node.arguments[0], env);\n analyze(apply, callBindings(apply, [value, value], env, true));\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils, ASTUtils } from \"@typescript-eslint/utils\";\nimport { getSolidSourceRegex, trackImports } from \"../utils\";\nimport { getScope } from \"../compat\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\ntype MessageIds = \"restatedDefault\";\ntype Options = [];\n\n// Defaults verified against the Solid 2.0 RC source (client/flow.ts):\n// <For> is keyed by default; <Show> and <Match> are non-keyed by default.\nconst JSX_PROP_DEFAULTS: Record<string, Record<string, boolean>> = {\n For: { keyed: true },\n Show: { keyed: false },\n Match: { keyed: false },\n};\n\n/*\n * Explicitly passing a prop's default value is noise that AI-generated code\n * produces constantly. Same category as typescript-eslint's\n * no-unnecessary-type-arguments: opt-in, stylistic, autofixable.\n */\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Disallow restating a prop or option value that is already the default.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-restated-default-options.md\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n restatedDefault:\n \"Passing `{{prop}}={{{value}}}` restates the default for `<{{component}}>`; omit it.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const { matchImport, handleImportDeclaration } = trackImports(getSolidSourceRegex(context));\n return {\n ImportDeclaration: handleImportDeclaration,\n JSXAttribute(node) {\n if (node.name.type !== \"JSXIdentifier\") return;\n const element = node.parent as T.JSXOpeningElement;\n if (element.name.type !== \"JSXIdentifier\") return;\n\n // Resolve through the import map so aliased Solid imports match and a\n // same-named component from another library (or a local declaration)\n // never does. An *unbound* <For>/<Show>/<Match> is still Solid's: the\n // compiler auto-imports the control-flow built-ins.\n let componentName = matchImport(Object.keys(JSX_PROP_DEFAULTS), element.name.name);\n if (\n !componentName &&\n element.name.name in JSX_PROP_DEFAULTS &&\n ASTUtils.findVariable(getScope(context, element), element.name.name) == null\n ) {\n componentName = element.name.name;\n }\n if (!componentName) return;\n const defaults = JSX_PROP_DEFAULTS[componentName];\n const prop = node.name.name;\n if (!(prop in defaults)) return;\n const defaultValue = defaults[prop];\n\n let stated: boolean | null = null;\n if (node.value == null) {\n // bare prop, e.g. `<Show keyed>` means true\n stated = true;\n } else if (\n node.value.type === \"JSXExpressionContainer\" &&\n node.value.expression.type === \"Literal\" &&\n typeof node.value.expression.value === \"boolean\"\n ) {\n stated = node.value.expression.value;\n }\n\n if (stated === defaultValue) {\n context.report({\n node,\n messageId: \"restatedDefault\",\n data: { prop, value: String(stated), component: element.name.name },\n fix: (fixer) => fixer.remove(node),\n });\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { ESLintUtils } from \"@typescript-eslint/utils\";\nimport { getSolidSourceRegex, trackImports } from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\ntype MessageIds = \"singleArgEffect\" | \"singleArgRenderEffect\";\ntype Options = [];\n\n/*\n * Solid 2.0 splits effects into a tracked compute function and an untracked\n * effect function: `createEffect(compute, effect)`. The single-argument 1.x\n * form types as `never` via a deprecated overload — which produces no compile\n * error on a bare statement call — and only throws at runtime in dev mode.\n * This rule is the build-time hard stop.\n */\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Require the two-argument `createEffect(compute, effect)` form used by Solid 2.0.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-single-arg-create-effect.md\",\n },\n schema: [],\n messages: {\n singleArgEffect:\n \"In Solid 2.0, createEffect takes separate compute and effect functions: `createEffect(() => signal(), (value) => doWork(value))`. For a derived value use `createMemo`; for a one-shot side effect, just call the function directly.\",\n singleArgRenderEffect:\n \"In Solid 2.0, createRenderEffect takes separate compute and effect functions: `createRenderEffect(() => signal(), (value) => doWork(value))`.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const { matchImport, handleImportDeclaration } = trackImports(getSolidSourceRegex(context));\n\n return {\n ImportDeclaration: handleImportDeclaration,\n CallExpression(node) {\n if (node.callee.type !== \"Identifier\" || node.arguments.length !== 1) return;\n if (matchImport(\"createEffect\", node.callee.name)) {\n context.report({ node, messageId: \"singleArgEffect\" });\n } else if (matchImport(\"createRenderEffect\", node.callee.name)) {\n context.report({ node, messageId: \"singleArgRenderEffect\" });\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { findVariable } from \"../compat\";\nimport { getSolidSourceRegex, trackImports } from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\n// Array methods that mutate their receiver in place.\nconst MUTATING_METHODS = new Set([\n \"push\",\n \"pop\",\n \"shift\",\n \"unshift\",\n \"splice\",\n \"sort\",\n \"reverse\",\n \"fill\",\n \"copyWithin\",\n]);\n\ntype MessageIds = \"mutateStore\" | \"mutateProjection\";\ntype Options = [];\n\n/*\n * Store setters receive a mutable draft in Solid 2.0 (`produce` semantics by\n * default), which makes mutating the read proxy directly — `store.count++`,\n * `store.items.push(x)` — look plausible. It isn't: the proxy's write traps\n * silently ignore writes outside a draft scope, with no error or dev warning\n * of any kind — the mutation just vanishes. That silence is exactly why this\n * rule matters: lint is currently the only guardrail. Draft mutations inside\n * the setter are written through the draft parameter, a different variable,\n * so they never resolve to the store and are naturally exempt.\n */\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow mutating a store's read proxy; store state changes only through the setter's mutable draft.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-store-mutation-outside-setter.md\",\n },\n schema: [],\n messages: {\n mutateStore:\n \"'{{name}}' is a store's read proxy, which is read-only; this mutation is silently ignored — no error, no update, the write just vanishes. Mutate the draft inside the setter instead: `{{setter}}(draft => { ... })`.\",\n mutateProjection:\n \"'{{name}}' is a projection, a read-only derived store. Derive this value inside the projection function instead of mutating the result.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const { matchImport, handleImportDeclaration } = trackImports(getSolidSourceRegex(context));\n\n type Target = { kind: \"store\"; setter: string | null } | { kind: \"projection\" };\n\n /** Resolves an identifier to the store or projection it names, if any. */\n const resolveTarget = (id: T.Identifier): Target | null => {\n const def = findVariable(context, id)?.defs[0];\n if (!def || def.type !== \"Variable\" || !def.node.init) return null;\n const { id: declId, init } = def.node;\n if (init.type !== \"CallExpression\" || init.callee.type !== \"Identifier\") return null;\n\n // const [store, setStore] = createStore(...)\n if (\n declId.type === \"ArrayPattern\" &&\n declId.elements[0]?.type === \"Identifier\" &&\n declId.elements[0].name === id.name &&\n matchImport(\"createStore\", init.callee.name)\n ) {\n const setter = declId.elements[1]?.type === \"Identifier\" ? declId.elements[1].name : null;\n return { kind: \"store\", setter };\n }\n // const projected = createProjection(...)\n if (declId.type === \"Identifier\" && matchImport(\"createProjection\", init.callee.name)) {\n return { kind: \"projection\" };\n }\n return null;\n };\n\n /** Walks a member chain (`store.a.b`) down to its base identifier. */\n const baseIdentifier = (node: T.Node): T.Identifier | null => {\n let current: T.Node = node;\n while (current.type === \"MemberExpression\") current = current.object;\n return current.type === \"Identifier\" ? current : null;\n };\n\n const checkMutation = (member: T.MemberExpression, reportNode: T.Node) => {\n const base = baseIdentifier(member);\n const target = base && resolveTarget(base);\n if (!target) return;\n if (target.kind === \"projection\") {\n context.report({\n node: reportNode,\n messageId: \"mutateProjection\",\n data: { name: base.name },\n });\n } else {\n context.report({\n node: reportNode,\n messageId: \"mutateStore\",\n data: { name: base.name, setter: target.setter ?? \"setStore\" },\n });\n }\n };\n\n return {\n ImportDeclaration: handleImportDeclaration,\n AssignmentExpression(node) {\n if (node.left.type === \"MemberExpression\") checkMutation(node.left, node);\n },\n UpdateExpression(node) {\n if (node.argument.type === \"MemberExpression\") checkMutation(node.argument, node);\n },\n UnaryExpression(node) {\n if (node.operator === \"delete\" && node.argument.type === \"MemberExpression\") {\n checkMutation(node.argument, node);\n }\n },\n CallExpression(node) {\n if (\n node.callee.type === \"MemberExpression\" &&\n node.callee.property.type === \"Identifier\" &&\n MUTATING_METHODS.has(node.callee.property.name)\n ) {\n checkMutation(node.callee, node);\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { ESLintUtils, TSESTree as T } from \"@typescript-eslint/utils\";\nimport { isDOMElementName, isSolidV2 } from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\nconst knownNamespaces = [\"on\", \"oncapture\", \"use\", \"prop\", \"attr\", \"bool\"];\nconst styleNamespaces = [\"style\", \"class\"];\nconst otherNamespaces = [\"xmlns\", \"xlink\"];\n\n// In Solid 2.0, namespaces are no longer reserved: any colon-name passes\n// through as a literal attribute, and `prop:` is the only special prefix left.\n// The formerly-public 1.x prefixes now silently render literal attributes, so\n// in v2 mode they're flagged as near-certain migration bugs with per-prefix\n// guidance.\nconst v2MigrationGuidance: Record<string, string> = {\n on: \"For an event handler, use the camelCase form instead: `onClick`\",\n oncapture:\n \"There is no capture-phase prefix in Solid 2.0; add a capture listener with `addEventListener` in a `ref` if needed\",\n use: \"Directives were removed in Solid 2.0; call the function in `ref` instead: `ref={(el) => myDirective(el)}`\",\n attr: \"Use the plain attribute name; attributes are the default in Solid 2.0\",\n bool: \"Use the plain attribute with a boolean or conditional value\",\n};\n\ntype MessageIds = \"unknown\" | \"style\" | \"component\" | \"component-suggest\" | \"v2Namespace\";\ntype Options = [{ allowedNamespaces: Array<string> }?];\n\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Enforce using only Solid-specific namespaced attribute names (i.e. `'on:'` in `<div on:click={...} />`).\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-unknown-namespaces.md\",\n },\n hasSuggestions: true,\n schema: [\n {\n type: \"object\",\n properties: {\n allowedNamespaces: {\n description: \"an array of additional namespace names to allow\",\n type: \"array\",\n items: {\n type: \"string\",\n },\n default: [],\n minItems: 1,\n uniqueItems: true,\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n unknown: `'{{namespace}}:' is not one of Solid's special prefixes for JSX attributes (${knownNamespaces\n .map((n) => `'${n}:'`)\n .join(\", \")}).`,\n style:\n \"Using the '{{namespace}}:' special prefix is potentially confusing, prefer the '{{namespace}}' prop instead.\",\n component: \"Namespaced props have no effect on components.\",\n \"component-suggest\": \"Replace {{namespace}}:{{name}} with {{name}}.\",\n v2Namespace:\n \"'{{namespace}}:' is not a special prefix in Solid 2.0; this renders a literal '{{namespace}}:{{name}}' attribute. {{guidance}}.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const explicitlyAllowedNamespaces = context.options?.[0]?.allowedNamespaces;\n const v2 = isSolidV2(context);\n return {\n \"JSXAttribute > JSXNamespacedName\": (node: T.JSXNamespacedName) => {\n const openingElement = node.parent!.parent as T.JSXOpeningElement;\n if (\n openingElement.name.type === \"JSXIdentifier\" &&\n !isDOMElementName(openingElement.name.name)\n ) {\n // no namespaces on Solid component elements\n context.report({\n node,\n messageId: \"component\",\n suggest: [\n {\n messageId: \"component-suggest\",\n data: { namespace: node.namespace.name, name: node.name.name },\n fix: (fixer) => fixer.replaceText(node, node.name.name),\n },\n ],\n });\n return;\n }\n\n const namespace = node.namespace?.name;\n\n if (v2) {\n // In 2.0 any colon-name is a legal literal attribute; only flag the\n // formerly-special 1.x prefixes, which are near-certain migration bugs.\n const guidance = v2MigrationGuidance[namespace];\n if (guidance && !explicitlyAllowedNamespaces?.includes(namespace)) {\n context.report({\n node,\n messageId: \"v2Namespace\",\n data: { namespace, name: node.name.name, guidance },\n });\n }\n return;\n }\n\n if (\n !(\n knownNamespaces.includes(namespace) ||\n otherNamespaces.includes(namespace) ||\n explicitlyAllowedNamespaces?.includes(namespace)\n )\n ) {\n if (styleNamespaces.includes(namespace)) {\n context.report({\n node,\n messageId: \"style\",\n data: { namespace },\n });\n } else {\n context.report({\n node,\n messageId: \"unknown\",\n data: { namespace },\n });\n }\n }\n },\n };\n },\n});\n","import type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { findVariable, getSourceCode } from \"../compat\";\nimport { findParent, getSolidSourceRegex, trackImports } from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\ntype MessageIds = \"neverWritten\" | \"neverRead\" | \"replaceWithAccessor\";\ntype Options = [];\n\n/*\n * A destructured signal tuple is the only handle on the signal, so scope\n * analysis is conclusive: if the setter is never referenced the value can\n * never change, and if the accessor is never referenced the state can never\n * be observed. Unused-variable rules miss both halves because the *other*\n * half keeps the declaration \"used\". Exported declarations are skipped —\n * references in other modules are invisible here.\n */\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"suggestion\",\n docs: {\n description:\n \"Disallow signals that are never written (use a plain value) or never read (dead state).\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-unused-signal.md\",\n },\n hasSuggestions: true,\n schema: [],\n messages: {\n neverWritten:\n \"This {{kind}} is never written, so its value can never change. Use a plain value, or `createMemo` if it should derive from reactive state.\",\n neverRead:\n \"This {{kind}} is never read, so setting it has no effect. Remove the {{kind}}, or read the value where the state should be used.\",\n replaceWithAccessor: \"Replace with a constant accessor.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const { matchImport, handleImportDeclaration } = trackImports(getSolidSourceRegex(context));\n\n /** Does this pattern element's variable have any reference besides its initialization? */\n const isUsed = (element: T.Identifier): boolean => {\n const variable = findVariable(context, element);\n // Unresolvable variables can't be proven unused; assume they're fine.\n if (!variable) return true;\n return variable.references.some((ref) => !ref.init);\n };\n\n return {\n ImportDeclaration: handleImportDeclaration,\n VariableDeclarator(node) {\n if (\n node.init?.type !== \"CallExpression\" ||\n node.init.callee.type !== \"Identifier\" ||\n node.id.type !== \"ArrayPattern\" ||\n node.id.elements.length > 2\n ) {\n return;\n }\n const primitive = matchImport(\n [\"createSignal\", \"createStore\", \"createOptimistic\"],\n node.init.callee.name\n );\n if (!primitive) return;\n const kind =\n primitive === \"createSignal\"\n ? \"signal\"\n : primitive === \"createStore\"\n ? \"store\"\n : \"optimistic value\";\n // Only plain `[accessor, setter]` shapes (with possible holes) are conclusive.\n const [accessor = null, setter = null] = node.id.elements;\n if (\n (accessor && accessor.type !== \"Identifier\") ||\n (setter && setter.type !== \"Identifier\")\n ) {\n return;\n }\n // Exported signals can be read or written by other modules.\n if (findParent(node, (n) => n.type === \"ExportNamedDeclaration\")) return;\n\n if (!accessor || !isUsed(accessor)) {\n context.report({ node: accessor ?? node.id, messageId: \"neverRead\", data: { kind } });\n return;\n }\n if (!setter || !isUsed(setter)) {\n const init = node.init;\n const initialValue = init.arguments[0];\n // Only suggest the rewrite for signals whose initial value is a\n // simple literal; richer expressions may want createMemo or\n // evaluate-once semantics, and store/optimistic results aren't\n // accessor-shaped.\n const suggest =\n primitive === \"createSignal\" && (!initialValue || initialValue.type === \"Literal\")\n ? [\n {\n messageId: \"replaceWithAccessor\" as const,\n fix: (fixer: TSESLint.RuleFixer) =>\n fixer.replaceText(\n node,\n `${accessor.name} = () => ${\n initialValue ? getSourceCode(context).getText(initialValue) : \"undefined\"\n }`\n ),\n },\n ]\n : undefined;\n context.report({\n node: setter ?? node.id,\n messageId: \"neverWritten\",\n data: { kind },\n suggest,\n });\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { findVariable } from \"../compat\";\nimport {\n FunctionNode,\n findParent,\n getFunctionName,\n isFunctionNode,\n getSolidSourceRegex,\n trackImports,\n} from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\ntype MessageIds = \"writeInMemo\" | \"writeInCompute\" | \"writeInComponent\";\ntype Options = [];\n\n/*\n * `createMemo` callbacks, the compute half of `createEffect(compute,\n * effect)`, and component bodies are pure owned scopes in Solid 2.0:\n * writing other reactive state from inside them creates update cycles and\n * throws in dev mode (REACTIVE_WRITE_IN_OWNED_SCOPE). Only setter calls\n * whose nearest enclosing function IS the pure scope are flagged — a setter\n * inside a nested function (an event handler, an `onSettled` or\n * `createTrackedEffect` callback, the effect half) runs later, in an\n * imperative scope, and is fine.\n */\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow writing signals or stores inside `createMemo`, the compute half of `createEffect`, or a component body, which are pure owned scopes.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-write-in-pure-computation.md\",\n },\n schema: [],\n messages: {\n writeInMemo:\n \"Calling the setter '{{name}}' inside createMemo makes the computation impure and creates an update cycle. Derive the value instead of storing it, or move the write to an effect.\",\n writeInCompute:\n \"Calling the setter '{{name}}' in the compute half of {{api}} — the compute function is tracked and must be pure. Move the write into the effect half (the second argument).\",\n writeInComponent:\n \"Calling the setter '{{name}}' during component setup — the body runs once as a pure owned scope, and Solid 2.0 throws on setup writes in dev. Initialize the state with the right value instead, or move the write into an effect half or event handler.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const { matchImport, handleImportDeclaration } = trackImports(getSolidSourceRegex(context));\n\n /** Pure computation functions seen so far, mapped to how to report writes in them. */\n const computations = new Map<T.Node, { messageId: MessageIds; api: string }>();\n\n /**\n * Does this signal opt into owned-scope writes? Core skips its dev guard\n * for signals created with `ownedWrite: true`, and its error message\n * steers users to that option — so the lint must honor it too. The check\n * only says \"no\" when it can *prove* the opt-in is absent: a missing\n * options argument, or an object literal (followed through one level of\n * const indirection) that is fully readable and lacks `ownedWrite`.\n * Everything else — spreads, casts, unresolvable or reassigned\n * variables — is assumed to opt in, so the rule can only under-report,\n * never contradict core.\n */\n const allowsOwnedWrite = (init: T.CallExpression): boolean => {\n let options: T.Node | undefined = init.arguments[1];\n if (!options) return false;\n if (options.type === \"Identifier\") {\n const variable = findVariable(context, options);\n const def = variable?.defs[0];\n if (\n variable?.defs.length !== 1 ||\n def?.type !== \"Variable\" ||\n def.node.parent?.kind !== \"const\" ||\n !def.node.init ||\n // A const holding an object can still be given properties later\n // (`opts.ownedWrite = true`); any reference that mutates the object\n // or escapes it (passed elsewhere, aliased) makes the literal read\n // inconclusive. Only references that ARE the options argument of a\n // signal creation keep it conclusive.\n variable.references.some(\n (ref) =>\n ref.identifier !== def.node.id &&\n !(\n ref.identifier.parent?.type === \"CallExpression\" &&\n ref.identifier.parent.arguments[1] === ref.identifier\n )\n )\n ) {\n return true;\n }\n options = def.node.init;\n }\n if (options.type !== \"ObjectExpression\") return true;\n return options.properties.some(\n (property) =>\n property.type === \"SpreadElement\" ||\n ((property.key.type === \"Identifier\"\n ? property.key.name === \"ownedWrite\"\n : property.key.type === \"Literal\" && property.key.value === \"ownedWrite\") &&\n !(property.value.type === \"Literal\" && property.value.value === false))\n );\n };\n\n /** Is `id` the setter half of a signal/store/optimistic tuple? */\n const isSetter = (id: T.Identifier): boolean => {\n const def = findVariable(context, id)?.defs[0];\n if (!def || def.type !== \"Variable\" || !def.node.init) return false;\n const { id: declId, init } = def.node;\n if (\n declId.type !== \"ArrayPattern\" ||\n declId.elements[1]?.type !== \"Identifier\" ||\n declId.elements[1].name !== id.name ||\n init.type !== \"CallExpression\" ||\n init.callee.type !== \"Identifier\"\n ) {\n return false;\n }\n const primitive = matchImport(\n [\"createSignal\", \"createStore\", \"createOptimistic\"],\n init.callee.name\n );\n if (!primitive) return false;\n // `ownedWrite` is a SignalOptions flag; store setters have no such\n // exemption in core, so only signal-shaped primitives honor it.\n if (primitive !== \"createStore\" && allowsOwnedWrite(init)) return false;\n return true;\n };\n\n /**\n * Setter calls whose nearest enclosing function might be a component.\n * Whether it IS one (contains JSX, component-shaped) is only known at the\n * function's :exit, so reports are deferred until then.\n */\n const pendingComponentWrites = new Map<FunctionNode, T.CallExpression[]>();\n const functionStack: Array<{ hasJSX: boolean }> = [];\n\n /**\n * Matches the component detection in no-destructure/components-return-once:\n * containing JSX isn't enough on its own, because data callbacks\n * (`items.map((item) => <li />)`) and lowercase-named helpers also return\n * JSX. Component-shaped means: not lowercase-named, not a \"render prop\",\n * and not a plain call argument (unless the callee is PascalCase, like a\n * HOC).\n */\n const isComponent = (node: FunctionNode) =>\n !getFunctionName(node)?.match(/^[a-z]/) &&\n node.parent?.type !== \"JSXExpressionContainer\" &&\n !(\n node.parent?.type === \"CallExpression\" &&\n node.parent.arguments.includes(node as T.CallExpressionArgument) &&\n !(node.parent.callee as T.Identifier).name?.match(/^[A-Z]/)\n );\n\n return {\n ImportDeclaration: handleImportDeclaration,\n \":function\"() {\n functionStack.push({ hasJSX: false });\n },\n JSXElement() {\n if (functionStack.length) functionStack[functionStack.length - 1].hasJSX = true;\n },\n JSXFragment() {\n if (functionStack.length) functionStack[functionStack.length - 1].hasJSX = true;\n },\n \":function:exit\"(node: T.Node) {\n const { hasJSX } = functionStack.pop() ?? { hasJSX: false };\n if (!isFunctionNode(node)) return;\n const pending = pendingComponentWrites.get(node);\n if (!pending) return;\n pendingComponentWrites.delete(node);\n // A function that is itself a registered computation is reported\n // through the computation path, never as a component.\n if (!hasJSX || computations.has(node) || !isComponent(node)) return;\n for (const call of pending) {\n context.report({\n node: call,\n messageId: \"writeInComponent\",\n data: { name: (call.callee as T.Identifier).name },\n });\n }\n },\n CallExpression(node) {\n if (node.callee.type !== \"Identifier\") return;\n\n // Register pure computation callbacks. Ancestors are visited before\n // descendants, so these are known before their setter calls are seen.\n if (matchImport(\"createMemo\", node.callee.name)) {\n const fn = node.arguments[0];\n if (isFunctionNode(fn)) {\n computations.set(fn, { messageId: \"writeInMemo\", api: \"createMemo\" });\n }\n return;\n }\n const effectName = matchImport([\"createEffect\", \"createRenderEffect\"], node.callee.name);\n if (effectName && node.arguments.length >= 2) {\n const fn = node.arguments[0];\n if (isFunctionNode(fn)) {\n computations.set(fn, { messageId: \"writeInCompute\", api: effectName });\n }\n return;\n }\n\n const enclosing = findParent(node, isFunctionNode);\n if (!enclosing || !isFunctionNode(enclosing)) return;\n const computation = computations.get(enclosing);\n if (!computation && !isSetter(node.callee)) return;\n if (computation) {\n if (isSetter(node.callee)) {\n context.report({\n node,\n messageId: computation.messageId,\n data: { name: node.callee.name, api: computation.api },\n });\n }\n return;\n }\n // Possibly a setup-scope write; decided at the function's :exit.\n const pending = pendingComponentWrites.get(enclosing);\n if (pending) pending.push(node);\n else pendingComponentWrites.set(enclosing, [node]);\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { ESLintUtils, TSESTree as T } from \"@typescript-eslint/utils\";\nimport { jsxHasProp, jsxPropName } from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\ntype MessageIds = \"preferClasslist\";\ntype Options = [{ classnames?: Array<string> }?];\n\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Enforce using the classlist prop over importing a classnames helper. The classlist prop accepts an object `{ [class: string]: boolean }` just like classnames.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-classlist.md\",\n },\n fixable: \"code\",\n deprecated: true,\n schema: [\n {\n type: \"object\",\n properties: {\n classnames: {\n type: \"array\",\n description: \"An array of names to treat as `classnames` functions\",\n default: [\"cn\", \"clsx\", \"classnames\"],\n items: {\n type: \"string\",\n },\n minItems: 1,\n uniqueItems: true,\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n preferClasslist:\n \"The classlist prop should be used instead of {{ classnames }} to efficiently set classes based on an object.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const classnames = context.options[0]?.classnames ?? [\"cn\", \"clsx\", \"classnames\"];\n return {\n JSXAttribute(node) {\n if (\n [\"class\", \"className\"].indexOf(jsxPropName(node)) === -1 ||\n jsxHasProp(\n (node.parent as T.JSXOpeningElement | undefined)?.attributes ?? [],\n \"classlist\"\n )\n ) {\n return;\n }\n if (node.value?.type === \"JSXExpressionContainer\") {\n const expr = node.value.expression;\n if (\n expr.type === \"CallExpression\" &&\n expr.callee.type === \"Identifier\" &&\n classnames.indexOf(expr.callee.name) !== -1 &&\n expr.arguments.length === 1 &&\n expr.arguments[0].type === \"ObjectExpression\"\n ) {\n context.report({\n node,\n messageId: \"preferClasslist\",\n data: {\n classnames: expr.callee.name,\n },\n fix: (fixer) => {\n const attrRange = node.range;\n const objectRange = expr.arguments[0].range;\n return [\n fixer.replaceTextRange([attrRange[0], objectRange[0]], \"classlist={\"),\n fixer.replaceTextRange([objectRange[1], attrRange[1]], \"}\"),\n ];\n },\n });\n }\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils, ASTUtils } from \"@typescript-eslint/utils\";\nimport { isFunctionNode, isJSXElementOrFragment } from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\nconst { getPropertyName } = ASTUtils;\n\nexport default createRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Enforce using Solid's `<For />` component for mapping an array to JSX elements.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-for.md\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n preferFor:\n \"Use Solid's `<For />` component for efficiently rendering lists. Array#map causes DOM elements to be recreated.\",\n preferForOrIndex:\n \"Use Solid's `<For />` component or `<Index />` component for rendering lists. Array#map causes DOM elements to be recreated.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const reportPreferFor = (node: T.CallExpression) => {\n const jsxExpressionContainerNode = node.parent as T.JSXExpressionContainer;\n const arrayNode = (node.callee as T.MemberExpression).object;\n const mapFnNode = node.arguments[0];\n context.report({\n node,\n messageId: \"preferFor\",\n fix: (fixer) => {\n const beforeArray: [number, number] = [\n jsxExpressionContainerNode.range[0],\n arrayNode.range[0],\n ];\n const betweenArrayAndMapFn: [number, number] = [arrayNode.range[1], mapFnNode.range[0]];\n const afterMapFn: [number, number] = [\n mapFnNode.range[1],\n jsxExpressionContainerNode.range[1],\n ];\n // We can insert the <For /> component\n return [\n fixer.replaceTextRange(beforeArray, \"<For each={\"),\n fixer.replaceTextRange(betweenArrayAndMapFn, \"}>{\"),\n fixer.replaceTextRange(afterMapFn, \"}</For>\"),\n ];\n },\n });\n };\n\n return {\n CallExpression(node) {\n const callOrChain = node.parent?.type === \"ChainExpression\" ? node.parent : node;\n if (\n callOrChain.parent?.type === \"JSXExpressionContainer\" &&\n isJSXElementOrFragment(callOrChain.parent.parent)\n ) {\n // check for Array.prototype.map in JSX\n if (\n node.callee.type === \"MemberExpression\" &&\n getPropertyName(node.callee) === \"map\" &&\n node.arguments.length === 1 && // passing thisArg to Array.prototype.map is rare, deopt in that case\n isFunctionNode(node.arguments[0])\n ) {\n const mapFnNode = node.arguments[0];\n if (mapFnNode.params.length === 1 && mapFnNode.params[0].type !== \"RestElement\") {\n // The map fn doesn't take an index param, so it can't possibly be an index-keyed list. Use <For />.\n // The returned JSX, if it's coming from React, will have an unnecessary `key` prop to be removed in\n // the useless-keys rule.\n reportPreferFor(node);\n } else {\n // Too many possible solutions to make a suggestion or fix\n context.report({\n node,\n messageId: \"preferForOrIndex\",\n });\n }\n }\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport {\n findParent,\n getFunctionName,\n isFunctionNode,\n isJSXElementOrFragment,\n type FunctionNode,\n} from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\ntype MessageIds = \"sideEffectInBody\";\ntype Options = [];\n\nconst TIMER_CALLS = new Set([\"setInterval\", \"setTimeout\"]);\nconst OBSERVER_CONSTRUCTORS = new Set([\n \"IntersectionObserver\",\n \"ResizeObserver\",\n \"MutationObserver\",\n \"PerformanceObserver\",\n]);\nconst LISTENER_TARGETS = new Set([\"window\", \"document\"]);\n\n/** Does this function look like a component (PascalCase name or returns JSX)? */\nconst isComponentLike = (fn: FunctionNode): boolean => {\n const name = getFunctionName(fn);\n if (name && /^[A-Z]/.test(name)) return true;\n if (fn.type === \"ArrowFunctionExpression\" && isJSXElementOrFragment(fn.body)) return true;\n if (fn.body.type === \"BlockStatement\") {\n return fn.body.body.some(\n (statement) =>\n statement.type === \"ReturnStatement\" && isJSXElementOrFragment(statement.argument)\n );\n }\n return false;\n};\n\n/*\n * Side-effectful setup in a component body runs during setup — including on\n * the server during SSR, and before the DOM has settled. `onSettled` runs\n * client-side at the right time. `onCleanup` itself is never flagged: it is\n * legitimate and lower-overhead than an `onSettled` return-cleanup; a paired\n * `onCleanup` is a symptom of setup work that belongs in `onSettled`, not the\n * offense.\n */\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"suggestion\",\n docs: {\n description:\n \"Enforce running side-effectful setup (timers, global listeners, observers) inside `onSettled` instead of the component body.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-onSettled-for-side-effects.md\",\n },\n schema: [],\n messages: {\n sideEffectInBody:\n \"{{name}} in the component body runs during setup, including on the server during SSR. Move it into `onSettled(() => { ...; return cleanup; })` so it runs client-side once the DOM has settled.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const report = (node: T.Node, name: string) => {\n // Only flag calls made directly in a component body; the same call\n // inside onSettled, an effect, or an event handler is fine.\n const enclosingFunction = findParent(node, isFunctionNode);\n if (!enclosingFunction || !isComponentLike(enclosingFunction)) return;\n context.report({ node, messageId: \"sideEffectInBody\", data: { name } });\n };\n\n return {\n CallExpression(node) {\n const { callee } = node;\n if (callee.type === \"Identifier\" && TIMER_CALLS.has(callee.name)) {\n report(node, `\\`${callee.name}\\``);\n } else if (\n callee.type === \"MemberExpression\" &&\n !callee.computed &&\n callee.property.type === \"Identifier\" &&\n callee.property.name === \"addEventListener\" &&\n callee.object.type === \"Identifier\" &&\n LISTENER_TARGETS.has(callee.object.name)\n ) {\n report(node, `\\`${callee.object.name}.addEventListener\\``);\n }\n },\n NewExpression(node) {\n if (node.callee.type === \"Identifier\" && OBSERVER_CONSTRUCTORS.has(node.callee.name)) {\n report(node, `\\`new ${node.callee.name}\\``);\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { isJSXElementOrFragment } from \"../utils\";\nimport { getSourceCode } from \"../compat\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\nconst EXPENSIVE_TYPES = [\"JSXElement\", \"JSXFragment\", \"Identifier\"];\n\nexport default createRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Enforce using Solid's `<Show />` component for conditionally showing content. Solid's compiler covers this case, so it's a stylistic rule only.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-show.md\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n preferShowAnd: \"Use Solid's `<Show />` component for conditionally showing content.\",\n preferShowTernary:\n \"Use Solid's `<Show />` component for conditionally showing content with a fallback.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const sourceCode = getSourceCode(context);\n const putIntoJSX = (node: T.Node): string => {\n const text = sourceCode.getText(node);\n return isJSXElementOrFragment(node) ? text : `{${text}}`;\n };\n\n const logicalExpressionHandler = (node: T.LogicalExpression) => {\n if (node.operator === \"&&\" && EXPENSIVE_TYPES.includes(node.right.type)) {\n context.report({\n node,\n messageId: \"preferShowAnd\",\n fix: (fixer) =>\n fixer.replaceText(\n node.parent?.type === \"JSXExpressionContainer\" &&\n isJSXElementOrFragment(node.parent.parent)\n ? node.parent\n : node,\n `<Show when={${sourceCode.getText(node.left)}}>${putIntoJSX(node.right)}</Show>`\n ),\n });\n }\n };\n const conditionalExpressionHandler = (node: T.ConditionalExpression) => {\n if (\n EXPENSIVE_TYPES.includes(node.consequent.type) ||\n EXPENSIVE_TYPES.includes(node.alternate.type)\n ) {\n context.report({\n node,\n messageId: \"preferShowTernary\",\n fix: (fixer) =>\n fixer.replaceText(\n node.parent?.type === \"JSXExpressionContainer\" &&\n isJSXElementOrFragment(node.parent.parent)\n ? node.parent\n : node,\n `<Show when={${sourceCode.getText(node.test)}} fallback={${sourceCode.getText(\n node.alternate\n )}}>${putIntoJSX(node.consequent)}</Show>`\n ),\n });\n }\n };\n\n return {\n JSXExpressionContainer(node) {\n if (!isJSXElementOrFragment(node.parent)) {\n return;\n }\n if (node.expression.type === \"LogicalExpression\") {\n logicalExpressionHandler(node.expression);\n } else if (\n node.expression.type === \"ArrowFunctionExpression\" &&\n node.expression.body.type === \"LogicalExpression\"\n ) {\n logicalExpressionHandler(node.expression.body);\n } else if (node.expression.type === \"ConditionalExpression\") {\n conditionalExpressionHandler(node.expression);\n } else if (\n node.expression.type === \"ArrowFunctionExpression\" &&\n node.expression.body.type === \"ConditionalExpression\"\n ) {\n conditionalExpressionHandler(node.expression.body);\n }\n },\n };\n },\n});\n","import type { TSESLint } from \"@typescript-eslint/utils\";\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { getSourceCode } from \"../compat\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\ntype MessageIds = \"manualClassString\" | \"useStructuredForm\";\ntype Options = [];\n\n/** Does this expression contain a runtime-varying part (conditional, logical, or call)? */\nconst containsDynamicPart = (node: T.Node): boolean => {\n switch (node.type) {\n case \"ConditionalExpression\":\n case \"LogicalExpression\":\n case \"CallExpression\":\n return true;\n case \"BinaryExpression\":\n return (\n node.operator === \"+\" && (containsDynamicPart(node.left) || containsDynamicPart(node.right))\n );\n case \"TemplateLiteral\":\n return node.expressions.some(containsDynamicPart);\n default:\n return false;\n }\n};\n\nconst isStringLiteral = (node: T.Node): node is T.StringLiteral =>\n node.type === \"Literal\" && typeof node.value === \"string\";\n\nconst isEmptyString = (node: T.Node): boolean => isStringLiteral(node) && node.value === \"\";\n\n/*\n * In Solid 2.0, `class` accepts arrays and objects natively\n * (`ClassValue = string | number | boolean | null | undefined |\n * Record<string, boolean> | ClassValue[]`), and toggles only the affected\n * classes. Manually-built strings — the React/classnames reflex — still work\n * but re-run the whole concatenation on every change. This rule nudges toward\n * either structured form; it imposes no preference between array and object.\n */\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"suggestion\",\n docs: {\n description:\n \"Enforce using the structured array/object forms of the `class` prop over manually-built class strings.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-structured-class.md\",\n },\n hasSuggestions: true,\n schema: [],\n messages: {\n manualClassString:\n \"Manually building class strings re-runs the whole expression on every change. In Solid 2.0, `class` accepts arrays and objects directly: `class={[base, { active: active() }]}`.\",\n useStructuredForm: \"Convert to the structured array form.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const sourceCode = getSourceCode(context);\n\n /**\n * Build a suggestion for the simple binary shape\n * `\"base \" + (cond ? \"cls\" : \"\")` -> `[\"base\", cond && \"cls\"]`.\n * Returns null for anything more complex.\n */\n const simpleBinarySuggestion = (\n expression: T.Expression\n ): ((fixer: TSESLint.RuleFixer) => TSESLint.RuleFix) | null => {\n if (expression.type !== \"BinaryExpression\" || expression.operator !== \"+\") return null;\n const { left, right } = expression;\n if (!isStringLiteral(left) || right.type !== \"ConditionalExpression\") return null;\n if (!isEmptyString(right.alternate)) return null;\n\n const base = left.value.trim();\n if (!base) return null;\n const test = sourceCode.getText(right.test);\n const consequent = sourceCode.getText(right.consequent);\n return (fixer) =>\n fixer.replaceText(expression, `[${JSON.stringify(base)}, ${test} && ${consequent}]`);\n };\n\n return {\n JSXAttribute(node) {\n if (node.name.type !== \"JSXIdentifier\" || node.name.name !== \"class\") return;\n if (node.value?.type !== \"JSXExpressionContainer\") return;\n const expression = node.value.expression;\n if (expression.type === \"JSXEmptyExpression\") return;\n\n let manual = false;\n if (expression.type === \"TemplateLiteral\") {\n // `btn-${kind}` (plain interpolation) is fine; conditionals inside are not.\n manual = expression.expressions.some(containsDynamicPart);\n } else if (expression.type === \"BinaryExpression\" && expression.operator === \"+\") {\n manual = containsDynamicPart(expression);\n } else if (\n expression.type === \"CallExpression\" &&\n expression.callee.type === \"MemberExpression\" &&\n expression.callee.property.type === \"Identifier\" &&\n expression.callee.property.name === \"join\"\n ) {\n // [..].join(\" \") or [..].filter(Boolean).join(\" \")\n manual = true;\n }\n if (!manual) return;\n\n const suggestionFix = simpleBinarySuggestion(expression);\n context.report({\n node: expression,\n messageId: \"manualClassString\",\n suggest: suggestionFix\n ? [{ messageId: \"useStructuredForm\", fix: suggestionFix }]\n : undefined,\n });\n },\n };\n },\n});\n","/**\n * File overview here, scroll to bottom.\n * @link https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/reactivity.md\n */\n\nimport { TSESTree as T, TSESLint, ESLintUtils, ASTUtils } from \"@typescript-eslint/utils\";\nimport { traverse } from \"estraverse\";\nimport {\n findParent,\n findInScope,\n isPropsByName,\n FunctionNode,\n isFunctionNode,\n ProgramOrFunctionNode,\n isProgramOrFunctionNode,\n getSolidSourceRegex,\n trackImports,\n isDOMElementName,\n ignoreTransparentWrappers,\n getFunctionName,\n isJSXElementOrFragment,\n isSolidV2,\n trace,\n createNameMatcher,\n} from \"../utils\";\nimport { findVariable, getScope, CompatContext, getSourceCode } from \"../compat\";\n\nconst { getFunctionHeadLocation } = ASTUtils;\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\ntype Variable = TSESLint.Scope.Variable;\ntype Reference = TSESLint.Scope.Reference;\n\ninterface ReactiveVariable {\n /**\n * The reactive variable references we're concerned with (i.e. not init).\n * References are removed after they are analyzed.\n */\n references: Array<Reference>;\n /**\n * The function node in which the reactive variable was declared, or for a\n * derived signal (function), the deepest function node that declares a\n * referenced signal.\n */\n declarationScope: ProgramOrFunctionNode;\n /**\n * The reactive variable. Not used directly, only needed for identification\n * in pushUniqueDerivedSignal.\n */\n variable: Variable;\n}\n\ninterface TrackedScope {\n /**\n * The root node, usually a function or JSX expression container, to allow\n * reactive variables under.\n */\n node: T.Node;\n /**\n * The reactive variable should be one of these types:\n * - \"function\": synchronous function or signal variable\n * - \"called-function\": synchronous or asynchronous function like a timer or\n * event handler that isn't really a tracked scope but allows reactivity\n * - \"expression\": some value containing reactivity somewhere\n */\n expect: \"function\" | \"called-function\" | \"expression\";\n}\n\nclass ScopeStackItem {\n /** the node for the current scope, or program if global scope */\n node: ProgramOrFunctionNode;\n /**\n * nodes whose descendants in the current scope are allowed to be reactive.\n * JSXExpressionContainers can be any expression containing reactivity, while\n * function nodes/identifiers are typically arguments to solid-js primitives\n * and should match a tracked scope exactly.\n */\n trackedScopes: Array<TrackedScope> = [];\n /** nameless functions with reactivity, should exactly match a tracked scope */\n unnamedDerivedSignals = new Set<FunctionNode>();\n /** switched to true by time of :exit if JSX is detected in the current scope */\n hasJSX = false;\n\n constructor(node: ProgramOrFunctionNode) {\n this.node = node;\n }\n}\n\nclass ScopeStack extends Array<ScopeStackItem> {\n currentScope = () => this[this.length - 1];\n parentScope = () => this[this.length - 2];\n\n /** Add references to a signal, memo, derived signal, etc. */\n pushSignal(\n variable: Variable,\n declarationScope: ProgramOrFunctionNode = this.currentScope().node\n ) {\n this.signals.push({\n references: variable.references.filter((reference) => !reference.init),\n variable,\n declarationScope,\n });\n }\n\n /**\n * Add references to a signal, merging with existing references if the\n * variable is the same. Derived signals are special; they don't use the\n * declaration scope of the function, but rather the minimum declaration scope\n * of any signals they contain.\n */\n pushUniqueSignal(variable: Variable, declarationScope: ProgramOrFunctionNode) {\n const foundSignal = this.signals.find((s) => s.variable === variable);\n if (!foundSignal) {\n this.pushSignal(variable, declarationScope);\n } else {\n foundSignal.declarationScope = this.findDeepestDeclarationScope(\n foundSignal.declarationScope,\n declarationScope\n );\n }\n }\n\n /** Add references to a props or store. */\n pushProps(\n variable: Variable,\n declarationScope: ProgramOrFunctionNode = this.currentScope().node\n ) {\n this.props.push({\n references: variable.references.filter((reference) => !reference.init),\n variable,\n declarationScope,\n });\n }\n\n /** Function callbacks that run synchronously and don't create a new scope. */\n syncCallbacks = new Set<FunctionNode>();\n\n /**\n * Iterate through and remove the signal references in the current scope.\n * That way, the next Scope up can safely check for references in its scope.\n */\n *consumeSignalReferencesInScope() {\n yield* this.consumeReferencesInScope(this.signals);\n this.signals = this.signals.filter((variable) => variable.references.length !== 0);\n }\n\n /** Iterate through and remove the props references in the current scope. */\n *consumePropsReferencesInScope() {\n yield* this.consumeReferencesInScope(this.props);\n this.props = this.props.filter((variable) => variable.references.length !== 0);\n }\n\n private *consumeReferencesInScope(\n variables: Array<ReactiveVariable>\n ): Iterable<{ reference: Reference; declarationScope: ProgramOrFunctionNode }> {\n for (const variable of variables) {\n const { references } = variable;\n const inScope: Array<Reference> = [],\n notInScope: Array<Reference> = [];\n references.forEach((reference) => {\n if (this.isReferenceInCurrentScope(reference)) {\n inScope.push(reference);\n } else {\n notInScope.push(reference);\n }\n });\n yield* inScope.map((reference) => ({\n reference,\n declarationScope: variable.declarationScope,\n }));\n // I don't think this is needed! Just a perf optimization\n variable.references = notInScope;\n }\n }\n\n /** Returns the function node deepest in the tree. Assumes a === b, a is inside b, or b is inside a. */\n private findDeepestDeclarationScope = (\n a: ProgramOrFunctionNode,\n b: ProgramOrFunctionNode\n ): ProgramOrFunctionNode => {\n if (a === b) return a;\n for (let i = this.length - 1; i >= 0; i -= 1) {\n const { node } = this[i];\n if (a === node || b === node) {\n return node;\n }\n }\n throw new Error(\"This should never happen\");\n };\n\n /**\n * Returns true if the reference is in the current scope, handling sync\n * callbacks. Must be called on the :exit pass only.\n */\n private isReferenceInCurrentScope(reference: Reference) {\n let parentFunction = findParent(reference.identifier, isProgramOrFunctionNode);\n while (isFunctionNode(parentFunction) && this.syncCallbacks.has(parentFunction)) {\n parentFunction = findParent(parentFunction, isProgramOrFunctionNode);\n }\n return parentFunction === this.currentScope().node;\n }\n\n /** variable references to be treated as signals, memos, derived signals, etc. */\n private signals: Array<ReactiveVariable> = [];\n /** variables references to be treated as props (or stores) */\n private props: Array<ReactiveVariable> = [];\n}\n\nconst getNthDestructuredVar = (id: T.Node, n: number, context: CompatContext): Variable | null => {\n if (id?.type === \"ArrayPattern\") {\n const el = id.elements[n];\n if (el?.type === \"Identifier\") {\n return findVariable(context, el);\n }\n } else if (id?.type === \"ObjectPattern\") {\n // {0: a, '1': b, 2: c, ...rest}\n const el = id.properties.find((p): p is T.Property => {\n if (p.type !== \"Property\") return false;\n if (p.key.type !== \"Literal\") return false;\n\n const key = p.key;\n return key.value === n || (typeof key.value === \"string\" && key.value === String(n));\n });\n\n if (el?.type === \"Property\" && el.value.type === \"Identifier\") {\n return findVariable(context, el.value);\n }\n }\n return null;\n};\n\nconst getReturnedVar = (id: T.Node, context: CompatContext): Variable | null => {\n if (id.type === \"Identifier\") {\n return findVariable(context, id);\n }\n return null;\n};\n\ntype MessageIds =\n | \"noWrite\"\n | \"untrackedReactive\"\n | \"expectedFunctionGotExpression\"\n | \"badSignal\"\n | \"badUnnamedDerivedSignal\"\n | \"shouldDestructure\"\n | \"shouldAssign\"\n | \"noAsyncTrackedScope\"\n | \"readAfterAwait\"\n | \"staleCapture\"\n | \"providerValue\";\ntype Options = [{ customReactiveFunctions: string[] }];\n\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Enforce that reactivity (props, signals, memos, etc.) is properly used, so changes in those values will be tracked and update the view as expected.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/reactivity.md\",\n },\n schema: [\n {\n type: \"object\",\n properties: {\n customReactiveFunctions: {\n description:\n \"List of function names to consider as reactive functions (allow signals to be safely passed as arguments). Supports exact names, '*' wildcards ('use*Store'), and regexes given as '/pattern/' strings. In addition, any create* or use* functions are automatically included.\",\n type: \"array\",\n items: {\n type: \"string\",\n },\n default: [],\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n noWrite: \"The reactive variable '{{name}}' should not be reassigned or altered directly.\",\n untrackedReactive:\n \"The reactive variable '{{name}}' should be used within JSX, a tracked scope (like createEffect), or inside an event handler function, or else changes will be ignored.\",\n expectedFunctionGotExpression:\n \"The reactive variable '{{name}}' should be wrapped in a function for reactivity. This includes event handler bindings on native elements, which are not reactive like other JSX props.\",\n badSignal:\n \"The reactive variable '{{name}}' should be called as a function when used in {{where}}.\",\n badUnnamedDerivedSignal:\n \"This function should be passed to a tracked scope (like createEffect) or an event handler because it contains reactivity, or else changes will be ignored.\",\n shouldDestructure:\n \"For proper analysis, array destructuring should be used to capture the {{nth}}result of this function call.\",\n shouldAssign:\n \"For proper analysis, a variable should be used to capture the result of this function call.\",\n noAsyncTrackedScope:\n \"This tracked scope should not be async. Solid's reactivity only tracks synchronously.\",\n readAfterAwait:\n \"The reactive variable '{{name}}' is read after this computation suspends (at an 'await' or 'yield'), so changes to it won't be tracked. Read it before the first suspension point and store the result in a variable.\",\n staleCapture:\n \"'{{captured}}' captures the value of the reactive variable '{{name}}' at setup, but a returned function reads the capture later — it will never update. Call '{{name}}' inside the returned function instead, or prefix '{{captured}}' with 'initial'/'default'/'static' if a one-time snapshot is intended.\",\n providerValue:\n \"A context provider reads its 'value' prop only once, when it is created, so the reactive variable '{{name}}' will not stay up to date here. Pass the signal, memo, or store itself (or an object containing them) instead of reading it in JSX.\",\n },\n },\n defaultOptions: [\n {\n customReactiveFunctions: [],\n },\n ],\n create(context, [options]) {\n const warnShouldDestructure = (node: T.Node, nth?: string) =>\n context.report({\n node,\n messageId: \"shouldDestructure\",\n data: nth ? { nth: nth + \" \" } : undefined,\n });\n const warnShouldAssign = (node: T.Node) => context.report({ node, messageId: \"shouldAssign\" });\n\n const sourceCode = getSourceCode(context);\n\n /** Represents the lexical function stack and relevant information for each function */\n const scopeStack = new ScopeStack();\n const { currentScope, parentScope } = scopeStack;\n\n /** Tracks imports from 'solid-js', handling aliases. */\n const { matchImport, handleImportDeclaration } = trackImports(getSolidSourceRegex(context));\n\n /** Solid 2.0 mode (settings.solid.version >= 2). */\n const v2 = isSolidV2(context);\n\n /**\n * `customReactiveFunctions` entries may be exact names, glob-ish patterns using `*`\n * wildcards, or regexes written as \"/pattern/\" strings.\n */\n const matchesCustomReactive = createNameMatcher(options.customReactiveFunctions);\n\n /**\n * JSXExpressionContainers for `value={...}` props on context providers. Providers read\n * `props.value` once, untracked, when created (in both Solid 1.x and 2.0), so reactive\n * expressions here are frozen at their initial value. Recorded so reads inside them get\n * a specific error message instead of the generic untracked-reactivity one.\n */\n const providerValueContainers = new WeakSet<T.Node>();\n\n /** Returns whether a name resolves to the result of a `createContext()` call in scope. */\n const isCreatedContext = (name: string, refNode: T.Node): boolean => {\n const variable = ASTUtils.findVariable(getScope(context, refNode), name);\n const def = variable?.defs[0];\n return Boolean(\n def &&\n def.node.type === \"VariableDeclarator\" &&\n def.node.init?.type === \"CallExpression\" &&\n def.node.init.callee.type === \"Identifier\" &&\n matchImport(\"createContext\", def.node.init.callee.name)\n );\n };\n\n /**\n * Detects JSX element names that are context providers: `<SomeContext.Provider>` and\n * `<SomeProvider>` by convention, plus any name resolving to a `createContext()` call —\n * in Solid 2.0 the context object is used directly as the provider (`<MyContext value={}>`).\n */\n const isProviderElementName = (name: T.JSXTagNameExpression): boolean => {\n if (name.type === \"JSXIdentifier\") {\n return name.name.endsWith(\"Provider\") || isCreatedContext(name.name, name);\n }\n if (name.type === \"JSXMemberExpression\") {\n return name.property.name === \"Provider\";\n }\n return false;\n };\n\n /**\n * Async/generator functions that are tracked scopes for Solid 2.0 async computations\n * (async createMemo, function-form createSignal/createStore, etc.). Only reads before\n * the first suspension point (`await`/`yield`) are tracked; later reads are reported.\n */\n const asyncTrackedScopes = new Set<FunctionNode>();\n const suspensionTaintCache = new Map<FunctionNode, number | null>();\n /**\n * If `fn` is an async computation, returns the source position after which reactive\n * reads are no longer tracked, or null if it never suspends. When the first suspension\n * point is inside a loop, the loop is tainted too, since later iterations read after\n * the previous iteration's suspension.\n */\n const getSuspensionTaint = (fn: ProgramOrFunctionNode): number | null => {\n if (!isFunctionNode(fn) || !asyncTrackedScopes.has(fn)) return null;\n const cached = suspensionTaintCache.get(fn);\n if (cached !== undefined) return cached;\n let suspension: T.Node | undefined;\n traverse(fn.body as never, {\n enter(cn) {\n const node = cn as T.Node;\n if (node !== fn.body && isFunctionNode(node)) {\n this.skip(); // nested functions suspend independently\n } else if (\n node.type === \"AwaitExpression\" ||\n node.type === \"YieldExpression\" ||\n (node.type === \"ForOfStatement\" && node.await)\n ) {\n suspension = node;\n this.break();\n }\n },\n fallback: \"iteration\",\n });\n let taint: number | null = null;\n if (suspension) {\n // the operands of the first suspension point are still evaluated synchronously\n taint =\n suspension.type === \"ForOfStatement\" ? suspension.body.range[0] : suspension.range[1];\n let ancestor: T.Node | undefined = suspension.parent;\n while (ancestor && ancestor !== fn) {\n if (\n ancestor.type === \"ForStatement\" ||\n ancestor.type === \"WhileStatement\" ||\n ancestor.type === \"DoWhileStatement\"\n ) {\n taint = ancestor.range[0];\n } else if (ancestor.type === \"ForOfStatement\" || ancestor.type === \"ForInStatement\") {\n // the iterated expression is only evaluated once, before the first suspension\n taint = ancestor.body.range[0];\n }\n ancestor = ancestor.parent;\n }\n }\n suspensionTaintCache.set(fn, taint);\n return taint;\n };\n\n /** Workaround for #61 */\n const markPropsOnCondition = (node: FunctionNode, cb: (props: T.Identifier) => boolean) => {\n if (\n node.params.length === 1 &&\n node.params[0].type === \"Identifier\" &&\n node.parent?.type !== \"JSXExpressionContainer\" && // \"render props\" aren't components\n node.parent?.type !== \"TemplateLiteral\" && // inline functions in tagged template literals aren't components\n cb(node.params[0])\n ) {\n // This function is a component, consider its parameter a props\n const propsParam = findVariable(context, node.params[0]);\n if (propsParam) {\n scopeStack.pushProps(propsParam, node);\n }\n }\n };\n\n /** Populates the function stack. */\n const onFunctionEnter = (node: ProgramOrFunctionNode) => {\n if (isFunctionNode(node)) {\n if (scopeStack.syncCallbacks.has(node)) {\n // Ignore sync callbacks like Array#forEach and certain Solid primitives\n return;\n }\n markPropsOnCondition(node, (props) => isPropsByName(props.name));\n }\n scopeStack.push(new ScopeStackItem(node));\n };\n\n /** Returns whether a node falls under a tracked scope in the current function scope */\n const matchTrackedScope = (trackedScope: TrackedScope, node: T.Node): boolean => {\n switch (trackedScope.expect) {\n case \"function\":\n case \"called-function\":\n return node === trackedScope.node;\n case \"expression\":\n return Boolean(\n findInScope(node, currentScope().node, (node) => node === trackedScope.node)\n );\n }\n };\n\n /**\n * Returns true when `fn` is directly returned by the enclosing function:\n * either the argument of a `return` statement or the whole body of an\n * arrow function. Deliberately strict — a function that merely appears\n * somewhere inside a returned expression (e.g. a runWithOwner callback\n * in a returned call) is not \"returned\" for our purposes.\n */\n const isDirectlyReturned = (fn: FunctionNode): boolean =>\n fn.parent?.type === \"ReturnStatement\" ||\n (fn.parent?.type === \"ArrowFunctionExpression\" && fn.parent.body === fn);\n\n /**\n * Detects the stale-capture footgun: a signal called at a function's\n * setup level, its result captured in a variable, and that variable read\n * by a function the enclosing function *returns*. The returned function\n * pretends to be live but reads a value frozen at setup. Reports and\n * returns true when found.\n */\n const checkStaleCapture = (identifier: T.Identifier): boolean => {\n const call = identifier.parent;\n if (call?.type !== \"CallExpression\" || call.callee !== identifier) return false;\n // Find the VariableDeclarator whose init contains this call, walking up\n // through intermediate expressions (`const t = items().length`) but\n // never through a statement or another function.\n let child: T.Node = call;\n while (\n child.parent &&\n child.parent.type !== \"VariableDeclarator\" &&\n !isFunctionNode(child.parent) &&\n !child.parent.type.endsWith(\"Statement\")\n ) {\n child = child.parent;\n }\n const declarator = child.parent;\n if (declarator?.type !== \"VariableDeclarator\" || declarator.init !== child) return false;\n\n const currentScopeNode = currentScope().node;\n const capturedVars = sourceCode.scopeManager?.getDeclaredVariables(declarator) ?? [];\n for (const captured of capturedVars) {\n // The initial/default/static naming convention opts into a one-time\n // snapshot, same as for props reads.\n if (/^(?:initial|default|static[A-Z])/.test(captured.name)) continue;\n for (const reference of captured.references) {\n if (reference.init) continue;\n if (isCapturedInReturnedFunction(reference.identifier, currentScopeNode)) {\n context.report({\n node: call,\n messageId: \"staleCapture\",\n data: { name: identifier.name, captured: captured.name },\n });\n return true;\n }\n }\n }\n return false;\n };\n\n /**\n * Returns true when `node` sits inside a nested function that escapes the\n * `boundary` function through a `return` statement (including functions\n * embedded in returned JSX or objects).\n */\n const isCapturedInReturnedFunction = (\n node: T.Node,\n boundary: ProgramOrFunctionNode\n ): boolean => {\n // Find the outermost function strictly inside `boundary` containing `node`.\n let outermost: FunctionNode | null = null;\n let cursor: T.Node | null = node;\n while (cursor && cursor !== boundary) {\n if (isFunctionNode(cursor)) outermost = cursor;\n cursor = cursor.parent ?? null;\n }\n if (!cursor || !outermost) return false; // not under boundary, or not captured by a closure\n // Walk from that function to `boundary`; only non-function nodes remain\n // in between, so a ReturnStatement found here belongs to `boundary`.\n let child: T.Node = outermost;\n let parent: T.Node | null = child.parent ?? null;\n while (parent && child !== boundary) {\n if (parent.type === \"ReturnStatement\") return true;\n // A function passed as a call argument doesn't escape through a\n // `return` below it — only the call's *result* does. Synchronous\n // callbacks (`return items.filter((item) => item.includes(q))`) run\n // during the computation, where the capture is fresh (#223). The\n // same goes for a called function itself (IIFEs).\n if (parent.type === \"CallExpression\" || parent.type === \"NewExpression\") return false;\n if (isFunctionNode(parent)) {\n return (\n parent === boundary &&\n parent.type === \"ArrowFunctionExpression\" &&\n parent.body === child\n );\n }\n child = parent;\n parent = parent.parent ?? null;\n }\n return false;\n };\n\n /** Inspects a specific reference of a reactive variable for correct handling. */\n const handleTrackedScopes = (\n identifier: T.Identifier,\n declarationScope: ProgramOrFunctionNode\n ) => {\n const currentScopeNode = currentScope().node;\n // Check if the call falls outside any tracked scopes in the current scope\n if (\n !currentScope().trackedScopes.find((trackedScope) =>\n matchTrackedScope(trackedScope, identifier)\n )\n ) {\n const matchedExpression = currentScope().trackedScopes.find((trackedScope) =>\n matchTrackedScope({ ...trackedScope, expect: \"expression\" }, identifier)\n );\n if (declarationScope === currentScopeNode) {\n // If the reactivity is not contained in a tracked scope, and any of\n // the reactive variables were declared in the current scope, then we\n // report them. When the reference is to an object in a\n // MemberExpression (props/store) or a function call (signal), report\n // that, otherwise the identifier.\n let parentMemberExpression: T.MemberExpression | null = null;\n if (identifier.parent?.type === \"MemberExpression\") {\n parentMemberExpression = identifier.parent;\n while (parentMemberExpression!.parent?.type === \"MemberExpression\") {\n parentMemberExpression = parentMemberExpression!.parent;\n }\n }\n const parentCallExpression =\n identifier.parent?.type === \"CallExpression\" ? identifier.parent : null;\n // Reads inside a context provider's `value={...}` get a specific message; the\n // value is read once, untracked, when the provider is created.\n const inProviderValue = Boolean(\n findParent(identifier, (n) => providerValueContainers.has(n))\n );\n context.report({\n node: parentMemberExpression ?? parentCallExpression ?? identifier,\n messageId: inProviderValue\n ? \"providerValue\"\n : matchedExpression\n ? \"expectedFunctionGotExpression\"\n : \"untrackedReactive\",\n data: {\n name: parentMemberExpression\n ? sourceCode.getText(parentMemberExpression)\n : identifier.name,\n },\n });\n } else {\n // If all of the reactive variables were declared above the current\n // function scope, then the entire function becomes reactive with the\n // deepest declaration scope of the reactive variables it contains.\n // Let the next onFunctionExit up handle it.\n if (!parentScope() || !isFunctionNode(currentScopeNode)) {\n throw new Error(\"this shouldn't happen!\");\n }\n\n // Signal called at this function's setup level with its value\n // captured by a variable that a *returned* function reads: the\n // returned function will read a stale value forever. Report here —\n // treating the enclosing function as a derived signal (below) is\n // still correct, but no call-site discipline can fix the capture.\n checkStaleCapture(identifier);\n\n // If the current function doesn't have an associated variable, that's\n // fine, it's being used inline (i.e. anonymous arrow function). For\n // this to be okay, the arrow function has to be the same node as one\n // of the tracked scopes, as we can't easily find references.\n const pushUnnamedDerivedSignal = () =>\n (parentScope().unnamedDerivedSignals ??= new Set()).add(currentScopeNode);\n\n if (isDirectlyReturned(currentScopeNode)) {\n // A function directly returned by its enclosing function is an\n // accessor handed to the caller — the custom-primitive contract.\n // The caller decides whether it lands in a tracked scope; there is\n // nowhere in this file for it to match a tracked scope, so\n // requiring one only punishes the idiomatic hook shape\n // (`return () => signal()`). Do nothing.\n } else if (currentScopeNode.type === \"FunctionDeclaration\") {\n // get variable representing function, function node only defines one variable\n const functionVariable: Variable | undefined =\n sourceCode.scopeManager?.getDeclaredVariables(currentScopeNode)?.[0];\n if (functionVariable) {\n scopeStack.pushUniqueSignal(\n functionVariable,\n declarationScope // use declaration scope of a signal contained in this function\n );\n } else {\n pushUnnamedDerivedSignal();\n }\n } else if (currentScopeNode.parent?.type === \"VariableDeclarator\") {\n const declarator = currentScopeNode.parent;\n // for nameless or arrow function expressions, use the declared variable it's assigned to\n const functionVariable = sourceCode.scopeManager?.getDeclaredVariables(declarator)?.[0];\n if (functionVariable) {\n // use declaration scope of a signal contained in this scope, not the function itself\n scopeStack.pushUniqueSignal(functionVariable, declarationScope);\n } else {\n pushUnnamedDerivedSignal();\n }\n } else if (currentScopeNode.parent?.type === \"Property\") {\n // todo make this a unique props or something--for now, just ignore (unsafe)\n } else {\n pushUnnamedDerivedSignal();\n }\n }\n }\n };\n\n /** Performs all analysis and reporting. */\n const onFunctionExit = (currentScopeNode: ProgramOrFunctionNode) => {\n // If this function is a component, add its props as a reactive variable\n if (isFunctionNode(currentScopeNode)) {\n markPropsOnCondition(currentScopeNode, (props) => {\n if (\n !isPropsByName(props.name) && // already added in markPropsOnEnter\n currentScope().hasJSX\n ) {\n const functionName = getFunctionName(currentScopeNode);\n // begins with lowercase === not component\n if (functionName && !/^[a-z]/.test(functionName)) return true;\n }\n return false;\n });\n }\n\n // Ignore sync callbacks like Array#forEach and certain Solid primitives.\n // In this case only, currentScopeNode !== currentScope().node, but we're\n // returning early so it doesn't matter.\n if (isFunctionNode(currentScopeNode) && scopeStack.syncCallbacks.has(currentScopeNode)) {\n return;\n }\n\n // If this scope is an async computation (Solid 2.0), reactive reads positioned\n // after its first suspension point resume outside the tracking window.\n const suspensionTaint = getSuspensionTaint(currentScopeNode);\n const isReadAfterSuspension = (identifier: T.Node): boolean =>\n suspensionTaint != null && identifier.range[0] >= suspensionTaint;\n\n // Iterate through all usages of (derived) signals in the current scope\n for (const { reference, declarationScope } of scopeStack.consumeSignalReferencesInScope()) {\n const identifier = reference.identifier;\n if (reference.isWrite()) {\n // don't allow reassigning signals\n context.report({\n node: identifier,\n messageId: \"noWrite\",\n data: {\n name: identifier.name,\n },\n });\n } else if (identifier.type === \"Identifier\") {\n const reportBadSignal = (where: string) =>\n context.report({\n node: identifier,\n messageId: \"badSignal\",\n data: { name: identifier.name, where },\n });\n if (\n // This allows both calling a signal and calling a function with a signal.\n identifier.parent?.type === \"CallExpression\" ||\n // Also allow the case where we pass an array of signals, such as in a custom hook\n (identifier.parent?.type === \"ArrayExpression\" &&\n identifier.parent.parent?.type === \"CallExpression\")\n ) {\n if (isReadAfterSuspension(identifier)) {\n // In an async computation, reads after the first suspension point aren't\n // tracked (and in Solid 2.0 may observe unpredictable state).\n context.report({\n node: identifier,\n messageId: \"readAfterAwait\",\n data: { name: identifier.name },\n });\n } else {\n // This signal is getting called properly, analyze it.\n handleTrackedScopes(identifier, declarationScope);\n }\n } else if (identifier.parent?.type === \"TemplateLiteral\") {\n reportBadSignal(\"template literals\");\n } else if (\n identifier.parent?.type === \"BinaryExpression\" &&\n [\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"**\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ].includes(identifier.parent.operator)\n ) {\n // We're in an arithmetic/comparison expression where using an uncalled signal wouldn't make sense\n reportBadSignal(\"arithmetic or comparisons\");\n } else if (\n identifier.parent?.type === \"UnaryExpression\" &&\n [\"-\", \"+\", \"~\"].includes(identifier.parent.operator)\n ) {\n // We're in a unary expression where using an uncalled signal wouldn't make sense\n reportBadSignal(\"unary expressions\");\n } else if (\n identifier.parent?.type === \"MemberExpression\" &&\n identifier.parent.computed &&\n identifier.parent.property === identifier\n ) {\n // We're using an uncalled signal to index an object or array, which doesn't make sense\n reportBadSignal(\"property accesses\");\n } else if (\n identifier.parent?.type === \"JSXExpressionContainer\" &&\n !currentScope().trackedScopes.find(\n (trackedScope) =>\n trackedScope.node === identifier &&\n (trackedScope.expect === \"function\" || trackedScope.expect === \"called-function\")\n )\n ) {\n // If the signal is in a JSXExpressionContainer that's also marked as a \"function\" or \"called-function\" tracked scope,\n // let it be.\n const elementOrAttribute = identifier.parent.parent;\n if (\n // The signal is not being called and is being used as a props.children, where calling\n // the signal was the likely intent.\n isJSXElementOrFragment(elementOrAttribute) ||\n // We can't say for sure about user components, but we know for a fact that a signal\n // should not be passed to a non-event handler DOM element attribute without calling it.\n // In v2 mode this case is delegated to solid/no-accessor-as-prop so the same\n // node never gets two reports.\n (!v2 &&\n elementOrAttribute?.type === \"JSXAttribute\" &&\n elementOrAttribute.parent?.type === \"JSXOpeningElement\" &&\n elementOrAttribute.parent.name.type === \"JSXIdentifier\" &&\n isDOMElementName(elementOrAttribute.parent.name.name))\n ) {\n reportBadSignal(\"JSX\");\n }\n }\n }\n // The signal is being read outside of a CallExpression. Since\n // there's a lot of possibilities here and they're generally fine,\n // do nothing.\n }\n\n // Do a similar thing with all usages of props in the current function\n for (const { reference, declarationScope } of scopeStack.consumePropsReferencesInScope()) {\n const identifier = reference.identifier;\n if (reference.isWrite()) {\n // don't allow reassigning props or stores\n context.report({\n node: identifier,\n messageId: \"noWrite\",\n data: {\n name: identifier.name,\n },\n });\n } else if (\n identifier.parent?.type === \"MemberExpression\" &&\n identifier.parent.object === identifier\n ) {\n const { parent } = identifier;\n if (parent.parent?.type === \"AssignmentExpression\" && parent.parent.left === parent) {\n // don't allow writing to props or stores directly\n context.report({\n node: identifier,\n messageId: \"noWrite\",\n data: {\n name: identifier.name,\n },\n });\n } else if (\n parent.property.type === \"Identifier\" &&\n /^(?:initial|default|static[A-Z])/.test(parent.property.name)\n ) {\n // We're using a prop with a name that starts with `initial` or\n // `default`, like `props.initialCount`. We'll refrain from warning\n // about untracked usages of these props, because the user has shown\n // that they understand the consequences of using a reactive\n // variable to initialize something else. Do nothing.\n } else if (isReadAfterSuspension(identifier)) {\n // In an async computation, reads after the first suspension point aren't\n // tracked (and in Solid 2.0 may observe unpredictable state).\n context.report({\n node: identifier,\n messageId: \"readAfterAwait\",\n data: { name: identifier.name },\n });\n } else {\n // The props are the object in a property read access, which\n // should be under a tracked scope.\n handleTrackedScopes(identifier, declarationScope);\n }\n } else if (\n identifier.type === \"Identifier\" &&\n (identifier.parent?.type === \"AssignmentExpression\" ||\n identifier.parent?.type === \"VariableDeclarator\")\n ) {\n if (\n identifier.parent.type === \"AssignmentExpression\" &&\n identifier.parent.right === identifier &&\n identifier.parent.left.type === \"MemberExpression\"\n ) {\n // `this.state = state` stores a *reference* to the proxy, not a\n // snapshot: property reads through it are still reactive at read\n // time. The alias escapes local analysis exactly like passing the\n // proxy as a call argument, which is already permitted (#184).\n // Do nothing.\n } else {\n // `... = props` is usually destructuring, which snapshots values instead of\n // staying reactive. Inside a tracked scope (or a function passed to one) the\n // destructuring re-runs on updates, so defer to the same analysis as reads.\n handleTrackedScopes(identifier, declarationScope);\n }\n }\n // The props are being read, but not in a MemberExpression. Since\n // there's a lot of possibilities here and they're generally fine,\n // do nothing.\n }\n\n // If there are any unnamed derived signals, they must match a tracked\n // scope. Usually anonymous arrow function args to createEffect,\n // createMemo, etc.\n const { unnamedDerivedSignals } = currentScope();\n if (unnamedDerivedSignals) {\n for (const node of unnamedDerivedSignals) {\n if (\n !currentScope().trackedScopes.find((trackedScope) =>\n matchTrackedScope(trackedScope, node)\n )\n ) {\n context.report({\n loc: getFunctionHeadLocation(node, sourceCode),\n messageId: \"badUnnamedDerivedSignal\",\n });\n }\n }\n }\n\n // Pop on exit\n scopeStack.pop();\n };\n\n /*\n * Sync array functions (forEach, map, reduce, reduceRight, flatMap),\n * store update fn params (ex. setState(\"todos\", (t) => [...t.slice(0, i()),\n * ...t.slice(i() + 1)])), batch, onCleanup, and onError fn params, and\n * maybe a few others don't actually create a new scope. That is, any\n * signal/prop accesses in these functions act as if they happen in the\n * enclosing function. Note that this means whether or not the enclosing\n * function is a tracking scope applies to the fn param as well.\n *\n * Every time a sync callback is detected, we put that function node into a\n * syncCallbacks Set<FunctionNode>. The detections must happen on the entry pass\n * and when the function node has not yet been traversed. In onFunctionEnter, if\n * the function node is in syncCallbacks, we don't push it onto the\n * scopeStack. In onFunctionExit, if the function node is in syncCallbacks,\n * we don't pop scopeStack.\n */\n const checkForSyncCallbacks = (node: T.CallExpression) => {\n if (\n node.arguments.length === 1 &&\n isFunctionNode(node.arguments[0]) &&\n !node.arguments[0].async\n ) {\n if (\n node.callee.type === \"Identifier\" &&\n matchImport([\"batch\", \"produce\", \"flush\"], node.callee.name)\n ) {\n // These Solid APIs take callbacks that run in the current scope\n scopeStack.syncCallbacks.add(node.arguments[0]);\n } else if (\n node.callee.type === \"MemberExpression\" &&\n !node.callee.computed &&\n node.callee.object.type !== \"ObjectExpression\" &&\n /^(?:forEach|map|flatMap|reduce|reduceRight|find|findIndex|filter|every|some)$/.test(\n node.callee.property.name\n )\n ) {\n // These common array methods (or likely array methods) take synchronous callbacks\n scopeStack.syncCallbacks.add(node.arguments[0]);\n }\n }\n if (node.callee.type === \"Identifier\") {\n if (\n matchImport(\n [\"createSignal\", \"createStore\", \"createOptimistic\", \"createOptimisticStore\"],\n node.callee.name\n ) &&\n node.parent?.type === \"VariableDeclarator\"\n ) {\n // Allow using reactive variables in state setter if the current scope is tracked.\n // ex. const [state, setState] = createStore({ ... });\n // setState(() => ({ preferredName: state.firstName, lastName: \"Milner\" }));\n const setter = getNthDestructuredVar(node.parent.id, 1, context);\n if (setter) {\n for (const reference of setter.references) {\n const { identifier } = reference;\n if (\n !reference.init &&\n reference.isRead() &&\n identifier.parent?.type === \"CallExpression\"\n ) {\n for (const arg of identifier.parent.arguments) {\n if (isFunctionNode(arg) && !arg.async) {\n scopeStack.syncCallbacks.add(arg);\n }\n }\n }\n }\n }\n } else if (matchImport([\"mapArray\", \"indexArray\", \"repeat\"], node.callee.name)) {\n const arg1 = node.arguments[1];\n if (isFunctionNode(arg1)) {\n scopeStack.syncCallbacks.add(arg1);\n }\n }\n }\n // Handle IIFEs\n if (isFunctionNode(node.callee)) {\n scopeStack.syncCallbacks.add(node.callee);\n }\n };\n\n /** Checks VariableDeclarators, AssignmentExpressions, and CallExpressions for reactivity. */\n const checkForReactiveAssignment = (\n id: T.BindingName | T.AssignmentExpression[\"left\"] | null,\n init: T.Node\n ) => {\n init = ignoreTransparentWrappers(init);\n\n // Mark return values of certain functions as reactive\n if (init.type === \"CallExpression\" && init.callee.type === \"Identifier\") {\n const { callee } = init;\n if (matchImport([\"createSignal\", \"useTransition\", \"createOptimistic\"], callee.name)) {\n const signal = id && getNthDestructuredVar(id, 0, context);\n if (signal) {\n scopeStack.pushSignal(signal, currentScope().node);\n } else {\n warnShouldDestructure(id ?? init, \"first\");\n }\n } else if (matchImport([\"createMemo\", \"createSelector\"], callee.name)) {\n const memo = id && getReturnedVar(id, context);\n // memos act like signals\n if (memo) {\n scopeStack.pushSignal(memo, currentScope().node);\n } else {\n warnShouldAssign(id ?? init);\n }\n } else if (matchImport([\"createStore\", \"createOptimisticStore\"], callee.name)) {\n const store = id && getNthDestructuredVar(id, 0, context);\n // stores act like props\n if (store) {\n scopeStack.pushProps(store, currentScope().node);\n } else {\n warnShouldDestructure(id ?? init, \"first\");\n }\n } else if (matchImport([\"mergeProps\", \"merge\", \"omit\"], callee.name)) {\n // Solid 2.0 renames mergeProps to merge; omit (which replaces splitProps)\n // also returns a single props object\n const merged = id && getReturnedVar(id, context);\n if (merged) {\n scopeStack.pushProps(merged, currentScope().node);\n } else {\n warnShouldAssign(id ?? init);\n }\n } else if (matchImport(\"splitProps\", callee.name)) {\n // splitProps can return an unbounded array of props variables, though it's most often two\n if (id?.type === \"ArrayPattern\") {\n const vars = id.elements\n .map((_, i) => getNthDestructuredVar(id, i, context))\n .filter(Boolean) as Array<Variable>;\n if (vars.length === 0) {\n warnShouldDestructure(id);\n } else {\n vars.forEach((variable) => {\n scopeStack.pushProps(variable, currentScope().node);\n });\n }\n } else {\n // if it's returned as an array, treat that as a props object\n const vars = id && getReturnedVar(id, context);\n if (vars) {\n scopeStack.pushProps(vars, currentScope().node);\n }\n }\n } else if (matchImport(\"createResource\", callee.name)) {\n // createResource return value has reactive .loading and .error\n const resourceReturn = id && getNthDestructuredVar(id, 0, context);\n if (resourceReturn) {\n scopeStack.pushProps(resourceReturn, currentScope().node);\n }\n } else if (matchImport([\"createMutable\", \"createProjection\"], callee.name)) {\n // createProjection (Solid 2.0) returns a readonly derived store\n const mutable = id && getReturnedVar(id, context);\n if (mutable) {\n scopeStack.pushProps(mutable, currentScope().node);\n }\n } else if (matchImport(\"mapArray\", callee.name)) {\n const arg1 = init.arguments[1];\n if (\n isFunctionNode(arg1) &&\n arg1.params.length >= 2 &&\n arg1.params[1].type === \"Identifier\"\n ) {\n const indexSignal = findVariable(context, arg1.params[1]);\n if (indexSignal) {\n scopeStack.pushSignal(indexSignal);\n }\n }\n } else if (matchImport(\"indexArray\", callee.name)) {\n const arg1 = init.arguments[1];\n if (\n isFunctionNode(arg1) &&\n arg1.params.length >= 1 &&\n arg1.params[0].type === \"Identifier\"\n ) {\n const valueSignal = findVariable(context, arg1.params[0]);\n if (valueSignal) {\n scopeStack.pushSignal(valueSignal);\n }\n }\n }\n }\n };\n\n const checkForTrackedScopes = (\n node:\n | T.JSXExpressionContainer\n | T.JSXSpreadAttribute\n | T.CallExpression\n | T.VariableDeclarator\n | T.AssignmentExpression\n | T.TaggedTemplateExpression\n | T.NewExpression\n ) => {\n const pushTrackedScope = (\n node: T.Node,\n expect: TrackedScope[\"expect\"],\n allowAsync = false\n ) => {\n currentScope().trackedScopes.push({ node, expect });\n if (\n expect !== \"called-function\" &&\n isFunctionNode(node) &&\n (node.async || node.generator)\n ) {\n if (allowAsync) {\n // Async computations are first-class in Solid 2.0 (async createMemo,\n // function-form createSignal/createStore, etc.). Reads before the first\n // suspension point are tracked normally; reads after it get a targeted\n // readAfterAwait report in onFunctionExit instead of a blanket warning.\n asyncTrackedScopes.add(node);\n } else if (node.async) {\n // From the docs: \"[Solid's] approach only tracks synchronously. If you\n // have a setTimeout or use an async function in your Effect the code\n // that executes async after the fact won't be tracked.\"\n context.report({\n node,\n messageId: \"noAsyncTrackedScope\",\n });\n }\n }\n };\n // given some expression, mark any functions within it as tracking scopes, and do not traverse\n // those functions\n const permissivelyTrackNode = (node: T.Node) => {\n traverse(node as any, {\n enter(cn) {\n const childNode = cn as T.Node;\n const traced = trace(childNode, context);\n // when referencing a function or something that could be a derived signal, track it\n if (\n isFunctionNode(traced) ||\n (traced.type === \"Identifier\" &&\n traced.parent.type !== \"MemberExpression\" &&\n !(traced.parent.type === \"CallExpression\" && traced.parent.callee === traced)) ||\n // memo accessors traced to their initializing call, e.g. passing a variable\n // holding a createMemo result — treat like passing a signal\n (traced.type === \"CallExpression\" &&\n traced.callee.type === \"Identifier\" &&\n matchImport(\n [\"createMemo\", \"createSelector\", \"children\", \"createProjection\"],\n traced.callee.name\n ))\n ) {\n pushTrackedScope(childNode, \"called-function\");\n this.skip(); // poor-man's `findInScope`: don't enter child scopes\n }\n },\n fallback: \"iteration\", // Don't crash when encounter unknown node.\n });\n };\n\n if (node.type === \"JSXExpressionContainer\") {\n if (\n node.parent?.type === \"JSXAttribute\" &&\n sourceCode.getText(node.parent.name).startsWith(\"on\") &&\n node.parent.parent?.type === \"JSXOpeningElement\" &&\n node.parent.parent.name.type === \"JSXIdentifier\" &&\n isDOMElementName(node.parent.parent.name.name)\n ) {\n // Expect a function if the attribute is like onClick={}, onclick={}, on:click={}, or\n // custom events such as on-click={}.\n // From the docs:\n // Events are never rebound and the bindings are not reactive, as it is expensive to\n // attach and detach listeners. Since event handlers are called like any other function\n // each time an event fires, there is no need for reactivity; simply shortcut your handler\n // if desired.\n // What this means here is we actually do consider an event handler a tracked scope\n // expecting a function, i.e. it's okay to use changing props/signals in the body of the\n // function, even though the changes don't affect when the handler will run. This is what\n // \"called-function\" represents—not quite a tracked scope, but a place where it's okay to\n // read reactive values.\n pushTrackedScope(node.expression, \"called-function\");\n } else if (\n node.parent?.type === \"JSXAttribute\" &&\n node.parent.name.type === \"JSXNamespacedName\" &&\n node.parent.name.namespace.name === \"use\" &&\n isFunctionNode(node.expression)\n ) {\n // With a `use:` hook, assume that a function passed is a called function.\n pushTrackedScope(node.expression, \"called-function\");\n } else if (\n node.parent?.type === \"JSXAttribute\" &&\n node.parent.name.name === \"value\" &&\n node.parent.parent?.type === \"JSXOpeningElement\" &&\n isProviderElementName(node.parent.parent.name)\n ) {\n // Context providers read `props.value` once, untracked, when they are created (in\n // both Solid 1.x and 2.0), so a reactive expression here is frozen at its initial\n // value. Don't push a tracked scope; record the container so reads inside it get\n // the specific `providerValue` message instead of the generic one.\n providerValueContainers.add(node);\n } else if (\n node.parent?.type === \"JSXAttribute\" &&\n node.parent.name?.type === \"JSXIdentifier\" &&\n /^static[A-Z]/.test(node.parent.name.name) &&\n node.parent.parent?.type === \"JSXOpeningElement\" &&\n node.parent.parent.name.type === \"JSXIdentifier\" &&\n !isDOMElementName(node.parent.parent.name.name)\n ) {\n // A caller is passing a value to a prop prefixed with `static` in a component, i.e.\n // `<Box staticName={...} />`. Since we're considering these props as static in the component\n // we shouldn't allow passing reactive values to them, as this isn't just ignoring reactivity\n // like initial*/default*; this is disabling it altogether as a convention. Do nothing.\n } else if (\n node.parent?.type === \"JSXAttribute\" &&\n node.parent.name.name === \"ref\" &&\n isFunctionNode(node.expression)\n ) {\n // Callback/function refs are called when an element is created but before it is connected\n // to the DOM. This is semantically a \"called function\", so it's fine to read reactive\n // variables here.\n pushTrackedScope(node.expression, \"called-function\");\n } else if (isJSXElementOrFragment(node.parent) && isFunctionNode(node.expression)) {\n pushTrackedScope(node.expression, \"function\"); // functions inline in JSX containers will be tracked\n } else {\n pushTrackedScope(node.expression, \"expression\");\n }\n } else if (node.type === \"JSXSpreadAttribute\") {\n // allow <div {...props.nestedProps} />; {...props} is already ignored\n pushTrackedScope(node.argument, \"expression\");\n } else if (node.type === \"NewExpression\") {\n const {\n callee,\n arguments: { 0: arg0 },\n } = node;\n if (\n callee.type === \"Identifier\" &&\n arg0 &&\n // Observers from Standard Web APIs\n [\n \"IntersectionObserver\",\n \"MutationObserver\",\n \"PerformanceObserver\",\n \"ReportingObserver\",\n \"ResizeObserver\",\n ].includes(callee.name)\n ) {\n // Observers callbacks are NOT tracked scopes. However, they\n // don't need to react to updates to reactive variables; it's okay\n // to poll the current value. Consider them called-function tracked\n // scopes for our purposes.\n pushTrackedScope(arg0, \"called-function\");\n }\n } else if (node.type === \"CallExpression\") {\n if (node.callee.type === \"Identifier\") {\n const {\n callee,\n arguments: { 0: arg0, 1: arg1 },\n } = node;\n if (\n matchImport(\n [\n \"createMemo\",\n \"children\",\n \"createEffect\",\n \"createRenderEffect\",\n \"createDeferred\",\n \"createComputed\",\n \"createSelector\",\n \"mapArray\",\n \"indexArray\",\n \"observable\",\n // Solid 2.0\n \"createTrackedEffect\",\n \"isPending\",\n \"latest\",\n \"resolve\",\n \"deep\",\n \"repeat\",\n \"createErrorBoundary\",\n \"createLoadingBoundary\",\n \"createRevealOrder\",\n ],\n callee.name\n )\n ) {\n // Solid 2 computations may settle asynchronously. This does not\n // extend dependency tracking beyond the first suspension point.\n pushTrackedScope(\n arg0,\n \"function\",\n Boolean(matchImport(\"createMemo\", callee.name)) ||\n (v2 && Boolean(matchImport([\"createEffect\", \"createRenderEffect\"], callee.name)))\n );\n if (\n matchImport([\"createErrorBoundary\", \"createLoadingBoundary\"], callee.name) &&\n arg1\n ) {\n // Boundary fallbacks (Solid 2.0) are reactive accessors; the error fallback\n // also receives (err, reset) arguments\n pushTrackedScope(arg1, \"called-function\");\n }\n if (matchImport(\"createEffect\", callee.name) && isFunctionNode(arg1)) {\n // Solid 2.0 split effects: createEffect(compute, effect) runs the second\n // function with the computed value, untracked. In Solid 1.x the second\n // argument is an initial value, so a function there is safe to treat as a\n // called function under both semantics.\n pushTrackedScope(arg1, \"called-function\");\n }\n } else if (matchImport(\"untrack\", callee.name) && arg0) {\n // untrack's callback is called synchronously but explicitly NOT\n // tracked: reads inside are sanctioned, and an async callback is\n // harmless (there's no subscription to lose), so it must not get\n // the async-tracked-scope or read-after-await treatment (#188).\n pushTrackedScope(arg0, \"called-function\");\n } else if (matchImport(\"createResource\", callee.name)) {\n // createResource(fetcher), createResource(fetcher, options),\n // createResource(source, fetcher), or createResource(source, fetcher, options).\n // Only when the second argument is a function is the first a reactive source\n // (a sync tracked scope). The fetcher itself is not tracked — it receives the\n // source's value as an argument and may be async.\n const arg1IsFunction = arg1 && isFunctionNode(trace(arg1, context));\n if (arg1IsFunction) {\n pushTrackedScope(arg0, \"function\");\n pushTrackedScope(arg1, \"called-function\");\n } else if (arg0) {\n pushTrackedScope(arg0, \"called-function\");\n }\n } else if (matchImport([\"mergeProps\", \"merge\"], callee.name)) {\n // mergeProps (Solid 1.x) and merge (Solid 2.0) wrap function sources in\n // createMemo, so function arguments are genuinely tracked scopes.\n for (const arg of node.arguments) {\n if (arg.type === \"SpreadElement\") continue;\n if (isFunctionNode(trace(arg, context))) {\n pushTrackedScope(arg, \"function\");\n }\n }\n } else if (\n matchImport(\n [\n \"createSignal\",\n \"createStore\",\n \"createProjection\",\n \"createOptimistic\",\n \"createOptimisticStore\",\n ],\n callee.name\n ) &&\n isFunctionNode(arg0)\n ) {\n // Solid 2.0 function-form derived primitives: the function argument is a\n // tracked scope, and may be async (async computations are first-class; only\n // reads before the first `await` are tracked). In Solid 1.x a function passed\n // to createSignal is just a stored value, so treating it as a tracked scope\n // is permissive under both semantics.\n pushTrackedScope(arg0, \"function\", true);\n } else if (\n matchImport([\"onMount\", \"onCleanup\", \"onError\", \"onSettled\", \"action\"], callee.name) ||\n [\n // Timers\n \"setInterval\",\n \"setTimeout\",\n \"setImmediate\",\n \"requestAnimationFrame\",\n \"requestIdleCallback\",\n ].includes(callee.name)\n ) {\n // on* and timers are NOT tracked scopes. However, they\n // don't need to react to updates to reactive variables; it's okay\n // to poll the current value. Consider them called-function tracked\n // scopes for our purposes.\n pushTrackedScope(arg0, \"called-function\");\n } else if (matchImport(\"on\", callee.name)) {\n // on accepts a signal or an array of signals as its first argument,\n // and a tracking function as its second\n if (arg0) {\n if (arg0.type === \"ArrayExpression\") {\n arg0.elements.forEach((element) => {\n if (element && element?.type !== \"SpreadElement\") {\n pushTrackedScope(element, \"function\");\n }\n });\n } else {\n pushTrackedScope(arg0, \"function\");\n }\n }\n if (arg1) {\n // Since dependencies are known, function can be async\n pushTrackedScope(arg1, \"called-function\");\n }\n } else if (matchImport(\"createStore\", callee.name) && arg0?.type === \"ObjectExpression\") {\n for (const property of arg0.properties) {\n if (\n property.type === \"Property\" &&\n property.kind === \"get\" &&\n isFunctionNode(property.value)\n ) {\n pushTrackedScope(property.value, \"function\");\n }\n }\n } else if (matchImport(\"runWithOwner\", callee.name)) {\n // runWithOwner(owner, fn) only creates a tracked scope if `owner =\n // getOwner()` runs in a tracked scope. If owner is a variable,\n // attempt to detect if it's a tracked scope or not, but if this\n // can't be done, assume it's a tracked scope.\n if (arg1) {\n let isTrackedScope = true;\n const owner = arg0.type === \"Identifier\" && findVariable(context, arg0);\n if (owner) {\n const decl = owner.defs[0];\n if (\n decl &&\n decl.node.type === \"VariableDeclarator\" &&\n decl.node.init?.type === \"CallExpression\" &&\n decl.node.init.callee.type === \"Identifier\" &&\n matchImport(\"getOwner\", decl.node.init.callee.name)\n ) {\n // Check if the function in which getOwner() is called is a tracked scope. If the scopeStack\n // has moved on from that scope already, assume it's tracked, since that's less intrusive.\n const ownerFunction = findParent(decl.node, isProgramOrFunctionNode);\n const scopeStackIndex = scopeStack.findIndex(\n ({ node }) => ownerFunction === node\n );\n if (\n (scopeStackIndex >= 1 &&\n !scopeStack[scopeStackIndex - 1].trackedScopes.some(\n (trackedScope) =>\n trackedScope.expect === \"function\" && trackedScope.node === ownerFunction\n )) ||\n scopeStackIndex === 0\n ) {\n isTrackedScope = false;\n }\n }\n }\n if (isTrackedScope) {\n pushTrackedScope(arg1, \"function\");\n }\n }\n } else if (\n /^(?:use|create)[A-Z]/.test(callee.name) ||\n matchesCustomReactive(callee.name)\n ) {\n // Custom hooks parameters may or may not be tracking scopes, no way to know.\n // Assume all identifier/function arguments are tracked scopes, and use \"called-function\"\n // to allow async handlers (permissive). Assume non-resolvable args are reactive expressions.\n for (const arg of node.arguments) {\n permissivelyTrackNode(arg);\n }\n } else if (\n parentScope()?.trackedScopes.some(\n (trackedScope) =>\n (trackedScope.expect === \"function\" || trackedScope.expect === \"called-function\") &&\n trackedScope.node === currentScope().node\n )\n ) {\n // An unknown call inside a tracked scope (e.g. a helper called in an effect\n // callback). Functions passed to it either run synchronously — still inside the\n // tracked scope — or run later, where polling current values is fine, like any\n // called function. Known Solid APIs that intentionally decline to track their\n // callbacks (like runWithOwner with an untracked owner) match earlier branches.\n for (const arg of node.arguments) {\n if (isFunctionNode(arg)) {\n pushTrackedScope(arg, \"called-function\");\n }\n }\n }\n } else if (node.callee.type === \"MemberExpression\") {\n const { property } = node.callee;\n if (\n property.type === \"Identifier\" &&\n property.name === \"addEventListener\" &&\n node.arguments.length >= 2\n ) {\n // Like `on*` event handlers, mark all `addEventListener` listeners as called functions.\n pushTrackedScope(node.arguments[1], \"called-function\");\n } else if (\n property.type === \"Identifier\" &&\n node.callee.object.type === \"Identifier\" &&\n [\"window\", \"globalThis\", \"self\"].includes(node.callee.object.name) &&\n [\n \"setInterval\",\n \"setTimeout\",\n \"setImmediate\",\n \"requestAnimationFrame\",\n \"requestIdleCallback\",\n ].includes(property.name)\n ) {\n // `window.setTimeout` etc. behave exactly like the bare timer globals above:\n // callbacks are called functions, free to poll current reactive values.\n if (node.arguments[0]) {\n pushTrackedScope(node.arguments[0], \"called-function\");\n }\n } else if (\n property.type === \"Identifier\" &&\n (/^(?:use|create)[A-Z]/.test(property.name) || matchesCustomReactive(property.name))\n ) {\n // Handle custom hook parameters for property access custom hooks\n for (const arg of node.arguments) {\n permissivelyTrackNode(arg);\n }\n }\n }\n } else if (node.type === \"VariableDeclarator\") {\n // Solid 1.3 createReactive (renamed createReaction?) returns a track\n // function, a tracked scope expecting a reactive function. All of the\n // track function's references where it's called push a tracked scope.\n if (node.init?.type === \"CallExpression\" && node.init.callee.type === \"Identifier\") {\n if (matchImport([\"createReactive\", \"createReaction\"], node.init.callee.name)) {\n const track = getReturnedVar(node.id, context);\n if (track) {\n for (const reference of track.references) {\n if (\n !reference.init &&\n reference.isReadOnly() &&\n reference.identifier.parent?.type === \"CallExpression\" &&\n reference.identifier.parent.callee === reference.identifier\n ) {\n const arg0 = reference.identifier.parent.arguments[0];\n if (arg0) {\n pushTrackedScope(arg0, \"function\");\n }\n }\n }\n }\n if (isFunctionNode(node.init.arguments[0])) {\n pushTrackedScope(node.init.arguments[0], \"called-function\");\n }\n }\n }\n } else if (node.type === \"AssignmentExpression\") {\n if (\n node.left.type === \"MemberExpression\" &&\n node.left.property.type === \"Identifier\" &&\n isFunctionNode(node.right) &&\n /^on[a-z]+$/.test(node.left.property.name)\n ) {\n // To allow (questionable) code like the following example:\n // ref.oninput = () = {\n // if (!errors[ref.name]) return;\n // ...\n // }\n // where event handlers are manually attached to refs, detect these\n // scenarios and mark the right hand sides as tracked scopes expecting\n // functions.\n pushTrackedScope(node.right, \"called-function\");\n }\n } else if (node.type === \"TaggedTemplateExpression\") {\n for (const expression of node.quasi.expressions) {\n if (isFunctionNode(expression)) {\n // ex. css`color: ${props => props.color}`. Use \"called-function\" to allow async handlers (permissive)\n pushTrackedScope(expression, \"called-function\");\n\n // exception case: add a reactive variable within checkForTrackedScopes when a param is props\n for (const param of expression.params) {\n if (param.type === \"Identifier\" && isPropsByName(param.name)) {\n const variable = findVariable(context, param);\n if (variable) scopeStack.pushProps(variable, currentScope().node);\n }\n }\n }\n }\n }\n };\n\n return {\n ImportDeclaration: handleImportDeclaration,\n JSXExpressionContainer(node: T.JSXExpressionContainer) {\n checkForTrackedScopes(node);\n },\n JSXSpreadAttribute(node: T.JSXSpreadAttribute) {\n checkForTrackedScopes(node);\n },\n CallExpression(node: T.CallExpression) {\n checkForTrackedScopes(node);\n checkForSyncCallbacks(node);\n\n // ensure calls to reactive primitives use the results. Directly-returned calls\n // (`return createMemo(...)` or as an arrow body) hand their result to the caller,\n // like a custom primitive, so there is nothing to capture in this scope.\n const parent = node.parent && ignoreTransparentWrappers(node.parent, true);\n if (\n parent?.type !== \"AssignmentExpression\" &&\n parent?.type !== \"VariableDeclarator\" &&\n parent?.type !== \"ReturnStatement\" &&\n !(parent?.type === \"ArrowFunctionExpression\" && parent.body === node)\n ) {\n if (parent?.type === \"CallExpression\" && parent.arguments.includes(node)) {\n // A primitive call passed to a wrapper, like\n // `const [state, setState] = makePersisted(createSignal(false))`\n // (#190). The dominant ecosystem contract passes the tuple through,\n // so if the outermost wrapper's result is captured, analyze the\n // primitive as if assigned there directly. If the result isn't\n // captured, the tuple escaped into the wrapper — nothing can be\n // concluded, so stay silent rather than warn.\n let outer: T.Node = parent;\n let outerParent = outer.parent && ignoreTransparentWrappers(outer.parent, true);\n while (\n outerParent?.type === \"CallExpression\" &&\n outerParent.arguments.includes(outer as T.CallExpressionArgument)\n ) {\n outer = outerParent;\n outerParent = outer.parent && ignoreTransparentWrappers(outer.parent, true);\n }\n if (outerParent?.type === \"VariableDeclarator\") {\n checkForReactiveAssignment(outerParent.id, node);\n } else if (\n outerParent?.type === \"AssignmentExpression\" &&\n outerParent.left.type !== \"MemberExpression\"\n ) {\n checkForReactiveAssignment(outerParent.left, node);\n }\n } else {\n checkForReactiveAssignment(null, node);\n }\n }\n },\n NewExpression(node: T.NewExpression) {\n checkForTrackedScopes(node);\n },\n VariableDeclarator(node: T.VariableDeclarator) {\n if (node.init) {\n checkForReactiveAssignment(node.id, node.init);\n checkForTrackedScopes(node);\n }\n },\n AssignmentExpression(node: T.AssignmentExpression) {\n if (node.left.type !== \"MemberExpression\") {\n checkForReactiveAssignment(node.left, node.right);\n }\n checkForTrackedScopes(node);\n },\n TaggedTemplateExpression(node: T.TaggedTemplateExpression) {\n checkForTrackedScopes(node);\n },\n \"JSXElement > JSXExpressionContainer > :function\"(node: T.Node) {\n if (\n isFunctionNode(node) &&\n node.parent?.type === \"JSXExpressionContainer\" &&\n node.parent.parent?.type === \"JSXElement\"\n ) {\n const element = node.parent.parent;\n\n if (element.openingElement.name.type === \"JSXIdentifier\") {\n const tagName = element.openingElement.name.name;\n if (matchImport(\"For\", tagName)) {\n // In Solid 2.0, <For> callback params depend on the `keyed` prop:\n // - absent, bare `keyed`, or `keyed={true}`: (item, index-accessor), same as 1.x\n // - `keyed={false}`: (item-accessor, index), the old <Index> shape\n // - `keyed={fn}`: (item-accessor, index-accessor)\n const keyedAttr = element.openingElement.attributes.find(\n (attr): attr is T.JSXAttribute =>\n attr.type === \"JSXAttribute\" &&\n attr.name.type === \"JSXIdentifier\" &&\n attr.name.name === \"keyed\"\n );\n let itemIsSignal = false;\n let indexIsSignal = true;\n if (keyedAttr && keyedAttr.value?.type === \"JSXExpressionContainer\") {\n const keyedValue = keyedAttr.value.expression;\n if (keyedValue.type === \"Literal\" && keyedValue.value === false) {\n itemIsSignal = true;\n indexIsSignal = false;\n } else if (!(keyedValue.type === \"Literal\" && keyedValue.value === true)) {\n // key function: both params are accessors\n itemIsSignal = true;\n }\n }\n if (itemIsSignal && node.params.length >= 1 && node.params[0].type === \"Identifier\") {\n const item = findVariable(context, node.params[0]);\n if (item) {\n scopeStack.pushSignal(item, currentScope().node);\n }\n }\n if (\n indexIsSignal &&\n node.params.length === 2 &&\n node.params[1].type === \"Identifier\"\n ) {\n // Mark `index` in `<For>{(item, index) => <div /></For>` as a signal\n const index = findVariable(context, node.params[1]);\n if (index) {\n scopeStack.pushSignal(index, currentScope().node);\n }\n }\n } else if (\n matchImport(\"Index\", tagName) &&\n node.params.length >= 1 &&\n node.params[0].type === \"Identifier\"\n ) {\n // Mark `item` in `<Index>{(item, index) => <div />}</Index>` as a signal\n const item = findVariable(context, node.params[0]);\n if (item) {\n scopeStack.pushSignal(item, currentScope().node);\n }\n }\n }\n }\n },\n\n /* Function enter/exit */\n FunctionExpression: onFunctionEnter,\n ArrowFunctionExpression: onFunctionEnter,\n FunctionDeclaration: onFunctionEnter,\n Program: onFunctionEnter,\n \"FunctionExpression:exit\": onFunctionExit,\n \"ArrowFunctionExpression:exit\": onFunctionExit,\n \"FunctionDeclaration:exit\": onFunctionExit,\n \"Program:exit\": onFunctionExit,\n\n /* Detect JSX for adding props */\n JSXElement() {\n if (scopeStack.length) {\n currentScope().hasJSX = true;\n }\n },\n JSXFragment() {\n if (scopeStack.length) {\n currentScope().hasJSX = true;\n }\n },\n };\n },\n});\n","import type { TSESLint } from \"@typescript-eslint/utils\";\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { findVariable } from \"../compat\";\nimport { jsxGetProp } from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\n// Mechanical renames: same semantics, new name. Verified against the Solid 2.0\n// RC source (packages/solid/src/index.ts).\nconst RENAMED = new Map<string, string>([\n [\"batch\", \"flush\"],\n [\"equalFn\", \"isEqual\"],\n [\"getListener\", \"getObserver\"],\n [\"onMount\", \"onSettled\"],\n [\"mergeProps\", \"merge\"],\n [\"unwrap\", \"snapshot\"],\n]);\n\n// Removed APIs whose replacement requires a structural rewrite; the message is\n// prescriptive but no autofix is offered.\nconst REMOVED = new Map<string, string>([\n [\n \"createResource\",\n \"Async derivation is built into Solid 2.0 computations. Use an async `createMemo(async () => ...)` and read it where needed\",\n ],\n [\n \"createComputed\",\n \"Use `createMemo` for derived values or the two-argument `createEffect(compute, effect)` for side effects\",\n ],\n [\"createDeferred\", \"There is no direct replacement; move the deferral out of the reactive graph\"],\n [\"createSelector\", \"Use `createProjection` to derive per-key reactive state\"],\n [\n \"on\",\n \"Explicit dependencies are built in: use the two-argument `createEffect(compute, effect)` form, where `compute` reads the dependencies\",\n ],\n [\"onError\", \"Use `createErrorBoundary` (or the `<Errored>` component) to handle errors\"],\n [\"catchError\", \"Use `createErrorBoundary` (or the `<Errored>` component) to handle errors\"],\n [\n \"resetErrorBoundaries\",\n \"Error boundaries heal automatically in Solid 2.0 when their sources update\",\n ],\n [\n \"startTransition\",\n \"Transitions are built in. Read pending state with `isPending(...)` and previous values with `latest(...)`\",\n ],\n [\n \"useTransition\",\n \"Transitions are built in. Read pending state with `isPending(...)` and previous values with `latest(...)`\",\n ],\n [\"from\", \"Signals interop with async iterables directly in Solid 2.0\"],\n [\"observable\", \"Signals interop with async iterables directly in Solid 2.0\"],\n [\"indexArray\", \"Use `mapArray`, which handles index-mode mapping in Solid 2.0\"],\n [\n \"splitProps\",\n 'Use `omit` from \"solid-js\" to exclude props, and pass the original props object along',\n ],\n [\n \"renderToStringAsync\",\n \"`renderToString` awaits async content in Solid 2.0; use it (or `renderToStream`) instead\",\n ],\n [\"createMutable\", \"Use `createStore`; store setters mutate directly in Solid 2.0\"],\n [\"modifyMutable\", \"Use `createStore`; store setters mutate directly in Solid 2.0\"],\n [\n \"produce\",\n \"Store setters receive a mutable draft by default in Solid 2.0; mutate directly in the setter\",\n ],\n // Components\n [\"Index\", \"Use `<For keyed={false}>`, which passes item accessors like `<Index>` did\"],\n [\"ErrorBoundary\", \"Use `<Errored>` (or `createErrorBoundary`)\"],\n [\"Suspense\", \"Use `<Loading>` to render a fallback while content is pending\"],\n [\"SuspenseList\", \"Use `<Reveal>` with `createRevealOrder` to coordinate reveal order\"],\n]);\n\n// Exports that moved from \"solid-js/store\" into core \"solid-js\" unchanged.\nconst STORE_MOVED = new Set([\"createStore\", \"reconcile\", \"Store\", \"StoreNode\"]);\n\n// Includes \"@solidjs/web\" so 1.x APIs that survived a mechanical source\n// rewrite (e.g. renderToStringAsync) are still reported as removed.\nconst SOLID_SOURCE_REGEX = /^(?:solid-js(?:\\/web|\\/store)?|@solidjs\\/web)$/;\n\ntype MessageIds = \"renamed\" | \"removed\" | \"webMoved\" | \"storeMoved\" | \"classList\";\ntype Options = [];\n\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow Solid 1.x APIs that were removed or renamed in Solid 2.0, with migration guidance.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/removed-api.md\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n renamed: \"'{{name}}' was renamed to '{{replacement}}' in Solid 2.0.\",\n removed: \"'{{name}}' was removed in Solid 2.0. {{guidance}}.\",\n webMoved: 'The \"solid-js/web\" module is now the \"@solidjs/web\" package in Solid 2.0.',\n storeMoved:\n 'The \"solid-js/store\" module no longer exists in Solid 2.0; \\'{{name}}\\' is exported from \"solid-js\".',\n classList:\n \"The `classList` prop was removed in Solid 2.0; `class` accepts the same object form directly.\",\n },\n },\n defaultOptions: [],\n create(context) {\n /** Rename the import specifier and, when it isn't aliased, all its references. */\n const renameFix = (\n fixer: TSESLint.RuleFixer,\n specifier: T.ImportSpecifier,\n replacement: string\n ): Array<TSESLint.RuleFix> => {\n const fixes: Array<TSESLint.RuleFix> = [];\n const aliased = specifier.local.range[0] !== specifier.imported.range[0];\n fixes.push(fixer.replaceText(specifier.imported, replacement));\n if (!aliased) {\n const variable = findVariable(context, specifier.local);\n if (variable) {\n for (const reference of variable.references) {\n if (reference.identifier !== specifier.local) {\n fixes.push(fixer.replaceText(reference.identifier, replacement));\n }\n }\n }\n }\n return fixes;\n };\n\n return {\n ImportDeclaration(node) {\n const source = node.source.value;\n if (!SOLID_SOURCE_REGEX.test(source)) return;\n\n if (source === \"solid-js/web\") {\n context.report({\n node: node.source,\n messageId: \"webMoved\",\n fix: (fixer) =>\n fixer.replaceText(\n node.source,\n node.source.raw.replace(\"solid-js/web\", \"@solidjs/web\")\n ),\n });\n }\n\n for (const specifier of node.specifiers) {\n if (specifier.type !== \"ImportSpecifier\") continue;\n const importedName =\n specifier.imported.type === \"Identifier\"\n ? specifier.imported.name\n : specifier.imported.value;\n\n const replacement = RENAMED.get(importedName);\n if (replacement) {\n context.report({\n node: specifier,\n messageId: \"renamed\",\n data: { name: importedName, replacement },\n fix: (fixer) => renameFix(fixer, specifier, replacement),\n });\n continue;\n }\n\n const guidance = REMOVED.get(importedName);\n if (guidance) {\n context.report({\n node: specifier,\n messageId: \"removed\",\n data: { name: importedName, guidance },\n });\n continue;\n }\n\n if (source === \"solid-js/store\" && STORE_MOVED.has(importedName)) {\n context.report({\n node: specifier,\n messageId: \"storeMoved\",\n data: { name: importedName },\n // Only offer the source rewrite when every specifier in this\n // declaration survives the move; otherwise the fix would create\n // a broken import of a removed API from \"solid-js\".\n fix: node.specifiers.every(\n (s) =>\n s.type === \"ImportSpecifier\" &&\n STORE_MOVED.has(\n s.imported.type === \"Identifier\" ? s.imported.name : s.imported.value\n )\n )\n ? (fixer) =>\n fixer.replaceText(\n node.source,\n node.source.raw.replace(\"solid-js/store\", \"solid-js\")\n )\n : undefined,\n });\n }\n }\n },\n JSXAttribute(node) {\n if (node.name.type === \"JSXIdentifier\" && node.name.name === \"classList\") {\n const element = node.parent as T.JSXOpeningElement;\n const hasClass = !!jsxGetProp(element.attributes, \"class\");\n context.report({\n node: node.name,\n messageId: \"classList\",\n // If a `class` prop already exists the two must be merged by hand.\n fix: hasClass ? undefined : (fixer) => fixer.replaceText(node.name, \"class\"),\n });\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils, ASTUtils } from \"@typescript-eslint/utils\";\nimport {\n FunctionNode,\n isFunctionNode,\n hasUseServerDirective,\n getUseServerEligibility,\n isInsideUseServerFunction,\n programHasUseServerDirective,\n} from \"../utils\";\nimport { findVariable, getSourceCode } from \"../compat\";\n\nconst { getFunctionHeadLocation } = ASTUtils;\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\ntype MessageIds = \"asyncServerFunction\";\ntype Options = [];\n\n/*\n * The client half of a server function is always asynchronous: calls cross\n * the network and resolve a Promise. The server half deliberately preserves\n * synchronous entry for in-process SSR calls. A non-async server function\n * therefore returns `T` during SSR and `Promise<T>` on the client, and its\n * declared TypeScript type matches only one of them — a split TS cannot see,\n * because it types the source declaration, not the compiled proxy.\n */\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Require server functions to be async, matching their client-side contract.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/require-async-server-function.md\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n asyncServerFunction:\n \"Server functions should be async: on the client every call resolves a Promise, but during server rendering this function is called in-process and returns synchronously, so the same code observes two different types.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const sourceCode = getSourceCode(context);\n let moduleLevel = false;\n\n const checkFunction = (fn: FunctionNode) => {\n if (fn.async) return;\n context.report({\n loc: getFunctionHeadLocation(fn, sourceCode),\n messageId: \"asyncServerFunction\",\n fix: (fixer) => {\n const firstToken = sourceCode.getFirstToken(fn);\n return firstToken ? fixer.insertTextBefore(firstToken, \"async \") : null;\n },\n });\n };\n\n /** Resolves `export { name }` specifiers to top-level function nodes. */\n const resolveExportedFunction = (identifier: T.Identifier): FunctionNode | null => {\n const variable = findVariable(context, identifier);\n const def = variable?.defs[0];\n if (!def) return null;\n if (def.type === \"FunctionName\" && isFunctionNode(def.node)) return def.node;\n if (\n def.type === \"Variable\" &&\n def.node.type === \"VariableDeclarator\" &&\n isFunctionNode(def.node.init)\n ) {\n return def.node.init;\n }\n return null;\n };\n\n return {\n Program(node) {\n moduleLevel = programHasUseServerDirective(node);\n },\n \":function\"(node: T.Node) {\n if (!isFunctionNode(node)) return;\n // Function-level directives. Ineligible positions (object/class\n // methods) are never extracted at all; valid-use-server owns those.\n if (\n !moduleLevel &&\n hasUseServerDirective(node) &&\n getUseServerEligibility(node) === \"eligible\" &&\n !isInsideUseServerFunction(node)\n ) {\n checkFunction(node);\n }\n },\n ExportNamedDeclaration(node) {\n if (!moduleLevel) return;\n if (node.declaration) {\n if (isFunctionNode(node.declaration)) {\n checkFunction(node.declaration);\n } else if (node.declaration.type === \"VariableDeclaration\") {\n for (const declarator of node.declaration.declarations) {\n if (isFunctionNode(declarator.init)) checkFunction(declarator.init);\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n if (specifier.local.type !== \"Identifier\") continue;\n const fn = resolveExportedFunction(specifier.local);\n if (fn) checkFunction(fn);\n }\n }\n },\n ExportDefaultDeclaration(node) {\n if (!moduleLevel) return;\n if (isFunctionNode(node.declaration)) checkFunction(node.declaration);\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { isDOMElementName } from \"../utils\";\nimport { getSourceCode } from \"../compat\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\nfunction isComponent(node: T.JSXOpeningElement) {\n return (\n (node.name.type === \"JSXIdentifier\" && !isDOMElementName(node.name.name)) ||\n node.name.type === \"JSXMemberExpression\"\n );\n}\n\nconst voidDOMElementRegex =\n /^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;\nfunction isVoidDOMElementName(name: string) {\n return voidDOMElementRegex.test(name);\n}\n\nfunction childrenIsEmpty(node: T.JSXOpeningElement) {\n return (node.parent as T.JSXElement).children.length === 0;\n}\n\nfunction childrenIsMultilineSpaces(node: T.JSXOpeningElement) {\n const childrens = (node.parent as T.JSXElement).children;\n\n return (\n childrens.length === 1 &&\n childrens[0].type === \"JSXText\" &&\n childrens[0].value.indexOf(\"\\n\") !== -1 &&\n childrens[0].value.replace(/(?!\\xA0)\\s/g, \"\") === \"\"\n );\n}\n\ntype MessageIds = \"selfClose\" | \"dontSelfClose\";\ntype Options = [{ component?: \"all\" | \"none\"; html?: \"all\" | \"void\" | \"none\" }?];\n\n/**\n * This rule is adapted from eslint-plugin-react's self-closing-comp rule under the MIT license,\n * with some enhancements. Thank you for your work!\n */\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"layout\",\n docs: {\n description: \"Disallow extra closing tags for components without children.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/self-closing-comp.md\",\n },\n fixable: \"code\",\n schema: [\n {\n type: \"object\",\n properties: {\n component: {\n type: \"string\",\n description: \"which Solid components should be self-closing when possible\",\n enum: [\"all\", \"none\"],\n default: \"all\",\n },\n html: {\n type: \"string\",\n description: \"which native elements should be self-closing when possible\",\n enum: [\"all\", \"void\", \"none\"],\n default: \"all\",\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n selfClose: \"Empty components are self-closing.\",\n dontSelfClose: \"This element should not be self-closing.\",\n },\n },\n defaultOptions: [],\n create(context) {\n function shouldBeSelfClosedWhenPossible(node: T.JSXOpeningElement): boolean {\n if (isComponent(node)) {\n const whichComponents = context.options[0]?.component ?? \"all\";\n return whichComponents === \"all\";\n } else if (node.name.type === \"JSXIdentifier\" && isDOMElementName(node.name.name)) {\n const whichComponents = context.options[0]?.html ?? \"all\";\n switch (whichComponents) {\n case \"all\":\n return true;\n case \"void\":\n return isVoidDOMElementName(node.name.name);\n case \"none\":\n return false;\n }\n }\n return true; // shouldn't encounter\n }\n\n return {\n JSXOpeningElement(node) {\n const canSelfClose = childrenIsEmpty(node) || childrenIsMultilineSpaces(node);\n if (canSelfClose) {\n const shouldSelfClose = shouldBeSelfClosedWhenPossible(node);\n if (shouldSelfClose && !node.selfClosing) {\n context.report({\n node,\n messageId: \"selfClose\",\n fix(fixer) {\n // Represents the last character of the JSXOpeningElement, the '>' character\n const openingElementEnding = node.range[1] - 1;\n // Represents the last character of the JSXClosingElement, the '>' character\n const closingElementEnding = (node.parent as T.JSXElement).closingElement!.range[1];\n\n // Replace />.*<\\/.*>/ with '/>'\n const range = [openingElementEnding, closingElementEnding] as const;\n return fixer.replaceTextRange(range, \" />\");\n },\n });\n } else if (!shouldSelfClose && node.selfClosing) {\n context.report({\n node,\n messageId: \"dontSelfClose\",\n fix(fixer) {\n const sourceCode = getSourceCode(context);\n const tagName = sourceCode.getText(node.name);\n // Represents the last character of the JSXOpeningElement, the '>' character\n const selfCloseEnding = node.range[1];\n // Replace ' />' or '/>' with '></${tagName}>'\n const lastTokens = sourceCode.getLastTokens(node, { count: 3 }); // JSXIdentifier, '/', '>'\n const isSpaceBeforeSelfClose = sourceCode.isSpaceBetween?.(\n lastTokens[0],\n lastTokens[1]\n );\n const range = [\n isSpaceBeforeSelfClose ? selfCloseEnding - 3 : selfCloseEnding - 2,\n selfCloseEnding,\n ] as const;\n return fixer.replaceTextRange(range, `></${tagName}>`);\n },\n });\n }\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils, ASTUtils } from \"@typescript-eslint/utils\";\nimport kebabCase from \"kebab-case\";\nimport { all as allCssProperties } from \"known-css-properties\";\nimport parse from \"style-to-object\";\nimport { jsxPropName } from \"../utils\";\nimport { getScope } from \"../compat\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\nconst { getPropertyName, getStaticValue } = ASTUtils;\n\nconst lengthPercentageRegex = /\\b(?:width|height|margin|padding|border-width|font-size)\\b/i;\n\ntype MessageIds = \"kebabStyleProp\" | \"invalidStyleProp\" | \"numericStyleValue\" | \"stringStyle\";\ntype Options = [{ styleProps?: Array<string>; allowString?: boolean }?];\n\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Require CSS properties in the `style` prop to be valid and kebab-cased (ex. 'font-size'), not camel-cased (ex. 'fontSize') like in React, \" +\n \"and that property values with dimensions are strings, not numbers with implicit 'px' units.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/style-prop.md\",\n },\n fixable: \"code\",\n schema: [\n {\n type: \"object\",\n properties: {\n styleProps: {\n description: \"an array of prop names to treat as a CSS style object\",\n default: [\"style\"],\n type: \"array\",\n items: {\n type: \"string\",\n },\n minItems: 1,\n uniqueItems: true,\n },\n allowString: {\n description:\n \"if allowString is set to true, this rule will not convert a style string literal into a style object (not recommended for performance)\",\n type: \"boolean\",\n default: false,\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n kebabStyleProp: \"Use {{ kebabName }} instead of {{ name }}.\",\n invalidStyleProp: \"{{ name }} is not a valid CSS property.\",\n numericStyleValue:\n 'This CSS property value should be a string with a unit; Solid does not automatically append a \"px\" unit.',\n stringStyle: \"Use an object for the style prop instead of a string.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const allCssPropertiesSet: Set<string> = new Set(allCssProperties);\n const allowString = Boolean(context.options[0]?.allowString);\n const styleProps = context.options[0]?.styleProps || [\"style\"];\n\n return {\n JSXAttribute(node) {\n if (styleProps.indexOf(jsxPropName(node)) === -1) {\n return;\n }\n const style =\n node.value?.type === \"JSXExpressionContainer\" ? node.value.expression : node.value;\n\n if (!style) {\n return;\n } else if (style.type === \"Literal\" && typeof style.value === \"string\" && !allowString) {\n // Convert style=\"font-size: 10px\" to style={{ \"font-size\": \"10px\" }}\n let objectStyles: Record<string, string> | undefined;\n try {\n objectStyles = parse(style.value) ?? undefined;\n } catch {\n // no-op\n }\n\n context.report({\n node: style,\n messageId: \"stringStyle\",\n // replace full prop value, wrap in JSXExpressionContainer, more fixes may be applied below\n fix:\n objectStyles &&\n ((fixer) => fixer.replaceText(node.value!, `{${JSON.stringify(objectStyles)}}`)),\n });\n } else if (style.type === \"TemplateLiteral\" && !allowString) {\n context.report({\n node: style,\n messageId: \"stringStyle\",\n });\n } else if (style.type === \"ObjectExpression\") {\n const properties = style.properties.filter(\n (prop) => prop.type === \"Property\"\n ) as Array<T.Property>;\n properties.forEach((prop) => {\n const name: string | null = getPropertyName(prop, getScope(context, prop));\n if (name && !name.startsWith(\"--\") && !allCssPropertiesSet.has(name)) {\n const kebabName: string = kebabCase(name);\n if (allCssPropertiesSet.has(kebabName)) {\n // if it's not valid simply because it's camelCased instead of kebab-cased, provide a fix\n context.report({\n node: prop.key,\n messageId: \"kebabStyleProp\",\n data: { name, kebabName },\n fix: (fixer) => fixer.replaceText(prop.key, `\"${kebabName}\"`), // wrap kebab name in quotes to be a valid object key\n });\n } else {\n context.report({\n node: prop.key,\n messageId: \"invalidStyleProp\",\n data: { name },\n });\n }\n } else if (!name || (!name.startsWith(\"--\") && lengthPercentageRegex.test(name))) {\n // catches numeric values (ex. { \"font-size\": 12 }) for common <length-percentage> peroperties\n // and suggests quoting or appending 'px'\n const value: unknown = getStaticValue(prop.value)?.value;\n if (typeof value === \"number\" && value !== 0) {\n context.report({ node: prop.value, messageId: \"numericStyleValue\" });\n }\n }\n });\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport {\n findParent,\n isFunctionNode,\n trackImports,\n createNameMatcher,\n getDirectivePrologue,\n getUseServerEligibility,\n isInsideUseServerFunction,\n programHasUseServerDirective,\n} from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\ntype MessageIds =\n | \"misplacedDirective\"\n | \"templateDirective\"\n | \"ineligiblePosition\"\n | \"nonFunctionExport\"\n | \"clientWrapper\";\ntype Options = [{ clientWrappers: string[] }];\n\nconst POSITION_LABELS = {\n objectMethod: \"an object method\",\n accessor: \"a getter or setter\",\n classMethod: \"a class method\",\n} as const;\n\n/**\n * Declaration wrappers whose behavior lives in the client bundle. In a\n * module-level \"use server\" file the client build replaces every export with\n * a bare server reference, so these wrapper calls are compiled out of the\n * client entirely: `GET`/`withMeta` metadata never reaches the client proxy\n * (calls silently go over POST), `live` sources never get their live\n * transport, and the router's `query`/`action`/`liveQuery` integration\n * (caching, dedup, submission tracking) never happens.\n */\nconst CLIENT_WRAPPERS = [\"GET\", \"live\", \"withMeta\", \"query\", \"action\", \"liveQuery\"];\nconst WRAPPER_SOURCES = /^(?:solid-js|@solidjs\\/(?:web|router|start))(?:\\/|$)/;\n\nconst isDefinitelyNotFunction = (node: T.Node): boolean =>\n node.type === \"Literal\" ||\n node.type === \"TemplateLiteral\" ||\n node.type === \"ArrayExpression\" ||\n node.type === \"ObjectExpression\";\n\nexport default createRule<Options, MessageIds>({\n meta: {\n type: \"problem\",\n docs: {\n description:\n 'Enforce that \"use server\" directives are placed where the compiler honors them, and that module-level directive files export working server functions.',\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/valid-use-server.md\",\n },\n schema: [\n {\n type: \"object\",\n properties: {\n clientWrappers: {\n description:\n \"Additional function names treated as client-side declaration wrappers that must not be called inside a module-level \\\"use server\\\" file. Supports exact names, '*' wildcards, and regexes given as '/pattern/' strings. GET, live, withMeta, query, action, and liveQuery are always included.\",\n type: \"array\",\n items: { type: \"string\" },\n default: [],\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n misplacedDirective:\n 'The \"use server\" directive only takes effect as the first statement of a function body or module; here it is an ordinary expression statement and the code stays on the client.',\n templateDirective:\n 'A template literal is never a directive; this code stays on the client. Use a plain string: \"use server\".',\n ineligiblePosition:\n 'The \"use server\" directive in {{position}} is silently ignored — the function is never extracted to the server. Use a standalone function, a function-valued property, or a block-bodied arrow instead.',\n nonFunctionExport:\n \"Every export of a module-level \\\"use server\\\" file is registered as a server function; '{{name}}' is not a function and will fail the server at boot. Move non-function exports to another module.\",\n clientWrapper:\n \"In a module-level \\\"use server\\\" file the client receives bare server references, so '{{name}}' never runs on the client and its behavior is silently lost. Wrap the imported server function in a shared module instead, or move the directive inside the wrapped function.\",\n },\n },\n defaultOptions: [{ clientWrappers: [] }],\n create(context, [options]) {\n const { matchImport, handleImportDeclaration } = trackImports(WRAPPER_SOURCES);\n const matchesCustomWrapper = createNameMatcher(options.clientWrappers);\n let moduleLevel = false;\n\n const checkExportedValue = (node: T.Node, name: string) => {\n if (isDefinitelyNotFunction(node)) {\n context.report({ node, messageId: \"nonFunctionExport\", data: { name } });\n }\n };\n\n return {\n Program(node) {\n moduleLevel = programHasUseServerDirective(node);\n },\n ImportDeclaration: handleImportDeclaration,\n ExpressionStatement(node) {\n const { expression } = node;\n const isTemplate =\n expression.type === \"TemplateLiteral\" &&\n expression.expressions.length === 0 &&\n expression.quasis.length === 1 &&\n expression.quasis[0].value.cooked === \"use server\";\n const isString = expression.type === \"Literal\" && expression.value === \"use server\";\n if (!isTemplate && !isString) return;\n\n if (isTemplate) {\n context.report({ node, messageId: \"templateDirective\" });\n return;\n }\n\n // In a module-level directive file, or nested inside an extracted\n // server function, the whole scope already runs on the server —\n // stray inner directives are ignored by the transform and harmless.\n if (moduleLevel) return;\n const nearestFunction = findParent(node, isFunctionNode);\n if (\n nearestFunction &&\n isFunctionNode(nearestFunction) &&\n isInsideUseServerFunction(nearestFunction)\n ) {\n return;\n }\n\n const parent = node.parent;\n const enclosingFunction =\n parent?.type === \"BlockStatement\" && isFunctionNode(parent.parent) ? parent.parent : null;\n if (\n parent?.type !== \"Program\" &&\n (parent?.type !== \"BlockStatement\" || !enclosingFunction)\n ) {\n // A string statement in a plain block (if/for body, bare block):\n // blocks have no directive prologue.\n context.report({ node, messageId: \"misplacedDirective\" });\n return;\n }\n\n const body = parent.body;\n if (!getDirectivePrologue(body).includes(node)) {\n context.report({ node, messageId: \"misplacedDirective\" });\n return;\n }\n\n if (enclosingFunction && !isInsideUseServerFunction(enclosingFunction)) {\n const eligibility = getUseServerEligibility(enclosingFunction);\n if (eligibility !== \"eligible\") {\n context.report({\n node,\n messageId: \"ineligiblePosition\",\n data: { position: POSITION_LABELS[eligibility] },\n });\n }\n }\n },\n ExportNamedDeclaration(node) {\n if (!moduleLevel || !node.declaration) return;\n if (node.declaration.type === \"VariableDeclaration\") {\n for (const declarator of node.declaration.declarations) {\n if (declarator.init && declarator.id.type === \"Identifier\") {\n checkExportedValue(declarator.init, declarator.id.name);\n }\n }\n }\n },\n ExportDefaultDeclaration(node) {\n if (!moduleLevel) return;\n checkExportedValue(node.declaration, \"default\");\n },\n CallExpression(node) {\n if (!moduleLevel || node.callee.type !== \"Identifier\") return;\n // Only module-scope calls: wrapper calls inside functions are just\n // server-side code, which is the caller's business.\n if (findParent(node, isFunctionNode) != null) return;\n const name = node.callee.name;\n if (matchImport(CLIENT_WRAPPERS, name) || matchesCustomWrapper(name)) {\n context.report({ node, messageId: \"clientWrapper\", data: { name } });\n }\n },\n };\n },\n});\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { TSESTree as T, ESLintUtils } from \"@typescript-eslint/utils\";\nimport { isDOMElementName, trace } from \"../utils\";\n\nconst createRule = ESLintUtils.RuleCreator.withoutDocs;\n\nexport default createRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow usage of type-unsafe event handlers.\",\n url: \"https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-array-handlers.md\",\n },\n schema: [],\n messages: {\n noArrayHandlers: \"Passing an array as an event handler is potentially type-unsafe.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n JSXAttribute(node) {\n const openingElement = node.parent as T.JSXOpeningElement;\n if (\n openingElement.name.type !== \"JSXIdentifier\" ||\n !isDOMElementName(openingElement.name.name)\n ) {\n return; // bail if this is not a DOM/SVG element or web component\n }\n\n const isNamespacedHandler =\n node.name.type === \"JSXNamespacedName\" && node.name.namespace.name === \"on\";\n const isNormalEventHandler =\n node.name.type === \"JSXIdentifier\" && /^on[a-zA-Z]/.test(node.name.name);\n\n if (\n (isNamespacedHandler || isNormalEventHandler) &&\n node.value?.type === \"JSXExpressionContainer\" &&\n trace(node.value.expression, context).type === \"ArrayExpression\"\n ) {\n // Warn if passed an array\n context.report({\n node,\n messageId: \"noArrayHandlers\",\n });\n }\n },\n };\n },\n});\n","{\n \"name\": \"@qq99/eslint-plugin-solid\",\n \"version\": \"0.18.0-no-reactive-read-in-effect-callback.0\",\n \"description\": \"Solid-specific linting rules for ESLint.\",\n \"keywords\": [\n \"eslint\",\n \"eslintplugin\",\n \"solid\",\n \"solidjs\",\n \"reactivity\"\n ],\n \"repository\": \"https://github.com/solidjs-community/eslint-plugin-solid\",\n \"license\": \"MIT\",\n \"author\": \"Josh Wilson <joshwilsonvu@gmail.com>\",\n \"exports\": {\n \".\": {\n \"types\": {\n \"import\": \"./dist/index.d.mts\",\n \"require\": \"./dist/index.d.ts\"\n },\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n },\n \"./configs/recommended\": {\n \"types\": {\n \"import\": \"./dist/configs/recommended.d.mts\",\n \"require\": \"./dist/configs/recommended.d.ts\"\n },\n \"import\": \"./dist/configs/recommended.mjs\",\n \"require\": \"./dist/configs/recommended.js\"\n },\n \"./configs/typescript\": {\n \"types\": {\n \"import\": \"./dist/configs/typescript.d.mts\",\n \"require\": \"./dist/configs/typescript.d.ts\"\n },\n \"import\": \"./dist/configs/typescript.mjs\",\n \"require\": \"./dist/configs/typescript.js\"\n },\n \"./configs/v2\": {\n \"types\": {\n \"import\": \"./dist/configs/v2.d.mts\",\n \"require\": \"./dist/configs/v2.d.ts\"\n },\n \"import\": \"./dist/configs/v2.mjs\",\n \"require\": \"./dist/configs/v2.js\"\n },\n \"./configs/v2-strict\": {\n \"types\": {\n \"import\": \"./dist/configs/v2-strict.d.mts\",\n \"require\": \"./dist/configs/v2-strict.d.ts\"\n },\n \"import\": \"./dist/configs/v2-strict.mjs\",\n \"require\": \"./dist/configs/v2-strict.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"main\": \"dist/index.js\",\n \"types\": \"dist/index.d.ts\",\n \"files\": [\n \"src\",\n \"dist\",\n \"README.md\"\n ],\n \"scripts\": {\n \"build\": \"tsup\",\n \"test\": \"vitest --run\",\n \"test:all\": \"PARSER=all vitest --run\",\n \"test:babel\": \"PARSER=babel vitest --run\",\n \"test:ts\": \"PARSER=ts vitest --run\",\n \"test:watch\": \"vitest\",\n \"turbo:build\": \"tsup\",\n \"turbo:docs\": \"PARSER=none tsx scripts/docs.mts\",\n \"turbo:test\": \"vitest --run\"\n },\n \"dependencies\": {\n \"@typescript-eslint/utils\": \"^8.0.0\",\n \"estraverse\": \"^5.3.0\",\n \"is-html\": \"^2.0.0\",\n \"kebab-case\": \"^1.0.2\",\n \"known-css-properties\": \"^0.30.0\",\n \"style-to-object\": \"^1.0.6\"\n },\n \"devDependencies\": {\n \"@babel/core\": \"^8.0.0\",\n \"@babel/eslint-parser\": \"^8.0.1\",\n \"@microsoft/api-extractor\": \"^7.47.6\",\n \"@types/estraverse\": \"^5.1.7\",\n \"@types/is-html\": \"^2.0.2\",\n \"@typescript-eslint/eslint-plugin\": \"^8.67.0\",\n \"@typescript-eslint/parser\": \"^8.67.0\",\n \"eslint\": \"^10.0.0\",\n \"markdown-magic\": \"^3.3.0\",\n \"prettier\": \"^2.8.8\",\n \"tsup\": \"^8.5.1\",\n \"tsx\": \"^4.17.0\",\n \"vitest\": \"^4.0.0\"\n },\n \"peerDependencies\": {\n \"eslint\": \"^9.0.0 || ^10.0.0\",\n \"typescript\": \">=4.8.4\"\n },\n \"engines\": {\n \"node\": \">=22.0.0\"\n }\n}\n","/**\n * FIXME: remove this comments and import when below issue is fixed.\n * This import is necessary for type generation due to a bug in the TypeScript compiler.\n * See: https://github.com/microsoft/TypeScript/issues/42873\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport componentsReturnOnce from \"./rules/components-return-once\";\nimport eventHandlers from \"./rules/event-handlers\";\nimport imports from \"./rules/imports\";\nimport jsxNoDuplicateProps from \"./rules/jsx-no-duplicate-props\";\nimport jsxNoScriptUrl from \"./rules/jsx-no-script-url\";\nimport jsxNoUndef from \"./rules/jsx-no-undef\";\nimport jsxUsesVars from \"./rules/jsx-uses-vars\";\nimport noAccessorAsProp from \"./rules/no-accessor-as-prop\";\nimport noBooleanEnumeratedAttribute from \"./rules/no-boolean-enumerated-attribute\";\nimport noBrowserGlobalsInServerFunction from \"./rules/no-browser-globals-in-server-function\";\nimport noDestructure from \"./rules/no-destructure\";\nimport noInnerHTML from \"./rules/no-innerhtml\";\nimport noInvalidServerCapture from \"./rules/no-invalid-server-capture\";\nimport noModuleScopeReactivePrimitive from \"./rules/no-module-scope-reactive-primitive\";\nimport noProxyApis from \"./rules/no-proxy-apis\";\nimport noReactDeps from \"./rules/no-react-deps\";\nimport noReactSpecificProps from \"./rules/no-react-specific-props\";\nimport noReactiveReadInEffectCallback from \"./rules/no-reactive-read-in-effect-callback\";\nimport noRestatedDefaultOptions from \"./rules/no-restated-default-options\";\nimport noSingleArgCreateEffect from \"./rules/no-single-arg-create-effect\";\nimport noStoreMutationOutsideSetter from \"./rules/no-store-mutation-outside-setter\";\nimport noUnknownNamespaces from \"./rules/no-unknown-namespaces\";\nimport noUnusedSignal from \"./rules/no-unused-signal\";\nimport noWriteInPureComputation from \"./rules/no-write-in-pure-computation\";\nimport preferClasslist from \"./rules/prefer-classlist\";\nimport preferFor from \"./rules/prefer-for\";\nimport preferOnSettledForSideEffects from \"./rules/prefer-onSettled-for-side-effects\";\nimport preferShow from \"./rules/prefer-show\";\nimport preferStructuredClass from \"./rules/prefer-structured-class\";\nimport reactivity from \"./rules/reactivity\";\nimport removedApi from \"./rules/removed-api\";\nimport requireAsyncServerFunction from \"./rules/require-async-server-function\";\nimport selfClosingComp from \"./rules/self-closing-comp\";\nimport styleProp from \"./rules/style-prop\";\nimport validUseServer from \"./rules/valid-use-server\";\nimport noArrayHandlers from \"./rules/no-array-handlers\";\n// import validateJsxNesting from \"./rules/validate-jsx-nesting\";\n\n// Use require() so that `package.json` doesn't get copied to `dist`\n// eslint-disable-next-line @typescript-eslint/no-require-imports\nconst { name, version } = require(\"../package.json\");\nconst meta = { name, version };\n\nconst allRules = {\n \"components-return-once\": componentsReturnOnce,\n \"event-handlers\": eventHandlers,\n imports,\n \"jsx-no-duplicate-props\": jsxNoDuplicateProps,\n \"jsx-no-undef\": jsxNoUndef,\n \"jsx-no-script-url\": jsxNoScriptUrl,\n \"jsx-uses-vars\": jsxUsesVars,\n \"no-accessor-as-prop\": noAccessorAsProp,\n \"no-boolean-enumerated-attribute\": noBooleanEnumeratedAttribute,\n \"no-browser-globals-in-server-function\": noBrowserGlobalsInServerFunction,\n \"no-destructure\": noDestructure,\n \"no-innerhtml\": noInnerHTML,\n \"no-invalid-server-capture\": noInvalidServerCapture,\n \"no-module-scope-reactive-primitive\": noModuleScopeReactivePrimitive,\n \"no-proxy-apis\": noProxyApis,\n \"no-react-deps\": noReactDeps,\n \"no-react-specific-props\": noReactSpecificProps,\n \"no-reactive-read-in-effect-callback\": noReactiveReadInEffectCallback,\n \"no-restated-default-options\": noRestatedDefaultOptions,\n \"no-single-arg-create-effect\": noSingleArgCreateEffect,\n \"no-store-mutation-outside-setter\": noStoreMutationOutsideSetter,\n \"no-unknown-namespaces\": noUnknownNamespaces,\n \"no-unused-signal\": noUnusedSignal,\n \"no-write-in-pure-computation\": noWriteInPureComputation,\n \"prefer-classlist\": preferClasslist,\n \"prefer-for\": preferFor,\n \"prefer-onSettled-for-side-effects\": preferOnSettledForSideEffects,\n \"prefer-show\": preferShow,\n \"prefer-structured-class\": preferStructuredClass,\n reactivity,\n \"removed-api\": removedApi,\n \"require-async-server-function\": requireAsyncServerFunction,\n \"self-closing-comp\": selfClosingComp,\n \"style-prop\": styleProp,\n \"valid-use-server\": validUseServer,\n \"no-array-handlers\": noArrayHandlers,\n // \"validate-jsx-nesting\": validateJsxNesting\n};\n\nexport const plugin = { meta, rules: allRules };\n","import type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { plugin } from \"../plugin\";\n\nconst recommended = {\n plugins: {\n solid: plugin,\n },\n languageOptions: {\n sourceType: \"module\",\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n },\n rules: {\n // identifier usage is important\n \"solid/jsx-no-duplicate-props\": 2,\n \"solid/jsx-no-undef\": 2,\n \"solid/jsx-uses-vars\": 2,\n \"solid/no-unknown-namespaces\": 2,\n // security problems\n \"solid/no-innerhtml\": 2,\n \"solid/jsx-no-script-url\": 2,\n // reactivity\n \"solid/components-return-once\": 1,\n \"solid/no-destructure\": 2,\n \"solid/prefer-for\": 2,\n \"solid/reactivity\": 1,\n \"solid/event-handlers\": 1,\n // these rules are mostly style suggestions\n \"solid/imports\": 1,\n \"solid/style-prop\": 1,\n \"solid/no-react-deps\": 1,\n \"solid/no-react-specific-props\": 1,\n \"solid/self-closing-comp\": 1,\n \"solid/no-array-handlers\": 0,\n // handled by Solid compiler, opt-in style suggestion\n \"solid/prefer-show\": 0,\n // only necessary for resource-constrained environments\n \"solid/no-proxy-apis\": 0,\n // deprecated\n \"solid/prefer-classlist\": 0,\n },\n} satisfies TSESLint.FlatConfig.Config;\n\nexport = recommended;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAuC,gBAAgB;AAgBhD,SAAS,cAAc,SAAwB;AACpD,MAAI,OAAO,QAAQ,kBAAkB,YAAY;AAC/C,WAAO,QAAQ,cAAc;AAAA,EAC/B;AACA,SAAO,QAAQ;AACjB;AAEO,SAAS,SAAS,SAAwB,MAA2C;AAC1F,QAAM,aAAa,cAAc,OAAO;AAExC,MAAI,OAAO,WAAW,aAAa,YAAY;AAC7C,WAAO,WAAW,SAAS,IAAI;AAA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;AAAA,QACxB,oBAAoB;AAAA,QACpB,oBAAoB;AAAA,QACpB,wBAAwB;AAAA;AAAA,QAExB,iBAAiB;AAAA,QACjB,oBAAoB;AAAA,QACpB,uBAAuB;AAAA,QACvB,iCAAiC;AAAA,QACjC,2BAA2B;AAAA,QAC3B,2BAA2B;AAAA;AAAA,QAE3B,qBAAqB;AAAA;AAAA,QAErB,uBAAuB;AAAA;AAAA,QAEvB,0BAA0B;AAAA,MAC5B;AAAA,IACF;AAEA,qBAAS;AAAA;AAAA;","names":["name","version","node","name","node","test","consequent","ESLintUtils","ASTUtils","createRule","name","ESLintUtils","createRule","node","ESLintUtils","createRule","name","node","ESLintUtils","ASTUtils","createRule","getStaticValue","ESLintUtils","createRule","isComponent","ESLintUtils","createRule","ESLintUtils","createRule","name","ESLintUtils","createRule","name","ESLintUtils","createRule","name","ESLintUtils","ASTUtils","createRule","isComponent","info","ESLintUtils","ASTUtils","createRule","getStringIfConstant","ESLintUtils","createRule","ESLintUtils","createRule","name","ESLintUtils","createRule","ESLintUtils","createRule","ESLintUtils","createRule","name","symbol","node","member","value","ts","name","source","node","ESLintUtils","name","ESLintUtils","ASTUtils","createRule","ESLintUtils","createRule","ESLintUtils","createRule","setter","ESLintUtils","createRule","ESLintUtils","createRule","setter","ESLintUtils","createRule","isComponent","ESLintUtils","createRule","ESLintUtils","ASTUtils","createRule","ESLintUtils","createRule","name","ESLintUtils","createRule","ESLintUtils","createRule","ESLintUtils","ASTUtils","createRule","name","node","setter","ESLintUtils","createRule","ESLintUtils","ASTUtils","getFunctionHeadLocation","createRule","ESLintUtils","name","createRule","ESLintUtils","ASTUtils","createRule","getPropertyName","getStaticValue","name","ESLintUtils","createRule","name","ESLintUtils","createRule"]}