[babel][eslint] Remove deprecated babel-eslint, upgrade eslint+prettier deps, removed unused plugins#6809
Conversation
+ update prettier configuration per https://github.com/prettier/eslint-plugin-prettier#recommended-configuration
- was replaced by `@babel/eslint-parser`, but we can actually just use `@typescript-eslint/parser` instead! - just needs a `jsx: true` flag for tests w/ JSX - update `.parse()` API to include `comment` flag which is needed to get the license rule working again + remove unnecessary `parserOptions` for tests - fix i18n rule throwing because `arguments` is a reserved name - fix cypress reference rule tests to work on Jest without needing to be commented out - there's multiple prettier autosave lint fixes on here, apologies for the noise
babel-eslint, upgrade eslint+prettier deps, removed unused depsbabel-eslint, upgrade eslint+prettier deps, removed unused plugins
|
Hmm, looks like the prettier upgrade is causing a webpack failure - will investigate tomorrow |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6809/ |
…eslint rules - TODO - follow up PR updating EUI's `packages/eslint-plugin` separately
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6809/ |
|
@elastic/eui-team This is ready for review whenever! |
|
One quick note - this PR, due to the prettier upgrade, will create a ton of lint shenanigans with already-open PRs that will need to re-run It will also need to be constantly rebased against main to grab latest and lint any errors as a result, so I'd definitely appreciate a quicker review and a coordinated time to merge |
1Copenut
left a comment
There was a problem hiding this comment.
👍 LGTM. I reviewed files looking at the changes for anything that seemed more than formatting (didn't see any) and ran your QA process on a local branch. All QA steps passed with zero issues.
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6809/ |
Summary
Meta issue: #6652
There's a ton of Prettier lint fixes in this PR - I recommend following along by commit if possible, but here's a TL;DR of the changes:
babel-eslintdependency - this was replaced by@babel/eslint-parser, but it turns out we can simply use our existing@typescript-eslint/parserinsteadeslintplugins andprettierto latest (and run--fixto get all changes, which is 99% of the line diffs in this PR)QA
General checklist
yarn lintpassesyarn jest scripts/eslint-pluginpassesyarn jest scripts/babel/proptypes-from-ts-props/index.test.tspasses (just in case)