From 150d37868a1f9923ae05d78231d671af10835cd3 Mon Sep 17 00:00:00 2001 From: Asher Date: Tue, 4 Aug 2020 15:08:45 -0500 Subject: [PATCH] Enforce strict equals --- .eslintrc.yaml | 1 + src/node/cli.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.eslintrc.yaml b/.eslintrc.yaml index a06f1d76..96931d55 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -23,6 +23,7 @@ rules: no-dupe-class-members: off "@typescript-eslint/no-use-before-define": off "@typescript-eslint/no-non-null-assertion": off + eqeqeq: error settings: # Does not work with CommonJS unfortunately. diff --git a/src/node/cli.ts b/src/node/cli.ts index e3072b1d..e900fdff 100644 --- a/src/node/cli.ts +++ b/src/node/cli.ts @@ -172,7 +172,7 @@ export const parse = ( const arg = argv[i] // -- signals the end of option parsing. - if (!ended && arg == "--") { + if (!ended && arg === "--") { ended = true continue } @@ -220,7 +220,7 @@ export const parse = ( throw error(`--${key} requires a value`) } - if (option.type == OptionalString && value == "false") { + if (option.type === OptionalString && value === "false") { continue }