Skip to content
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

docs: mention about name field in flat config #18252

Merged
merged 12 commits into from Apr 4, 2024

Conversation

antfu
Copy link
Contributor

@antfu antfu commented Apr 1, 2024

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

  • Documentation update

What changes did you make? (Give an overview)

Resolves #18231

This PR updates the docs for flat config, mentioning the name property. Recommending people to provide that field with a convention to have / as the separator (consistent with how rules are composed).

Is there anything you'd like reviewers to focus on?

@antfu antfu requested a review from a team as a code owner April 1, 2024 12:36
@eslint-github-bot eslint-github-bot bot added the documentation Relates to ESLint's documentation label Apr 1, 2024
Copy link

netlify bot commented Apr 1, 2024

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 69928c5
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/660dd23c783729000891feb8
😎 Deploy Preview https://deploy-preview-18252--docs-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together. Just left a few suggestions for clarifying.

docs/src/use/configure/configuration-files.md Outdated Show resolved Hide resolved
docs/src/use/configure/configuration-files.md Outdated Show resolved Hide resolved
docs/src/use/configure/configuration-files.md Outdated Show resolved Hide resolved
@antfu antfu requested a review from nzakas April 1, 2024 21:55
docs/src/use/configure/configuration-files.md Outdated Show resolved Hide resolved
Co-authored-by: Nicholas C. Zakas <[email protected]>
Comment on lines +355 to +360
recommended: {
name: "example/recommended",
rules: {
"no-unused-vars": "warn"
}
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the convention if the configuration is an array of configuration objects? Would it be the same name for all configuration objects?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I mentioned it here 8cccc58

Supposely the config inspector could have an indicator of duplicated names to help with that as well.

nzakas
nzakas previously approved these changes Apr 3, 2024
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a bit of grammar cleanup, but otherwise LGTM.

docs/src/use/configure/configuration-files.md Outdated Show resolved Hide resolved
docs/src/use/configure/configuration-files.md Outdated Show resolved Hide resolved
Co-authored-by: Nicholas C. Zakas <[email protected]>
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@nzakas nzakas merged commit 94178ad into eslint:main Apr 4, 2024
19 checks passed
@antfu antfu deleted the feat/flat-config-name branch April 4, 2024 22:21
aladdin-add added a commit to eslint-community/eslint-plugin-eslint-plugin that referenced this pull request Apr 8, 2024
aladdin-add added a commit to eslint-community/eslint-plugin-n that referenced this pull request Apr 8, 2024
aladdin-add added a commit to eslint-community/eslint-plugin-n that referenced this pull request Apr 8, 2024
aladdin-add added a commit to eslint-community/eslint-plugin-n that referenced this pull request Apr 8, 2024
aladdin-add added a commit to eslint-community/eslint-plugin-n that referenced this pull request Apr 8, 2024
* feat: add `name` to flat configs

refs: eslint/eslint#18252

* fix: npm install error
aladdin-add added a commit to eslint-community/eslint-plugin-eslint-plugin that referenced this pull request Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Relates to ESLint's documentation
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Support name field in flat config and recommend as an convention
4 participants