Skip to content

Commit

Permalink
Merge branch 'main' into feat/flat-config
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed May 17, 2024
2 parents f91ce9a + eef5e25 commit a147a75
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/rules/await-interactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ MyStory.play = async (context) => {

## When Not To Use It

This rule should not be applied in test files. Please ensure you are defining the storybook rules only for story files. You can see more details [here](https://github.com/storybookjs/eslint-plugin-storybook#eslint-overrides).
This rule should not be applied in test files. Please ensure you are defining the storybook rules only for story files. You can see more details [here](https://github.com/storybookjs/eslint-plugin-storybook#overridingdisabling-rules).
2 changes: 1 addition & 1 deletion docs/rules/context-in-play-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ MyStory.play = (context) => {

## When Not To Use It

This rule should not be applied in test files. Please ensure you are defining the storybook rules only for story files. You can see more details [here](https://github.com/storybookjs/eslint-plugin-storybook#eslint-overrides).
This rule should not be applied in test files. Please ensure you are defining the storybook rules only for story files. You can see more details [here](https://github.com/storybookjs/eslint-plugin-storybook#overridingdisabling-rules).
4 changes: 2 additions & 2 deletions docs/rules/default-exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export const Primary = {}

## When Not To Use It

This rule should only be applied in your `.stories.*` files. Please ensure you are defining the storybook rules only for story files. You can see more details [here](https://github.com/storybookjs/eslint-plugin-storybook#eslint-overrides).
This rule should only be applied in your `.stories.*` files. Please ensure you are defining the storybook rules only for story files. You can see more details [here](https://github.com/storybookjs/eslint-plugin-storybook#overridingdisabling-rules).

If you're using [CSF in MDX](https://github.com/storybookjs/storybook/blob/next/addons/docs/docs/recipes.md#csf-stories-with-mdx-docs), you should disable this rule for the stories that use CSF in MDX. You can see how to override the rule [here](https://github.com/storybookjs/eslint-plugin-storybook#eslint-overrides).
If you're using Storybook 6.5 and [CSF in MDX](https://github.com/storybookjs/storybook/blob/v6.5.0/addons/docs/docs/recipes.md#csf-stories-with-mdx-docs), you should disable this rule for the stories that use CSF in MDX. You can see how to override the rule [here](https://github.com/storybookjs/eslint-plugin-storybook#overridingdisabling-rules).

## Further Reading

Expand Down
4 changes: 0 additions & 4 deletions docs/rules/meta-inline-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,3 @@ export default {
component: Button,
}
```

## Further Reading

If there are other links that describe the issue this rule addresses, please include them here in a bulleted list.
2 changes: 1 addition & 1 deletion docs/rules/story-exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const Primary = {} // at least one named export!

## When Not To Use It

This rule should only be applied in your `.stories.*` files. Please ensure you are defining the storybook rules only for story files. You can see more details [here](https://github.com/storybookjs/eslint-plugin-storybook#eslint-overrides).
This rule should only be applied in your `.stories.*` files. Please ensure you are defining the storybook rules only for story files. You can see more details [here](https://github.com/storybookjs/eslint-plugin-storybook#overridingdisabling-rules).

## Further Reading

Expand Down
6 changes: 1 addition & 5 deletions docs/rules/use-storybook-expect.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,4 @@ Default.play = () => {

## When Not To Use It

This rule should not be applied in test files. Please ensure you are defining the storybook rules only for story files. You can see more details [here](https://github.com/storybookjs/eslint-plugin-storybook#eslint-overrides).

## Further Reading

If there are other links that describe the issue this rule addresses, please include them here in a bulleted list.
This rule should not be applied in test files. Please ensure you are defining the storybook rules only for story files. You can see more details [here](https://github.com/storybookjs/eslint-plugin-storybook#overridingdisabling-rules).
6 changes: 1 addition & 5 deletions docs/rules/use-storybook-testing-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,4 @@ Default.play = async (context) => {

## When Not To Use It

This rule should not be applied in test files. Please ensure you are defining the storybook rules only for story files. You can see more details [here](https://github.com/storybookjs/eslint-plugin-storybook#eslint-overrides).

## Further Reading

If there are other links that describe the issue this rule addresses, please include them here in a bulleted list.
This rule should not be applied in test files. Please ensure you are defining the storybook rules only for story files. You can see more details [here](https://github.com/storybookjs/eslint-plugin-storybook#overridingdisabling-rules).
16 changes: 8 additions & 8 deletions tools/generate-rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const generateRule = async () => {
meta: {
type: 'problem', // \`problem\`, \`suggestion\`, or \`layout\`
docs: {
description: 'Fill me in',
description: '${ruleDescription}',
// Add the categories that suit this rule.
categories: [CategoryId.RECOMMENDED],
recommended: 'warn', // \`warn\` or \`error\`
Expand Down Expand Up @@ -138,7 +138,9 @@ const generateRule = async () => {
},
}
},
})\n`)
})
`)
)

logger.log(`creating tests/lib/rules/${ruleId}.test.ts`)
Expand Down Expand Up @@ -178,7 +180,8 @@ const generateRule = async () => {
},
],
})
`)
`)
)

logger.log(`creating docs/rules/${ruleId}.md`)
Expand All @@ -197,17 +200,13 @@ const generateRule = async () => {
Examples of **incorrect** code for this rule:
\`\`\`js
// fill me in
\`\`\`
Examples of **correct** code for this rule:
\`\`\`js
// fill me in
\`\`\`
### Options
Expand All @@ -221,7 +220,8 @@ const generateRule = async () => {
## Further Reading
If there are other links that describe the issue this rule addresses, please include them here in a bulleted list. Otherwise, delete this section.
`)
`)
)

const { shouldOpenInVSCode } = await prompts({
Expand Down

0 comments on commit a147a75

Please sign in to comment.