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

chore: upgrade to eslint v9 and migrate to flatconfig #1386

Merged

Conversation

aliesenli
Copy link
Contributor

@aliesenli aliesenli commented Nov 9, 2024

Description of changes:

This PR upgrades ESLint to version 9 and migrates to the new flat-config format, which has been the default configuration format since ESLint v9.0.0.

The .eslintrc.json file has been removed in favor of the new eslint.config.js file.

Following packages has been adjusted to make this migration possible:

"@typescript-eslint/parser": "^8.13.0",  --> added parser to recognize react (built in)

"eslint": "^8.7.0",                      --> upgrade to "^9.14.0",
"eslint-config-react-app": "^7.0.1",     --> swapped with "eslint-plugin-react": "^7.37.2",
"eslint-plugin-mocha": "^10.2.0",        --> upgrade to "^10.5.0",

Patched the globals@11 to make linter happy
patches/globals+11.12.0.patch

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@aliesenli aliesenli requested a review from a team as a code owner November 9, 2024 18:17
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-1386.d16eby4ekpss5y.amplifyapp.com

@aliesenli aliesenli changed the title chore: upgrade to eslint v9 and migrates flatconfig chore: upgrade to eslint v9 and migrate to flatconfig Nov 9, 2024
eslint.config.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@jorenbroekema jorenbroekema left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, I migrated a bunch of repos to ESLint v9 recently and contemplated doing it for Style Dictionary but couldn't find the time for it, so this is much appreciated.

Just 1 suggestion for patching globals@11 version

eslint.config.js Outdated Show resolved Hide resolved
@aliesenli aliesenli force-pushed the upgrade-to-eslint-v9-and-flatconfig branch from 9902598 to 3b74836 Compare November 12, 2024 18:27
@aliesenli
Copy link
Contributor Author

aliesenli commented Nov 12, 2024

Thanks for the PR, I migrated a bunch of repos to ESLint v9 recently and contemplated doing it for Style Dictionary but couldn't find the time for it, so this is much appreciated.

Just 1 suggestion for patching globals@11 version

Thanks for the suggestion! I've just patched the globals@11 and rebased onto main.

I think the package-lock(v4.1.4) and package.json(v4.2.0) are out of sync tho @jorenbroekema

@jorenbroekema
Copy link
Collaborator

jorenbroekema commented Nov 13, 2024

I think the package-lock version gets out of sync quite a bit because during the version bump the package-lock would have to be synced by doing an npm install after the bump in package.json and committing that with the version bump, I guess our release orchestration (changesets) isn't doing this. It's not a problem imo but could be solved by doing npm install after rebasing on latest main and committing the pkg lock version bump. Not a blocker for me though

EDIT: #1387 fixed here for in the future.

@jorenbroekema jorenbroekema merged commit 03e0403 into amzn:main Nov 19, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants