Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Ensure shared references in rule configs are separated (#17666)
* fix: Ensure shared references in rule configs are separated. In eslint.config.js files, it's possible for two rule configs to contain references to the same object. That object may be modified during validation, thus affecting all configs, and may create validation errors. This clones rule configs before validation to ensure that each rule is using unique references to manage its configs. Fixes #12592 * Update tests/lib/config/flat-config-array.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update tests/lib/config/flat-config-array.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update lib/config/flat-config-schema.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Update lib/config/flat-config-schema.js Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com> * Upgrade config-array and update tests --------- Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
- Loading branch information
1 parent
f30cefe
commit 5de9637
Showing
3 changed files
with
124 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters