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

feat: Add globalIgnores helper function #159

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Implementing
Development

Successfully merging this pull request may close these issues.

2 participants