-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Update typescript eslint to v4.8 #83520
Conversation
use type-aware @typescript-eslint/no-shadow instead of no-shadow. do not use no-undef, rely on TypeScript instead
Pinging @elastic/kibana-platform (Team:Platform) |
Pinging @elastic/ingest-management (Team:Ingest Management) |
Pinging @elastic/apm-ui (Team:apm) |
@@ -998,7 +999,8 @@ module.exports = { | |||
'no-shadow-restricted-names': 'error', | |||
'no-sparse-arrays': 'error', | |||
'no-this-before-super': 'error', | |||
'no-undef': 'error', | |||
// rely on typescript | |||
'no-undef': 'off', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are no *.js
files but scripts/check_circular_deps
@@ -863,7 +863,8 @@ module.exports = { | |||
'no-shadow-restricted-names': 'error', | |||
'no-sparse-arrays': 'error', | |||
'no-this-before-super': 'error', | |||
'no-undef': 'error', | |||
// rely on typescript | |||
'no-undef': 'off', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are no *.js
files but scripts/**
public static from<P = {}, Q = {}, B = {}>( | ||
opts: RouteValidator<P, Q, B> | RouteValidatorFullConfig<P, Q, B> | ||
public static from<_P = {}, _Q = {}, _B = {}>( | ||
opts: RouteValidator<_P, _Q, _B> | RouteValidatorFullConfig<_P, _Q, _B> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that really an opinionated decision from the @typescript-eslint/no-shadow
rules? There is technically no shadowing between the class/instance generics and a static function's...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alerting team related code LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Infra changes LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app arch updates LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fleet changes LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KibanaApp changes look good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ES UI team changes LGTM, thanks for making those changes! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* update deps * update rules use type-aware @typescript-eslint/no-shadow instead of no-shadow. do not use no-undef, rely on TypeScript instead * fix or mute all lint errors * react-hooks eslint plugin fails on ? syntax * fix wrong typings in viz * remove React as a global type * fix eslint errors * update version to 4.8.1 * fix a new error
* update deps * update rules use type-aware @typescript-eslint/no-shadow instead of no-shadow. do not use no-undef, rely on TypeScript instead * fix or mute all lint errors * react-hooks eslint plugin fails on ? syntax * fix wrong typings in viz * remove React as a global type * fix eslint errors * update version to 4.8.1 * fix a new error
… into add-logs-to-node-details * 'add-logs-to-node-details' of github.com:phillipb/kibana: (87 commits) [Maps] Add 'crossed' & 'exited' events to tracking alert (elastic#82463) Updating code-owners to use new core/app-services team names (elastic#83731) Add Managed label to data streams and a view switch for the table (elastic#83049) [Maps] Add query bar inputs to geo threshold alerts tracked points & boundaries (elastic#80871) fix(NA): search examples kibana version declaration (elastic#83182) Fixed console error, which appears when saving changes in Edit Alert flyout (elastic#83610) [Alerting] Add `alert.updatedAt` field to represent date of last user edit (elastic#83578) Not resetting server log level if level is defined (elastic#83651) disable incremenetal build for legacy tsconfig.json (elastic#82986) [Workplace Search] Migrate SourceLogic from ent-search (elastic#83593) [Workplace Search] Port Box changes from ent-search (elastic#83675) [APM] Improve router types (elastic#83620) Bump flat to v4.1.1 (elastic#83647) Bump y18n@5 to v5.0.5 (elastic#83644) Bump jsonpointer to v4.1.0 (elastic#83641) Bump is-my-json-valid to v2.20.5 (elastic#83642) [Telemetry] Move Monitoring collection strategy to a collector (elastic#82638) Update typescript eslint to v4.8 (elastic#83520) [ML] Persist URL state for Anomaly detection jobs using metric function (elastic#83507) [ML] Performance improvements to annotations editing in Single Metric Viewer & buttons placement (elastic#83216) ...
* update deps * update rules use type-aware @typescript-eslint/no-shadow instead of no-shadow. do not use no-undef, rely on TypeScript instead * fix or mute all lint errors * react-hooks eslint plugin fails on ? syntax * fix wrong typings in viz * remove React as a global type * fix eslint errors * update version to 4.8.1 * fix a new error
Summary
Blocks: #83397
@typescript-eslint
to version compatible with TypeScript 4.1no-shadow
to@typescript-eslint/no-shadow
checking types as wellno-undef
for TS files. TypeScript fails in such cases anyway. Incorrectly triggers no-undef and no-redeclare in some cases typescript-eslint/typescript-eslint#2477 (comment)eslint-plugin-react-hooks
to version compatible with@typescript-eslint@v4
eslint-disable-next-line react-hooks/exhaustive-deps
for newly detected problems:The 'XX' makes the dependencies of useMemo Hook (at line YY) change on every render. Move it inside the useMemo callback. Alternatively, wrap the initialization of 'XX' in its own useMemo() Hook.(react-hooks/exhaustive-deps)
. These problems exist in the codebase for a while, so I decided to mute them and allow plugin owners to fix them later.