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: indicate eslintrc mode for .eslintignore #18285

Merged
merged 6 commits into from Apr 12, 2024
Merged

Conversation

fasttime
Copy link
Member

@fasttime fasttime commented Apr 7, 2024

Prerequisites checklist

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

[X] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

Updated descriptions of the --ignore-pattern CLI flag to clarify that .eslintignore only applies in eslintrc mode. In the new config system, ignore patterns are defined in the config.

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

@eslint-github-bot eslint-github-bot bot added the documentation Relates to ESLint's documentation label Apr 7, 2024
@github-actions github-actions bot added cli Relates to ESLint's command-line interface and removed documentation Relates to ESLint's documentation labels Apr 7, 2024
Copy link

netlify bot commented Apr 7, 2024

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 29210be
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/6618ea3b60e8f80008cf39ff
😎 Deploy Preview https://deploy-preview-18285--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.

@fasttime fasttime marked this pull request as ready for review April 7, 2024 12:57
@fasttime fasttime requested a review from a team as a code owner April 7, 2024 12:57
@aladdin-add aladdin-add added documentation Relates to ESLint's documentation accepted There is consensus among the team that this change meets the criteria for inclusion labels Apr 7, 2024
--ignore-pattern [String] Pattern of files to ignore (in addition to those in .eslintignore)
--ignore-pattern [String] Patterns of files to ignore
Copy link
Contributor

Choose a reason for hiding this comment

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

This option also works with legacy config, so this info might still be useful for those users depending upon the config.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've updated the texts as suggested by @nzakas. Does the new wording look good to you?

@@ -426,7 +426,7 @@ npx eslint --no-ignore file.js

#### `--ignore-pattern`

This option allows you to specify patterns of files to ignore (in addition to those in `.eslintignore`).
This option allows you to specify patterns of files to ignore.
Copy link
Member

Choose a reason for hiding this comment

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

We should probably say "In eslintrc mode, these are in addition to .eslintignore."

@github-actions github-actions bot removed the documentation Relates to ESLint's documentation label Apr 9, 2024
@fasttime fasttime changed the title docs: remove obsolete references to .eslintignore docs: indicate eslintrc mode for .eslintignore Apr 9, 2024
@eslint-github-bot eslint-github-bot bot added the documentation Relates to ESLint's documentation label Apr 9, 2024
@github-actions github-actions bot removed the documentation Relates to ESLint's documentation label Apr 9, 2024
@amareshsm amareshsm added the documentation Relates to ESLint's documentation label Apr 9, 2024
lib/options.js Outdated
@@ -261,7 +261,7 @@ module.exports = function(usingFlatConfig) {
{
option: "ignore-pattern",
type: "[String]",
description: "Patterns of files to ignore",
description: "Patterns of files to ignore. In eslintrc mode, these are in addition to `.eslintignore`",
Copy link
Member

Choose a reason for hiding this comment

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

Instead of always displaying this, can we use the usingFlatConfig variable to only show "these are in addition to .eslintignore" when using eslintrc?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've changed it so the original text will be printed in eslintrc mode. In flat config mode, the notice about .eslintignore will be omitted.

@github-actions github-actions bot removed the documentation Relates to ESLint's documentation label Apr 10, 2024
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
@eslint-github-bot eslint-github-bot bot added the documentation Relates to ESLint's documentation label Apr 12, 2024
@github-actions github-actions bot removed the documentation Relates to ESLint's documentation label Apr 12, 2024
@eslint-github-bot eslint-github-bot bot added the documentation Relates to ESLint's documentation label Apr 12, 2024
@github-actions github-actions bot removed the documentation Relates to ESLint's documentation label Apr 12, 2024
@fasttime fasttime requested a review from nzakas April 12, 2024 08:02
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 200fd4e into main Apr 12, 2024
19 checks passed
@nzakas nzakas deleted the docs-remove-eslintignore branch April 12, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion cli Relates to ESLint's command-line interface
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

None yet

5 participants