mirror of
https://github.com/twentyhq/twenty
synced 2026-04-21 13:37:22 +00:00
## 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 |
||
|---|---|---|
| .. | ||
| component-props-naming.spec.ts | ||
| component-props-naming.ts | ||
| effect-components.spec.ts | ||
| effect-components.ts | ||
| explicit-boolean-predicates-in-if.ts | ||
| graphql-resolvers-should-be-guarded.spec.ts | ||
| graphql-resolvers-should-be-guarded.ts | ||
| inject-workspace-repository.spec.ts | ||
| inject-workspace-repository.ts | ||
| matching-state-variable.spec.ts | ||
| matching-state-variable.ts | ||
| max-consts-per-file.spec.ts | ||
| max-consts-per-file.ts | ||
| no-hardcoded-colors.spec.ts | ||
| no-hardcoded-colors.ts | ||
| no-navigate-prefer-link.spec.ts | ||
| no-navigate-prefer-link.ts | ||
| no-state-useref.spec.ts | ||
| no-state-useref.ts | ||
| rest-api-methods-should-be-guarded.spec.ts | ||
| rest-api-methods-should-be-guarded.ts | ||
| sort-css-properties-alphabetically.spec.ts | ||
| sort-css-properties-alphabetically.ts | ||
| styled-components-prefixed-with-styled.spec.ts | ||
| styled-components-prefixed-with-styled.ts | ||
| use-getLoadable-and-getValue-to-get-atoms.spec.ts | ||
| use-getLoadable-and-getValue-to-get-atoms.ts | ||
| useRecoilCallback-has-dependency-array.spec.ts | ||
| useRecoilCallback-has-dependency-array.ts | ||