@lichens-innovation/eslint-plugin-coding-guide 1.0.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 (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +125 -0
  3. package/dist/ast-utils.d.ts +2 -0
  4. package/dist/configs/recommended.d.ts +6 -0
  5. package/dist/create-rule.d.ts +4 -0
  6. package/dist/eslint.config.d.ts +2 -0
  7. package/dist/index.d.ts +114 -0
  8. package/dist/index.js +1294 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/rule-tester.d.ts +2 -0
  11. package/dist/rules/filename-convention-by-export-shape.d.ts +4 -0
  12. package/dist/rules/hoist-static-component-constants.d.ts +5 -0
  13. package/dist/rules/index.d.ts +101 -0
  14. package/dist/rules/max-params-project.d.ts +8 -0
  15. package/dist/rules/no-explicit-undefined-optional.d.ts +4 -0
  16. package/dist/rules/no-exported-mutable-state.d.ts +4 -0
  17. package/dist/rules/no-hook-returning-jsx.d.ts +4 -0
  18. package/dist/rules/no-inline-array-chain-in-jsx.d.ts +4 -0
  19. package/dist/rules/no-inline-curried-handler.d.ts +4 -0
  20. package/dist/rules/no-inline-guard-chain-handler.d.ts +4 -0
  21. package/dist/rules/no-inline-object-param-type.d.ts +4 -0
  22. package/dist/rules/no-inline-render-function.d.ts +5 -0
  23. package/dist/rules/no-jsx-in-variable.d.ts +4 -0
  24. package/dist/rules/no-nested-try.d.ts +4 -0
  25. package/dist/rules/no-non-hook-use-prefix.d.ts +4 -0
  26. package/dist/rules/no-render-fn-in-usecallback.d.ts +4 -0
  27. package/dist/rules/no-tests-in-dunder-folder.d.ts +4 -0
  28. package/dist/rules/no-trivial-usememo.d.ts +4 -0
  29. package/dist/rules/no-unguarded-json-parse.d.ts +4 -0
  30. package/dist/rules/prefer-element-ref-type.d.ts +4 -0
  31. package/dist/rules/prefer-includes-over-or-chain.d.ts +4 -0
  32. package/dist/rules/prefer-jsx-short-circuit.d.ts +4 -0
  33. package/dist/rules/prefer-nullish-helpers.d.ts +4 -0
  34. package/dist/rules/prefer-positive-condition.d.ts +4 -0
  35. package/dist/rules/prefer-props-with-children.d.ts +4 -0
  36. package/dist/rules/prefer-reactnode-over-jsxelement-union.d.ts +4 -0
  37. package/dist/rules/prefer-role-query-over-testid.d.ts +4 -0
  38. package/dist/rules/prefer-some-over-find-check.d.ts +4 -0
  39. package/dist/rules/prefer-state-updater-form.d.ts +4 -0
  40. package/dist/rules/require-effect-cleanup.d.ts +4 -0
  41. package/dist/rules/require-fallback-on-deep-chain.d.ts +7 -0
  42. package/dist/rules/require-numeric-enum-initializer.d.ts +4 -0
  43. package/dist/rules/require-usestate-useref-generic.d.ts +4 -0
  44. package/dist/rules/todo-ticket-ref.d.ts +12 -0
  45. package/dist/vite.config.d.mts +2 -0
  46. package/dist/vitest.config.d.mts +2 -0
  47. package/package.json +92 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/configs/recommended.ts","../src/create-rule.ts","../src/rules/filename-convention-by-export-shape.ts","../src/ast-utils.ts","../src/rules/hoist-static-component-constants.ts","../src/rules/max-params-project.ts","../src/rules/no-explicit-undefined-optional.ts","../src/rules/no-exported-mutable-state.ts","../src/rules/no-hook-returning-jsx.ts","../src/rules/no-inline-array-chain-in-jsx.ts","../src/rules/no-inline-curried-handler.ts","../src/rules/no-inline-guard-chain-handler.ts","../src/rules/no-inline-object-param-type.ts","../src/rules/no-inline-render-function.ts","../src/rules/no-jsx-in-variable.ts","../src/rules/no-nested-try.ts","../src/rules/no-non-hook-use-prefix.ts","../src/rules/no-render-fn-in-usecallback.ts","../src/rules/no-tests-in-dunder-folder.ts","../src/rules/no-trivial-usememo.ts","../src/rules/no-unguarded-json-parse.ts","../src/rules/prefer-element-ref-type.ts","../src/rules/prefer-includes-over-or-chain.ts","../src/rules/prefer-jsx-short-circuit.ts","../src/rules/prefer-nullish-helpers.ts","../src/rules/prefer-positive-condition.ts","../src/rules/prefer-props-with-children.ts","../src/rules/prefer-reactnode-over-jsxelement-union.ts","../src/rules/prefer-role-query-over-testid.ts","../src/rules/prefer-some-over-find-check.ts","../src/rules/prefer-state-updater-form.ts","../src/rules/require-effect-cleanup.ts","../src/rules/require-fallback-on-deep-chain.ts","../src/rules/require-numeric-enum-initializer.ts","../src/rules/require-usestate-useref-generic.ts","../src/rules/todo-ticket-ref.ts","../src/rules/index.ts","../src/index.ts"],"sourcesContent":["import type { ESLint, Linter } from \"eslint\";\n\ninterface CodingGuidePlugin {\n rules: Record<string, unknown>;\n}\n\nexport const recommended = (plugin: CodingGuidePlugin): Linter.Config => ({\n name: \"coding-guide/recommended\",\n files: [\"**/*.{ts,tsx}\"],\n plugins: { \"coding-guide\": plugin as unknown as ESLint.Plugin },\n rules: Object.fromEntries(Object.keys(plugin.rules).map((ruleName) => [`coding-guide/${ruleName}`, \"error\"])),\n});\n","import { ESLintUtils } from \"@typescript-eslint/utils\";\n\nexport const createRule = ESLintUtils.RuleCreator(\n (name) => `https://github.com/Lichens-Innovation/eslint-plugin-coding-guide/blob/main/docs/rules/${name}.md`\n);\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst GENERIC_BASENAMES = new Set([\"utils\", \"types\", \"helpers\", \"constants\", \"config\", \"client\", \"index\"]);\n\nconst KEBAB_SUFFIX_BY_NAME_SUFFIX = [\n { nameSuffix: \"Page\", kebabSuffix: \"-page\" },\n { nameSuffix: \"Dialog\", kebabSuffix: \"-dialog\" },\n { nameSuffix: \"Provider\", kebabSuffix: \"-provider\" },\n];\n\nconst getBasename = (filename: string): string => {\n const withoutDir = filename.replaceAll(\"\\\\\", \"/\").split(\"/\").pop() ?? filename;\n return withoutDir.replace(/\\.(tsx|ts|jsx|js)$/, \"\");\n};\n\ninterface PrimaryExport {\n name: string;\n isFunctionLike: boolean;\n}\n\nconst collectFromVariableDeclaration = (declaration: TSESTree.VariableDeclaration): PrimaryExport[] => {\n const found: PrimaryExport[] = [];\n for (const declarator of declaration.declarations) {\n if (declarator.id.type !== \"Identifier\") continue;\n const isFunctionLike =\n declarator.init?.type === \"ArrowFunctionExpression\" || declarator.init?.type === \"FunctionExpression\";\n found.push({ name: declarator.id.name, isFunctionLike });\n }\n return found;\n};\n\nconst collectPrimaryValueExports = (programBody: readonly TSESTree.ProgramStatement[]): PrimaryExport[] => {\n const exportsFound: PrimaryExport[] = [];\n\n for (const statement of programBody) {\n if (statement.type !== \"ExportNamedDeclaration\" || !statement.declaration) continue;\n const declaration = statement.declaration;\n\n if (declaration.type === \"FunctionDeclaration\" && declaration.id) {\n exportsFound.push({ name: declaration.id.name, isFunctionLike: true });\n continue;\n }\n\n if (declaration.type === \"ClassDeclaration\" && declaration.id) {\n exportsFound.push({ name: declaration.id.name, isFunctionLike: false });\n continue;\n }\n\n if (declaration.type === \"VariableDeclaration\") {\n exportsFound.push(...collectFromVariableDeclaration(declaration));\n }\n }\n\n return exportsFound;\n};\n\nexport default createRule({\n name: \"filename-convention-by-export-shape\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Enforce filename conventions against a file's exported shape\",\n },\n schema: [],\n messages: {\n genericBasename:\n \"'{{basename}}' is a generic root-level filename — prefix it with its domain (e.g. '{{example}}').\",\n hookFilename: \"This file's sole export '{{name}}' is a hook — rename the file to start with 'use-'.\",\n suffixFilename:\n \"This file's sole export '{{name}}' ends in '{{nameSuffix}}' — rename the file to end with '{{kebabSuffix}}'.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n \"Program:exit\"(program: TSESTree.Program) {\n const basename = getBasename(context.filename);\n\n if (GENERIC_BASENAMES.has(basename.toLowerCase())) {\n context.report({\n node: program,\n messageId: \"genericBasename\",\n data: { basename, example: `<domain>.${basename}.ts` },\n });\n }\n\n const primaryExports = collectPrimaryValueExports(program.body);\n if (primaryExports.length !== 1) return;\n\n const [primary] = primaryExports;\n if (!primary.isFunctionLike) return;\n\n const { name } = primary;\n\n if (/^use[A-Z]/.test(name)) {\n if (!basename.startsWith(\"use-\")) {\n context.report({ node: program, messageId: \"hookFilename\", data: { name } });\n }\n return;\n }\n\n for (const { nameSuffix, kebabSuffix } of KEBAB_SUFFIX_BY_NAME_SUFFIX) {\n if (!name.endsWith(nameSuffix)) continue;\n if (!basename.endsWith(kebabSuffix)) {\n context.report({ node: program, messageId: \"suffixFilename\", data: { name, nameSuffix, kebabSuffix } });\n }\n return;\n }\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nconst isNode = (value: unknown): value is TSESTree.Node =>\n typeof value === \"object\" && value !== null && typeof (value as { type?: unknown }).type === \"string\";\n\nexport const getChildNodes = (node: TSESTree.Node): TSESTree.Node[] =>\n Object.entries(node)\n .filter(([key]) => key !== \"parent\")\n .flatMap(([, value]) => (Array.isArray(value) ? value : [value]))\n .filter(isNode);\n","import type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { getChildNodes } from \"../ast-utils.js\";\nimport { createRule } from \"../create-rule.js\";\n\ntype LiteralCollection = TSESTree.ArrayExpression | TSESTree.ObjectExpression;\n\nconst isLiteralCollection = (node?: TSESTree.Node | null): node is LiteralCollection =>\n node?.type === \"ArrayExpression\" || node?.type === \"ObjectExpression\";\n\ninterface IsDescendantScopeArgs {\n scope: TSESLint.Scope.Scope;\n ancestorScope: TSESLint.Scope.Scope;\n}\n\nconst isDescendantScope = ({ scope, ancestorScope }: IsDescendantScopeArgs): boolean => {\n let current: TSESLint.Scope.Scope | null = scope;\n while (current) {\n if (current === ancestorScope) return true;\n current = current.upper;\n }\n return false;\n};\n\ninterface ReferencesLocalBindingArgs {\n node: TSESTree.Node;\n functionScope: TSESLint.Scope.Scope;\n sourceCode: Readonly<TSESLint.SourceCode>;\n}\n\n/** True if any identifier referenced inside `node` resolves to a binding local to `functionScope`. */\nconst referencesLocalBinding = ({ node, functionScope, sourceCode }: ReferencesLocalBindingArgs): boolean => {\n let found = false;\n\n const visit = (current: TSESTree.Node): void => {\n if (found) return;\n\n if (current.type === \"Identifier\") {\n const scope = sourceCode.getScope(current);\n const reference = scope.references.find((ref) => ref.identifier === current);\n const variable = reference?.resolved;\n if (variable && isDescendantScope({ scope: variable.scope, ancestorScope: functionScope })) {\n found = true;\n }\n return;\n }\n\n for (const child of getChildNodes(current)) visit(child);\n };\n\n visit(node);\n return found;\n};\n\nconst isNonEmptyLiteral = (node: LiteralCollection): boolean =>\n (node.type === \"ArrayExpression\" && node.elements.length > 0) ||\n (node.type === \"ObjectExpression\" && node.properties.length > 0);\n\n/** Name of the function that owns `scope` — a component (PascalCase) or a hook (use[A-Z]...). */\nconst getComponentOrHookName = (scope: TSESLint.Scope.Scope): string | undefined => {\n const block = scope.block;\n if (block.type === \"FunctionDeclaration\" && block.id) return block.id.name;\n if (block.parent?.type === \"VariableDeclarator\" && block.parent.id.type === \"Identifier\") {\n return block.parent.id.name;\n }\n return undefined;\n};\n\nconst isComponentOrHookName = (name?: string): boolean => !!name && (/^[A-Z]/.test(name) || /^use[A-Z]/.test(name));\n\nexport default createRule({\n name: \"hoist-static-component-constants\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Disallow a static array/object literal declared inside a component body\",\n },\n schema: [],\n messages: {\n hoist: \"'{{name}}' has no dependency on this component's scope — hoist it to module scope.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const sourceCode = context.sourceCode;\n\n return {\n VariableDeclarator(node) {\n if (node.id.type !== \"Identifier\" || !isLiteralCollection(node.init)) return;\n if (!isNonEmptyLiteral(node.init)) return;\n\n const scope = sourceCode.getScope(node);\n if (scope.type !== \"function\") return;\n if (!isComponentOrHookName(getComponentOrHookName(scope))) return;\n\n if (referencesLocalBinding({ node: node.init, functionScope: scope, sourceCode })) return;\n\n context.report({ node, messageId: \"hoist\", data: { name: node.id.name } });\n },\n };\n },\n});\n","import { ESLintUtils, type TSESLint, type TSESTree } from \"@typescript-eslint/utils\";\nimport type * as ts from \"typescript\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst WRAPPER_TYPES = new Set<string>([\n \"Property\",\n \"ObjectExpression\",\n \"ArrayExpression\",\n \"SpreadElement\",\n \"ChainExpression\",\n \"ConditionalExpression\",\n \"LogicalExpression\",\n \"TSAsExpression\",\n \"TSSatisfiesExpression\",\n \"TSNonNullExpression\",\n \"TSTypeAssertion\",\n]);\n\ntype FunctionLike = TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.ArrowFunctionExpression;\n\nconst EXPLANATION = `\n{{name}} has {{count}} parameters. Maximum allowed is {{max}}.\nThe idea is to group related parameters together into a single object making callsites more readable because the caller needs to explicitly name each parameter.\nThe house style is a named Args interface: capitalize the function name, add an Args suffix, and take a single destructured object of that type. Do not leave the shape inline and anonymous.\nExample:\n interface BuildSiteEquipmentKeyArgs {\n siteSlug?: string;\n equipmentSlug?: string;\n }\n\n const buildSiteEquipmentSlugKey = ({ siteSlug, equipmentSlug }: BuildSiteEquipmentKeyArgs) => {\n // ...\n }\n`;\n\nexport interface Options {\n max?: number;\n}\n\nconst getFunctionName = (node: FunctionLike): string => {\n const parent = node.parent;\n if (node.type === \"ArrowFunctionExpression\") return \"Arrow function\";\n if (parent?.type === \"MethodDefinition\" || (parent?.type === \"Property\" && parent.method)) {\n const key = parent.key;\n if (key.type === \"Identifier\") return `Method '${key.name}'`;\n return \"Method\";\n }\n if (node.type === \"FunctionDeclaration\" && node.id?.name) return `Function '${node.id.name}'`;\n if (parent?.type === \"VariableDeclarator\" && parent.id.type === \"Identifier\") {\n return `Function '${parent.id.name}'`;\n }\n return \"Function\";\n};\n\nconst isJsxAttributeCallback = (node: FunctionLike): boolean => {\n const parent = node.parent;\n if (parent?.type !== \"JSXExpressionContainer\") return false;\n return parent.parent?.type === \"JSXAttribute\";\n};\n\nconst isPassedAsCallArgument = (node: TSESTree.Node): boolean => {\n let current: TSESTree.Node = node;\n const seen = new Set<TSESTree.Node>();\n\n while (current.parent && !seen.has(current)) {\n seen.add(current);\n const parent = current.parent;\n\n if (parent.type === \"CallExpression\" || parent.type === \"NewExpression\") {\n return parent.arguments.includes(current as TSESTree.CallExpressionArgument);\n }\n\n if (WRAPPER_TYPES.has(parent.type)) {\n current = parent;\n continue;\n }\n\n break;\n }\n\n return false;\n};\n\nconst isExternalFile = (fileName: string): boolean => {\n const normalized = fileName.replaceAll(\"\\\\\", \"/\");\n return normalized.includes(\"/node_modules/\") || normalized.includes(\"/typescript/lib/\");\n};\n\nconst typeDeclaredExternally = (type: ts.Type): boolean => {\n const seen = new Set<ts.Type>();\n\n const collectDeclarationFiles = (current: ts.Type): string[] => {\n if (seen.has(current)) return [];\n seen.add(current);\n\n if (current.isUnion() || current.isIntersection()) {\n return current.types.flatMap(collectDeclarationFiles);\n }\n\n const files: string[] = [];\n for (const signature of current.getCallSignatures()) {\n const declaration = signature.getDeclaration();\n if (declaration) files.push(declaration.getSourceFile().fileName);\n }\n\n const symbol = current.aliasSymbol ?? current.getSymbol();\n for (const declaration of symbol?.getDeclarations() ?? []) {\n files.push(declaration.getSourceFile().fileName);\n }\n\n return files;\n };\n\n return collectDeclarationFiles(type).some(isExternalFile);\n};\n\ninterface BaseDeclaresMethodExternallyArgs {\n base: ts.Type;\n methodName: string;\n checker: ts.TypeChecker;\n}\n\nconst baseDeclaresMethodExternally = ({ base, methodName, checker }: BaseDeclaresMethodExternallyArgs): boolean => {\n const property = checker.getPropertyOfType(base, methodName);\n const declarations = property?.getDeclarations() ?? [];\n return declarations.some((declaration) => isExternalFile(declaration.getSourceFile().fileName));\n};\n\ninterface ClassMethodOverridesExternalArgs {\n functionNode: FunctionLike;\n services: ReturnType<typeof ESLintUtils.getParserServices>;\n checker: ts.TypeChecker;\n}\n\nconst classMethodOverridesExternal = ({\n functionNode,\n services,\n checker,\n}: ClassMethodOverridesExternalArgs): boolean => {\n const methodDef = functionNode.parent;\n if (methodDef?.type !== \"MethodDefinition\") return false;\n\n const classLike = methodDef.parent.parent;\n if (classLike.type !== \"ClassDeclaration\" && classLike.type !== \"ClassExpression\") return false;\n\n const methodName = methodDef.key.type === \"Identifier\" ? methodDef.key.name : null;\n if (!methodName) return false;\n\n const tsClass = services.esTreeNodeToTSNodeMap.get(classLike);\n const classType = checker.getTypeAtLocation(tsClass);\n const bases = classType.getBaseTypes() ?? [];\n\n return bases.some((base) => baseDeclaresMethodExternally({ base, methodName, checker }));\n};\n\ninterface IsContextuallyExternalArgs {\n node: FunctionLike;\n tsNode: ts.Node;\n checker: ts.TypeChecker;\n}\n\nconst isContextuallyExternal = ({ node, tsNode, checker }: IsContextuallyExternalArgs): boolean => {\n if (node.type === \"FunctionDeclaration\") return false;\n const contextualType = checker.getContextualType(tsNode as ts.Expression);\n return !!contextualType && typeDeclaredExternally(contextualType);\n};\n\nexport default createRule<[number | Options], \"exceed\">({\n name: \"max-params-project\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Enforce a maximum number of parameters on project-owned functions\",\n },\n schema: [\n {\n oneOf: [\n { type: \"integer\", minimum: 0 },\n {\n type: \"object\",\n properties: { max: { type: \"integer\", minimum: 0 } },\n additionalProperties: false,\n },\n ],\n },\n ],\n messages: {\n exceed: EXPLANATION,\n },\n },\n defaultOptions: [1],\n create(context, [option]) {\n const max = typeof option === \"number\" ? option : (option.max ?? 1);\n\n const findVariable = (identifierNode: TSESTree.Identifier): TSESLint.Scope.Variable | null => {\n let scope: TSESLint.Scope.Scope | null = context.sourceCode.getScope(identifierNode);\n while (scope) {\n const variable = scope.variables.find((candidate) => candidate.name === identifierNode.name);\n if (variable) return variable;\n scope = scope.upper;\n }\n return null;\n };\n\n // Handles `const stateCreator = (set, get) => (...)` — a callback bound to a\n // name and passed by reference later (e.g. zustand's `create(stateCreator)` /\n // `persist(immer(stateCreator), opts)`) instead of inlined at the call site.\n const isImposedThroughVariableUsage = (node: FunctionLike): boolean => {\n const declarator = node.parent;\n if (declarator?.type !== \"VariableDeclarator\" || declarator.init !== node) return false;\n if (declarator.id.type !== \"Identifier\") return false;\n\n const variable = findVariable(declarator.id);\n if (!variable) return false;\n\n return variable.references.some(\n (reference) => reference.identifier !== declarator.id && isPassedAsCallArgument(reference.identifier)\n );\n };\n\n const isImposedByCallee = (node: FunctionLike): boolean => {\n if (isJsxAttributeCallback(node)) return true;\n if (isPassedAsCallArgument(node)) return true;\n return isImposedThroughVariableUsage(node);\n };\n\n const isImposedByExternalType = (node: FunctionLike): boolean => {\n try {\n const services = ESLintUtils.getParserServices(context, true);\n if (!services.program) return false;\n\n const checker = services.program.getTypeChecker();\n const tsNode = services.esTreeNodeToTSNodeMap.get(node);\n if (!tsNode) return false;\n\n if (isContextuallyExternal({ node, tsNode, checker })) return true;\n\n return classMethodOverridesExternal({ functionNode: node, services, checker });\n } catch {\n return false;\n }\n };\n\n const checkFunction = (node: FunctionLike): void => {\n if (node.params.length <= max) return;\n if (isImposedByCallee(node)) return;\n if (isImposedByExternalType(node)) return;\n\n context.report({\n node,\n messageId: \"exceed\",\n data: {\n name: getFunctionName(node),\n count: node.params.length,\n max,\n },\n });\n };\n\n return {\n FunctionDeclaration: checkFunction,\n FunctionExpression: checkFunction,\n ArrowFunctionExpression: checkFunction,\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst isUndefinedKeyword = (typeNode: TSESTree.TypeNode): boolean => typeNode.type === \"TSUndefinedKeyword\";\n\ntype OptionalTarget = TSESTree.TSPropertySignature | TSESTree.PropertyDefinition | TSESTree.Identifier;\n\n/** Resolve the parameter node that owns `optional`/`?`, walking through a TSParameterProperty wrapper. */\nconst getParamOptionalTarget = (\n annotated: TSESTree.Identifier | TSESTree.ObjectPattern | TSESTree.ArrayPattern\n): TSESTree.Identifier | null => {\n const parent = annotated.parent;\n if (!parent) return null;\n if (parent.type === \"AssignmentPattern\") return null; // default value already implies optional\n\n const paramNode = parent.type === \"TSParameterProperty\" ? parent : annotated;\n const container = paramNode.parent;\n if (\n container &&\n \"params\" in container &&\n Array.isArray(container.params) &&\n (container.params as TSESTree.Node[]).includes(paramNode) &&\n annotated.type === \"Identifier\"\n ) {\n return annotated;\n }\n return null;\n};\n\nconst getOptionalTarget = (unionNode: TSESTree.TSUnionType): OptionalTarget | null => {\n const typeAnnotation = unionNode.parent;\n if (!typeAnnotation || typeAnnotation.type !== \"TSTypeAnnotation\") return null;\n\n const annotated = typeAnnotation.parent;\n if (!annotated) return null;\n\n if (annotated.type === \"TSPropertySignature\" || annotated.type === \"PropertyDefinition\") {\n return annotated;\n }\n if (annotated.type === \"Identifier\" || annotated.type === \"ObjectPattern\" || annotated.type === \"ArrayPattern\") {\n return getParamOptionalTarget(annotated);\n }\n return null;\n};\n\nexport default createRule({\n name: \"no-explicit-undefined-optional\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Use `?` instead of an explicit `| undefined` on params/properties that support it\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n useOptionalModifier: \"Do not use explicit `| undefined` to mark {{what}} optional — use `?` instead.\",\n redundantUndefined: \"{{what}} is already optional (`?`) — remove the redundant explicit `undefined`.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const sourceCode = context.sourceCode;\n\n return {\n TSUnionType(node) {\n const remaining = node.types.filter((typeNode) => !isUndefinedKeyword(typeNode));\n if (remaining.length === node.types.length || remaining.length === 0) return;\n\n const target = getOptionalTarget(node);\n if (!target) return;\n\n const alreadyOptional = target.optional === true;\n const what = [\"TSPropertySignature\", \"PropertyDefinition\"].includes(target.type)\n ? \"this property\"\n : \"this parameter\";\n\n context.report({\n node,\n messageId: alreadyOptional ? \"redundantUndefined\" : \"useOptionalModifier\",\n data: { what },\n fix:\n remaining.length === 1\n ? (fixer) => {\n const fixes = [fixer.replaceText(node, sourceCode.getText(remaining[0]))];\n if (!alreadyOptional && node.parent) fixes.push(fixer.insertTextBefore(node.parent, \"?\"));\n return fixes;\n }\n : null,\n });\n },\n };\n },\n});\n","import { createRule } from \"../create-rule.js\";\n\nexport default createRule({\n name: \"no-exported-mutable-state\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Disallow exporting a mutable (let/var) module-scoped binding\",\n },\n schema: [],\n messages: {\n noMutableExport: \"Do not export a mutable ({{kind}}) binding — export a const, or a getter/setter pair.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n ExportNamedDeclaration(node) {\n const declaration = node.declaration;\n if (!declaration || declaration.type !== \"VariableDeclaration\") return;\n if (declaration.kind === \"const\") return;\n\n context.report({\n node,\n messageId: \"noMutableExport\",\n data: { kind: declaration.kind },\n });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { getChildNodes } from \"../ast-utils.js\";\nimport { createRule } from \"../create-rule.js\";\n\nconst HOOK_NAME_RE = /^use[A-Z]/;\n\ntype FunctionLike = TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.ArrowFunctionExpression;\n\ninterface CheckFunctionArgs {\n node: FunctionLike;\n name?: string;\n}\n\nconst isJsxReturn = (node: TSESTree.ReturnStatement): boolean =>\n node.argument?.type === \"JSXElement\" || node.argument?.type === \"JSXFragment\";\n\nconst returnsJsxDirectly = (functionNode: FunctionLike): boolean => {\n let found = false;\n\n const visit = (node: TSESTree.Node): void => {\n if (found) return;\n if (\n node !== functionNode &&\n [\"FunctionDeclaration\", \"FunctionExpression\", \"ArrowFunctionExpression\"].includes(node.type)\n ) {\n return; // don't descend into nested function bodies\n }\n\n if (node.type === \"ReturnStatement\" && isJsxReturn(node)) {\n found = true;\n return;\n }\n\n for (const child of getChildNodes(node)) visit(child);\n };\n\n if ([\"JSXElement\", \"JSXFragment\"].includes(functionNode.body.type)) return true;\n visit(functionNode.body);\n return found;\n};\n\nexport default createRule({\n name: \"no-hook-returning-jsx\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Disallow a use* hook returning JSX\",\n },\n schema: [],\n messages: {\n hookReturnsJsx: \"'{{name}}' is named like a hook but returns JSX — hooks should return data, not markup.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const checkFunction = ({ node, name }: CheckFunctionArgs): void => {\n if (!name || !HOOK_NAME_RE.test(name)) return;\n if (!returnsJsxDirectly(node)) return;\n\n context.report({ node, messageId: \"hookReturnsJsx\", data: { name } });\n };\n\n return {\n FunctionDeclaration(node) {\n checkFunction({ node, name: node.id?.name });\n },\n \"VariableDeclarator > ArrowFunctionExpression\"(node: TSESTree.ArrowFunctionExpression) {\n const declarator = node.parent as TSESTree.VariableDeclarator;\n checkFunction({ node, name: declarator.id.type === \"Identifier\" ? declarator.id.name : undefined });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst CHAINABLE_METHODS = new Set([\"filter\", \"sort\", \"map\", \"reduce\"]);\n\nconst countChainedArrayCalls = (node: TSESTree.Expression): number => {\n let count = 0;\n let current: TSESTree.Expression = node;\n\n while (current.type === \"CallExpression\") {\n const callee = current.callee;\n if (callee.type !== \"MemberExpression\" || callee.computed) break;\n if (callee.property.type !== \"Identifier\" || !CHAINABLE_METHODS.has(callee.property.name)) break;\n\n count += 1;\n if (callee.object.type === \"Super\") break;\n current = callee.object;\n }\n\n return count;\n};\n\nexport default createRule({\n name: \"no-inline-array-chain-in-jsx\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Disallow chained array methods directly inside a JSX expression\",\n },\n schema: [],\n messages: {\n precompute: \"Chained {{count}} array methods inline in JSX — precompute the list with an imported helper.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n JSXExpressionContainer(node) {\n const expression = node.expression;\n if (expression.type !== \"CallExpression\") return;\n\n const count = countChainedArrayCalls(expression);\n if (count < 2) return;\n\n context.report({ node: expression, messageId: \"precompute\", data: { count } });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst isCurriedArrow = (node: TSESTree.Expression): boolean => {\n if (node.type !== \"ArrowFunctionExpression\") return false;\n if (node.body.type === \"ArrowFunctionExpression\") return true;\n if (node.body.type !== \"BlockStatement\") return false;\n\n return node.body.body.some(\n (statement) => statement.type === \"ReturnStatement\" && statement.argument?.type === \"ArrowFunctionExpression\"\n );\n};\n\nexport default createRule({\n name: \"no-inline-curried-handler\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Disallow a curried handler factory declared as a local component variable\",\n },\n schema: [],\n messages: {\n extractToUtils:\n \"'{{name}}' is a curried handler factory declared inside a component — move it to a *.utils.ts file.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n VariableDeclarator(node) {\n if (!node.init || !isCurriedArrow(node.init)) return;\n if (node.id.type !== \"Identifier\") return;\n\n const scope = context.sourceCode.getScope(node);\n if (scope.type !== \"function\") return; // module-scope factories are fine\n\n context.report({ node, messageId: \"extractToUtils\", data: { name: node.id.name } });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst countAndChainOperands = (node: TSESTree.Expression): number => {\n if (node.type === \"LogicalExpression\" && node.operator === \"&&\") {\n return countAndChainOperands(node.left) + countAndChainOperands(node.right);\n }\n return 1;\n};\n\nexport default createRule({\n name: \"no-inline-guard-chain-handler\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Disallow a JSX prop arrow whose body is a long && guard chain\",\n },\n schema: [],\n messages: {\n extractHandler:\n \"JSX prop arrow guards with a {{count}}-term `&&` chain — extract a named handler with early returns.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n JSXAttribute(node) {\n const container = node.value;\n if (container?.type !== \"JSXExpressionContainer\") return;\n\n const expression = container.expression;\n if (expression.type !== \"ArrowFunctionExpression\") return;\n if (expression.body.type !== \"LogicalExpression\" || expression.body.operator !== \"&&\") return;\n\n const count = countAndChainOperands(expression.body);\n if (count < 3) return;\n\n context.report({ node: expression, messageId: \"extractHandler\", data: { count } });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\ntype FunctionLike = TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.ArrowFunctionExpression;\n\nexport default createRule({\n name: \"no-inline-object-param-type\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Disallow inline object type literals on function parameters\",\n },\n schema: [],\n messages: {\n extractInterface: \"Inline object type on this parameter — extract a named `interface` above the function.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const checkParam = (param: TSESTree.Parameter): void => {\n const typeAnnotation = \"typeAnnotation\" in param ? param.typeAnnotation?.typeAnnotation : undefined;\n if (typeAnnotation?.type === \"TSTypeLiteral\") {\n context.report({ node: typeAnnotation, messageId: \"extractInterface\" });\n }\n };\n\n const checkFunction = (node: FunctionLike): void => {\n node.params.forEach(checkParam);\n };\n\n return {\n FunctionDeclaration: checkFunction,\n FunctionExpression: checkFunction,\n ArrowFunctionExpression: checkFunction,\n };\n },\n});\n","import type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst RENDER_NAME_RE = /^render[A-Z]/;\n\n/** True for a locally-declared function/const, false for a parameter (e.g. a render-prop passed in). */\nconst isLocallyDeclaredFunction = (variable?: TSESLint.Scope.Variable): boolean => {\n if (variable?.scope.type !== \"function\") return false;\n const def = variable.defs[0] as { type?: string } | undefined;\n return def?.type === \"FunctionName\" || def?.type === \"Variable\";\n};\n\nconst isInsideJsx = (node: TSESTree.Node): boolean => {\n let current: TSESTree.Node | undefined = node.parent;\n while (current) {\n if (current.type === \"JSXExpressionContainer\") return true;\n current = current.parent;\n }\n return false;\n};\n\nexport default createRule({\n name: \"no-inline-render-function\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Disallow calling a locally-declared render* helper function from within JSX\",\n },\n schema: [],\n messages: {\n extractSubcomponent:\n \"'{{name}}' is a local render helper called from JSX — extract a `<{{suggested}} />` subcomponent instead.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n CallExpression(node) {\n if (node.callee.type !== \"Identifier\" || !RENDER_NAME_RE.test(node.callee.name)) return;\n if (!isInsideJsx(node)) return;\n\n const scope = context.sourceCode.getScope(node);\n const variable = scope.references.find((ref) => ref.identifier === node.callee)?.resolved ?? undefined;\n if (!isLocallyDeclaredFunction(variable)) return;\n\n const name = node.callee.name;\n const suggested = name.slice(\"render\".length) || \"Section\";\n\n context.report({ node, messageId: \"extractSubcomponent\", data: { name, suggested } });\n },\n };\n },\n});\n","import { createRule } from \"../create-rule.js\";\n\nexport default createRule({\n name: \"no-jsx-in-variable\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Disallow storing a JSX element/fragment in a variable\",\n },\n schema: [],\n messages: {\n declareComponent: \"JSX stored in a variable — declare a small named component with explicit props instead.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n VariableDeclarator(node) {\n if (!node.init) return;\n if (node.init.type !== \"JSXElement\" && node.init.type !== \"JSXFragment\") return;\n\n context.report({ node, messageId: \"declareComponent\" });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nexport default createRule({\n name: \"no-nested-try\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Disallow nesting a try statement inside another try block or catch handler\",\n },\n schema: [],\n messages: {\n nestedTry: \"Nested try/catch — flatten into a single try/catch that handles both error paths.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n TryStatement(node) {\n let previous: TSESTree.Node = node;\n let current: TSESTree.Node | undefined = node.parent;\n\n while (current) {\n if ([\"FunctionDeclaration\", \"FunctionExpression\", \"ArrowFunctionExpression\"].includes(current.type)) {\n return;\n }\n\n if (current.type === \"TryStatement\" && (previous === current.block || previous === current.handler)) {\n context.report({ node, messageId: \"nestedTry\" });\n return;\n }\n\n previous = current;\n current = current.parent;\n }\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { getChildNodes } from \"../ast-utils.js\";\nimport { createRule } from \"../create-rule.js\";\n\nconst HOOK_NAME_RE = /^use[A-Z]/;\n\ntype FunctionLike = TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.ArrowFunctionExpression;\n\ninterface CheckFunctionArgs {\n node: FunctionLike;\n name?: string;\n}\n\nconst callsAHook = (node: TSESTree.Node): boolean => {\n if (node.type === \"CallExpression\" && node.callee.type === \"Identifier\" && HOOK_NAME_RE.test(node.callee.name)) {\n return true;\n }\n\n return getChildNodes(node).some((child) => callsAHook(child));\n};\n\nexport default createRule({\n name: \"no-non-hook-use-prefix\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Disallow a use* named function whose body calls no hook\",\n },\n schema: [],\n messages: {\n misnamed: \"'{{name}}' is named like a hook but calls no hook internally — rename it to a plain action verb.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const checkFunction = ({ node, name }: CheckFunctionArgs): void => {\n if (!name || !HOOK_NAME_RE.test(name)) return;\n if (callsAHook(node.body)) return;\n\n context.report({ node, messageId: \"misnamed\", data: { name } });\n };\n\n return {\n FunctionDeclaration(node) {\n checkFunction({ node, name: node.id?.name });\n },\n \"VariableDeclarator > ArrowFunctionExpression\"(node: TSESTree.ArrowFunctionExpression) {\n const declarator = node.parent as TSESTree.VariableDeclarator;\n checkFunction({ node, name: declarator.id.type === \"Identifier\" ? declarator.id.name : undefined });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst RENDER_NAME_RE = /^render/i;\n\ntype FunctionLike = TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression;\n\nconst callbackReturnsJsx = (fn?: FunctionLike): boolean => {\n if (!fn) return false;\n if ([\"JSXElement\", \"JSXFragment\"].includes(fn.body.type)) return true;\n if (fn.body.type !== \"BlockStatement\") return false;\n\n return fn.body.body.some(\n (statement) =>\n statement.type === \"ReturnStatement\" &&\n statement.argument &&\n [\"JSXElement\", \"JSXFragment\"].includes(statement.argument.type)\n );\n};\n\nexport default createRule({\n name: \"no-render-fn-in-usecallback\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Disallow useCallback wrapping a JSX-returning or render*-named function\",\n },\n schema: [],\n messages: {\n extractSubcomponent:\n \"useCallback wraps a render function — extract a `<Component />` instead; reserve useCallback for event handlers.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n CallExpression(node) {\n if (node.callee.type !== \"Identifier\" || node.callee.name !== \"useCallback\") return;\n\n const [callback] = node.arguments;\n if (!callback || (callback.type !== \"ArrowFunctionExpression\" && callback.type !== \"FunctionExpression\")) {\n return;\n }\n\n const declarator = node.parent.type === \"VariableDeclarator\" ? node.parent : null;\n const boundName = declarator?.id.type === \"Identifier\" ? declarator.id.name : \"\";\n\n if (!callbackReturnsJsx(callback) && !RENDER_NAME_RE.test(boundName)) return;\n\n context.report({ node, messageId: \"extractSubcomponent\" });\n },\n };\n },\n});\n","import { createRule } from \"../create-rule.js\";\n\nexport default createRule({\n name: \"no-tests-in-dunder-folder\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Disallow test files inside a __tests__ folder\",\n },\n schema: [],\n messages: {\n colocate: \"This test lives in a `__tests__` folder — colocate it as `*.test.ts(x)` next to its source file.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n Program(node) {\n const filename = context.filename.replaceAll(\"\\\\\", \"/\");\n if (!filename.includes(\"/__tests__/\")) return;\n\n context.report({ node, messageId: \"colocate\" });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { getChildNodes } from \"../ast-utils.js\";\nimport { createRule } from \"../create-rule.js\";\n\nconst containsCallExpression = (node: TSESTree.Node): boolean => {\n if ([\"CallExpression\", \"NewExpression\"].includes(node.type)) return true;\n return getChildNodes(node).some((child) => containsCallExpression(child));\n};\n\nexport default createRule({\n name: \"no-trivial-usememo\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Disallow useMemo whose body has no function call (likely unnecessary memoization)\",\n },\n schema: [],\n messages: {\n unnecessaryMemo: \"useMemo body has no function call inside — likely too trivial to be worth memoizing.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n CallExpression(node) {\n if (node.callee.type !== \"Identifier\" || node.callee.name !== \"useMemo\") return;\n\n const [callback] = node.arguments;\n if (!callback || callback.type !== \"ArrowFunctionExpression\") return;\n\n const bodyToCheck =\n callback.body.type === \"BlockStatement\"\n ? callback.body.body.find((statement) => statement.type === \"ReturnStatement\")?.argument\n : callback.body;\n\n if (!bodyToCheck) return;\n if (containsCallExpression(bodyToCheck)) return;\n\n context.report({ node, messageId: \"unnecessaryMemo\" });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst isJsonParseCall = (node: TSESTree.CallExpression): boolean =>\n node.callee.type === \"MemberExpression\" &&\n node.callee.object.type === \"Identifier\" &&\n node.callee.object.name === \"JSON\" &&\n node.callee.property.type === \"Identifier\" &&\n node.callee.property.name === \"parse\";\n\n/** Walk up from `node`, stopping at the first TryStatement/function boundary encountered. */\nconst isInsideTryBlock = (node: TSESTree.Node): boolean => {\n let current: TSESTree.Node | undefined = node;\n let previous: TSESTree.Node | undefined;\n\n while (current) {\n if (current.type === \"TryStatement\" && previous === current.block) return true;\n if ([\"FunctionDeclaration\", \"FunctionExpression\", \"ArrowFunctionExpression\"].includes(current.type)) {\n return false;\n }\n\n previous = current;\n current = current.parent;\n }\n\n return false;\n};\n\nexport default createRule({\n name: \"no-unguarded-json-parse\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Require JSON.parse(...) to be wrapped in a try/catch\",\n },\n schema: [],\n messages: {\n unguarded: \"JSON.parse(...) can throw on malformed input — wrap it in a try/catch.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n CallExpression(node) {\n if (!isJsonParseCall(node)) return;\n if (isInsideTryBlock(node)) return;\n\n context.report({ node, messageId: \"unguarded\" });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst TAG_BY_HTML_ELEMENT: Record<string, string> = {\n HTMLDivElement: \"div\",\n HTMLSpanElement: \"span\",\n HTMLButtonElement: \"button\",\n HTMLInputElement: \"input\",\n HTMLTextAreaElement: \"textarea\",\n HTMLSelectElement: \"select\",\n HTMLFormElement: \"form\",\n HTMLAnchorElement: \"a\",\n HTMLUListElement: \"ul\",\n HTMLLIElement: \"li\",\n HTMLTableElement: \"table\",\n HTMLCanvasElement: \"canvas\",\n HTMLVideoElement: \"video\",\n HTMLAudioElement: \"audio\",\n HTMLImageElement: \"img\",\n HTMLParagraphElement: \"p\",\n HTMLHeadingElement: \"h1\",\n HTMLLabelElement: \"label\",\n};\n\nconst hasElementRefImported = (program: TSESTree.Program): boolean =>\n program.body.some(\n (statement) =>\n statement.type === \"ImportDeclaration\" &&\n statement.source.value === \"react\" &&\n statement.specifiers.some(\n (specifier) =>\n specifier.type === \"ImportSpecifier\" &&\n specifier.imported.type === \"Identifier\" &&\n specifier.imported.name === \"ElementRef\"\n )\n );\n\nexport default createRule({\n name: \"prefer-element-ref-type\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: 'Prefer useRef<ElementRef<\"tag\">>(null) over a raw HTMLXxxElement type argument',\n },\n fixable: \"code\",\n schema: [],\n messages: {\n preferElementRef: 'Use `ElementRef<\"{{tag}}\">` instead of `{{typeName}}` for this ref.',\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n CallExpression(node) {\n if (node.callee.type !== \"Identifier\" || node.callee.name !== \"useRef\") return;\n\n const typeArg = node.typeArguments?.params[0];\n if (!typeArg || typeArg.type !== \"TSTypeReference\" || typeArg.typeName.type !== \"Identifier\") return;\n\n const typeName = typeArg.typeName.name;\n if (!/^HTML\\w*Element$/.test(typeName)) return;\n\n const tag = TAG_BY_HTML_ELEMENT[typeName];\n if (!tag) {\n context.report({ node: typeArg, messageId: \"preferElementRef\", data: { typeName, tag: \"?\" } });\n return;\n }\n\n const canAutofix = hasElementRefImported(context.sourceCode.ast);\n\n context.report({\n node: typeArg,\n messageId: \"preferElementRef\",\n data: { typeName, tag },\n fix: canAutofix ? (fixer) => fixer.replaceText(typeArg, `ElementRef<\"${tag}\">`) : undefined,\n });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst flattenOrChain = (node: TSESTree.Expression): TSESTree.Expression[] => {\n if (node.type === \"LogicalExpression\" && node.operator === \"||\") {\n return [...flattenOrChain(node.left), ...flattenOrChain(node.right)];\n }\n\n return [node];\n};\n\nconst isEqualityToLiteral = (node: TSESTree.Expression): node is TSESTree.BinaryExpression =>\n node.type === \"BinaryExpression\" && [\"===\", \"==\"].includes(node.operator) && node.right.type === \"Literal\";\n\nexport default createRule({\n name: \"prefer-includes-over-or-chain\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Prefer Array#includes over a chain of === comparisons against the same value\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n preferIncludes: \"Repeated equality checks against the same value — use `[...].includes(...)` instead.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const sourceCode = context.sourceCode;\n\n return {\n LogicalExpression(node) {\n if (node.operator !== \"||\") return;\n if (node.parent.type === \"LogicalExpression\" && node.parent.operator === \"||\") return; // only report the outermost chain\n\n const operands = flattenOrChain(node);\n if (operands.length < 2) return;\n if (!operands.every(isEqualityToLiteral)) return;\n\n const binaryOperands = operands as TSESTree.BinaryExpression[];\n const lhsTexts = binaryOperands.map((operand) => sourceCode.getText(operand.left));\n const [firstLhs] = lhsTexts;\n if (!lhsTexts.every((text) => text === firstLhs)) return;\n\n context.report({\n node,\n messageId: \"preferIncludes\",\n fix: (fixer) => {\n const literalsText = binaryOperands.map((operand) => sourceCode.getText(operand.right)).join(\", \");\n return fixer.replaceText(node, `[${literalsText}].includes(${firstLhs})`);\n },\n });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\nimport type { Type } from \"typescript\";\n\nimport { createRule } from \"../create-rule.js\";\n\n// Mirrors the ts.TypeFlags bit values we need — avoids a runtime dependency on\n// the \"typescript\" package just for these constants (the `Type` values themselves\n// come from the consumer's own type-aware parser services at lint time).\nconst TYPE_FLAG_UNDEFINED = 4;\nconst TYPE_FLAG_NULL = 8;\nconst TYPE_FLAG_VOID = 16;\nconst TYPE_FLAG_BOOLEAN = 256;\nconst TYPE_FLAG_BOOLEAN_LITERAL = 8192;\nconst TYPE_FLAG_NEVER = 262144;\nconst BOOLEANISH_FLAGS =\n TYPE_FLAG_BOOLEAN |\n TYPE_FLAG_BOOLEAN_LITERAL |\n TYPE_FLAG_NULL |\n TYPE_FLAG_UNDEFINED |\n TYPE_FLAG_VOID |\n TYPE_FLAG_NEVER;\n\nconst unwrap = (node: TSESTree.Expression): TSESTree.Expression => {\n let current: TSESTree.Expression = node;\n while (\n current.type === \"TSAsExpression\" ||\n current.type === \"TSSatisfiesExpression\" ||\n current.type === \"TSTypeAssertion\" ||\n current.type === \"TSNonNullExpression\" ||\n current.type === \"ChainExpression\"\n ) {\n current = current.expression;\n }\n return current;\n};\n\nconst isJsxNode = (node?: TSESTree.Node): node is TSESTree.JSXElement | TSESTree.JSXFragment =>\n !!node && [\"JSXElement\", \"JSXFragment\"].includes(node.type);\n\nconst isJsxChildExpression = (node: TSESTree.Node): boolean => {\n const container = node.parent;\n if (!container || container.type !== \"JSXExpressionContainer\") return false;\n const grandparent = container.parent;\n return !!grandparent && [\"JSXElement\", \"JSXFragment\"].includes(grandparent.type);\n};\n\nconst isDiscardedNode = (node: TSESTree.Expression): boolean => {\n const inner = unwrap(node);\n if (inner.type === \"Literal\" && (inner.value === null || inner.value === false)) return true;\n return inner.type === \"Identifier\" && inner.name === \"undefined\";\n};\n\nconst isLengthAccess = (node: TSESTree.Expression): boolean => {\n const inner = unwrap(node);\n return (\n inner.type === \"MemberExpression\" &&\n !inner.computed &&\n inner.property.type === \"Identifier\" &&\n inner.property.name === \"length\"\n );\n};\n\nconst isSyntacticallyBoolean = (node: TSESTree.Expression): boolean => {\n const inner = unwrap(node);\n if (inner.type === \"UnaryExpression\" && inner.operator === \"!\") return true;\n if (inner.type === \"BinaryExpression\") return true;\n if (inner.type === \"CallExpression\") return true;\n if (inner.type === \"Literal\" && typeof inner.value === \"boolean\") return true;\n if (inner.type === \"LogicalExpression\" && inner.operator === \"&&\") {\n return isSyntacticallyBoolean(inner.left) && isSyntacticallyBoolean(inner.right);\n }\n return false;\n};\n\nconst isBooleanishType = (type?: Type): boolean => {\n if (!type) return false;\n if (type.flags & BOOLEANISH_FLAGS) return true;\n if (type.isUnion()) return type.types.every(isBooleanishType);\n return false;\n};\n\nconst collectNonJsxAndLeaves = (node: TSESTree.Expression): TSESTree.Expression[] => {\n if (isJsxNode(node)) return [];\n if (node.type === \"LogicalExpression\" && node.operator === \"&&\") {\n return [...collectNonJsxAndLeaves(node.left), ...collectNonJsxAndLeaves(node.right)];\n }\n return [node];\n};\n\nexport default createRule({\n name: \"prefer-jsx-short-circuit\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Prefer && short-circuit for optional JSX, with a boolean left side\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n preferShortCircuit: \"Use `&&` short-circuit instead of `cond ? jsx : null` for optional rendering.\",\n requireBooleanGuard:\n \"Left side of `&&` in JSX may leak a non-boolean value — use `!!value` or a boolean comparison.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const sourceCode = context.sourceCode;\n\n const getTextPreservingParens = (node: TSESTree.Node): string => {\n const tokenBefore = sourceCode.getTokenBefore(node);\n const tokenAfter = sourceCode.getTokenAfter(node);\n if (tokenBefore?.value === \"(\" && tokenAfter?.value === \")\") {\n return sourceCode.text.slice(tokenBefore.range[0], tokenAfter.range[1]);\n }\n return sourceCode.getText(node);\n };\n\n const getTypeAtNode = (node: TSESTree.Node): Type | undefined => {\n try {\n const services = sourceCode.parserServices;\n if (!services?.program || !services.esTreeNodeToTSNodeMap) return undefined;\n const tsNode = services.esTreeNodeToTSNodeMap.get(node);\n if (!tsNode) return undefined;\n return services.program.getTypeChecker().getTypeAtLocation(tsNode);\n } catch {\n return undefined;\n }\n };\n\n const needsBooleanCoerce = (node: TSESTree.Expression): boolean => {\n if (isSyntacticallyBoolean(node)) return false;\n if (isLengthAccess(node)) return true;\n\n const type = getTypeAtNode(node);\n if (type) return !isBooleanishType(type);\n\n const inner = unwrap(node);\n if (inner.type === \"Identifier\") return false;\n if (inner.type === \"Literal\" && typeof inner.value === \"boolean\") return false;\n return inner.type !== \"JSXElement\" && inner.type !== \"JSXFragment\";\n };\n\n const coerceText = (node: TSESTree.Expression): string => {\n const text = sourceCode.getText(node);\n if (isLengthAccess(node)) return `${text} > 0`;\n const inner = unwrap(node);\n if ([\"Identifier\", \"MemberExpression\", \"ChainExpression\"].includes(inner.type)) {\n return `!!${text}`;\n }\n return `!!(${text})`;\n };\n\n const formatBooleanTest = (node: TSESTree.Expression): string => {\n if (node.type === \"LogicalExpression\" && node.operator === \"&&\") {\n return `${formatBooleanTest(node.left)} && ${formatBooleanTest(node.right)}`;\n }\n if (needsBooleanCoerce(node)) return coerceText(node);\n return sourceCode.getText(node);\n };\n\n return {\n \"JSXExpressionContainer > ConditionalExpression\"(node: TSESTree.Node) {\n if (node.type !== \"ConditionalExpression\") return;\n if (!isJsxChildExpression(node)) return;\n if (!isJsxNode(node.consequent) || !isDiscardedNode(node.alternate)) return;\n\n context.report({\n node,\n messageId: \"preferShortCircuit\",\n fix: (fixer) => {\n const testText = formatBooleanTest(node.test);\n const consequentText = getTextPreservingParens(node.consequent);\n return fixer.replaceText(node, `${testText} && ${consequentText}`);\n },\n });\n },\n\n \"JSXExpressionContainer > LogicalExpression[operator='&&']\"(node: TSESTree.Node) {\n if (node.type !== \"LogicalExpression\") return;\n if (!isJsxChildExpression(node)) return;\n\n for (const leaf of collectNonJsxAndLeaves(node)) {\n if (!needsBooleanCoerce(leaf)) continue;\n\n context.report({\n node: leaf,\n messageId: \"requireBooleanGuard\",\n fix: (fixer) => fixer.replaceText(leaf, coerceText(leaf)),\n });\n }\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst isNullOrUndefinedLiteral = (node: TSESTree.Expression): boolean =>\n (node.type === \"Literal\" && node.value === null) || (node.type === \"Identifier\" && node.name === \"undefined\");\n\nexport default createRule({\n name: \"prefer-nullish-helpers\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Prefer isNullish/!isNullish over a manual null-and-undefined comparison pair\",\n },\n schema: [],\n messages: {\n preferNotNullish: \"Manual `!== null && !== undefined` pair — use `!isNullish({{expr}})` instead.\",\n preferNullish: \"Manual `=== null || === undefined` pair — use `isNullish({{expr}})` instead.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const sourceCode = context.sourceCode;\n\n interface CheckPairArgs {\n node: TSESTree.LogicalExpression;\n operator: \"!==\" | \"===\";\n logicalOperator: \"&&\" | \"||\";\n messageId: \"preferNotNullish\" | \"preferNullish\";\n }\n\n const checkPair = ({ node, operator, logicalOperator, messageId }: CheckPairArgs): void => {\n if (node.operator !== logicalOperator) return;\n\n const matchesNullishComparison = (side: TSESTree.Expression): side is TSESTree.BinaryExpression =>\n side.type === \"BinaryExpression\" && side.operator === operator && isNullOrUndefinedLiteral(side.right);\n\n if (!matchesNullishComparison(node.left)) return;\n if (!matchesNullishComparison(node.right)) return;\n\n const leftExpr = sourceCode.getText(node.left.left);\n const rightExpr = sourceCode.getText(node.right.left);\n if (leftExpr !== rightExpr) return;\n\n context.report({\n node,\n messageId,\n data: { expr: leftExpr },\n });\n };\n\n return {\n LogicalExpression(node) {\n checkPair({ node, operator: \"!==\", logicalOperator: \"&&\", messageId: \"preferNotNullish\" });\n checkPair({ node, operator: \"===\", logicalOperator: \"||\", messageId: \"preferNullish\" });\n },\n };\n },\n});\n","import { createRule } from \"../create-rule.js\";\n\nexport default createRule({\n name: \"prefer-positive-condition\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Prefer a positive condition in a ternary over a negated one with swapped branches\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n preferPositive: \"Negated ternary condition — swap the branches and drop the `!` instead.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const sourceCode = context.sourceCode;\n\n return {\n ConditionalExpression(node) {\n const test = node.test;\n if (test.type !== \"UnaryExpression\" || test.operator !== \"!\" || !test.prefix) return;\n\n context.report({\n node,\n messageId: \"preferPositive\",\n fix: (fixer) => {\n const innerTest = sourceCode.getText(test.argument);\n const consequentText = sourceCode.getText(node.consequent);\n const alternateText = sourceCode.getText(node.alternate);\n return fixer.replaceText(node, `${innerTest} ? ${alternateText} : ${consequentText}`);\n },\n });\n },\n };\n },\n});\n","import { createRule } from \"../create-rule.js\";\n\nexport default createRule({\n name: \"prefer-props-with-children\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Prefer PropsWithChildren<Props> over a hand-declared children property\",\n },\n schema: [],\n messages: {\n preferPropsWithChildren:\n \"'{{name}}' hand-declares a `children` property — wrap the props type in `PropsWithChildren<...>` instead.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n TSInterfaceDeclaration(node) {\n const childrenProperty = node.body.body.find(\n (member) =>\n member.type === \"TSPropertySignature\" && member.key.type === \"Identifier\" && member.key.name === \"children\"\n );\n if (!childrenProperty) return;\n\n context.report({\n node: childrenProperty,\n messageId: \"preferPropsWithChildren\",\n data: { name: node.id.name },\n });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst isJsxElementOrReactElementType = (node: TSESTree.TypeNode): boolean => {\n if (node.type !== \"TSTypeReference\") return false;\n const typeName = node.typeName;\n\n if (typeName.type === \"TSQualifiedName\") {\n return typeName.left.type === \"Identifier\" && typeName.left.name === \"JSX\" && typeName.right.name === \"Element\";\n }\n\n return typeName.type === \"Identifier\" && [\"ReactElement\", \"JSX.Element\"].includes(typeName.name);\n};\n\nconst isNullOrUndefinedKeyword = (node: TSESTree.TypeNode): boolean =>\n [\"TSNullKeyword\", \"TSUndefinedKeyword\"].includes(node.type);\n\nconst hasReactNodeImported = (program: TSESTree.Program): boolean =>\n program.body.some(\n (statement) =>\n statement.type === \"ImportDeclaration\" &&\n statement.source.value === \"react\" &&\n statement.specifiers.some(\n (specifier) =>\n specifier.type === \"ImportSpecifier\" &&\n specifier.imported.type === \"Identifier\" &&\n specifier.imported.name === \"ReactNode\"\n )\n );\n\nexport default createRule({\n name: \"prefer-reactnode-over-jsxelement-union\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Prefer ReactNode over a JSX.Element | null | undefined union\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n preferReactNode: \"Use `ReactNode` instead of a `JSX.Element`/`ReactElement` union with null/undefined.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n TSUnionType(node) {\n const hasElementType = node.types.some(isJsxElementOrReactElementType);\n const hasNullish = node.types.some(isNullOrUndefinedKeyword);\n if (!hasElementType || !hasNullish) return;\n\n const canAutofix = hasReactNodeImported(context.sourceCode.ast);\n\n context.report({\n node,\n messageId: \"preferReactNode\",\n fix: canAutofix ? (fixer) => fixer.replaceText(node, \"ReactNode\") : undefined,\n });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst TESTID_QUERY_RE = /^(get|query|find)(All)?ByTestId$/;\n\ninterface CheckNameArgs {\n node: TSESTree.Node;\n name: string;\n}\n\nexport default createRule({\n name: \"prefer-role-query-over-testid\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Prefer Testing Library's *ByRole queries over *ByTestId\",\n },\n schema: [],\n messages: {\n preferRole: \"'{{name}}' — prefer the equivalent `*ByRole` query for a semantic, accessible selector.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const checkName = ({ node, name }: CheckNameArgs): void => {\n if (!TESTID_QUERY_RE.test(name)) return;\n context.report({ node, messageId: \"preferRole\", data: { name } });\n };\n\n return {\n CallExpression(node) {\n if (node.callee.type === \"Identifier\") {\n checkName({ node, name: node.callee.name });\n } else if (node.callee.type === \"MemberExpression\" && node.callee.property.type === \"Identifier\") {\n checkName({ node: node.callee.property, name: node.callee.property.name });\n }\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst isFindCall = (node: TSESTree.Node): node is TSESTree.CallExpression =>\n node.type === \"CallExpression\" &&\n node.callee.type === \"MemberExpression\" &&\n !node.callee.computed &&\n node.callee.property.type === \"Identifier\" &&\n node.callee.property.name === \"find\";\n\nexport default createRule({\n name: \"prefer-some-over-find-check\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Prefer Array#some over comparing Array#find's result to undefined\",\n },\n fixable: \"code\",\n schema: [],\n messages: {\n preferSome: \"Use `.some(...)` instead of comparing `.find(...)` to undefined for an existence check.\",\n },\n },\n defaultOptions: [],\n create(context) {\n const sourceCode = context.sourceCode;\n\n const toSomeCallText = (findCallNode: TSESTree.CallExpression): string => {\n const callee = findCallNode.callee as TSESTree.MemberExpression;\n const calleeText = sourceCode.getText(callee.object);\n const argsText = findCallNode.arguments.map((arg) => sourceCode.getText(arg)).join(\", \");\n return `${calleeText}.some(${argsText})`;\n };\n\n return {\n BinaryExpression(node) {\n if (node.operator !== \"!==\" && node.operator !== \"===\") return;\n\n const [findSide, otherSide] =\n node.left.type === \"CallExpression\" ? [node.left, node.right] : [node.right, node.left];\n\n if (!isFindCall(findSide)) return;\n if (otherSide.type !== \"Identifier\" || otherSide.name !== \"undefined\") return;\n\n const negate = node.operator === \"===\";\n\n context.report({\n node,\n messageId: \"preferSome\",\n fix: (fixer) => {\n const someText = toSomeCallText(findSide);\n return fixer.replaceText(node, negate ? `!${someText}` : someText);\n },\n });\n },\n UnaryExpression(node) {\n if (node.operator !== \"!\" || !node.prefix) return;\n const findCall = node.argument;\n if (!isFindCall(findCall)) return;\n\n context.report({\n node,\n messageId: \"preferSome\",\n fix: (fixer) => fixer.replaceText(node, `!${toSomeCallText(findCall)}`),\n });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst decapitalize = (name: string): string => name.charAt(0).toLowerCase() + name.slice(1);\n\ninterface NonReferencePositionArgs {\n node: TSESTree.Node;\n key: string;\n}\n\n/** Skip AST fields that hold a property/method *name* rather than a variable reference. */\nconst isNonReferencePosition = ({ node, key }: NonReferencePositionArgs): boolean => {\n if ((node.type === \"MemberExpression\" || node.type === \"MethodDefinition\") && key === \"property\" && !node.computed) {\n return true;\n }\n if (node.type === \"Property\" && key === \"key\" && !node.computed) return true;\n return false;\n};\n\nconst isAstNode = (value: unknown): value is TSESTree.Node =>\n !!value && typeof value === \"object\" && typeof (value as { type?: unknown }).type === \"string\";\n\nconst makeReferencesIdentifier = (name: string): ((node: unknown) => boolean) => {\n const referencesIdentifier = (node: unknown): boolean => {\n if (!isAstNode(node)) return false;\n if (node.type === \"Identifier\" && node.name === name) return true;\n\n for (const key of Object.keys(node)) {\n if (key === \"parent\" || isNonReferencePosition({ node, key })) continue;\n const value = (node as unknown as Record<string, unknown>)[key];\n const matches = Array.isArray(value) ? value.some(referencesIdentifier) : referencesIdentifier(value);\n if (matches) return true;\n }\n\n return false;\n };\n\n return referencesIdentifier;\n};\n\nexport default createRule({\n name: \"prefer-state-updater-form\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Prefer the updater-function form of a state setter when the new value depends on the current one\",\n },\n schema: [],\n messages: {\n preferUpdaterForm:\n \"'{{setter}}' argument references '{{state}}' directly — use the updater form `{{setter}}((current) => ...)` instead.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n CallExpression(node) {\n if (node.callee.type !== \"Identifier\" || !/^set[A-Z]/.test(node.callee.name)) return;\n if (node.arguments.length !== 1) return;\n\n const [arg] = node.arguments;\n if ([\"ArrowFunctionExpression\", \"FunctionExpression\"].includes(arg.type)) return; // already updater form\n\n const stateName = decapitalize(node.callee.name.slice(\"set\".length));\n if (!makeReferencesIdentifier(stateName)(arg)) return;\n\n context.report({\n node,\n messageId: \"preferUpdaterForm\",\n data: { setter: node.callee.name, state: stateName },\n });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst RISKY_CALL_NAMES = new Set([\"setInterval\", \"setTimeout\", \"addEventListener\", \"subscribe\"]);\n\nconst isAstNode = (value: unknown): value is TSESTree.Node =>\n !!value && typeof value === \"object\" && typeof (value as { type?: unknown }).type === \"string\";\n\nconst isRiskyRegistration = (node: TSESTree.Node): boolean => {\n if (node.type !== \"CallExpression\") return false;\n if (node.callee.type === \"Identifier\") return RISKY_CALL_NAMES.has(node.callee.name);\n if (node.callee.type === \"MemberExpression\" && node.callee.property.type === \"Identifier\") {\n return RISKY_CALL_NAMES.has(node.callee.property.name);\n }\n return false;\n};\n\n/** Don't descend into nested (already independently-scoped) functions. */\nconst containsRiskyRegistration = (node: unknown): boolean => {\n if (!isAstNode(node)) return false;\n if (isRiskyRegistration(node)) return true;\n if ([\"FunctionDeclaration\", \"FunctionExpression\", \"ArrowFunctionExpression\"].includes(node.type)) {\n return false;\n }\n\n for (const key of Object.keys(node)) {\n if (key === \"parent\") continue;\n const value = (node as unknown as Record<string, unknown>)[key];\n const matches = Array.isArray(value)\n ? value.some((child) => containsRiskyRegistration(child))\n : containsRiskyRegistration(value);\n if (matches) return true;\n }\n\n return false;\n};\n\nconst hasCleanupReturn = (blockStatement: TSESTree.BlockStatement): boolean =>\n blockStatement.body.some(\n (statement) =>\n statement.type === \"ReturnStatement\" &&\n statement.argument !== null &&\n [\"ArrowFunctionExpression\", \"FunctionExpression\"].includes(statement.argument.type)\n );\n\nexport default createRule({\n name: \"require-effect-cleanup\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Require a cleanup return from a useEffect that registers a timer/listener/subscription\",\n },\n schema: [],\n messages: {\n requireCleanup: \"This effect registers a {{what}} but returns no cleanup function to tear it down.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n CallExpression(node) {\n if (node.callee.type !== \"Identifier\" || node.callee.name !== \"useEffect\") return;\n\n const [callback] = node.arguments;\n if (\n !callback ||\n (callback.type !== \"ArrowFunctionExpression\" && callback.type !== \"FunctionExpression\") ||\n callback.body.type !== \"BlockStatement\"\n ) {\n return;\n }\n if (!containsRiskyRegistration(callback.body)) return;\n if (hasCleanupReturn(callback.body)) return;\n\n context.report({ node, messageId: \"requireCleanup\", data: { what: \"interval/listener/subscription\" } });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nexport interface Options {\n minDepth?: number;\n}\n\nconst countOptionalDepth = (node: TSESTree.Node): number => {\n let depth = 0;\n let current: TSESTree.Node = node;\n\n while (current.type === \"MemberExpression\" || current.type === \"CallExpression\") {\n if (current.optional) depth += 1;\n current = current.type === \"CallExpression\" ? current.callee : current.object;\n }\n\n return depth;\n};\n\nconst endsWithNullishFallback = (node: TSESTree.ChainExpression): boolean =>\n node.parent.type === \"LogicalExpression\" && node.parent.operator === \"??\" && node.parent.left === node;\n\nexport default createRule<[Options], \"requireFallback\">({\n name: \"require-fallback-on-deep-chain\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Require a ?? fallback on a deep optional chain\",\n },\n schema: [\n {\n type: \"object\",\n properties: { minDepth: { type: \"integer\", minimum: 2 } },\n additionalProperties: false,\n },\n ],\n messages: {\n requireFallback: \"Optional chain is {{depth}} levels deep with no `?? fallback` — add one.\",\n },\n },\n defaultOptions: [{}],\n create(context, [options]) {\n const minDepth = options.minDepth ?? 3;\n\n return {\n ChainExpression(node) {\n const depth = countOptionalDepth(node.expression);\n if (depth < minDepth) return;\n if (endsWithNullishFallback(node)) return;\n\n context.report({ node, messageId: \"requireFallback\", data: { depth } });\n },\n };\n },\n});\n","import { createRule } from \"../create-rule.js\";\n\nexport default createRule({\n name: \"require-numeric-enum-initializer\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Require an explicit initializer on every enum member\",\n },\n schema: [],\n messages: {\n missingInitializer: \"Enum member '{{name}}' has no explicit initializer — assign an explicit value.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n TSEnumMember(node) {\n if (node.initializer) return;\n\n const name = node.id.type === \"Identifier\" ? node.id.name : context.sourceCode.getText(node.id);\n context.report({\n node,\n messageId: \"missingInitializer\",\n data: { name },\n });\n },\n };\n },\n});\n","import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../create-rule.js\";\n\nconst HOOK_NAMES = new Set([\"useState\", \"useRef\"]);\n\nconst hasTypeArguments = (node: TSESTree.CallExpression): boolean => {\n const typeArgs = node.typeArguments;\n return !!typeArgs && typeArgs.params.length > 0;\n};\n\nconst hasUninferableInitialValue = (node: TSESTree.CallExpression): boolean => {\n if (node.arguments.length === 0) return true;\n const [arg] = node.arguments;\n return (arg.type === \"Literal\" && arg.value === null) || (arg.type === \"Identifier\" && arg.name === \"undefined\");\n};\n\nexport default createRule({\n name: \"require-usestate-useref-generic\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Require an explicit generic on useState()/useRef() when the initial value can't infer one\",\n },\n schema: [],\n messages: {\n requireGeneric: \"'{{name}}()' has no inferable type from its initial value — add an explicit `<Type>` generic.\",\n },\n },\n defaultOptions: [],\n create(context) {\n return {\n CallExpression(node) {\n if (node.callee.type !== \"Identifier\" || !HOOK_NAMES.has(node.callee.name)) return;\n if (hasTypeArguments(node)) return;\n if (!hasUninferableInitialValue(node)) return;\n\n context.report({ node, messageId: \"requireGeneric\", data: { name: node.callee.name } });\n },\n };\n },\n});\n","import { createRule } from \"../create-rule.js\";\n\nexport interface Options {\n pattern?: string;\n terms?: string[];\n commentPattern?: string;\n description?: string;\n comment?: string;\n}\n\ntype MessageIds = \"missingTicket\" | \"missingTicketWithCommentPattern\" | \"missingTicketWithDescription\";\n\nexport default createRule<[Options], MessageIds>({\n name: \"todo-ticket-ref\",\n meta: {\n type: \"suggestion\",\n docs: {\n description: \"Require a ticket reference in the TODO comment\",\n },\n schema: [\n {\n type: \"object\",\n properties: {\n pattern: { type: \"string\" },\n terms: { type: \"array\", items: { type: \"string\" } },\n commentPattern: { type: \"string\" },\n description: { type: \"string\" },\n comment: { type: \"string\" }, // ignored, kept for config compatibility (e.g. \"TODO: JIRA-1234 - description\")\n },\n additionalProperties: false,\n },\n ],\n messages: {\n missingTicket: \"{{ term }} comment doesn't reference a ticket number. Ticket pattern: {{ pattern }}\",\n missingTicketWithCommentPattern:\n \"{{ term }} comment doesn't reference a ticket number. Comment pattern: {{ commentPattern }}\",\n missingTicketWithDescription: \"{{ term }} comment doesn't reference a ticket number. {{ description }}\",\n },\n },\n defaultOptions: [{}],\n create(context, [options]) {\n const pattern = options.pattern ?? \"([A-Z]+-\\\\d+)\";\n const terms = options.terms ?? [\"TODO\"];\n const commentPattern = options.commentPattern;\n const description = options.description;\n\n const sourceCode = context.sourceCode;\n const comments = sourceCode.getAllComments();\n\n // Ticket pattern: valid if it appears anywhere in the comment (e.g. \"TODO: TBDT2-173\", \"TODO: https://.../browse/TBDT2-173\")\n const ticketRegex = new RegExp(pattern, \"i\");\n const termSearchPatterns: Record<string, RegExp> = {};\n for (const term of terms) {\n termSearchPatterns[term] = commentPattern ? new RegExp(commentPattern, \"i\") : ticketRegex;\n }\n\n const getMessageId = (): MessageIds => {\n if (description) return \"missingTicketWithDescription\";\n if (commentPattern) return \"missingTicketWithCommentPattern\";\n return \"missingTicket\";\n };\n\n const checkComment = (comment: (typeof comments)[number]): void => {\n const value = comment.value;\n for (const term of terms) {\n if (!value.includes(term)) continue;\n const re = termSearchPatterns[term];\n if (re.test(value)) continue;\n context.report({\n loc: comment.loc,\n messageId: getMessageId(),\n data: { term, pattern, commentPattern: commentPattern ?? \"\", description: description ?? \"\" },\n });\n }\n };\n\n comments.forEach(checkComment);\n\n return {};\n },\n});\n","import filenameConventionByExportShape from \"./filename-convention-by-export-shape.js\";\nimport hoistStaticComponentConstants from \"./hoist-static-component-constants.js\";\nimport maxParamsProject from \"./max-params-project.js\";\nimport noExplicitUndefinedOptional from \"./no-explicit-undefined-optional.js\";\nimport noExportedMutableState from \"./no-exported-mutable-state.js\";\nimport noHookReturningJsx from \"./no-hook-returning-jsx.js\";\nimport noInlineArrayChainInJsx from \"./no-inline-array-chain-in-jsx.js\";\nimport noInlineCurriedHandler from \"./no-inline-curried-handler.js\";\nimport noInlineGuardChainHandler from \"./no-inline-guard-chain-handler.js\";\nimport noInlineObjectParamType from \"./no-inline-object-param-type.js\";\nimport noInlineRenderFunction from \"./no-inline-render-function.js\";\nimport noJsxInVariable from \"./no-jsx-in-variable.js\";\nimport noNestedTry from \"./no-nested-try.js\";\nimport noNonHookUsePrefix from \"./no-non-hook-use-prefix.js\";\nimport noRenderFnInUsecallback from \"./no-render-fn-in-usecallback.js\";\nimport noTestsInDunderFolder from \"./no-tests-in-dunder-folder.js\";\nimport noTrivialUsememo from \"./no-trivial-usememo.js\";\nimport noUnguardedJsonParse from \"./no-unguarded-json-parse.js\";\nimport preferElementRefType from \"./prefer-element-ref-type.js\";\nimport preferIncludesOverOrChain from \"./prefer-includes-over-or-chain.js\";\nimport preferJsxShortCircuit from \"./prefer-jsx-short-circuit.js\";\nimport preferNullishHelpers from \"./prefer-nullish-helpers.js\";\nimport preferPositiveCondition from \"./prefer-positive-condition.js\";\nimport preferPropsWithChildren from \"./prefer-props-with-children.js\";\nimport preferReactnodeOverJsxelementUnion from \"./prefer-reactnode-over-jsxelement-union.js\";\nimport preferRoleQueryOverTestid from \"./prefer-role-query-over-testid.js\";\nimport preferSomeOverFindCheck from \"./prefer-some-over-find-check.js\";\nimport preferStateUpdaterForm from \"./prefer-state-updater-form.js\";\nimport requireEffectCleanup from \"./require-effect-cleanup.js\";\nimport requireFallbackOnDeepChain from \"./require-fallback-on-deep-chain.js\";\nimport requireNumericEnumInitializer from \"./require-numeric-enum-initializer.js\";\nimport requireUsestateUserefGeneric from \"./require-usestate-useref-generic.js\";\nimport todoTicketRef from \"./todo-ticket-ref.js\";\n\nexport const rules = {\n \"filename-convention-by-export-shape\": filenameConventionByExportShape,\n \"hoist-static-component-constants\": hoistStaticComponentConstants,\n \"max-params-project\": maxParamsProject,\n \"no-explicit-undefined-optional\": noExplicitUndefinedOptional,\n \"no-exported-mutable-state\": noExportedMutableState,\n \"no-hook-returning-jsx\": noHookReturningJsx,\n \"no-inline-array-chain-in-jsx\": noInlineArrayChainInJsx,\n \"no-inline-curried-handler\": noInlineCurriedHandler,\n \"no-inline-guard-chain-handler\": noInlineGuardChainHandler,\n \"no-inline-object-param-type\": noInlineObjectParamType,\n \"no-inline-render-function\": noInlineRenderFunction,\n \"no-jsx-in-variable\": noJsxInVariable,\n \"no-nested-try\": noNestedTry,\n \"no-non-hook-use-prefix\": noNonHookUsePrefix,\n \"no-render-fn-in-usecallback\": noRenderFnInUsecallback,\n \"no-tests-in-dunder-folder\": noTestsInDunderFolder,\n \"no-trivial-usememo\": noTrivialUsememo,\n \"no-unguarded-json-parse\": noUnguardedJsonParse,\n \"prefer-element-ref-type\": preferElementRefType,\n \"prefer-includes-over-or-chain\": preferIncludesOverOrChain,\n \"prefer-jsx-short-circuit\": preferJsxShortCircuit,\n \"prefer-nullish-helpers\": preferNullishHelpers,\n \"prefer-positive-condition\": preferPositiveCondition,\n \"prefer-props-with-children\": preferPropsWithChildren,\n \"prefer-reactnode-over-jsxelement-union\": preferReactnodeOverJsxelementUnion,\n \"prefer-role-query-over-testid\": preferRoleQueryOverTestid,\n \"prefer-some-over-find-check\": preferSomeOverFindCheck,\n \"prefer-state-updater-form\": preferStateUpdaterForm,\n \"require-effect-cleanup\": requireEffectCleanup,\n \"require-fallback-on-deep-chain\": requireFallbackOnDeepChain,\n \"require-numeric-enum-initializer\": requireNumericEnumInitializer,\n \"require-usestate-useref-generic\": requireUsestateUserefGeneric,\n \"todo-ticket-ref\": todoTicketRef,\n};\n","import type { Linter } from \"eslint\";\n\nimport { recommended } from \"./configs/recommended.js\";\nimport { rules } from \"./rules/index.js\";\n\nexport type { Options as MaxParamsProjectOptions } from \"./rules/max-params-project.js\";\nexport type { Options as RequireFallbackOnDeepChainOptions } from \"./rules/require-fallback-on-deep-chain.js\";\nexport type { Options as TodoTicketRefOptions } from \"./rules/todo-ticket-ref.js\";\n\nconst plugin = {\n meta: {\n name: \"@lichens-innovation/eslint-plugin-coding-guide\",\n },\n rules,\n} as const;\n\nexport const configs: { recommended: Linter.Config } = {\n recommended: recommended(plugin),\n};\n\nexport default plugin;\n"],"mappings":";;AAMA,IAAa,KAAe,OAA8C;CACxE,MAAM;CACN,OAAO,CAAC,eAAe;CACvB,SAAS,EAAE,gBAAgB,EAAmC;CAC9D,OAAO,OAAO,YAAY,OAAO,KAAK,EAAO,KAAK,CAAC,CAAC,KAAK,MAAa,CAAC,gBAAgB,KAAY,OAAO,CAAC,CAAC;AAC9G,ICTa,IAAa,EAAY,aACnC,MAAS,yFAAyF,EAAK,IAC1G,GCAM,oBAAoB,IAAI,IAAI;CAAC;CAAS;CAAS;CAAW;CAAa;CAAU;CAAU;AAAO,CAAC,GAEnG,IAA8B;CAClC;EAAE,YAAY;EAAQ,aAAa;CAAQ;CAC3C;EAAE,YAAY;EAAU,aAAa;CAAU;CAC/C;EAAE,YAAY;EAAY,aAAa;CAAY;AACrD,GAEM,KAAe,OACA,EAAS,WAAW,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,KAAK,EAAA,CACpD,QAAQ,sBAAsB,EAAE,GAQ9C,KAAkC,MAA+D;CACrG,IAAM,IAAyB,CAAC;CAChC,KAAK,IAAM,KAAc,EAAY,cAAc;EACjD,IAAI,EAAW,GAAG,SAAS,cAAc;EACzC,IAAM,IACJ,EAAW,MAAM,SAAS,6BAA6B,EAAW,MAAM,SAAS;EACnF,EAAM,KAAK;GAAE,MAA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CAAC,CAAC,CAAC;GACnB,OAAO,GAAS,CAAC,IAAU;IACzB,IAAM,IAAU,EAAQ,WAAW,iBAC7B,IAAQ,EAAQ,SAAS,CAAC,MAAM,GAChC,IAAiB,EAAQ,gBACzB,IAAc,EAAQ,aAGtB,IADa,EAAQ,WACC,eAAe,GAGrC,IAAc,IAAI,OAAO,GAAS,GAAG,GACrC,IAA6C,CAAC;IACpD,KAAK,IAAM,KAAQ,GACjB,EAAmB,KAAQ,IAAiB,IAAI,OAAO,GAAgB,GAAG,IAAI;IAGhF,IAAM,UACA,IAAoB,iCACpB,IAAuB,oCACpB;IAmBT,OAFA,EAAS,SAda,MAA6C;KACjE,IAAM,IAAQ,EAAQ;KACtB,KAAK,IAAM,KAAQ,GACZ,EAAM,SAAS,CAAI,MACb,EAAmB,EAC1B,CAAG,KAAK,CAAK,KACjB,EAAQ,OAAO;MACb,KAAK,EAAQ;MACb,WAAW,EAAa;MACxB,MAAM;OAAE;OAAM;OAAS,gBAAgB,KAAkB;OAAI,aAAa,KAAe;MAAG;KAC9F,CAAC;IAEL,CAE6B,GAEtB,CAAC;GACV;EACF,CCbqB;CCtDnB;AACF,GAEa,KAA0C,EACrD,aAAa,EAAY,CAAM,EACjC"}
@@ -0,0 +1,2 @@
1
+ import { RuleTester } from '@typescript-eslint/rule-tester';
2
+ export declare const ruleTester: RuleTester;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"genericBasename" | "hookFilename" | "suffixFilename", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { TSESLint } from '@typescript-eslint/utils';
2
+ declare const _default: TSESLint.RuleModule<"hoist", [], unknown, TSESLint.RuleListener> & {
3
+ name: string;
4
+ };
5
+ export default _default;
@@ -0,0 +1,101 @@
1
+ export declare const rules: {
2
+ "filename-convention-by-export-shape": import('@typescript-eslint/utils/ts-eslint').RuleModule<"genericBasename" | "hookFilename" | "suffixFilename", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
3
+ name: string;
4
+ };
5
+ "hoist-static-component-constants": import('@typescript-eslint/utils/ts-eslint').RuleModule<"hoist", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
6
+ name: string;
7
+ };
8
+ "max-params-project": import('@typescript-eslint/utils/ts-eslint').RuleModule<"exceed", [number | import('./max-params-project.js').Options], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
9
+ name: string;
10
+ };
11
+ "no-explicit-undefined-optional": import('@typescript-eslint/utils/ts-eslint').RuleModule<"useOptionalModifier" | "redundantUndefined", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
12
+ name: string;
13
+ };
14
+ "no-exported-mutable-state": import('@typescript-eslint/utils/ts-eslint').RuleModule<"noMutableExport", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
15
+ name: string;
16
+ };
17
+ "no-hook-returning-jsx": import('@typescript-eslint/utils/ts-eslint').RuleModule<"hookReturnsJsx", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
18
+ name: string;
19
+ };
20
+ "no-inline-array-chain-in-jsx": import('@typescript-eslint/utils/ts-eslint').RuleModule<"precompute", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
21
+ name: string;
22
+ };
23
+ "no-inline-curried-handler": import('@typescript-eslint/utils/ts-eslint').RuleModule<"extractToUtils", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
24
+ name: string;
25
+ };
26
+ "no-inline-guard-chain-handler": import('@typescript-eslint/utils/ts-eslint').RuleModule<"extractHandler", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
27
+ name: string;
28
+ };
29
+ "no-inline-object-param-type": import('@typescript-eslint/utils/ts-eslint').RuleModule<"extractInterface", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
30
+ name: string;
31
+ };
32
+ "no-inline-render-function": import('@typescript-eslint/utils/ts-eslint').RuleModule<"extractSubcomponent", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
33
+ name: string;
34
+ };
35
+ "no-jsx-in-variable": import('@typescript-eslint/utils/ts-eslint').RuleModule<"declareComponent", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
36
+ name: string;
37
+ };
38
+ "no-nested-try": import('@typescript-eslint/utils/ts-eslint').RuleModule<"nestedTry", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
39
+ name: string;
40
+ };
41
+ "no-non-hook-use-prefix": import('@typescript-eslint/utils/ts-eslint').RuleModule<"misnamed", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
42
+ name: string;
43
+ };
44
+ "no-render-fn-in-usecallback": import('@typescript-eslint/utils/ts-eslint').RuleModule<"extractSubcomponent", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
45
+ name: string;
46
+ };
47
+ "no-tests-in-dunder-folder": import('@typescript-eslint/utils/ts-eslint').RuleModule<"colocate", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
48
+ name: string;
49
+ };
50
+ "no-trivial-usememo": import('@typescript-eslint/utils/ts-eslint').RuleModule<"unnecessaryMemo", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
51
+ name: string;
52
+ };
53
+ "no-unguarded-json-parse": import('@typescript-eslint/utils/ts-eslint').RuleModule<"unguarded", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
54
+ name: string;
55
+ };
56
+ "prefer-element-ref-type": import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferElementRef", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
57
+ name: string;
58
+ };
59
+ "prefer-includes-over-or-chain": import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferIncludes", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
60
+ name: string;
61
+ };
62
+ "prefer-jsx-short-circuit": import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferShortCircuit" | "requireBooleanGuard", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
63
+ name: string;
64
+ };
65
+ "prefer-nullish-helpers": import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferNotNullish" | "preferNullish", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
66
+ name: string;
67
+ };
68
+ "prefer-positive-condition": import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferPositive", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
69
+ name: string;
70
+ };
71
+ "prefer-props-with-children": import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferPropsWithChildren", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
72
+ name: string;
73
+ };
74
+ "prefer-reactnode-over-jsxelement-union": import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferReactNode", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
75
+ name: string;
76
+ };
77
+ "prefer-role-query-over-testid": import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferRole", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
78
+ name: string;
79
+ };
80
+ "prefer-some-over-find-check": import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferSome", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
81
+ name: string;
82
+ };
83
+ "prefer-state-updater-form": import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferUpdaterForm", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
84
+ name: string;
85
+ };
86
+ "require-effect-cleanup": import('@typescript-eslint/utils/ts-eslint').RuleModule<"requireCleanup", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
87
+ name: string;
88
+ };
89
+ "require-fallback-on-deep-chain": import('@typescript-eslint/utils/ts-eslint').RuleModule<"requireFallback", [import('./require-fallback-on-deep-chain.js').Options], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
90
+ name: string;
91
+ };
92
+ "require-numeric-enum-initializer": import('@typescript-eslint/utils/ts-eslint').RuleModule<"missingInitializer", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
93
+ name: string;
94
+ };
95
+ "require-usestate-useref-generic": import('@typescript-eslint/utils/ts-eslint').RuleModule<"requireGeneric", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
96
+ name: string;
97
+ };
98
+ "todo-ticket-ref": import('@typescript-eslint/utils/ts-eslint').RuleModule<"missingTicket" | "missingTicketWithCommentPattern" | "missingTicketWithDescription", [import('./todo-ticket-ref.js').Options], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
99
+ name: string;
100
+ };
101
+ };
@@ -0,0 +1,8 @@
1
+ import { ESLintUtils } from '@typescript-eslint/utils';
2
+ export interface Options {
3
+ max?: number;
4
+ }
5
+ declare const _default: ESLintUtils.RuleModule<"exceed", [number | Options], unknown, ESLintUtils.RuleListener> & {
6
+ name: string;
7
+ };
8
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"useOptionalModifier" | "redundantUndefined", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"noMutableExport", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"hookReturnsJsx", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"precompute", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"extractToUtils", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"extractHandler", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"extractInterface", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { TSESLint } from '@typescript-eslint/utils';
2
+ declare const _default: TSESLint.RuleModule<"extractSubcomponent", [], unknown, TSESLint.RuleListener> & {
3
+ name: string;
4
+ };
5
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"declareComponent", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"nestedTry", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"misnamed", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"extractSubcomponent", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"colocate", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"unnecessaryMemo", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"unguarded", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferElementRef", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferIncludes", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferShortCircuit" | "requireBooleanGuard", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferNotNullish" | "preferNullish", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferPositive", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferPropsWithChildren", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferReactNode", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferRole", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferSome", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"preferUpdaterForm", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"requireCleanup", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,7 @@
1
+ export interface Options {
2
+ minDepth?: number;
3
+ }
4
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"requireFallback", [Options], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
5
+ name: string;
6
+ };
7
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<"missingInitializer", [], unknown, import('@typescript-eslint/utils/ts-eslint').RuleListener> & {
2
+ name: string;
3
+ };
4
+ export default _default;