twenty/tools/eslint-rules/rules
Félix Malfait 44aee860d9
Consolidate Prettier config and improve consistency (#15191)
## Summary

Clean up and consolidate formatting configuration across the monorepo.

## Changes

### 1. Remove Redundant Configs
-  Delete `packages/twenty-server/.prettierrc` (had invalid
`brakeBeforeElse` typo)
-  Delete `packages/twenty-zapier/.prettierrc`
-  Use root `.prettierrc` only (Prettier searches up directory tree
automatically)

### 2. Improve Root Prettier Config
- Change `endOfLine: 'auto'` → `'lf'` for consistent Unix line endings
across all OSes

### 3. Enhance VSCode Settings
- `files.eol: 'auto'` → `'\\n'` (consistent with Prettier)
- Add `files.insertFinalNewline: true` (explicit editor behavior)
- Add `files.trimTrailingWhitespace: true` (cleaner files)

### 4. Add `.gitattributes`
- Enforce LF line endings at Git level
- Prevents `core.autocrlf` from converting based on contributor's OS
- Mark patch files as binary (they have mixed line endings by design)
- Explicitly define binary file types

### 5. Fix Line Endings
- Convert 3 selectable-list state files from CRLF → LF
- These were the only source files with Windows line endings

## Why These Changes Matter

**Before:**
- 3 different Prettier configs (inconsistent, one had typo)
- Mixed CRLF/LF depending on contributor's OS
- No Git-level enforcement

**After:**
- Single source of truth for formatting
- All files use LF (Unix standard)
- Git enforces line endings regardless of OS
- Prettier warning about invalid option removed

## Result

-  Single `.prettierrc` config
-  Consistent LF line endings enforced by Git
-  Better VSCode defaults
-  No more CRLF files sneaking in from Windows contributors
2025-10-18 12:24:35 +02:00
..
component-props-naming.spec.ts POC: chore: use Nx workspace lint rules (#3163) 2024-01-03 23:07:25 +01:00
component-props-naming.ts Consolidate Prettier config and improve consistency (#15191) 2025-10-18 12:24:35 +02:00
effect-components.spec.ts POC: chore: use Nx workspace lint rules (#3163) 2024-01-03 23:07:25 +01:00
effect-components.ts Consolidate Prettier config and improve consistency (#15191) 2025-10-18 12:24:35 +02:00
explicit-boolean-predicates-in-if.ts Consolidate Prettier config and improve consistency (#15191) 2025-10-18 12:24:35 +02:00
graphql-resolvers-should-be-guarded.spec.ts Consolidate Prettier config and improve consistency (#15191) 2025-10-18 12:24:35 +02:00
graphql-resolvers-should-be-guarded.ts Consolidate Prettier config and improve consistency (#15191) 2025-10-18 12:24:35 +02:00
inject-workspace-repository.spec.ts feat: add eslint rule for enforcing WorkspaceService naming convention (#6308) 2024-07-19 19:17:57 +02:00
inject-workspace-repository.ts feat: add eslint rule for enforcing WorkspaceService naming convention (#6308) 2024-07-19 19:17:57 +02:00
matching-state-variable.spec.ts POC: chore: use Nx workspace lint rules (#3163) 2024-01-03 23:07:25 +01:00
matching-state-variable.ts Consolidate Prettier config and improve consistency (#15191) 2025-10-18 12:24:35 +02:00
max-consts-per-file.spec.ts TWNTY-3825 - ESLint rule: const naming (#4171) 2024-02-25 13:52:48 +01:00
max-consts-per-file.ts Consolidate Prettier config and improve consistency (#15191) 2025-10-18 12:24:35 +02:00
no-hardcoded-colors.spec.ts refacto clickoutside componentv2 (#11644) 2025-04-18 17:48:30 +02:00
no-hardcoded-colors.ts refacto clickoutside componentv2 (#11644) 2025-04-18 17:48:30 +02:00
no-navigate-prefer-link.spec.ts Create ESLint rule to discourage usage of navigate() and prefer Link (#5642) 2024-06-04 17:04:57 +02:00
no-navigate-prefer-link.ts Consolidate Prettier config and improve consistency (#15191) 2025-10-18 12:24:35 +02:00
no-state-useref.spec.ts POC: chore: use Nx workspace lint rules (#3163) 2024-01-03 23:07:25 +01:00
no-state-useref.ts POC: chore: use Nx workspace lint rules (#3163) 2024-01-03 23:07:25 +01:00
rest-api-methods-should-be-guarded.spec.ts Consolidate Prettier config and improve consistency (#15191) 2025-10-18 12:24:35 +02:00
rest-api-methods-should-be-guarded.ts Consolidate Prettier config and improve consistency (#15191) 2025-10-18 12:24:35 +02:00
sort-css-properties-alphabetically.spec.ts POC: chore: use Nx workspace lint rules (#3163) 2024-01-03 23:07:25 +01:00
sort-css-properties-alphabetically.ts Consolidate Prettier config and improve consistency (#15191) 2025-10-18 12:24:35 +02:00
styled-components-prefixed-with-styled.spec.ts POC: chore: use Nx workspace lint rules (#3163) 2024-01-03 23:07:25 +01:00
styled-components-prefixed-with-styled.ts POC: chore: use Nx workspace lint rules (#3163) 2024-01-03 23:07:25 +01:00
use-getLoadable-and-getValue-to-get-atoms.spec.ts TWNTY-3794 - ESLint rule: only take explicit boolean predicates in if statements (#4354) 2024-03-09 10:48:19 +01:00
use-getLoadable-and-getValue-to-get-atoms.ts TWNTY-2244 - ESLint rule: enforce usage of .getLoadable() + .getValue() to get atoms (#4143) 2024-03-06 00:24:20 +01:00
useRecoilCallback-has-dependency-array.spec.ts [ESLint rule] prevent useRecoilCallback without a dependency array (#4411) 2024-03-12 15:12:17 +01:00
useRecoilCallback-has-dependency-array.ts [ESLint rule] prevent useRecoilCallback without a dependency array (#4411) 2024-03-12 15:12:17 +01:00