quick-lint-js icon indicating copy to clipboard operation
quick-lint-js copied to clipboard

Compare diagnostics with V8, ESLint+Babel, TypeScript, etc.

Open strager opened this issue 4 years ago • 3 comments

https://quick-lint-js.com/errors/

Allow people to compare diagnostics emitted by different parsers:

  • [ ] V8
  • [ ] JavaScriptCore
  • [ ] SpiderMonkey
  • [ ] ESLint+Babel
  • [ ] ESLint+Esprima
  • [ ] TypeScript
  • [ ] Flow

strager avatar May 14 '21 08:05 strager

i want to take this one.

dierpg avatar Dec 10 '21 07:12 dierpg

We could start out with a tool which runs all the different tools and prints out the diagnostics. tools/test-all-js-engines does this, but it runs the code samples. We want to just parse.

strager avatar Dec 10 '21 10:12 strager

I noticed that tools/test-all-js-engines has two problems for syntax errors:

  • It truncates error messages. This matters for SpiderMonkey which sometimes reports two-part errors. You can see this in the ; instead of , sample.
  • It truncates error messages. This means line and column numbers are excluded.

If you run the underlying JS engine directly, you get more information for syntax errors.

strager avatar Dec 12 '21 03:12 strager