Skip to content

Commit

Permalink
Fix eslint-plugin-self to work with flat-config.
Browse files Browse the repository at this point in the history
  • Loading branch information
Standard8 authored and azeemba committed May 19, 2024
1 parent 4a4e557 commit 157d715
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vendor/eslint-plugin-self/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ if (plugin.configs) {
selfPlugin.configs[configName].extends = [].concat(config.extends)
.map(extendsName => extendsName.replace(`plugin:${pluginName}/`, 'plugin:self/'));
}
if (config.plugins) {
// The Array.isArray avoids attempting to change the plugins property for
// eslint v9 based configurations.
if (config.plugins && Array.isArray(config.plugins)) {
selfPlugin.configs[configName].plugins = [].concat(config.plugins)
.map(enabledPluginName => enabledPluginName.replace(pluginName, 'self'));
}
Expand Down

0 comments on commit 157d715

Please sign in to comment.