Skip to content

Commit 1b90ea7

Browse files
authored
Minor: Do not clear the config cache on each run (#368)
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
1 parent 86608d5 commit 1b90ea7

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

eslint-plugin-prettier.js

-9
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,6 @@ module.exports = {
154154
const filepath = context.getFilename();
155155
const source = sourceCode.text;
156156

157-
// This allows long-running ESLint processes (e.g. vscode-eslint) to
158-
// pick up changes to .prettierrc without restarting the editor. This
159-
// will invalidate the prettier plugin cache on every file as well which
160-
// will make ESLint very slow, so it would probably be a good idea to
161-
// find a better way to do this.
162-
if (usePrettierrc && prettier && prettier.clearConfigCache) {
163-
prettier.clearConfigCache();
164-
}
165-
166157
return {
167158
Program() {
168159
if (!prettier) {

0 commit comments

Comments
 (0)