-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update eslint-plugin-storybook version (#352)
* feat: Update eslint-plugin-storybook version * update snapshot * update snapshot * update snapshot * update snapshot
- Loading branch information
Showing
4 changed files
with
195 additions
and
244 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,23 @@ | ||
// @ts-check | ||
// @ts-ignore | ||
import importPlugin from 'eslint-plugin-import'; | ||
import * as storybook from 'eslint-plugin-storybook'; | ||
import storybookRuleSetBase from '../../rules/storybook.js'; | ||
|
||
const storybookRuleSetStories = { | ||
plugins: { | ||
storybook, | ||
import: importPlugin, | ||
}, | ||
|
||
rules: { | ||
...storybook.configs.recommended.overrides[0].rules, | ||
...storybook.configs['csf-strict'].rules, | ||
...storybookRuleSetBase.rules, | ||
'import/no-default-export': ['off'], | ||
}, | ||
}; | ||
|
||
const storybookRuleSetConfig = { | ||
plugins: { | ||
storybook, | ||
import: importPlugin, | ||
}, | ||
rules: { | ||
...storybook.configs.recommended.overrides[1].rules, | ||
'import/no-default-export': ['off'], | ||
}, | ||
}; | ||
import storybook from 'eslint-plugin-storybook'; | ||
|
||
export default [ | ||
{ | ||
files: ['**/*.@(stories|story).@(ts|tsx|js|jsx|mjs|cjs)'], | ||
...storybookRuleSetStories, | ||
plugins: { | ||
storybook, | ||
import: importPlugin, | ||
}, | ||
}, | ||
|
||
...storybook.configs['flat/recommended'], | ||
...storybook.configs['flat/csf-strict'], | ||
|
||
{ | ||
files: ['**/.storybook/**/*.@(ts|tsx|js|jsx|mjs|cjs)'], | ||
...storybookRuleSetConfig, | ||
files: ['**/*.@(stories|story).@(ts|tsx|js|jsx|mjs|cjs)'], | ||
rules: { | ||
'import/no-default-export': ['off'], | ||
}, | ||
}, | ||
]; |
Oops, something went wrong.