-
Notifications
You must be signed in to change notification settings - Fork 0
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
ESLint migration to v9 #414
base: main
Are you sure you want to change the base?
Conversation
Bumps the eslint group with 4 updates: [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest), [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react), [eslint-plugin-simple-import-sort](https://github.com/lydell/eslint-plugin-simple-import-sort) and [eslint](https://github.com/eslint/eslint). Updates `eslint-plugin-jest` from 27.9.0 to 28.2.0 - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](jest-community/eslint-plugin-jest@v27.9.0...v28.2.0) Updates `eslint-plugin-react` from 7.34.0 to 7.34.1 - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/v7.34.1/CHANGELOG.md) - [Commits](jsx-eslint/eslint-plugin-react@v7.34.0...v7.34.1) Updates `eslint-plugin-simple-import-sort` from 12.0.0 to 12.1.0 - [Changelog](https://github.com/lydell/eslint-plugin-simple-import-sort/blob/main/CHANGELOG.md) - [Commits](lydell/eslint-plugin-simple-import-sort@v12.0.0...v12.1.0) Updates `eslint` from 8.57.0 to 9.1.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](eslint/eslint@v8.57.0...v9.1.0) --- updated-dependencies: - dependency-name: eslint-plugin-jest dependency-type: direct:production update-type: version-update:semver-major dependency-group: eslint - dependency-name: eslint-plugin-react dependency-type: direct:production update-type: version-update:semver-patch dependency-group: eslint - dependency-name: eslint-plugin-simple-import-sort dependency-type: direct:production update-type: version-update:semver-minor dependency-group: eslint - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-major dependency-group: eslint ... Signed-off-by: dependabot[bot] <[email protected]>
@@ -24,15 +24,16 @@ yarn add --dev @cabify/eslint-config eslint prettier | |||
|
|||
## Usage | |||
|
|||
1. Create a `.eslintrc` file at the root of your project: | |||
1. Create a `.eslint.config.js` file at the root of your project: |
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.
Please, review if we can define the config in a ts
file
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.
According to the eslint doc create an eslint.config.ts
is an experimental feature.
In my opinion, we should keep the files as .js
until we can configure without experimental options.
ref1
@@ -0,0 +1,65 @@ | |||
const globals = require('globals'); |
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.
Can't you use an ESmodule file for this?
It question applies to all configuration files.
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 see there are config files in ESmodule as well.
I don't understand why we need to define the config in both formats 🤷
@@ -1,6 +1,7 @@ | |||
const confusingBrowserGlobals = require('confusing-browser-globals'); |
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.
Could all these config filers use a ts
file instead of js
?
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.
ref1
@@ -0,0 +1,4 @@ | |||
// eslint-disable-next-line import/extensions |
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.
Could you check if we can use a ts
file to define the 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.
ref1
} | ||
}, | ||
}; | ||
/* eslint-disable import/prefer-default-export */ |
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.
Why not a ts
file?
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.
ref1
ESLint Migration to v9
This MR updates our shared ESLint configuration to align with version 9 standards.
Key Changes:
This update ensures our configuration stays compatible with the latest ESLint features and best practices.