summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-03-03 08:39:24 -0500
committerHazelnoot <acomputerdog@gmail.com>2025-03-03 08:39:24 -0500
commit0cd1292308ba0b6acdae199da3442a1ce3b8e092 (patch)
tree660c34017eec451f2ceea49360ed7cdcbd3c1f19
parentignore empty CW with creating / editing notes (diff)
downloadsharkey-0cd1292308ba0b6acdae199da3442a1ce3b8e092.tar.gz
sharkey-0cd1292308ba0b6acdae199da3442a1ce3b8e092.tar.bz2
sharkey-0cd1292308ba0b6acdae199da3442a1ce3b8e092.zip
disable '@typescript-eslint/prefer-nullish-coalescing' for primitive types
-rw-r--r--packages/backend/eslint.config.js7
-rw-r--r--packages/shared/eslint.config.js4
2 files changed, 4 insertions, 7 deletions
diff --git a/packages/backend/eslint.config.js b/packages/backend/eslint.config.js
index 7c649a373c..ef5a0ccec1 100644
--- a/packages/backend/eslint.config.js
+++ b/packages/backend/eslint.config.js
@@ -42,13 +42,6 @@ export default [
name: '__filename',
message: 'Not in ESModule. Use `import.meta.url` instead.',
}],
- // https://typescript-eslint.io/rules/prefer-nullish-coalescing/
- '@typescript-eslint/prefer-nullish-coalescing': ['warn', {
- ignorePrimitives: {
- // Without this, the rule breaks for nullable booleans
- boolean: true,
- },
- }],
},
},
{
diff --git a/packages/shared/eslint.config.js b/packages/shared/eslint.config.js
index 860eb4a8e8..be7a031b63 100644
--- a/packages/shared/eslint.config.js
+++ b/packages/shared/eslint.config.js
@@ -37,6 +37,10 @@ export default [
'no-restricted-imports': ['error', {
paths: [{ name: 'punycode' }],
}],
+ // https://typescript-eslint.io/rules/prefer-nullish-coalescing/
+ '@typescript-eslint/prefer-nullish-coalescing': ['warn', {
+ ignorePrimitives: true,
+ }],
},
},
];