Repository navigation
[babel] Remove @elastic/eslint-config-kibana and babel-eslint-plugin - #6808
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
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
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
|
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/ |
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