-
Notifications
You must be signed in to change notification settings - Fork 69
docs: typo in flat config setup instructions #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
README.md
Outdated
| export default [ | ||
| // ... | ||
| { | ||
| // Inside your .eslintignore file | ||
| // Inside your flat config file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original comment is actually correct, it's meant to match the content specified in the .eslintignore file, as stated in a few sentences above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. Personally, I found that a little bit confusing as the comment refers to the .eslintignore file which is no longer supported in ESLint 9. I've just pushed one more commit with changes that may make it more clear that if one uses a flat configuration file, it's enough to only put it there. Feel free to close the PR if you disagree though
btw, thanks for maintaining this package!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, and I feel you could make larger changes to improve the doc further :)
| // ... | ||
| { | ||
| // Inside your .eslintignore file | ||
| ignores: ['!.storybook'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ignores: ['!.storybook'], | |
| // Replaces your .eslintignore file | |
| ignores: ['!.storybook'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be worth reminding people that ignores comes instead of eslintignore.
|
|
||
| This allows for this plugin to also lint your configuration files inside the .storybook folder, so that you always have a correct configuration and don't face any issues regarding mistyped addon names, for instance. | ||
|
|
||
| > For more info on why this line is required in the .eslintignore file, check this [ESLint documentation](https://eslint.org/docs/latest/use/configure/ignore-deprecated#:~:text=In%20addition%20to,contents%20are%20ignored). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: to make sure that the legacy/flat config snippets stay side by side,
- I would move this callout and the paragraph before, to place them after the flat config example
- I would rework the wording to say "For more info on why this line is required in the .eslintignore file or the
ignoresobject, ..."
What Changed
Updated flat config setup instructions. The instruction itself seems to work fine but that comment might be misleading - it references
.eslintignorewhile one's editing a flat config file.Checklist
Check the ones applicable to your change:
pnpm run update-allChange Type
Indicate the type of change your pull request is:
maintenancedocumentationpatchminormajor