fix: add eqeqeq lint rule (#5106)

This commit is contained in:
LongYinan
2023-11-29 04:43:31 +00:00
parent a843dcd851
commit 923844f302
12 changed files with 18 additions and 16 deletions

View File

@@ -195,7 +195,7 @@ export class Typesystem {
): boolean {
if (superType.type === 'typeRef') {
// TODO both are ref
if (context && sub.type != 'typeRef') {
if (context && sub.type !== 'typeRef') {
context[superType.name] = sub;
}
// TODO bound

View File

@@ -141,7 +141,7 @@ filterMatcher.register(
name: 'is',
defaultArgs: () => [true],
impl: (value, target) => {
return value == target;
return value === target;
},
}
);
@@ -209,7 +209,7 @@ filterMatcher.register(
defaultArgs: () => [],
impl: tags => {
const safeTags = safeArray(tags);
return safeTags.length == 0;
return safeTags.length === 0;
},
}
);

View File

@@ -10,9 +10,9 @@ import * as styles from './page-list.css';
export function isToday(date: Date): boolean {
const today = new Date();
return (
date.getDate() == today.getDate() &&
date.getMonth() == today.getMonth() &&
date.getFullYear() == today.getFullYear()
date.getDate() === today.getDate() &&
date.getMonth() === today.getMonth() &&
date.getFullYear() === today.getFullYear()
);
}