-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Improve parse perf when using @typescript-eslint/parser
#1409
Conversation
Fixes #1408 See the above issue for justification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, but rather than mutating the new parserOptions object, maybe we could change this entire block to:
parserOptions = Object.assign({}, parserOptions, {
ecmaFeatures: Object.assign({}, parserOptions.ecmaFeatures),
comment: true,
attachComment: true,
tokens: true,
loc: true,
range: true,
filePath: path,
project: undefined,
projects: undefined,
})
?
LGTM; i'm not sure if appveyor is failing on master or only on this PR. |
@ljharb - appveyor was passing with my first commit - it appears using |
That's a shame. We can fix that in a followup PR. |
No need to re- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! Excited to see this land.
This comment has been minimized.
This comment has been minimized.
@benmosher it’s still better to create a new object all at once instead of mutating it at any point. |
fair enough, but even if we used destructuring to remove the fields (iff this file was being transpiled) the Babel'd version would start with an empty object and add fields. given that we can't predict all the fields we need to pass through, this seems acceptable to me. I'm good to merge if you are, @ljharb. |
Definitely, we can look into creating the object differently in a follow up. Once tests are passing, it’s good to go. |
@ljharb - having a look, the travis CI tests that are failing are the same ones that are failing in master right now (tests against eslint v2/v3) |
We should fix those in master first, then, and rebase this PR |
This comment has been minimized.
This comment has been minimized.
If tests are failing in master can we just merge this and release? |
No, we shouldn’t merge and must not release without passing tests. |
ok. sorry |
sorry @deser, test failures were on me but they are fixed now 👍🏼 |
AppVeyor failed during install time on node8.
If not I can just push a fluff commit to make it retry |
thanks for getting this merged! @ljharb can you cut a release of eslint-module-utils as well? it looks like only eslint-plugin-import got released after this change |
Oops, yes will do today. |
v2.4.1 of eslint-module-utils is published. |
Fixes #1408
See the above issue for justification.