Skip to content

Build your personal knowledge base with Trilium Notes

chore(eslint): drop linebreak-style from the format config

Elian Doran0eb6d7c63d0d
diff --git a/CLAUDE.md b/CLAUDE.md
index 8e40a3e712..7b10b68817 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -190,7 +190,7 @@ Use `note.getOwnedAttribute()` for direct, `note.getAttribute()` for inherited.
## Code Style
-- 4-space indent, semicolons, double quotes, max line 100, Unix line endings (the format config enforces these). Imports sorted per `eslint-plugin-simple-import-sort` (packages before relative, alphabetical within a group) — only ESLint checks that and it isn't run locally, so sort by hand.
+- 4-space indent, semicolons, double quotes, max line 100 (the format config enforces these). Unix line endings come from Git — `.gitattributes` plus `core.autocrlf` normalize to LF on commit, so the format config does not check them. Imports sorted per `eslint-plugin-simple-import-sort` (packages before relative, alphabetical within a group) — only ESLint checks that and it isn't run locally, so sort by hand.
- **Never use the non-null assertion `!`**, tests included. Narrow instead: `?.`, `?? fallback`, an explicit check, or an `*OrThrow` accessor (`becca.getNoteOrThrow(id)`).
- **Never use `Array.prototype.forEach`** — write a `for...of` loop instead, and iterate `array.entries()` when the index is needed (`for (const [index, item] of arr.entries())`). It reads better and allows `break`/`continue`/`await`.
- **Helpers go below the primary export** they support (or in another module), never between the imports and the main definition — the entry point reads first.
diff --git a/eslint.format.config.mjs b/eslint.format.config.mjs
index 0c95e71aff..b599cf4c99 100644
--- a/eslint.format.config.mjs
+++ b/eslint.format.config.mjs
@@ -16,7 +16,6 @@ export const stylisticRules = {
"@stylistic/quote-props": ["error", "consistent-as-needed"],
"@stylistic/max-len": ["error", { code: 100 }],
"@stylistic/comma-dangle": ["error", "never"],
- "@stylistic/linebreak-style": ["error", "unix"],
"@stylistic/array-bracket-spacing": ["error", "always"],
"@stylistic/object-curly-spacing": ["error", "always"],
"@stylistic/padded-blocks": ["error", { classes: "always" }]