-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore(website): fixed most no-unnecessary-condition complaints #7836
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
Changes from all commits
3fd0d80
0a7de2d
fc201ba
6d959e7
9310882
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ export function getRuleJsonSchemaWithErrorLevel( | |
}; | ||
} | ||
// example: naming-convention rule | ||
if (typeof ruleSchema.items === 'object' && ruleSchema.items) { | ||
if (typeof ruleSchema.items === 'object') { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typeof null === 'object' // true There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think in the context of the types it's probably defined as We could probably even change this check to be "cleaner" but it'll do fine like this I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I don't see any |
||
return { | ||
...ruleSchema, | ||
type: 'array', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,7 @@ export function TypeInfo({ | |
onHoverNode, | ||
}: TypeInfoProps): React.JSX.Element { | ||
const computed = useMemo(() => { | ||
if (!typeChecker || !value) { | ||
if (!typeChecker) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is not correct There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @armano2 according to the types it is - the property |
||
return undefined; | ||
} | ||
const info: InfoModel = {}; | ||
|
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 not correct, as this part of code is neccesary for some older versions of playground (older version of ts)
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.
🤔 I'm confused, where are those types defined? The
editor.api.d.ts
I see hasgetContainerDomNode(): HTMLElement;
- and I thought we're settled on just one editor version?