Skip to content

Commit

Permalink
Allow running with plugins that are compatible with ESLint flat config (
Browse files Browse the repository at this point in the history
  • Loading branch information
Standard8 committed Apr 20, 2024
1 parent d3bf60d commit 54ea1b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 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 54ea1b5

Please sign in to comment.