Skip to content

Commit

Permalink
chore(infra/biome): rule noDoubleEquals
Browse files Browse the repository at this point in the history
  • Loading branch information
shulaoda committed Jul 23, 2024
1 parent fee9fee commit bc1b226
Show file tree
Hide file tree
Showing 8 changed files with 1,739 additions and 1,736 deletions.
3 changes: 3 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
"useImportType": "error",
"useExportType": "error",
"useEnumInitializers": "error"
},
"suspicious": {
"noDoubleEquals": "error"
}
},
"ignore": [
Expand Down
3,458 changes: 1,729 additions & 1,729 deletions packages/rspack/etc/api.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/rspack/scripts/check-documentation-coverage.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function checkConfigsDocumentationCoverage() {
let level;
for (let j = 0; j < line.length; j++) {
if (level === undefined) {
if (line[j] != "#") {
if (line[j] !== "#") {
level = j;
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions packages/rspack/src/config/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ function getRawTsConfig(
return {
configFile,
referencesType:
references == "auto" ? "auto" : references ? "manual" : "disabled",
references: references == "auto" ? undefined : references
references === "auto" ? "auto" : references ? "manual" : "disabled",
references: references === "auto" ? undefined : references
};
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/build-npm.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ for (const binding of bindings) {
platformArchABI
} = parseTriple(name.slice(9));
assert(
file.split(".")[1] == platformArchABI,
file.split(".")[1] === platformArchABI,
`Binding is not matched with triple (expected: rspack.${platformArchABI}.node, got: ${file})`
);

Expand Down
2 changes: 1 addition & 1 deletion scripts/meta/check_is_workspace_root.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ try {
}
}
);
if (rootPkgJson.name != "monorepo") {
if (rootPkgJson.name !== "monorepo") {
throw new Error(`Unexpected cwd ${process.cwd()}`);
}
} catch (oldErr) {
Expand Down
2 changes: 1 addition & 1 deletion website/components/webpack-license.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useLang } from 'rspress/runtime';

const WebpackLicense: FC<{ from: string | string[] }> = ({ from }) => {
const links = Array.isArray(from) ? from : [from];
const isEn = useLang() == 'en';
const isEn = useLang() === 'en';
if (isEn) {
return (
<details>
Expand Down
2 changes: 1 addition & 1 deletion website/theme/components/Announcement/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function Announcement() {
}}
>
<a
href={`${lang == 'en' ? '' : `/${lang}`}/misc/join-us.html`}
href={`${lang === 'en' ? '' : `/${lang}`}/misc/join-us.html`}
className="hover:underline text-gray-700 font-bold"
>
{t('recruit')}
Expand Down

0 comments on commit bc1b226

Please sign in to comment.