chore: update eslint to force curly braces
parent
d8a10e5311
commit
9b61d7efc5
|
@ -29,6 +29,7 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
rules: {
|
||||
'curly': ['error', 'all'],
|
||||
'no-console': ['error', {allow: ['warn', 'error']}],
|
||||
'no-empty': 'off',
|
||||
'getter-return': 'off',
|
||||
|
|
|
@ -71,7 +71,9 @@ export const deleteDemoDataBucketMembership = async (bucketID: string) => {
|
|||
}
|
||||
|
||||
export const fetchDemoDataBuckets = async (): Promise<Bucket[]> => {
|
||||
if (!isFlagEnabled('demodata')) return []
|
||||
if (!isFlagEnabled('demodata')) {
|
||||
return []
|
||||
}
|
||||
|
||||
try {
|
||||
// FindBuckets paginates before filtering for authed buckets until #6591 is resolved,
|
||||
|
|
|
@ -54,7 +54,9 @@ class DashboardCards extends PureComponent<OwnProps & StateProps> {
|
|||
private registerSpinner = elem => {
|
||||
this._spinner = elem
|
||||
|
||||
if (!elem) return
|
||||
if (!elem) {
|
||||
return
|
||||
}
|
||||
|
||||
let count = 1.0
|
||||
const threshold = []
|
||||
|
|
|
@ -54,18 +54,20 @@ export default class EmptyQueryView extends PureComponent<Props> {
|
|||
}
|
||||
|
||||
if (errorMessage) {
|
||||
if (errorFormat === ErrorFormat.Tooltip)
|
||||
if (errorFormat === ErrorFormat.Tooltip) {
|
||||
return (
|
||||
<EmptyGraphErrorTooltip
|
||||
message={errorMessage}
|
||||
testID="empty-graph--error"
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
if (errorFormat === ErrorFormat.Scroll)
|
||||
if (errorFormat === ErrorFormat.Scroll) {
|
||||
return (
|
||||
<EmptyGraphError message={errorMessage} testID="empty-graph--error" />
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
|
|
|
@ -133,7 +133,9 @@ const postOrderDFS = (
|
|||
): VariableNode[] => {
|
||||
// Handle the edge case that the function is
|
||||
// called without providing the root node
|
||||
if (!node) return [...acc]
|
||||
if (!node) {
|
||||
return [...acc]
|
||||
}
|
||||
|
||||
for (const child of node.children) {
|
||||
// by checking the cache for existing variables, we ensure that the graph stops
|
||||
|
|
Loading…
Reference in New Issue