Skip to content

Commit

Permalink
fix(config): get rid of array in config export
Browse files Browse the repository at this point in the history
  • Loading branch information
timofei-iatsenko committed Oct 11, 2024
1 parent 89f5953 commit 34e5018
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ To enable all of the recommended rules for our plugin, add the following config:
import pluginLingui from 'eslint-plugin-lingui'

export default [
...pluginLingui.configs['flat/recommended'],
pluginLingui.configs['flat/recommended'],
// Any other config...
]
```
Expand Down
14 changes: 6 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface Plugin extends Omit<ESLint.Plugin, 'rules'> {
rules: Record<RuleKey, RuleModule<any, any, any>>
configs: {
recommended: ESLint.ConfigData
'flat/recommended': Array<Linter.FlatConfig>
'flat/recommended': Linter.FlatConfig
}
}

Expand All @@ -50,14 +50,12 @@ Object.assign(plugin.configs, {
plugins: ['lingui'],
rules: recommendedRules,
},
'flat/recommended': [
{
plugins: {
lingui: plugin,
},
rules: recommendedRules,
'flat/recommended': {
plugins: {
lingui: plugin,
},
],
rules: recommendedRules,
},
})

export = plugin

0 comments on commit 34e5018

Please sign in to comment.