Skip to content

A local-first personal finance app

[AI] DX: enable oxlint no-useless-default-assignment in strict packages (#8306)

Matiss Janis Aboltinsfb6009745cc4
diff --git a/.oxlintrc.json b/.oxlintrc.json
index dae5112b26..863793f2b2 100644
--- a/.oxlintrc.json
+++ b/.oxlintrc.json
@@ -107,6 +107,7 @@
"typescript/no-duplicate-type-constituents": "off",
// we want to allow unions such as "string | 'network' | 'file-key-mismatch'"
"typescript/no-redundant-type-constituents": "off",
+ "typescript/no-useless-default-assignment": "error",
"typescript/await-thenable": "error",
"typescript/no-floating-promises": "error",
"typescript/require-array-sort-compare": "error",
@@ -442,6 +443,20 @@
"eslint/no-empty-function": "off"
}
},
+ // TODO: drop these globs as each package becomes strict.
+ {
+ "files": [
+ "packages/api/**/*",
+ "packages/desktop-client/**/*",
+ "packages/desktop-electron/**/*",
+ "packages/loot-core/**/*",
+ "packages/plugins-service/**/*",
+ "packages/sync-server/**/*"
+ ],
+ "rules": {
+ "typescript/no-useless-default-assignment": "off"
+ }
+ },
// crdt enforces the repo's "TODO: enable this" typescript rules as errors
{
"files": ["packages/crdt/**/*"],
diff --git a/upcoming-release-notes/enable-no-useless-default-assignment.md b/upcoming-release-notes/enable-no-useless-default-assignment.md
new file mode 100644
index 0000000000..957919836e
--- /dev/null
+++ b/upcoming-release-notes/enable-no-useless-default-assignment.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [MatissJanis]
+---
+
+Enable the oxlint `no-useless-default-assignment` rule, disabling it only in packages that are not yet strict TS compatible