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: fix Ignoring Files section in config migration guide #17392

Merged
merged 2 commits into from Jul 20, 2023

Conversation

mdjermanovic
Copy link
Member

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:

Fixes Ignoring Files section in config migration guide.

What changes did you make? (Give an overview)

Fixed some incorrect details.

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

@mdjermanovic mdjermanovic added the documentation Relates to ESLint's documentation label Jul 20, 2023
@mdjermanovic mdjermanovic requested a review from a team as a code owner July 20, 2023 08:39
@netlify
Copy link

netlify bot commented Jul 20, 2023

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit fcba557
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/64b8f39dff30aa0008ce4f53
😎 Deploy Preview https://deploy-preview-17392--docs-eslint.netlify.app/use/configure/migration-guide
📱 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.

To ignore files with flat config, you can use the `ignores` property in a config object. The `ignores` property accepts an array of glob patterns. Note that flat config glob patterns do _not_ match dot files (e.g. `*.js` won't match `.dotfile.js`). Flat config does not support loading ignore patterns from `.eslintignore` files, so you'll need to migrate those patterns directly into flat config.
To ignore files with flat config, you can use the `ignores` property in a config object. The `ignores` property accepts an array of glob patterns. Flat config does not support loading ignore patterns from `.eslintignore` files, so you'll need to migrate those patterns directly into flat 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.

The removed sentence was incorrect.

{
// ...other 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.

There should be no other config here.

// ...other config
ignores: ["temp.js", ".config/*"]

ignores: ["**/temp.js", "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.

**/temp.js in flat config is equivalent to temp.js in eslintrc.

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 80dffed into main Jul 20, 2023
22 checks passed
@nzakas nzakas deleted the docs-fix-migration-ignores branch July 20, 2023 15:00
bmish added a commit to bmish/eslint that referenced this pull request Jul 23, 2023
* main: (101 commits)
  docs: Migrating `eslint-env` configuration comments (eslint#17390)
  Merge pull request from GHSA-qwh7-v8hg-w8rh
  feat: adds option for allowing empty object patterns as parameter (eslint#17365)
  fix: FlatESLint#getRulesMetaForResults shouldn't throw on unknown rules (eslint#17393)
  docs: fix Ignoring Files section in config migration guide (eslint#17392)
  docs: Update README
  feat: Improve config error messages (eslint#17385)
  fix: Update no-loop-func to not overlap with no-undef (eslint#17358)
  docs: Update README
  docs: Update README
  8.45.0
  Build: changelog update for 8.45.0
  chore: package.json update for @eslint/js release
  docs: add playground links to correct and incorrect code blocks (eslint#17306)
  docs: Expand rule option schema docs (eslint#17198)
  docs: Config Migration Guide (eslint#17230)
  docs: Update README
  fix: Fix suggestion message in `no-useless-escape` (eslint#17339)
  docs: Update README
  chore: update eslint-config-eslint exports (eslint#17336)
  ...
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Jan 17, 2024
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jan 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion documentation Relates to ESLint's documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants