Skip to content

Conversation

@BPScott
Copy link
Member

@BPScott BPScott commented Dec 13, 2020

Fixes #304

This halfs the time taken on CLI runs. However when you make a config
change your editor won't pick up that change until you reload your
editor window (either by restarting your editor, or in VSCode there is a
"Reload window" command).

Given that most of the time you're not adjusting your config, this
speedup is worth that extra bit of friction.

After this change your editor's eslint plugin will not instantly pick up config changes in .prettierrc. I suggest moving your prettier config into package.json - which eslint plugins should already be watching as it may effect eslint configuration changes. Worst case scenario you'll need to restart your editor after changing your prettier configuration.

On my test repo, getting timing info by running TIMING=1 yarn run eslint .: Without this change the prettier/prettier rule takes ~19s, with this change it takes ~8.5s.

This halfs the time taken on CLI runs. However when you make a config
change your editor won't pick up that change until you reload your
editor window (either by restarting your editor, or in VSCode there is a
"Reload window" command).

Given that most of the time you're not adjusting your config, this
speedup is worth that extra bit of friction
@BPScott BPScott merged commit 1b90ea7 into master Dec 13, 2020
@BPScott BPScott deleted the keep-config-cache branch December 13, 2020 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eslint-plugin-prettier is very slow

2 participants