feat: internal Rust napi parser + merge eslint-plugin-runner into @rslint/core#1035
Open
fansenze wants to merge 1 commit into
Open
feat: internal Rust napi parser + merge eslint-plugin-runner into @rslint/core#1035fansenze wants to merge 1 commit into
fansenze wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request replaces the hand-written JS tokenizer and the npm oxc-parser dependency with a new native Rust napi crate, crates/rslint-estree, which leverages oxc's parser-driven token stream. The former @rslint/eslint-plugin-runner package is merged directly into @rslint/core under packages/rslint/src/eslint-plugin. On the JS side, SourceCode now lazily rebuilds the token array from the columnar data sent from Rust. The review feedback highlights a bug in the language promotion logic where TypeScript definition files (.d.ts) are incorrectly promoted to .tsx when JSX is enabled, and suggests guarding against this by checking !st.is_typescript_definition().
31f590a to
f32a009
Compare
cf3193b to
8b393ea
Compare
…lint/core - Replace the npm parser + hand-written JS tokenizer with an internal Rust napi parser (ESTree AST + parser-driven tokens); visitorKeys vendored. - Ship the parser binary in the per-platform subpackages next to the Go CLI binary, resolved at runtime; @rslint/core depends on them. - Merge the runner into @rslint/core (src/eslint-plugin + tests/eslint-plugin); drop the @rslint/eslint-plugin-runner package. - Single rslib build for both the library surface and the eslint-plugin worker (the worker bundles its ESLint-compat deps, so consumers need none). - napi targets 3 -> 8 + release CI matrix.
8b393ea to
09cb991
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces
@rslint/eslint-plugin-runner's npm parser + hand-written JS tokenizer with an internal Rust napi parser, and merges the runner into@rslint/core.parse()→ ESTree AST + parser-driven token stream + comments. The hand-written JS tokenizer is removed;visitorKeysare vendored.@rslint/coredepends on them.src/eslint-plugin/, tests →tests/eslint-plugin/; removed@rslint/eslint-plugin-runner. A single rslib build covers both the library surface and the eslint-plugin worker (the worker bundles its ESLint-compat deps, so consumers need none). napi targets 3 → 8 + release CI matrix.Related Links
N/A
Checklist