From 1b90ea752636959babb27ebca5d67093c346dab9 Mon Sep 17 00:00:00 2001 From: Ben Scott <227292+BPScott@users.noreply.github.com> Date: Sun, 13 Dec 2020 14:43:12 -0800 Subject: [PATCH] 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 --- eslint-plugin-prettier.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/eslint-plugin-prettier.js b/eslint-plugin-prettier.js index 23249c1a..fd7e453c 100644 --- a/eslint-plugin-prettier.js +++ b/eslint-plugin-prettier.js @@ -154,15 +154,6 @@ module.exports = { const filepath = context.getFilename(); const source = sourceCode.text; - // This allows long-running ESLint processes (e.g. vscode-eslint) to - // pick up changes to .prettierrc without restarting the editor. This - // will invalidate the prettier plugin cache on every file as well which - // will make ESLint very slow, so it would probably be a good idea to - // find a better way to do this. - if (usePrettierrc && prettier && prettier.clearConfigCache) { - prettier.clearConfigCache(); - } - return { Program() { if (!prettier) {