-
Notifications
You must be signed in to change notification settings - Fork 142
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 #3192
Conversation
We still use the ("legacy setup")[1] on purpose: we'll upgrade to a flat config in a separate PR, when we upgrade ESLint. [1]: https://typescript-eslint.io/getting-started/legacy-eslint-setup Rule changes: * @typescript-eslint/ban-types have been split in multiple rules, most of them are enabled by default. The configuration we used has been ported to @typescript-eslint/no-restricted-types * no-throw-literal isn't needed anymore as the new rule @typescript-eslint/only-throw-error is covering the same thing and more. * @typescript-eslint/no-var-requires was replaced with @typescript-eslint/no-require-imports. * @typescript-eslint/no-unused-experessions was turned on in the recommended rules, but we have a few cases where we avoid using an `if` like `foo && bar()` that raise that error, so I disabled the rule for now.
* The new @typescript-eslint/only-throw-error reports quite a few (valid) cases where we don't throw errors. I ignored those as issues as this was generally what we wanted. * Some eslint-disable comments were not needed, so I removed them * Optional properties and arguments that also accept `undefined` now raise an error * typescript-eslint is also better at finding unused variables in catch clauses * And other minor things...
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3192 +/- ##
=======================================
Coverage 93.47% 93.47%
=======================================
Files 280 280
Lines 7703 7705 +2
Branches 1727 1727
=======================================
+ Hits 7200 7202 +2
Misses 503 503 ☔ View full report in Codecov by Sentry. |
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
@@ -52,7 +52,7 @@ describe('trackInteractionToNextPaint', () => { | |||
setViewEnd = interactionToNextPaintTracking.setViewEnd | |||
|
|||
registerCleanupTask(() => { | |||
interactionToNextPaintTracking.stop | |||
interactionToNextPaintTracking.stop() |
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.
👏 praise: nice catch!
@@ -22,7 +22,7 @@ export enum ExperimentalFeature { | |||
|
|||
const enabledExperimentalFeatures: Set<ExperimentalFeature> = new Set() | |||
|
|||
export function initFeatureFlags(enableExperimentalFeatures?: string[] | undefined) { | |||
export function initFeatureFlags(enableExperimentalFeatures: string[] | undefined) { |
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.
👏 praise: Nice!
Co-authored-by: Thomas Lebeau <thomas.lebeau@datadoghq.com>
Motivation
Keep dependencies up to date. Also, ESLint v8 is not supported anymore, so this is a first toward upgrading ESLint to v9.
Changes
See commit messages.
Testing
I have gone over the contributing documentation.