-
-
Notifications
You must be signed in to change notification settings - Fork 27
Add strict presets #1266
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
Add strict presets #1266
Conversation
The commit adds new strict presets for both regular and TypeScript configurations while cleaning up the config file organization and naming.
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Pull Request Overview
This PR introduces strict preset configurations for ESLint React, providing more opinionated rule enforcement options. The strict presets enable additional rules that are disabled by default in the recommended configurations, giving developers stricter lint enforcement options.
- Adds new strict preset configurations:
strict
,strict-typescript
, andstrict-type-checked
- Refactors existing configurations to extract common TypeScript and type-checking rules into shared modules
- Updates documentation and examples to showcase the new strict presets
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
packages/plugins/eslint-plugin/src/index.ts | Exports the new strict preset configurations |
packages/plugins/eslint-plugin/src/configs/strict.ts | Defines the base strict preset with additional rules enabled |
packages/plugins/eslint-plugin/src/configs/strict-typescript.ts | Combines strict preset with TypeScript-specific rules |
packages/plugins/eslint-plugin/src/configs/strict-type-checked.ts | Combines strict-typescript preset with type-checking rules |
packages/plugins/eslint-plugin/src/configs/_ts.ts | Shared TypeScript rule overrides extracted for reuse |
packages/plugins/eslint-plugin/src/configs/_tc.ts | Shared type-checking rules extracted for reuse |
packages/plugins/eslint-plugin/src/configs/x.ts | Removes rules that are now available in strict presets |
packages/plugins/eslint-plugin/src/configs/dom.ts | Adjusts DOM rules to be enabled in strict presets |
examples/react-dom/eslint.config.js | Updates example to use strict-type-checked preset |
examples/next/eslint.config.js | Updates example to use strict-type-checked preset |
README.md | Documents the new strict presets |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
Signed-off-by: REL1CX <[email protected]>
b2c74c5
to
f088f34
Compare
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information