-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Conversation
✅ Deploy Preview for docs-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
|
||
| ```js | ||
| export default [ | ||
| import { defineConfig } from "eslint/config"; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
Co-authored-by: Milos Djermanovic <[email protected]>
Co-authored-by: Milos Djermanovic <[email protected]>
Co-authored-by: Milos Djermanovic <[email protected]>
mdjermanovic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
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)
/configentrypoint on the package to exportdefineConfigandglobalIgnores/configentrypointeslint.config.jsto usedefineConfigandglobalIgnoresdocs/src/use/configure/combine-configs.md: Updated all examples to usedefineConfigfor defining configurations, ensuring consistency and clarity in the documentation. [1] [2] [3]docs/src/use/configure/configuration-files.md: Revised multiple sections to incorporatedefineConfig, including examples for applying rules, specifying files, and handling ignores. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]README.md: Updated the example configuration to usedefineConfigfor better compatibility and standardization.fixes #19116
Is there anything you'd like reviewers to focus on?
Did I miss any important docs?