Skip to content

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Feb 26, 2025

Prerequisites checklist

What is the purpose of this pull request?

Added a globalIgnores() function

What changes did you make? (Give an overview)

This pull request introduces the globalIgnores function to the config-helpers package, allowing users to specify patterns for files and directories that should be globally ignored by ESLint. The most important changes include the addition of this new function, updates to the documentation, and corresponding tests.

  • Added globalIgnores function in packages/config-helpers/src/global-ignores.js to create a global ignores config with specified patterns.
  • Exported globalIgnores function in packages/config-helpers/src/index.js.
  • Updated packages/config-helpers/README.md to include a section on the globalIgnores function, with an example usage.
  • Added a new build script build:dedupe-types in packages/config-helpers/package.json to deduplicate types.
  • Added tests for the globalIgnores function in packages/config-helpers/tests/global-ignores.test.js.
  • Updated existing tests to include globalIgnores in packages/config-helpers/tests/index.test.js and packages/config-helpers/tests/types/types.test.ts. [1] [2] [3] [4] [5]

Related Issues

Refs eslint/eslint#19403

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

I added a second argument to allow specifying a name. Is that the right approach?

@mdjermanovic
Copy link
Member

I added a second argument to allow specifying a name. Is that the right approach?

I think it's the right approach. I agree with your note from eslint/eslint#19403 (comment) that passing an object with ignores and name would look too much like a regular config.

@nzakas nzakas moved this from Needs Triage to Implementing in Triage Feb 27, 2025
Copy link
Member

@mdjermanovic mdjermanovic 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!

@mdjermanovic mdjermanovic merged commit d8e05d8 into main Feb 28, 2025
18 checks passed
@mdjermanovic mdjermanovic deleted the global-ignores branch February 28, 2025 11:40
@github-project-automation github-project-automation bot moved this from Implementing to Complete in Triage Feb 28, 2025
@github-actions github-actions bot mentioned this pull request Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

2 participants