@tsrx/eslint-parser 0.6.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["parse_module"],"sources":["../src/index.ts"],"sourcesContent":["import type { Program } from 'estree';\nimport type { Linter } from 'eslint';\nimport {\n\tanalyzeTsrx as analyze_tsrx,\n\tDIAGNOSTIC_CODES,\n\tparseModule as parse_module,\n} from '@tsrx/core';\n\ninterface ParseResult {\n\tast: Program;\n\tservices?: Record<string, any>;\n\tscopeManager?: any;\n\tvisitorKeys?: Record<string, string[]>;\n}\n\nconst visitorKeys: Record<string, string[]> = {\n\tProgram: ['body'],\n\tJSXElement: ['openingElement', 'children', 'closingElement'],\n\tJSXOpeningElement: ['name', 'attributes'],\n\tJSXClosingElement: ['name'],\n\tJSXFragment: ['openingFragment', 'children', 'closingFragment'],\n\tJSXOpeningFragment: [],\n\tJSXClosingFragment: [],\n\tJSXExpressionContainer: ['expression'],\n\tJSXAttribute: ['name', 'value'],\n\tJSXSpreadAttribute: ['argument'],\n\tJSXIdentifier: [],\n\tJSXMemberExpression: ['object', 'property'],\n\tJSXNamespacedName: ['namespace', 'name'],\n\tJSXText: [],\n\tJSXStyleElement: ['openingElement', 'children', 'closingElement'],\n\tJSXIfExpression: ['test', 'consequent', 'alternate'],\n\tJSXForExpression: ['init', 'test', 'update', 'left', 'right', 'body', 'index', 'key', 'empty'],\n\tJSXSwitchExpression: ['discriminant', 'cases'],\n\tJSXTryExpression: ['block', 'handler', 'finalizer', 'pending'],\n\tJSXCodeBlock: ['body', 'render'],\n\tStyleSheet: [],\n\tForOfStatement: ['left', 'right', 'body'],\n};\n\n/**\n * Keep this hook for small ESLint-only AST normalizations.\n */\nfunction normalize_tsrx_ast_for_eslint(ast: any): void {\n\tconst seen = new Set<any>();\n\tconst visit = (node: any) => {\n\t\tif (!node || typeof node !== 'object') return;\n\t\tif (seen.has(node)) return;\n\t\tseen.add(node);\n\n\t\t// `<style apply={...} />` resolutions hold scope bindings whose reference\n\t\t// paths point back at AST ancestors. ESLint rules do not use them, and the\n\t\t// cycles break consumers that deep-clone or serialize the AST (RuleTester).\n\t\tif (node.type === 'JSXStyleElement' && node.metadata?.styleApplies) {\n\t\t\tdelete node.metadata.styleApplies;\n\t\t}\n\n\t\tfor (const key of Object.keys(node)) {\n\t\t\tif (key === 'parent' || key === 'loc' || key === 'range') continue;\n\t\t\tconst value = node[key];\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tfor (const child of value) visit(child);\n\t\t\t} else if (value && typeof value === 'object') {\n\t\t\t\tvisit(value);\n\t\t\t}\n\t\t}\n\t};\n\n\tvisit(ast);\n}\n\n/**\n * Recursively walks the AST and ensures all nodes have range and loc properties\n * ESLint's scope analyzer requires these properties on ALL nodes\n */\nfunction ensure_node_properties(node: any, code: string): void {\n\tif (!node || typeof node !== 'object') {\n\t\treturn;\n\t}\n\n\t// Ensure range property exists\n\tif (node.start !== undefined && node.end !== undefined && !node.range) {\n\t\tnode.range = [node.start, node.end];\n\t}\n\n\t// Ensure loc property exists\n\tif (!node.loc && node.start !== undefined && node.end !== undefined) {\n\t\tconst lines = code.split('\\n');\n\t\tlet current_pos = 0;\n\t\tlet start_line = 1;\n\t\tlet start_column = 0;\n\t\tlet end_line = 1;\n\t\tlet end_column = 0;\n\n\t\tfor (let i = 0; i < lines.length; i++) {\n\t\t\tconst line_length = lines[i].length + 1;\n\t\t\tif (current_pos + line_length > node.start) {\n\t\t\t\tstart_line = i + 1;\n\t\t\t\tstart_column = node.start - current_pos;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcurrent_pos += line_length;\n\t\t}\n\n\t\tcurrent_pos = 0;\n\t\tfor (let i = 0; i < lines.length; i++) {\n\t\t\tconst line_length = lines[i].length + 1;\n\t\t\tif (current_pos + line_length > node.end) {\n\t\t\t\tend_line = i + 1;\n\t\t\t\tend_column = node.end - current_pos;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcurrent_pos += line_length;\n\t\t}\n\n\t\tnode.loc = {\n\t\t\tstart: { line: start_line, column: start_column },\n\t\t\tend: { line: end_line, column: end_column },\n\t\t};\n\t}\n\n\tfor (const key in node) {\n\t\tif (key === 'parent' || key === 'loc' || key === 'range') {\n\t\t\tcontinue; // Skip these to avoid infinite loops\n\t\t}\n\n\t\tconst value = node[key];\n\t\tif (Array.isArray(value)) {\n\t\t\tvalue.forEach((child) => ensure_node_properties(child, code));\n\t\t} else if (value && typeof value === 'object' && value.type) {\n\t\t\tensure_node_properties(value, code);\n\t\t}\n\t}\n}\n\nfunction is_fatal_parser_diagnostic(error: any): boolean {\n\treturn (\n\t\terror?.code === DIAGNOSTIC_CODES.UNCLOSED_TAG ||\n\t\terror?.code === DIAGNOSTIC_CODES.MISMATCHED_CLOSING_TAG\n\t);\n}\n\nfunction to_eslint_parse_error(error: any): SyntaxError {\n\tconst parse_error: any = new SyntaxError(error?.message || String(error));\n\tconst loc = error?.loc?.start;\n\tif (loc) {\n\t\tparse_error.lineNumber = loc.line;\n\t\tparse_error.column = loc.column + 1;\n\t}\n\tif (typeof error?.start === 'number') {\n\t\tparse_error.index = error.start;\n\t}\n\treturn parse_error;\n}\n\n/**\n * ESLint parser for TSRX (.tsrx) files\n *\n * This parser uses the shared TSRX parser to parse .tsrx files\n * and returns an ESTree-compatible AST for ESLint to analyze.\n */\nexport function parseForESLint(code: string, options?: Linter.ParserOptions): ParseResult {\n\ttry {\n\t\tconst errors: any[] = [];\n\t\tconst comments: any[] = [];\n\t\t// Parse the TSRX source code using the shared TSRX parser. ESLint passes\n\t\t// `<input>` for in-memory sources (e.g. RuleTester), so a real filename is\n\t\t// only missing when the parser is invoked directly.\n\t\tconst ast = parse_module(code, options?.filePath || 'ESLintParser.tsrx', {\n\t\t\tcollect: true,\n\t\t\terrors,\n\t\t\tcomments,\n\t\t}) as any;\n\t\tif (!ast) throw new Error('Parser returned null or undefined AST');\n\t\tanalyze_tsrx(ast, options?.filePath || 'ESLintParser.tsrx', {\n\t\t\tcollect: true,\n\t\t\terrors,\n\t\t\tcomments,\n\t\t});\n\n\t\tconst fatal_error = errors.find(is_fatal_parser_diagnostic);\n\t\tif (fatal_error) {\n\t\t\tthrow to_eslint_parse_error(fatal_error);\n\t\t}\n\n\t\t// Normalize for ESLint traversal (avoid duplicate node visits)\n\t\tnormalize_tsrx_ast_for_eslint(ast);\n\n\t\t// Recursively ensure all nodes have range and loc properties\n\t\tensure_node_properties(ast, code);\n\n\t\t// Create a properly structured AST object ensuring all required properties exist\n\t\tconst result: any = {\n\t\t\ttype: ast.type || 'Program',\n\t\t\tstart: ast.start !== undefined ? ast.start : 0,\n\t\t\tend: ast.end !== undefined ? ast.end : code.length,\n\t\t\tloc: ast.loc || {\n\t\t\t\tstart: { line: 1, column: 0 },\n\t\t\t\tend: { line: code.split('\\n').length, column: 0 },\n\t\t\t},\n\t\t\trange: ast.range || [0, code.length],\n\t\t\tbody: ast.body || [],\n\t\t\tsourceType: ast.sourceType || 'module',\n\t\t\tcomments: ast.comments || [],\n\t\t\ttokens: ast.tokens || [],\n\t\t};\n\n\t\treturn {\n\t\t\tast: result,\n\t\t\tservices: {\n\t\t\t\ttsrxDiagnostics: errors,\n\t\t\t},\n\t\t\tvisitorKeys,\n\t\t};\n\t} catch (error: any) {\n\t\tif (error instanceof SyntaxError && (error as any).lineNumber != null) {\n\t\t\tthrow error;\n\t\t}\n\t\t// Transform TSRX parse errors to ESLint-compatible format\n\t\tthrow new SyntaxError(`Failed to parse TSRX file: ${error.message || error}`);\n\t}\n}\n\n/**\n * Legacy parse function for older ESLint versions\n */\nexport function parse(code: string, options?: Linter.ParserOptions): Program {\n\tconst result = parseForESLint(code, options);\n\treturn result.ast;\n}\n\nexport default {\n\tparseForESLint,\n\tparse,\n};\n"],"mappings":";;AAeA,MAAM,cAAwC;CAC7C,SAAS,CAAC,MAAM;CAChB,YAAY;EAAC;EAAkB;E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,IAAI,UAAU,CAAC;GAIb;GACV,UAAU,EACT,iBAAiB,OAClB;GACA;EACD;CACD,SAAS,OAAY;EACpB,IAAI,iBAAiB,eAAgB,MAAc,cAAc,MAChE,MAAM;EAGP,MAAM,IAAI,YAAY,8BAA8B,MAAM,WAAW,OAAO;CAC7E;AACD;;;;AAKA,SAAgB,MAAM,MAAc,SAAyC;CAE5E,OADe,eAAe,MAAM,OACxB,CAAC,CAAC;AACf;AAEA,IAAA,cAAe;CACd;CACA;AACD"}
1
+ {"version":3,"file":"index.js","names":["parse_module"],"sources":["../src/index.ts"],"sourcesContent":["import type { Program } from 'estree';\nimport type { AST, Linter } from 'eslint';\nimport {\n\tanalyzeTsrx as analyze_tsrx,\n\tDIAGNOSTIC_CODES,\n\tparseModule as parse_module,\n} from '@tsrx/core';\nimport { Definition, Referencer, ScopeManager } from 'eslint-scope';\n\ninterface ParseResult {\n\tast: Program;\n\tservices?: Record<string, any>;\n\tscopeManager?: any;\n\tvisitorKeys?: Record<string, string[]>;\n}\n\nconst visitorKeys: Record<string, string[]> = {\n\tProgram: ['body'],\n\tJSXElement: ['openingElement', 'children', 'closingElement'],\n\tJSXOpeningElement: ['name', 'tagExpression', 'attributes'],\n\tJSXClosingElement: ['name', 'tagExpression'],\n\tJSXFragment: ['openingFragment', 'children', 'closingFragment'],\n\tJSXOpeningFragment: [],\n\tJSXClosingFragment: [],\n\tJSXExpressionContainer: ['expression'],\n\tJSXAttribute: ['name', 'value'],\n\tJSXSpreadAttribute: ['argument'],\n\tJSXIdentifier: [],\n\tJSXMemberExpression: ['object', 'property'],\n\tJSXNamespacedName: ['namespace', 'name'],\n\tJSXText: [],\n\tJSXStyleElement: ['openingElement', 'children', 'closingElement'],\n\tJSXIfExpression: ['statement'],\n\tJSXForExpression: ['index', 'key', 'loop', 'empty'],\n\tJSXSwitchExpression: ['discriminant', 'cases'],\n\tJSXSwitchCase: ['test', 'consequent'],\n\tJSXTryExpression: ['block', 'pending', 'handler', 'finalizer'],\n\tJSXCodeBlock: ['body', 'render'],\n\tStyleSheet: [],\n\tForOfStatement: ['left', 'right', 'body'],\n\t// eslint-scope's default keys leave out `pending`, so without this, scope\n\t// analysis would skip the `pending` block of a plain `try`.\n\tTryStatement: ['block', 'pending', 'handler', 'finalizer'],\n};\n\n/**\n * eslint-scope's referencer, plus the `@for` parts: the loop's `index` and\n * `key` belong to the loop's scope, like its variable, and the `@empty` branch\n * runs outside it. TSRX gives every iteration its own index. A `@catch` can\n * also take a `reset` function after the error.\n */\nclass TSRXReferencer extends Referencer {\n\t#tsrx_for_by_loop = new Map<any, any>();\n\t#var_heads = new Set<any>();\n\n\tJSXOpeningElement(node: any): void {\n\t\tif (!node.tagExpression) {\n\t\t\tsuper.JSXOpeningElement(node);\n\t\t\treturn;\n\t\t}\n\t\t// A dynamic tag's expression holds its references, with or without JSX\n\t\t// enabled. The name that mirrors it holds none.\n\t\tthis.visit(node.tagExpression);\n\t\tnode.attributes.forEach(this.visit, this);\n\t}\n\n\t// A closing tag repeats the opening tag's name, so it adds no references.\n\t// With JSX enabled, eslint-scope read the `</style>` of a `<style>` element\n\t// as one.\n\tJSXClosingElement(): void {}\n\n\tJSXForExpression(node: any): void {\n\t\tthis.#tsrx_for_by_loop.set(node.loop, node);\n\t\t// TSRX runs each iteration in a callback, so the loop has a scope of its\n\t\t// own whatever its head declares. eslint-scope opens one only for a\n\t\t// `let` or `const` head.\n\t\tconst head = node.loop.type === 'ForStatement' ? node.loop.init : node.loop.left;\n\t\tif (head?.type !== 'VariableDeclaration' || head.kind === 'var') {\n\t\t\t(this as any).scopeManager.__nestForScope(node.loop);\n\t\t}\n\t\tif (head?.kind === 'var') this.#var_heads.add(head);\n\t\tthis.visit(node.loop);\n\t\tif (node.empty) this.visit(node.empty);\n\t}\n\n\tVariableDeclaration(node: any): void {\n\t\tif (!this.#var_heads.has(node)) {\n\t\t\tsuper.VariableDeclaration(node);\n\t\t\treturn;\n\t\t}\n\t\t// A `var` head declares the variable in the loop's scope, as `let` does.\n\t\tnode.declarations.forEach((declaration: any, index: number) => {\n\t\t\tthis.visitVariableDeclaration(this.currentScope(), 'Variable', node, index);\n\t\t\tif (declaration.init) this.visit(declaration.init);\n\t\t});\n\t}\n\n\tCatchClause(node: any): void {\n\t\tif (!node.resetParam) {\n\t\t\tsuper.CatchClause(node);\n\t\t\treturn;\n\t\t}\n\t\t// eslint-scope's `CatchClause`, with `reset` defined as the error is.\n\t\t(this as any).scopeManager.__nestCatchScope(node);\n\t\tfor (const param of [node.param, node.resetParam]) {\n\t\t\tthis.visitPattern(param, { processRightHandNodes: true }, (pattern: any, info: any) => {\n\t\t\t\t(this.currentScope() as any).__define(\n\t\t\t\t\tpattern,\n\t\t\t\t\tnew (Definition as any)('CatchClause', pattern, node, null, null, null),\n\t\t\t\t);\n\t\t\t\tthis.referencingDefaultValue(pattern, info.assignments, null, true);\n\t\t\t});\n\t\t}\n\t\tthis.visit(node.body);\n\t\tthis.close(node);\n\t}\n\n\tclose(node: any): void {\n\t\tconst tsrx_for = this.#tsrx_for_by_loop.get(node);\n\t\tif (tsrx_for?.index) {\n\t\t\t(this.currentScope() as any).__define(\n\t\t\t\ttsrx_for.index,\n\t\t\t\tnew (Definition as any)('Variable', tsrx_for.index, tsrx_for, tsrx_for, null, null),\n\t\t\t);\n\t\t}\n\t\tif (tsrx_for?.key) this.visit(tsrx_for.key);\n\t\tsuper.close(node);\n\t}\n}\n\n/**\n * Scope analysis as ESLint runs it, with `TSRXReferencer`. A `.tsrx` file is\n * always a module.\n */\nfunction analyze_scope(ast: any, options: Linter.ParserOptions | undefined): any {\n\tconst ecma_features = options?.ecmaFeatures ?? {};\n\tconst scope_options = {\n\t\tignoreEval: true,\n\t\tnodejsScope: ecma_features.globalReturn,\n\t\timpliedStrict: ecma_features.impliedStrict,\n\t\tecmaVersion: typeof options?.ecmaVersion === 'number' ? options.ecmaVersion : 6,\n\t\tsourceType: 'module',\n\t\tchildVisitorKeys: visitorKeys,\n\t\t// eslint-visitor-keys' `getKeys`, which ESLint passes\n\t\tfallback: (node: any) =>\n\t\t\tObject.keys(node).filter(\n\t\t\t\t(key) =>\n\t\t\t\t\tkey !== 'parent' &&\n\t\t\t\t\tkey !== 'leadingComments' &&\n\t\t\t\t\tkey !== 'trailingComments' &&\n\t\t\t\t\tkey[0] !== '_',\n\t\t\t),\n\t\tjsx: ecma_features.jsx,\n\t};\n\tconst scope_manager = new ScopeManager(scope_options as any);\n\tnew TSRXReferencer(scope_options as any, scope_manager).visit(ast);\n\treturn scope_manager;\n}\n\nconst LOOP_FIELDS: Record<string, string[]> = {\n\tForStatement: ['init', 'test', 'update', 'body'],\n\tForInStatement: ['left', 'right', 'body'],\n\tForOfStatement: ['await', 'left', 'right', 'body'],\n};\n\nconst STATEMENT_FIELDS: Record<string, { keyword: string; fields: string[] }> = {\n\tJSXIfExpression: { keyword: 'if', fields: ['test', 'consequent', 'alternate'] },\n};\n\nconst SIGNATURE_TYPES = new Set([\n\t'TSFunctionType',\n\t'TSConstructorType',\n\t'TSCallSignatureDeclaration',\n\t'TSConstructSignatureDeclaration',\n\t'TSMethodSignature',\n]);\n\n/** The name rules see for a dynamic tag that no JSX name can mirror. */\nconst DYNAMIC_TAG_NAME = 'tsrx-dynamic-tag';\n\n/**\n * The JSX name rules see for a dynamic tag: a `JSXIdentifier` or\n * `JSXMemberExpression` that mirrors its expression (`<{as}>` is `as`,\n * `<{ui.Box}>` is `ui.Box`), or a synthetic `JSXIdentifier` for any other\n * expression (`<{'div'}>`, `<{icons[key]}>`, `<{pick()}>`). The name spans the\n * braces, so a rule that fixes the text before or after it keeps them.\n */\nfunction dynamic_tag_name(container: any): any {\n\tconst name = mirror_tag_expression(container.expression) ?? {\n\t\ttype: 'JSXIdentifier',\n\t\tname: DYNAMIC_TAG_NAME,\n\t};\n\treturn { ...name, start: container.start, end: container.end };\n}\n\n/** The JSX name for an identifier or a chain of `.name` accesses, or `null`. */\nfunction mirror_tag_expression(node: any): any {\n\tif (node.type === 'Identifier') {\n\t\treturn { type: 'JSXIdentifier', name: node.name, start: node.start, end: node.end };\n\t}\n\tif (node.type !== 'MemberExpression' || node.computed || node.property.type !== 'Identifier') {\n\t\treturn null;\n\t}\n\t// `<this.Item>` is a JSX member name too.\n\tconst object =\n\t\tnode.object.type === 'ThisExpression'\n\t\t\t? { type: 'JSXIdentifier', name: 'this', start: node.object.start, end: node.object.end }\n\t\t\t: mirror_tag_expression(node.object);\n\treturn (\n\t\tobject && {\n\t\t\ttype: 'JSXMemberExpression',\n\t\t\tobject,\n\t\t\tproperty: mirror_tag_expression(node.property),\n\t\t\tstart: node.start,\n\t\t\tend: node.end,\n\t\t}\n\t);\n}\n\n/**\n * Keep this hook for small ESLint-only AST normalizations. Returns the `JSXText`\n * nodes, which each get a token of their own.\n */\nfunction normalize_tsrx_ast_for_eslint(ast: any, code: string): Span[] {\n\tconst texts: Span[] = [];\n\tconst seen = new Set<any>();\n\tconst visit = (node: any) => {\n\t\tif (!node || typeof node !== 'object') return;\n\t\tif (seen.has(node)) return;\n\t\tseen.add(node);\n\n\t\t// `<style apply={...} />` resolutions hold scope bindings whose reference\n\t\t// paths point back at AST ancestors. ESLint rules do not use them, and the\n\t\t// cycles break consumers that deep-clone or serialize the AST (RuleTester).\n\t\tif (node.type === 'JSXStyleElement' && node.metadata?.styleApplies) {\n\t\t\tdelete node.metadata.styleApplies;\n\t\t}\n\n\t\t// ESLint's code path analysis handles every `SwitchCase` as a case of a\n\t\t// `switch` statement and throws on one inside `@switch`. `@case` bodies\n\t\t// never fall through, so they need no switch code paths.\n\t\tif (node.type === 'JSXSwitchExpression') {\n\t\t\tfor (const switch_case of node.cases) switch_case.type = 'JSXSwitchCase';\n\t\t}\n\n\t\t// A comment in JSX text is a comment for ESLint, not a `{}` container:\n\t\t// drop the placeholder node the parser keeps for it.\n\t\tif (node.type === 'JSXElement' || node.type === 'JSXFragment') {\n\t\t\tnode.children = node.children.filter(\n\t\t\t\t(child: any) =>\n\t\t\t\t\tchild.type !== 'JSXExpressionContainer' ||\n\t\t\t\t\tchild.expression.type !== 'JSXEmptyExpression' ||\n\t\t\t\t\tchild.start !== child.expression.start,\n\t\t\t);\n\t\t}\n\n\t\t// The loop of a `@for` is a real for statement in `loop`, so rules such as\n\t\t// `semi` and `init-declarations` know its head. ESLint's code path analysis\n\t\t// allows a for statement no fields of its own, so `index`, `key` and the\n\t\t// `@empty` branch stay on `JSXForExpression`.\n\t\tif (node.type === 'JSXForExpression') {\n\t\t\tconst loop: any = {\n\t\t\t\ttype: node.statementType,\n\t\t\t\tstart: code.indexOf('for', node.start),\n\t\t\t\tend: node.body.end,\n\t\t\t};\n\t\t\tfor (const key of LOOP_FIELDS[node.statementType]) {\n\t\t\t\tloop[key] = node[key];\n\t\t\t\tdelete node[key];\n\t\t\t}\n\t\t\tnode.loop = loop;\n\t\t}\n\n\t\t// An `@if` likewise keeps its if statement in `statement`, so code path\n\t\t// analysis gives each arm a path of its own, as it does the branches of an\n\t\t// `if`. A `@try` keeps its blocks, in source order: as a `try` statement,\n\t\t// its body would be inside a `try`, though the React, Preact and Hono\n\t\t// output has none.\n\t\t// `react-hooks/rules-of-hooks` would then report as conditional every hook\n\t\t// after the body's first call, member access or identifier, except `use()`,\n\t\t// which 6.1.1 and 7.1.1 report anywhere in the body as inside a try/catch\n\t\t// block.\n\t\t// `@switch` keeps its cases: a `switch` would fall through from each case\n\t\t// into the next.\n\t\tif (node.type in STATEMENT_FIELDS) {\n\t\t\tconst { keyword, fields } = STATEMENT_FIELDS[node.type];\n\t\t\tconst statement: any = {\n\t\t\t\ttype: node.statementType,\n\t\t\t\tstart: code.indexOf(keyword, node.start),\n\t\t\t\tend: node.end,\n\t\t\t};\n\t\t\tfor (const key of fields) {\n\t\t\t\tstatement[key] = node[key];\n\t\t\t\tdelete node[key];\n\t\t\t}\n\t\t\tnode.statement = statement;\n\t\t}\n\n\t\t// The parser accepts a plain `try` with only a `pending` block. It compiles\n\t\t// to a `try` with neither a `catch` nor a `finally`, which isn't JavaScript,\n\t\t// and code path analysis throws on it.\n\t\tif (node.type === 'TryStatement' && !node.handler && !node.finalizer) {\n\t\t\tthrow to_eslint_parse_error({\n\t\t\t\tmessage: 'Missing catch or finally clause',\n\t\t\t\tloc: node.loc,\n\t\t\t\tstart: node.start,\n\t\t\t});\n\t\t}\n\n\t\t// Rules read a tag name as a JSX name, and crash on the expression\n\t\t// container of a dynamic tag. They see a name that mirrors it instead, and\n\t\t// the container moves to `tagExpression`, where rules still lint the code\n\t\t// and scope analysis reads the opening tag's (see `TSRXReferencer`).\n\t\tif (\n\t\t\t(node.type === 'JSXOpeningElement' || node.type === 'JSXClosingElement') &&\n\t\t\tnode.name?.type === 'JSXExpressionContainer'\n\t\t) {\n\t\t\tnode.tagExpression = node.name;\n\t\t\tnode.name = dynamic_tag_name(node.name);\n\t\t}\n\n\t\t// typescript-eslint names the parameters of a function type or signature\n\t\t// `params`, and rules such as `max-params` read that name. It is not\n\t\t// enumerable, so traversal still visits each parameter once.\n\t\tif (SIGNATURE_TYPES.has(node.type) && node.parameters) {\n\t\t\tObject.defineProperty(node, 'params', { value: node.parameters, configurable: true });\n\t\t}\n\n\t\t// Like espree, a template element spans its delimiters: `` `a${ ``, `` }b` ``.\n\t\tif (node.type === 'TemplateElement') {\n\t\t\tconst end_offset = node.tail ? 1 : 2;\n\t\t\tnode.start -= 1;\n\t\t\tnode.end += end_offset;\n\t\t\tnode.range = [node.start, node.end];\n\t\t\tnode.loc = {\n\t\t\t\tstart: { line: node.loc.start.line, column: node.loc.start.column - 1 },\n\t\t\t\tend: { line: node.loc.end.line, column: node.loc.end.column + end_offset },\n\t\t\t};\n\t\t}\n\n\t\tif (node.type === 'JSXText' && node.end > node.start) {\n\t\t\ttexts.push({ type: 'JSXText', start: node.start, end: node.end });\n\t\t}\n\n\t\tfor (const key of Object.keys(node)) {\n\t\t\tif (key === 'parent' || key === 'loc' || key === 'range') continue;\n\t\t\tconst value = node[key];\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tfor (const child of value) visit(child);\n\t\t\t} else if (value && typeof value === 'object') {\n\t\t\t\tvisit(value);\n\t\t\t}\n\t\t}\n\t};\n\n\tvisit(ast);\n\treturn texts.sort((a, b) => a.start - b.start);\n}\n\n/**\n * Recursively walks the AST and ensures all nodes have range and loc properties\n * ESLint's scope analyzer requires these properties on ALL nodes\n */\nfunction ensure_node_properties(node: any, locate: Locate): void {\n\tif (!node || typeof node !== 'object') {\n\t\treturn;\n\t}\n\n\t// Ensure range property exists\n\tif (node.start !== undefined && node.end !== undefined && !node.range) {\n\t\tnode.range = [node.start, node.end];\n\t}\n\n\t// Ensure loc property exists\n\tif (!node.loc && node.start !== undefined && node.end !== undefined) {\n\t\tnode.loc = locate(node.start, node.end);\n\t}\n\n\tfor (const key in node) {\n\t\tif (key === 'parent' || key === 'loc' || key === 'range') {\n\t\t\tcontinue; // Skip these to avoid infinite loops\n\t\t}\n\n\t\tconst value = node[key];\n\t\tif (Array.isArray(value)) {\n\t\t\tvalue.forEach((child) => ensure_node_properties(child, locate));\n\t\t} else if (value && typeof value === 'object' && value.type) {\n\t\t\tensure_node_properties(value, locate);\n\t\t}\n\t}\n}\n\n/** The fields read from an acorn token recorded by the TSRX parser. */\ninterface LexerToken {\n\ttype: { label: string; keyword?: string };\n\tvalue?: any;\n\tstart: number;\n\tend: number;\n}\n\n/** A comment as the TSRX parser collects it. */\ninterface ParserComment {\n\ttype: 'Line' | 'Block';\n\tstart: number;\n\tend: number;\n}\n\ninterface ESLintToken extends AST.Token {\n\tstart: number;\n\tend: number;\n\tregex?: { pattern: string; flags: string };\n}\n\ninterface ESLintComment {\n\ttype: 'Line' | 'Block';\n\tvalue: string;\n\tstart: number;\n\tend: number;\n\trange: AST.Range;\n\tloc: AST.SourceLocation;\n}\n\ninterface Span {\n\ttype: AST.TokenType;\n\tstart: number;\n\tend: number;\n\tregex?: ESLintToken['regex'];\n}\n\ntype Locate = (start: number, end: number) => AST.SourceLocation;\n\n/**\n * Builds `loc` objects from offsets, with the line terminators acorn and ESLint\n * count.\n */\nfunction create_locator(code: string): Locate {\n\tconst line_starts = [0];\n\tfor (const match of code.matchAll(/\\r\\n?|[\\n\\u2028\\u2029]/g)) {\n\t\tline_starts.push(match.index + match[0].length);\n\t}\n\tconst position = (offset: number) => {\n\t\tlet low = 0;\n\t\tlet high = line_starts.length - 1;\n\t\twhile (low < high) {\n\t\t\tconst middle = (low + high + 1) >> 1;\n\t\t\tif (line_starts[middle] <= offset) low = middle;\n\t\t\telse high = middle - 1;\n\t\t}\n\t\treturn { line: low + 1, column: offset - line_starts[low] };\n\t};\n\treturn (start, end) => ({ start: position(start), end: position(end) });\n}\n\n/**\n * Converts the parser's comments to ESLint comments, in source order. The value\n * is read from the source: the parser strips the indentation from the value of\n * a multi-line block comment.\n */\nfunction to_eslint_comments(\n\tcode: string,\n\tcomments: ParserComment[],\n\tlocate: Locate,\n): ESLintComment[] {\n\tconst result: ESLintComment[] = [];\n\tfor (const { type, start, end } of [...comments].sort((a, b) => a.start - b.start)) {\n\t\tif (result.at(-1)?.start === start) continue;\n\t\tconst value_end = type === 'Block' && code.startsWith('*/', end - 2) ? end - 2 : end;\n\t\tresult.push({\n\t\t\ttype,\n\t\t\tvalue: code.slice(start + 2, value_end),\n\t\t\tstart,\n\t\t\tend,\n\t\t\trange: [start, end],\n\t\t\tloc: locate(start, end),\n\t\t});\n\t}\n\treturn result;\n}\n\n/**\n * Converts the tokens the TSRX lexer reported into the token list ESLint\n * expects: in source order, without overlaps, in espree's token types, and\n * covering every character that is not whitespace or a comment.\n */\nfunction to_eslint_tokens(\n\tcode: string,\n\tlexer_tokens: LexerToken[],\n\ttexts: Span[],\n\tcomments: ESLintComment[],\n\tlocate: Locate,\n): ESLintToken[] {\n\t// The lexer reports a token again when it re-reads it after looking ahead.\n\tconst lexed: LexerToken[] = [];\n\tfor (const token of [...lexer_tokens].sort((a, b) => a.start - b.start || a.end - b.end)) {\n\t\tconst last = lexed.at(-1);\n\t\tif (last?.start === token.start && last.end === token.end) {\n\t\t\tlexed[lexed.length - 1] = token;\n\t\t} else if (!last || token.start >= last.end) {\n\t\t\tlexed.push(token);\n\t\t}\n\t}\n\n\tconst spans: Span[] = [];\n\tfor (let i = 0; i < lexed.length; i++) {\n\t\tconst token = lexed[i];\n\t\tconst label = token.type.label;\n\n\t\tif (label === '`' || (label === '}' && is_template_part(lexed[i + 1]))) {\n\t\t\t// Like espree, one token per template chunk: `` `a${ ``, `` }b${ ``, `` }c` ``.\n\t\t\tlet last = i + 1;\n\t\t\twhile (is_template_part(lexed[last])) last++;\n\t\t\tconst closer = lexed[last]?.type.label;\n\t\t\tif (closer !== '${' && closer !== '`') last--;\n\t\t\tspans.push({ type: 'Template', start: token.start, end: lexed[last].end });\n\t\t\ti = last;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (code.startsWith('</', token.start) && token.end > token.start + 1) {\n\t\t\t// The lexer skips the body of a raw `<style>` or `<script>` element and\n\t\t\t// reports its closing tag as one token.\n\t\t\tfor (const match of code.slice(token.start, token.end).matchAll(/([</>])|[^\\s</>]+/g)) {\n\t\t\t\tconst start = token.start + match.index;\n\t\t\t\tspans.push({\n\t\t\t\t\ttype: match[1] ? 'Punctuator' : 'JSXIdentifier',\n\t\t\t\t\tstart,\n\t\t\t\t\tend: start + match[0].length,\n\t\t\t\t});\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (label === 'eof' || token.start === token.end) continue;\n\t\tspans.push({\n\t\t\ttype: token_type(token, lexed[i - 1], lexed[i - 2]),\n\t\t\tstart: token.start,\n\t\t\tend: token.end,\n\t\t\tregex:\n\t\t\t\tlabel === 'regexp' ? { pattern: token.value.pattern, flags: token.value.flags } : undefined,\n\t\t});\n\t}\n\n\t// Each JSX text node is one token. The lexer reports no token for\n\t// whitespace-only text, and reads text after a template directive's block\n\t// as code (`Identifier \" hello\"`).\n\tconst with_texts = [...outside(spans, texts), ...texts].sort((a, b) => a.start - b.start);\n\t// Text the lexer read as part of a comment is left to the gap filling below.\n\tconst kept = outside(with_texts, comments);\n\n\tconst tokens: ESLintToken[] = [];\n\tconst add = (span: Span) => {\n\t\tconst token: ESLintToken = {\n\t\t\ttype: span.type,\n\t\t\tvalue: code.slice(span.start, span.end),\n\t\t\tstart: span.start,\n\t\t\tend: span.end,\n\t\t\trange: [span.start, span.end],\n\t\t\tloc: locate(span.start, span.end),\n\t\t};\n\t\tif (span.regex) token.regex = span.regex;\n\t\ttokens.push(token);\n\t};\n\n\t// The lexer reports no token for the `@` of a template directive or the\n\t// body of a raw `<style>` or `<script>` element.\n\tconst fill = (start: number, end: number) => {\n\t\tconst at = end > start && code[end - 1] === '@';\n\t\tif (at) end--;\n\t\tif (/\\S/.test(code.slice(start, end))) add({ type: 'JSXText', start, end });\n\t\tif (at) add({ type: 'Punctuator', start: end, end: end + 1 });\n\t};\n\n\tconst covered: Array<Span | ESLintComment> = [...kept, ...comments];\n\tlet position = 0;\n\tfor (const item of covered.sort((a, b) => a.start - b.start)) {\n\t\tfill(position, item.start);\n\t\tif (!('value' in item)) add(item);\n\t\tposition = item.end;\n\t}\n\tfill(position, code.length);\n\n\treturn tokens;\n}\n\n/** The spans that overlap none of the sorted, disjoint `ranges`. */\nfunction outside(spans: Span[], ranges: Array<{ start: number; end: number }>): Span[] {\n\tlet index = 0;\n\treturn spans.filter((span) => {\n\t\twhile (index < ranges.length && ranges[index].end <= span.start) index++;\n\t\treturn index === ranges.length || ranges[index].start >= span.end;\n\t});\n}\n\nfunction is_template_part(token: LexerToken | undefined): boolean {\n\treturn token?.type.label === 'template' || token?.type.label === 'invalidTemplate';\n}\n\n/** The espree token type of an acorn token. */\nfunction token_type(\n\ttoken: LexerToken,\n\tprevious: LexerToken | undefined,\n\tbefore_previous: LexerToken | undefined,\n): AST.TokenType {\n\tconst { label, keyword } = token.type;\n\tswitch (label) {\n\t\tcase 'name':\n\t\t\treturn token.value === 'static' || token.value === 'yield' || token.value === 'let'\n\t\t\t\t? 'Keyword'\n\t\t\t\t: 'Identifier';\n\t\tcase 'privateId':\n\t\t\treturn 'PrivateIdentifier';\n\t\tcase 'jsxName':\n\t\t\treturn 'JSXIdentifier';\n\t\tcase 'jsxText':\n\t\t\treturn 'JSXText';\n\t\tcase 'num':\n\t\t\treturn 'Numeric';\n\t\tcase 'regexp':\n\t\t\treturn 'RegularExpression';\n\t\tcase 'string':\n\t\t\t// A JSX attribute value, as in espree.\n\t\t\treturn previous?.type.label === '=' && before_previous?.type.label === 'jsxName'\n\t\t\t\t? 'JSXText'\n\t\t\t\t: 'String';\n\t}\n\tif (keyword === 'true' || keyword === 'false') return 'Boolean';\n\tif (keyword === 'null') return 'Null';\n\treturn keyword ? 'Keyword' : 'Punctuator';\n}\n\nfunction is_fatal_parser_diagnostic(error: any): boolean {\n\treturn (\n\t\terror?.code === DIAGNOSTIC_CODES.UNCLOSED_TAG ||\n\t\terror?.code === DIAGNOSTIC_CODES.MISMATCHED_CLOSING_TAG\n\t);\n}\n\nfunction to_eslint_parse_error(error: any): SyntaxError {\n\tconst parse_error: any = new SyntaxError(error?.message || String(error));\n\tconst loc = error?.loc?.start;\n\tif (loc) {\n\t\tparse_error.lineNumber = loc.line;\n\t\tparse_error.column = loc.column + 1;\n\t}\n\tif (typeof error?.start === 'number') {\n\t\tparse_error.index = error.start;\n\t}\n\treturn parse_error;\n}\n\n/**\n * ESLint parser for TSRX (.tsrx) files\n *\n * This parser uses the shared TSRX parser to parse .tsrx files\n * and returns an ESTree-compatible AST for ESLint to analyze.\n */\nexport function parseForESLint(code: string, options?: Linter.ParserOptions): ParseResult {\n\ttry {\n\t\tconst errors: any[] = [];\n\t\tconst comments: any[] = [];\n\t\t// Parse the TSRX source code using the shared TSRX parser. ESLint passes\n\t\t// `<input>` for in-memory sources (e.g. RuleTester), so a real filename is\n\t\t// only missing when the parser is invoked directly.\n\t\tconst ast = parse_module(code, options?.filePath || 'ESLintParser.tsrx', {\n\t\t\tcollect: true,\n\t\t\terrors,\n\t\t\tcomments,\n\t\t\t// Also records every token, as `tsrx_tokens`.\n\t\t\tkeywordTokens: true,\n\t\t}) as any;\n\t\tif (!ast) throw new Error('Parser returned null or undefined AST');\n\t\tconst lexer_tokens = ast.tsrx_tokens;\n\t\tdelete ast.tsrx_tokens;\n\t\tdelete ast.tsrx_keyword_tokens;\n\t\tanalyze_tsrx(ast, options?.filePath || 'ESLintParser.tsrx', {\n\t\t\tcollect: true,\n\t\t\terrors,\n\t\t\tcomments,\n\t\t});\n\n\t\tconst fatal_error = errors.find(is_fatal_parser_diagnostic);\n\t\tif (fatal_error) {\n\t\t\tthrow to_eslint_parse_error(fatal_error);\n\t\t}\n\n\t\t// Normalize for ESLint traversal (avoid duplicate node visits)\n\t\tconst texts = normalize_tsrx_ast_for_eslint(ast, code);\n\n\t\t// Recursively ensure all nodes have range and loc properties\n\t\tconst locate = create_locator(code);\n\t\tensure_node_properties(ast, locate);\n\n\t\tconst eslint_comments = to_eslint_comments(code, comments, locate);\n\n\t\t// Create a properly structured AST object ensuring all required properties exist\n\t\tconst result: any = {\n\t\t\ttype: ast.type || 'Program',\n\t\t\tstart: ast.start !== undefined ? ast.start : 0,\n\t\t\tend: ast.end !== undefined ? ast.end : code.length,\n\t\t\tloc: ast.loc || {\n\t\t\t\tstart: { line: 1, column: 0 },\n\t\t\t\tend: { line: code.split('\\n').length, column: 0 },\n\t\t\t},\n\t\t\trange: ast.range || [0, code.length],\n\t\t\tbody: ast.body || [],\n\t\t\tsourceType: ast.sourceType || 'module',\n\t\t\tcomments: eslint_comments,\n\t\t\ttokens: to_eslint_tokens(code, lexer_tokens, texts, eslint_comments, locate),\n\t\t};\n\n\t\treturn {\n\t\t\tast: result,\n\t\t\tservices: {\n\t\t\t\ttsrxDiagnostics: errors,\n\t\t\t},\n\t\t\tscopeManager: analyze_scope(result, options),\n\t\t\tvisitorKeys,\n\t\t};\n\t} catch (error: any) {\n\t\tif (error instanceof SyntaxError && (error as any).lineNumber != null) {\n\t\t\tthrow error;\n\t\t}\n\t\t// Transform TSRX parse errors to ESLint-compatible format\n\t\tthrow new SyntaxError(`Failed to parse TSRX file: ${error.message || error}`);\n\t}\n}\n\n/**\n * Legacy parse function for older ESLint versions\n */\nexport function parse(code: string, options?: Linter.ParserOptions): Program {\n\tconst result = parseForESLint(code, options);\n\treturn result.ast;\n}\n\nexport default {\n\tparseForESLint,\n\tparse,\n};\n"],"mappings":";;;AAgBA,MAAM,cAAwC;CAC7C,SAAS,CAAC,MAAM;CAChB,YAAY;EAAC;EAAkB;EAAY;CAAgB;CAC3D,mBAAmB;EAAC;EAAQ;EAAiB;CAAY;CACzD,mBAAmB,CAAC,QAAQ,eAAe;CAC3C,aAAa;EAAC;EAAmB;EAAY;CAAiB;CAC9D,oBAAoB,CAAC;CACrB,oBAAoB,CAAC;CACrB,wBAAwB,CAAC,YAAY;CACrC,cAAc,CAAC,QAAQ,OAAO;CAC9B,oBAAoB,CAAC,UAAU;CAC/B,eAAe,CAAC;CAChB,qBAAqB,CAAC,UAAU,UAAU;CAC1C,mBAAmB,CAAC,aAAa,MAAM;CACvC,SAAS,CAAC;CACV,iBAAiB;EAAC;EAAkB;EAAY;CAAgB;CAChE,iBAAiB,CAAC,WAAW;CAC7B,kBAAkB;EAAC;EAAS;EAAO;EAAQ;CAAO;CAClD,qBAAqB,CAAC,gBAAgB,OAAO;CAC7C,eAAe,CAAC,QAAQ,YAAY;CACpC,kBAAkB;EAAC;EAAS;EAAW;EAAW;CAAW;CAC7D,cAAc,CAAC,QAAQ,QAAQ;CAC/B,YAAY,CAAC;CACb,gBAAgB;EAAC;EAAQ;EAAS;CAAM;CAGxC,cAAc;EAAC;EAAS;EAAW;EAAW;CAAW;AAC1D;;;;;;;AAQA,IAAM,iBAAN,cAA6B,WAAW;CACvC,oCAAoB,IAAI,IAAc;CACtC,6BAAa,IAAI,IAAS;CAE1B,kBAAkB,MAAiB;EAClC,IAAI,CAAC,KAAK,eAAe;GACxB,MAAM,kBAAkB,IAAI;GAC5B;EACD;EAGA,KAAK,MA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U,MAAM;EAGjE,MAAM,SAAc;GACnB,MAAM,IAAI,QAAQ;GAClB,OAAO,IAAI,UAAU,KAAA,IAAY,IAAI,QAAQ;GAC7C,KAAK,IAAI,QAAQ,KAAA,IAAY,IAAI,MAAM,KAAK;GAC5C,KAAK,IAAI,OAAO;IACf,OAAO;KAAE,MAAM;KAAG,QAAQ;IAAE;IAC5B,KAAK;KAAE,MAAM,KAAK,MAAM,IAAI,CAAC,CAAC;KAAQ,QAAQ;IAAE;GACjD;GACA,OAAO,IAAI,SAAS,CAAC,GAAG,KAAK,MAAM;GACnC,MAAM,IAAI,QAAQ,CAAC;GACnB,YAAY,IAAI,cAAc;GAC9B,UAAU;GACV,QAAQ,iBAAiB,MAAM,cAAc,OAAO,iBAAiB,MAAM;EAC5E;EAEA,OAAO;GACN,KAAK;GACL,UAAU,EACT,iBAAiB,OAClB;GACA,cAAc,cAAc,QAAQ,OAAO;GAC3C;EACD;CACD,SAAS,OAAY;EACpB,IAAI,iBAAiB,eAAgB,MAAc,cAAc,MAChE,MAAM;EAGP,MAAM,IAAI,YAAY,8BAA8B,MAAM,WAAW,OAAO;CAC7E;AACD;;;;AAKA,SAAgB,MAAM,MAAc,SAAyC;CAE5E,OADe,eAAe,MAAM,OACxB,CAAC,CAAC;AACf;AAEA,IAAA,cAAe;CACd;CACA;AACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsrx/eslint-parser",
3
- "version": "0.6.2",
3
+ "version": "0.7.0",
4
4
  "description": "ESLint parser for TSRX (.tsrx files)",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -33,7 +33,8 @@
33
33
  "eslint": ">=9.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@tsrx/core": "0.5.4"
36
+ "eslint-scope": "^9.1.2",
37
+ "@tsrx/core": "0.6.0"
37
38
  },
38
39
  "devDependencies": {
39
40
  "@types/eslint": "^9.6.1",