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: migrate to eslint v9 and flat config #287

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

Conversation

mainframev
Copy link
Contributor

@mainframev mainframev commented Jan 17, 2025

Migrating to eslint v9 and flat config file. There are a lot of breaking changes related to that, within this PR the most noticeable are:

  • no more .eslintrc.json files. Allowed only eslint.config.{js,ts,mjs,cjs}
  • no more extends
  • plugins need to be imported, we can also change plugins namespaces
  • .eslintignores not allowed anymore, ignores or includeIgnoreFile from compat
  • env key is removed, we need to use globals
  • parser and parserOptions keys were moved to languageOptions
  • for backward compatibility should be used @eslint/eslintrc FlatCompat

@mainframev mainframev self-assigned this Jan 17, 2025
@mainframev mainframev added the dependencies Pull requests that update a dependency file label Jan 17, 2025
@mainframev mainframev force-pushed the chore/update-eslint-to-v9 branch from eaf2201 to ee8aff2 Compare January 17, 2025 15:03
@@ -1 +0,0 @@
node_modules
Copy link
Contributor Author

Choose a reason for hiding this comment

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

eslintignore is not supported anymore, we should use ignores in eslint.config.(js|cjs|mjs). Or there is an option to use includeIgnoreFIle from compat.

@@ -26,7 +26,6 @@ const OverflowMenuItemWrapper = React.forwardRef<
}>
>(({ keytipProps, overflowSequence, id, children, ...props }, ref) => {
const isVisible = useIsOverflowItemVisible(id);
false;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

weird stuff that somehow passed through all checks

@mainframev mainframev force-pushed the chore/update-eslint-to-v9 branch from ee8aff2 to f5b4296 Compare January 17, 2025 16:51
@@ -74,16 +77,14 @@
"@types/react-dom": "18.3.0",
"@types/react-virtualized-auto-sizer": "^1.0.1",
"@types/react-window": "^1.8.5",
"@typescript-eslint/eslint-plugin": "7.18.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a typo ? these plugins are actually crutial for us

Copy link
Contributor Author

@mainframev mainframev Jan 21, 2025

Choose a reason for hiding this comment

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

it was automatically removed during running nx generator for moving to flat config. The reason is that new typescript-eslint already includes those packages.

If you're migrating from a "legacy" .eslintrc configuration setup you likely have our plugin and parser installed separately. This package includes these as dependencies so you can freely uninstall your local references

@mainframev mainframev force-pushed the chore/update-eslint-to-v9 branch 2 times, most recently from 6871719 to 57e48b7 Compare January 27, 2025 00:20
@mainframev mainframev marked this pull request as ready for review January 28, 2025 10:12
@mainframev mainframev force-pushed the chore/update-eslint-to-v9 branch from 1eb662b to 3153f81 Compare January 28, 2025 10:17
@@ -56,19 +49,4 @@ describe('playwright-component-configuration generator', () => {
}
`);
});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed this as with flat config it's easier to have it in the root config

@mainframev mainframev force-pushed the chore/update-eslint-to-v9 branch from 3153f81 to ab155b8 Compare February 15, 2025 15:55
@mainframev mainframev requested a review from Hotell February 15, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants