lint: migrate prettier to oxfmt (#20783)

Most changes are `implements` being unwrapped this is not a oxfmt
regression
Prettier in 3.7 (we're on 3.1) changed this behaviour prettier blog
[post](https://prettier.io/blog/2025/11/27/3.7.0#change-18094)

This unifies our linting tooling

---------

Co-authored-by: github-actions <github-actions@twenty.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
neo773
2026-05-22 03:51:33 +05:30
committed by GitHub
parent e2ee4ffdff
commit 323e66433e
421 changed files with 1362 additions and 2042 deletions
@@ -2,8 +2,8 @@ import fs from 'fs';
import path from 'path';
import {
DEFAULT_LANGUAGE,
SUPPORTED_LANGUAGES,
DEFAULT_LANGUAGE,
SUPPORTED_LANGUAGES,
} from '../navigation/supported-languages';
type BasePage = string | BaseGroup;
@@ -71,15 +71,11 @@ const baseStructure: BaseStructure = JSON.parse(
const docsConfig = JSON.parse(fs.readFileSync(docsPath, 'utf8'));
const collectTranslations = (
file: TranslationFile | null,
): TranslationMaps => {
const collectTranslations = (file: TranslationFile | null): TranslationMaps => {
const tabLabels = new Map<string, string>();
const groupLabels = new Map<string, string>();
const collectGroups = (
groups?: Record<string, TranslationGroupEntry>,
) => {
const collectGroups = (groups?: Record<string, TranslationGroupEntry>) => {
if (!groups) {
return;
}
@@ -99,17 +95,15 @@ const collectTranslations = (
};
const loadTranslationFile = (language: string): TranslationFile | null => {
const translationPath = path.join(
localesRoot,
language,
'navigation.json',
);
const translationPath = path.join(localesRoot, language, 'navigation.json');
if (!fs.existsSync(translationPath)) {
return null;
}
return JSON.parse(fs.readFileSync(translationPath, 'utf8')) as TranslationFile;
return JSON.parse(
fs.readFileSync(translationPath, 'utf8'),
) as TranslationFile;
};
const buildLanguageEntry = (language: string): GeneratedLanguage => {
@@ -161,9 +155,8 @@ const hasLocaleContent = (language: string): boolean => {
return fs.existsSync(localeDir);
};
const languages = SUPPORTED_LANGUAGES.filter(hasLocaleContent).map(
buildLanguageEntry,
);
const languages =
SUPPORTED_LANGUAGES.filter(hasLocaleContent).map(buildLanguageEntry);
if (!docsConfig.navigation) {
docsConfig.navigation = {};