[babel] Remove @elastic/eslint-config-kibana and babel-eslint-plugin#6808
Merged
cee-chen merged 6 commits intoelastic:mainfrom May 24, 2023
Merged
[babel] Remove @elastic/eslint-config-kibana and babel-eslint-plugin#6808cee-chen merged 6 commits intoelastic:mainfrom
@elastic/eslint-config-kibana and babel-eslint-plugin#6808cee-chen merged 6 commits intoelastic:mainfrom
Conversation
- `eslint-plugin-babel` is not used by anything in our repo except for: - `@elastic/eslint-config-kibana` is no longer supported/maintained, and exists in Kibana now. It doesn't make sense for us to import from Kibana, so we should likely just maintain our own eslint config settings
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6808/ |
1Copenut
approved these changes
May 24, 2023
Contributor
1Copenut
left a comment
There was a problem hiding this comment.
👍 LGTM! I pulled the branch, then ran yarn &&. yarn lint. Passed with no issues.
1Copenut
approved these changes
May 24, 2023
Contributor
1Copenut
left a comment
There was a problem hiding this comment.
👍 LGTM! I pulled the branch, then ran yarn &&. yarn lint. Passed with no issues.
4f3f077 to
0f72bcb
Compare
@see https://github.com/elastic/eslint-config-kibana/blob/master/.eslintrc.js - excluding rules that overlap w/ Prettier (spacing, quotes, indentation, etc) - excluded `no-undef`, `no-redeclare` - `@typescript/eslint` already handles these without throwing errors on globals and type exports (see https://stackoverflow.com/a/64197516/4294462) - also allows removing `env` config + update eqeqeq rule and no-empty rule to allow empty catches [opinionated] - removed `no-nested-ternary`, as we use those plenty and Prettier styles them to be very readable - also removed several rules which just don't come up for us often, e.g. `__proto__` and `__iterator__` checks
+ upgrade `mocha` eslint plugin to latest
+ remove unused import disable rules + remove `import/named` - it doesn't know how to handle types and `@typescript/eslint` already does it better
+ upgrade react eslint packages to latest + remove unused disable rules
+ remove unnecessary `jsx` import in Jest test
0f72bcb to
24b21ef
Compare
Contributor
Author
|
Thanks Trevor! Rebases were me being annoying and just re-ordering a rule (not actually changing presence of any rules). Merging in |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6808/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6808/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Meta issue: #6652
The only dependency using
babel-eslint-pluginwas@elastic/eslint-config-kibana, which appears to have been deprecated / archived at some point, and was instead moved directly to within Kibana. I spoke to Tiago and he confirmed that it doesn't make sense for EUI to try and import a@kbnpackage, but instead that we should keep our eslint configurations separate (as EUI and Kibana are generally seperate repos).This PR handles removing the two aforementioned dependencies and recreating the eslint config as specified in https://github.com/elastic/eslint-config-kibana/blob/master/.eslintrc.js. I made one or two opinionated changes (see commit messages) and excluded some rules that were already handled by Prettier or by
@typescript/eslint.QA
General checklist
yarn lintpasses