-
Notifications
You must be signed in to change notification settings - Fork 38
Performance issues #44
Description
In a rather large project, that unfortunately I'm not at liberty to share, performance of this plugin is a bit dissappointing.
The result of this is not only that it might take a very long time to lint the entire project, but more importantly, in VScode with lint-fixing on save enabled, it will take several seconds for each save action to complete.
I understand it's difficult to get this problem fixed in this particular repository, however, there just might just be a workaround 😎
Inspired on this more generic issue and this preceeding issue, the solution appears to be this piece of VScode configuration:
"eslint.enable": true,
"eslint.useESLintClass": true,
"eslint.codeActionsOnSave.rules": [
"!deprecation/deprecation",
"*",
],
"editor.codeActionsOnSave": {
"source.fixAll": false,
"source.fixAll.eslint": true
},Essentially skipping the deprecation/deprecation rule. This is fine, because the rule only checks code, but doesn't provide fixes, which is exactly the only thing linting on save is good for. The other bits of config are important to get the VScode extension to understand the rules setting in the first place.
Now, I realise that this only fixes it for VScode (well, it does on my machine), so if you enjoy a different editor, you might have to seek out a different solution. However, the above configuration might nudge that search in the right direction. I would not be surprised if eslint plugins for other editors have a similar rules setting to filter certain rules.
And perhaps it's a good idea to list those solutions below, when anyone finds one.