Skip to content

feat: Export defineConfig, globalIgnores #19487

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

Merged
merged 7 commits into from
Mar 7, 2025
Merged

feat: Export defineConfig, globalIgnores #19487

merged 7 commits into from
Mar 7, 2025

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Mar 7, 2025

Prerequisites checklist

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

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

What changes did you make? (Give an overview)

  1. Created a /config entrypoint on the package to export defineConfig and globalIgnores
  2. Added type definitions for /config entrypoint
  3. Updated type tests
  4. Updated eslint.config.js to use defineConfig and globalIgnores
  5. Updated documentation:

fixes #19116

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

Did I miss any important docs?

@nzakas nzakas requested a review from a team as a code owner March 7, 2025 16:42
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Mar 7, 2025
@eslint-github-bot eslint-github-bot bot added the feature This change adds a new feature to ESLint label Mar 7, 2025
Copy link

netlify bot commented Mar 7, 2025

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit c09f969
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/67cb4f750c472a00086159bf
😎 Deploy Preview https://deploy-preview-19487--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.

@mdjermanovic mdjermanovic added the accepted There is consensus among the team that this change meets the criteria for inclusion label Mar 7, 2025
@mdjermanovic mdjermanovic moved this from Needs Triage to Implementing in Triage Mar 7, 2025
@@ -72,15 +72,17 @@ This ensures that pnpm installs dependencies in a way that is more compatible wi
You can configure rules in your `eslint.config.js` files as in this example:

```js
export default [
import { defineConfig } from "eslint/config";
Copy link
Member

Choose a reason for hiding this comment

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

Since eslint is still CJS, should we maybe rather use default imports (e.g., import config from "eslint/config";) in ESM config examples as they're guaranteed to work?

Copy link
Member Author

Choose a reason for hiding this comment

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

At least locally, this seems to work fine as-is. (Node v22.9.0)

nzakas and others added 4 commits March 7, 2025 14:53
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
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 7ddb095 into main Mar 7, 2025
31 checks passed
@mdjermanovic mdjermanovic deleted the define-config branch March 7, 2025 20:15
@github-project-automation github-project-automation bot moved this from Implementing to Complete in Triage Mar 7, 2025
kdeldycke added a commit to kdeldycke/workflows that referenced this pull request Jul 19, 2025
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 feature This change adds a new feature to ESLint
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Change Request: Flat config extends
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy