-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
lint(eslint): Enable no-extra-non-null-assertion and auto-fix violations #83786
base: master
Are you sure you want to change the base?
Conversation
@@ -344,7 +344,7 @@ export default typescript.config([ | |||
...react.configs.flat.recommended.rules, | |||
...react.configs.flat['jsx-runtime'].rules, | |||
'react/display-name': 'off', // TODO(ryan953): Fix violations and delete this line | |||
'react/no-unescaped-entities': 'off', // TODO(ryan953): Fix violations and delete this line | |||
'react/no-unescaped-entities': '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.
This isn't going to happen. I tried and it's not worth it right now: #83511
@@ -418,8 +418,7 @@ export default typescript.config([ | |||
'@typescript-eslint/ban-ts-comment': 'off', // TODO(ryan953): Fix violations and delete this line | |||
'@typescript-eslint/no-array-constructor': 'off', // TODO(ryan953): Fix violations and delete this line | |||
'@typescript-eslint/no-empty-object-type': 'off', // TODO(ryan953): Fix violations and delete this line | |||
'@typescript-eslint/no-explicit-any': 'off', // TODO(ryan953): Fix violations and delete this line | |||
'@typescript-eslint/no-extra-non-null-assertion': 'off', // TODO(ryan953): Fix violations and delete this line | |||
'@typescript-eslint/no-explicit-any': '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.
no-explicit-any
isn't going to happen.
@@ -142,11 +142,11 @@ export const MetricChart = memo( | |||
} | |||
}); | |||
|
|||
const bucketSize = series[0]!?.data[1]!?.name - series[0]!?.data[0]!?.name; |
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.
This is a good example where a manual fix was needed...
Before we had !
next to each of the optional fields, chained all the way down.
Now we have one !
at the end of the chain.
@@ -668,7 +668,7 @@ describe('WaterfallModel', () => { | |||
|
|||
expected[1] = { | |||
type: 'out_of_view', | |||
span: fullWaterfall[1]!!.span, |
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.
Here's an example of the automation fixing some earlier automation.
Two kinda of fixes in here
Auto fixes to remove double
!!
:and manual fixes to move many
!
to the end of chains: