-
Notifications
You must be signed in to change notification settings - Fork 37
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(eslint): add flat configs #114
base: canary
Are you sure you want to change the base?
Conversation
@@ -12,12 +12,12 @@ module.exports = { | |||
'plugin:import/recommended', | |||
'prettier', | |||
require.resolve('./rules/best-practice'), | |||
require.resolve('./rules/comments'), |
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.
I added a comments config and a unicorn config to ensure that only pure rules, excluding plugins, are in the rules directory.
@@ -1,6 +1,6 @@ | |||
module.exports = { | |||
extends: [ | |||
'plugin:eslint-comments/recommended', |
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.
I replaced eslint-comment
to @eslint-community/eslint-comments
cause eslint-comment is not maintained for a while
* Fix no-unused-vars * Add a rule for `*.config.mjs` files. * Install `@types/node` for `process.*`
Resolves #73
Resolves #108
Related to #113
The goal of this PR is to ensure that developers meet no breaking changes.
Developers can apply the flat config as follows.
Due to certain characteristics of the flat config, it is not fully identical to the legacy config.
@vercel/style-guide/eslint/browser
and@vercel/style-guide/eslint/node
might not be needed since developers can register them through theglobals
package. Instead, developers can continue to use the existing_base.js
by applying configs.recommended.For
@vercel/style-guide/eslint/jest
, I’ve addedjest-typescript.js
to increase flexibility, as users may need to configure it within the flat config usingoptions.files
.