From d8fb3326dbd815f545d4d15819e9735e55a1fc61 Mon Sep 17 00:00:00 2001 From: Kentaro Suzuki Date: Sun, 19 May 2024 00:58:02 +0900 Subject: [PATCH] fix/issue 97 eslint safer expression (#102) * fix(eslint): enable strict-boolean-expressions * fix/issue 98/scss at rule (#99) * fix: scss preset * chore: format code * chore: changeset * Version Packages (#100) Co-authored-by: github-actions[bot] * fix/issue 98/scss at rule (#99) * fix: scss preset * chore: format code * chore: changeset * Version Packages (#100) Co-authored-by: github-actions[bot] * chore: changeset --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] --- .changeset/healthy-countries-jump.md | 5 +++++ packages/eslint-config/src/base/typescript.ts | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 .changeset/healthy-countries-jump.md diff --git a/.changeset/healthy-countries-jump.md b/.changeset/healthy-countries-jump.md new file mode 100644 index 00000000..9f65aa98 --- /dev/null +++ b/.changeset/healthy-countries-jump.md @@ -0,0 +1,5 @@ +--- +"@virtual-live-lab/eslint-config": patch +--- + +Enable tseslint/strict-boolean-expressions diff --git a/packages/eslint-config/src/base/typescript.ts b/packages/eslint-config/src/base/typescript.ts index 385378aa..74784e6b 100644 --- a/packages/eslint-config/src/base/typescript.ts +++ b/packages/eslint-config/src/base/typescript.ts @@ -44,6 +44,13 @@ const tsConfig = tseslint.config({ "@typescript-eslint/no-unsafe-declaration-merging": "off", "@typescript-eslint/prefer-for-of": "off", "@typescript-eslint/prefer-function-type": "off", + // #97 + "@typescript-eslint/strict-boolean-expressions": [ + "error", + { + allowNumber: false, + }, + ], }, });