[suggest] improve compatibility with more estree parsers?
See original GitHub issueI am trying to use eslint-scope with meriyah which uses different data structure for ranges.
It doesn’t have .range: [start, end]
, but has direct .start
and .end
.
If I update the above code from .range[0]
to .start
, everything works fine with meriyah.
Do you consider to improve compatibility with other estree parsers? To check both .range[0]
and .start
? Thanks!
FYI, estree spec seems didn’t define the shape of ranges, it only defined position. https://github.com/estree/estree/blob/14df8a024956ea289bd55b9c2226a1d5b8a473ee/es5.md#node-objects
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
@typescript-eslint/typescript-estree | Yarn - Package Manager
owner typescript-eslint117.2mBSD-2-Clause5.47.1TS vulns 0 vulnerabilities. A parser that converts TypeScript source code into an ESTree compatible form.
Read more >gruntjs - Version of TypeScript not officially supported by ...
I make the assumption that typescript is installed locally. Is it possible? How can I check the installed tool versions ( tsc and...
Read more >eslint-plugin-import - npm
Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.
Read more >Working with Custom Parsers - Pluggable JavaScript Linter
The AST that custom parsers should create is based on ESTree. The AST requires some additional properties about detail information of the source...
Read more >babel/parser
The Babel parser (previously Babylon) is a JavaScript parser used in Babel. ... It can provide up to 30% performance improvement when the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I noticed it is acknowledged that both
.range
and.start
.end
are non-standard. Same as what I read from estree spec. https://github.com/eslint/eslint/issues/8956@nzakas you probably missed my comment on reopening of the issue.