Skip to content
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

Open
wants to merge 44 commits into
base: main
Choose a base branch
from
Open

ESLint migration to v9 #414

wants to merge 44 commits into from

Conversation

ezej4
Copy link
Contributor

@ezej4 ezej4 commented Apr 22, 2024

ESLint Migration to v9

This MR updates our shared ESLint configuration to align with version 9 standards.

Key Changes:

  • Updated the module system from commonjs to ES6 modules.
  • Migrated configurations to the new flat config format, following the official migration guide.

This update ensures our configuration stays compatible with the latest ESLint features and best practices.

dependabot bot and others added 2 commits April 22, 2024 06:19
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]>
@ezej4 ezej4 changed the title ### ESLint migration to v9 ESLint migration to v9 Apr 22, 2024
Jorge Ezequiel Fabbroni Assum added 2 commits September 9, 2024 15:26
@ezej4 ezej4 changed the title ESLint migration to v9 DRAFT: ESLint migration to v9 Sep 9, 2024
@ezej4 ezej4 changed the title DRAFT: ESLint migration to v9 ESLint migration to v9 Dec 13, 2024
@@ -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:
Copy link
Contributor

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

Copy link
Contributor Author

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');
Copy link
Contributor

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.

Copy link
Contributor

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');
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

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 */
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ref1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants