You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What did you expect to happen?
I expect the lint time to be quicker.
What actually happened?
The lint time was slow.
When I run cross-env TIMING=1 DEBUG=eslint:cli-engine vue-cli-service lint --no-fix with the above .eslintrc.json, the amount of time it takes to lint the full project is around 65 seconds.
When I set parserOptions.project to null in the above .eslintrc.json, the amount of time it takes to lint the full project is around 20 seconds.
In the first run, the debug info shows ~3seconds for the first Vue file. Thereafter, .vue files are typically around 300-500ms, and .ts files are around 10-50ms.
In the second run, the debug info shows ~3 seconds for the first Vue file still. Thereafter, .vue files are typically around 50-100ms, and .ts files are around 10-50ms.
The rule % split and time from TIMING=1 looks approximately the same:
If this was all it took to speed up the project, then I wouldn't bother mentioning this issue. However, there are now three new errors caught by the linter, which appear to all be false positives.
I'm not familiar with typescript parsers. So I can't identify the cause of the slowdown in your environment. It looks like it's working fine in my environment. If you can improve, can you follow #1296.
I'm not going to open an new issue, but just want point out, the parser indeed slow, not only @typescript-eslint/parser but also @babel/eslint-parser, I didn't test espree because I can never use it in my vue projects. Maybe not about the js parser, just too much work to do when parsing Vue SFC.
Tell us about your environment
Please show your full configuration:
tsconfig.json:
What did you do?
What did you expect to happen?
I expect the lint time to be quicker.
What actually happened?
The lint time was slow.
When I run
cross-env TIMING=1 DEBUG=eslint:cli-engine vue-cli-service lint --no-fix
with the above .eslintrc.json, the amount of time it takes to lint the full project is around 65 seconds.When I set
parserOptions.project
tonull
in the above .eslintrc.json, the amount of time it takes to lint the full project is around 20 seconds.In the first run, the debug info shows ~3seconds for the first Vue file. Thereafter, .vue files are typically around 300-500ms, and .ts files are around 10-50ms.
In the second run, the debug info shows ~3 seconds for the first Vue file still. Thereafter, .vue files are typically around 50-100ms, and .ts files are around 10-50ms.
The rule % split and time from TIMING=1 looks approximately the same:
Run 1:
Run 2:
If this was all it took to speed up the project, then I wouldn't bother mentioning this issue. However, there are now three new errors caught by the linter, which appear to all be false positives.
Is it necessary for
parserOptions.project
to be passed to the parser? If so, is it possible to speed up the time spent parsing each .vue SFC file?The text was updated successfully, but these errors were encountered: