Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor fixes for eslint.codeActionsOnSave.rules mechanism (#1364)
* saveRuleConfigCache is indexed by file path not uri When adding new entries to saveRuleConfigCache those entries are indexed by file path (lines 589 and 592), but we are trying to delete them by URI. This is causing cache entries to become stale if the settings are changed. * getSaveRuleConfig returns undefined with eslint@8 The function getSaveRuleConfig returns undefined on eslint@8 unless the setting eslint.useESLintClass == true, but there's no point on using this setting with eslint@8 as the CLIEngine is no longer available. To fix this I changed the condition to check if the ESLintClass.isCliEngine == true, this way we can keep the logic about the engine selection and capabilities only within the ESLintClass.newESLintClass function. * Revert "saveRuleConfigCache is indexed by file path not uri" This reverts commit 63e3556. * use the uri as key for saveRuleConfigCache
- Loading branch information