i18n - docs translations (#18452)
Created by Github action --------- Co-authored-by: github-actions <github-actions@twenty.com>
This commit is contained in:
committed by
GitHub
parent
514d0017ea
commit
9d808302aa
+4
-4
@@ -260,7 +260,7 @@ const StyledButton = styled.button`
|
||||
|
||||
## تطبيق قاعدة "عدم استيراد الأنواع"
|
||||
|
||||
تجنب استيراد الأنواع. To enforce this standard, an Oxlint rule checks for and reports any type imports. يساعد هذا على الحفاظ على الاتساق وقابلية القراءة في كود TypeScript.
|
||||
تجنب استيراد الأنواع. لفرض هذا المعيار، تتحقق قاعدة Oxlint وتبلغ عن أي استيرادات للأنواع. يساعد هذا على الحفاظ على الاتساق وقابلية القراءة في كود TypeScript.
|
||||
|
||||
```tsx
|
||||
// ❌ Bad
|
||||
@@ -281,10 +281,10 @@ import { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
* **الصيانة**: يعزز الصيانة داخل قاعدة الكود لأن المطوّرين يمكنهم تحديد مواقع استيرادات الأنواع فقط عند استعراض أو تعديل الكود.
|
||||
|
||||
### Oxlint Rule
|
||||
### قاعدة Oxlint
|
||||
|
||||
An Oxlint rule, `typescript/consistent-type-imports`, enforces the no-type import standard. ستولد هذه القاعدة تحذيرات أو أخطاء عن أي انتهاكات لاستيراد الأنواع.
|
||||
تفرض قاعدة Oxlint، `typescript/consistent-type-imports`, معيار عدم استيراد الأنواع. ستولد هذه القاعدة تحذيرات أو أخطاء عن أي انتهاكات لاستيراد الأنواع.
|
||||
|
||||
يرجى ملاحظة أن هذه القاعدة تتناول بشكل خاص حالات الحافة النادرة حيث تحدث استيرادات الأنواع دون قصد. يمنع TypeScript نفسه هذه الممارسة، كما هو موضح في [ملاحظات إصدار TypeScript 3.8](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html). في معظم الحالات، لا ينبغي لك أن تستخدم استيرادات الأنواع وحدها.
|
||||
|
||||
To ensure your code complies with this rule, make sure to run Oxlint as part of your development workflow.
|
||||
لضمان امتثال الكود الخاص بك لهذه القاعدة، تأكد من تشغيل Oxlint كجزء من سير العمل الخاص بالتطوير لديك.
|
||||
|
||||
@@ -99,27 +99,27 @@ my-twenty-app/
|
||||
.oxlintrc.json
|
||||
tsconfig.json
|
||||
README.md
|
||||
public/ # Public assets folder (images, fonts, etc.)
|
||||
public/ # مجلد الأصول العامة (صور، خطوط، إلخ)
|
||||
src/
|
||||
├── application-config.ts # Required - main application configuration
|
||||
├── application-config.ts # مطلوب - إعدادات التطبيق الرئيسية
|
||||
├── roles/
|
||||
│ └── default-role.ts # Default role for logic functions
|
||||
│ └── default-role.ts # الدور الافتراضي للدوال المنطقية
|
||||
├── objects/
|
||||
│ └── example-object.ts # Example custom object definition
|
||||
│ └── example-object.ts # تعريف كائن مخصص — مثال
|
||||
├── fields/
|
||||
│ └── example-field.ts # Example standalone field definition
|
||||
│ └── example-field.ts # تعريف حقل مستقل — مثال
|
||||
├── logic-functions/
|
||||
│ ├── hello-world.ts # Example logic function
|
||||
│ ├── pre-install.ts # Pre-install logic function
|
||||
│ └── post-install.ts # Post-install logic function
|
||||
│ ├── hello-world.ts # دالة منطقية — مثال
|
||||
│ ├── pre-install.ts # دالة منطقية لما قبل التثبيت
|
||||
│ └── post-install.ts # دالة منطقية لما بعد التثبيت
|
||||
├── front-components/
|
||||
│ └── hello-world.tsx # Example front component
|
||||
│ └── hello-world.tsx # مكوّن واجهة أمامية — مثال
|
||||
├── views/
|
||||
│ └── example-view.ts # Example saved view definition
|
||||
│ └── example-view.ts # تعريف عرض محفوظ — مثال
|
||||
├── navigation-menu-items/
|
||||
│ └── example-navigation-menu-item.ts # Example sidebar navigation link
|
||||
│ └── example-navigation-menu-item.ts # رابط تنقّل في الشريط الجانبي — مثال
|
||||
└── skills/
|
||||
└── example-skill.ts # Example AI agent skill definition
|
||||
└── example-skill.ts # تعريف مهارة لوكيل الذكاء الاصطناعي — مثال},{
|
||||
```
|
||||
|
||||
مع `--minimal`، سيتم إنشاء الملفات الأساسية فقط (`application-config.ts`، `roles/default-role.ts`، `logic-functions/pre-install.ts`، و`logic-functions/post-install.ts`). مع `--interactive`، تختار ملفات الأمثلة التي تريد تضمينها.
|
||||
@@ -130,7 +130,7 @@ my-twenty-app/
|
||||
* **.gitignore**: يتجاهل العناصر الشائعة مثل `node_modules` و`.yarn` و`generated/` (عميل مضبوط الأنواع) و`dist/` و`build/` ومجلدات التغطية وملفات السجلات وملفات `.env*`.
|
||||
* **yarn.lock**، **.yarnrc.yml**، **.yarn/**: تقوم بقفل وتكوين حزمة أدوات Yarn 4 المستخدمة في المشروع.
|
||||
* **.nvmrc**: يثبّت إصدار Node.js المتوقع للمشروع.
|
||||
* **.oxlintrc.json** and **tsconfig.json**: Provide linting and TypeScript configuration for your app's TypeScript sources.
|
||||
* **.oxlintrc.json** و **tsconfig.json**: يقدّمان إعدادات الفحص والتهيئة لـ TypeScript لمصادر TypeScript في تطبيقك.
|
||||
* **README.md**: ملف README قصير في جذر التطبيق يتضمن تعليمات أساسية.
|
||||
* **public/**: مجلد لتخزين الأصول العامة (صور، خطوط، ملفات ثابتة) التي سيتم تقديمها مع تطبيقك. الملفات الموضوعة هنا تُرفع أثناء المزامنة وتكون متاحة أثناء وقت التشغيل.
|
||||
* **src/**: المكان الرئيسي حيث تعرّف تطبيقك ككود
|
||||
|
||||
+4
-4
@@ -260,7 +260,7 @@ const StyledButton = styled.button`
|
||||
|
||||
## Prosazování Zákazu Importů Typů
|
||||
|
||||
Vyhýbejte se typovým importům. To enforce this standard, an Oxlint rule checks for and reports any type imports. To pomáhá udržovat konzistenci a čitelnost v TypeScript kódu.
|
||||
Vyhýbejte se typovým importům. K prosazení tohoto standardu pravidlo Oxlint kontroluje a hlásí jakékoli typové importy. To pomáhá udržovat konzistenci a čitelnost v TypeScript kódu.
|
||||
|
||||
```tsx
|
||||
// ❌ Bad
|
||||
@@ -281,10 +281,10 @@ import { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
* **Udržovatelnost**: Zvyšuje udržovatelnost kódové základny, protože vývojáři mohou při revizi nebo úpravách kódu identifikovat a najít importy pouze typů.
|
||||
|
||||
### Oxlint Rule
|
||||
### Pravidlo Oxlint
|
||||
|
||||
An Oxlint rule, `typescript/consistent-type-imports`, enforces the no-type import standard. Toto pravidlo generuje chyby nebo varování pro jakékoli porušení typového importu.
|
||||
Pravidlo Oxlint, `typescript/consistent-type-imports`, prosazuje standard zákazu importů typů. Toto pravidlo generuje chyby nebo varování pro jakékoli porušení typového importu.
|
||||
|
||||
Upozorňujeme, že toto pravidlo konkrétně řeší vzácné okrajové případy, kdy dochází k neúmyslným typovým importům. TypeScript sám odrazuje tuto praxi, jak je uvedeno v [poznámkách k verzi TypeScript 3.8](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html). Ve většině případů byste neměli potřebovat používat pouze typové importy.
|
||||
|
||||
To ensure your code complies with this rule, make sure to run Oxlint as part of your development workflow.
|
||||
Aby váš kód splňoval toto pravidlo, spusťte Oxlint jako součást svého vývojového pracovního postupu.
|
||||
|
||||
@@ -99,27 +99,27 @@ my-twenty-app/
|
||||
.oxlintrc.json
|
||||
tsconfig.json
|
||||
README.md
|
||||
public/ # Public assets folder (images, fonts, etc.)
|
||||
public/ # Složka s veřejnými prostředky (obrázky, písma apod.)
|
||||
src/
|
||||
├── application-config.ts # Required - main application configuration
|
||||
├── application-config.ts # Povinné – hlavní konfigurace aplikace
|
||||
├── roles/
|
||||
│ └── default-role.ts # Default role for logic functions
|
||||
│ └── default-role.ts # Výchozí role pro logické funkce
|
||||
├── objects/
|
||||
│ └── example-object.ts # Example custom object definition
|
||||
│ └── example-object.ts # Ukázková definice vlastního objektu
|
||||
├── fields/
|
||||
│ └── example-field.ts # Example standalone field definition
|
||||
│ └── example-field.ts # Ukázková samostatná definice pole
|
||||
├── logic-functions/
|
||||
│ ├── hello-world.ts # Example logic function
|
||||
│ ├── pre-install.ts # Pre-install logic function
|
||||
│ └── post-install.ts # Post-install logic function
|
||||
│ ├── hello-world.ts # Ukázková logická funkce
|
||||
│ ├── pre-install.ts # Předinstalační logická funkce
|
||||
│ └── post-install.ts # Postinstalační logická funkce
|
||||
├── front-components/
|
||||
│ └── hello-world.tsx # Example front component
|
||||
│ └── hello-world.tsx # Ukázková front-endová komponenta
|
||||
├── views/
|
||||
│ └── example-view.ts # Example saved view definition
|
||||
│ └── example-view.ts # Ukázková definice uloženého zobrazení
|
||||
├── navigation-menu-items/
|
||||
│ └── example-navigation-menu-item.ts # Example sidebar navigation link
|
||||
│ └── example-navigation-menu-item.ts # Ukázkový odkaz postranní navigace
|
||||
└── skills/
|
||||
└── example-skill.ts # Example AI agent skill definition
|
||||
└── example-skill.ts # Ukázková definice dovednosti agenta AI
|
||||
```
|
||||
|
||||
S volbou `--minimal` se vytvoří pouze základní soubory (`application-config.ts`, `roles/default-role.ts`, `logic-functions/pre-install.ts` a `logic-functions/post-install.ts`). S volbou `--interactive` si vyberete, které ukázkové soubory chcete zahrnout.
|
||||
|
||||
+4
-4
@@ -260,7 +260,7 @@ const StyledButton = styled.button`
|
||||
|
||||
## Durchsetzung von No-Type Imports
|
||||
|
||||
Vermeiden Sie Typ-Importe. To enforce this standard, an Oxlint rule checks for and reports any type imports. Dies trägt zur Konsistenz und Lesbarkeit des TypeScript-Codes bei.
|
||||
Vermeiden Sie Typ-Importe. Um diesen Standard durchzusetzen, überprüft eine Oxlint-Regel alle Typ-Importe und meldet sie. Dies trägt zur Konsistenz und Lesbarkeit des TypeScript-Codes bei.
|
||||
|
||||
```tsx
|
||||
// ❌ Bad
|
||||
@@ -281,10 +281,10 @@ import { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
* **Wartbarkeit**: Es verbessert die Wartbarkeit der Codebasis, da Entwickler Typ-Only-Imports beim Überprüfen oder Ändern von Code identifizieren und lokalisieren können.
|
||||
|
||||
### Oxlint Rule
|
||||
### Oxlint-Regel
|
||||
|
||||
An Oxlint rule, `typescript/consistent-type-imports`, enforces the no-type import standard. Diese Regel generiert Fehler oder Warnungen bei Verstößen gegen Typ-Importe.
|
||||
Eine Oxlint-Regel, `typescript/consistent-type-imports`, setzt den No-Type-Import-Standard durch. Diese Regel generiert Fehler oder Warnungen bei Verstößen gegen Typ-Importe.
|
||||
|
||||
Bitte beachten Sie, dass diese Regel speziell seltene Randfälle behandelt, in denen unbeabsichtigte Typ-Importe auftreten. TypeScript selbst lehnt diese Praxis ab, wie in den [TypeScript 3.8 Release Notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html) erwähnt. In den meisten Situationen sollten Typ-Only-Imports nicht benötigt werden.
|
||||
|
||||
To ensure your code complies with this rule, make sure to run Oxlint as part of your development workflow.
|
||||
Um sicherzustellen, dass Ihr Code mit dieser Regel übereinstimmt, achten Sie darauf, Oxlint als Teil Ihres Entwicklungsworkflows auszuführen.
|
||||
|
||||
+4
-4
@@ -260,7 +260,7 @@ const StyledButton = styled.button`
|
||||
|
||||
## Applicare importazioni senza tipo
|
||||
|
||||
Evita le importazioni di tipo. To enforce this standard, an Oxlint rule checks for and reports any type imports. Questo aiuta a mantenere la coerenza e la leggibilità del codice TypeScript.
|
||||
Evita le importazioni di tipo. Per far rispettare questo standard, una regola di Oxlint verifica e segnala qualsiasi import di tipo. Questo aiuta a mantenere la coerenza e la leggibilità del codice TypeScript.
|
||||
|
||||
```tsx
|
||||
// ❌ Male
|
||||
@@ -281,10 +281,10 @@ import { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
* **Manutenibilità**: Migliora la manutenibilità della codebase perché gli sviluppatori possono identificare e individuare gli import solo di tipo durante la revisione o la modifica del codice.
|
||||
|
||||
### Oxlint Rule
|
||||
### Regola Oxlint
|
||||
|
||||
An Oxlint rule, `typescript/consistent-type-imports`, enforces the no-type import standard. Questa regola genererà errori o avvisi per qualsiasi violazione relativa agli import di tipo.
|
||||
Una regola di Oxlint, `typescript/consistent-type-imports`, impone lo standard che vieta gli import di tipo. Questa regola genererà errori o avvisi per qualsiasi violazione relativa agli import di tipo.
|
||||
|
||||
Tieni presente che questa regola affronta specificamente rari casi limite in cui si verificano import di tipo involontari. TypeScript stesso scoraggia questa pratica, come menzionato nelle [note di rilascio di TypeScript 3.8](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html). Nella maggior parte delle situazioni, non si dovrebbe aver bisogno di usare importazioni di solo tipo.
|
||||
|
||||
To ensure your code complies with this rule, make sure to run Oxlint as part of your development workflow.
|
||||
Per assicurarti che il tuo codice sia conforme a questa regola, assicurati di eseguire Oxlint come parte del tuo flusso di lavoro di sviluppo.
|
||||
|
||||
+4
-4
@@ -260,7 +260,7 @@ const StyledButton = styled.button`
|
||||
|
||||
## Impor Importações Sem Tipo
|
||||
|
||||
Evite importações de tipo. To enforce this standard, an Oxlint rule checks for and reports any type imports. Isso ajuda a manter a consistência e a legibilidade no código TypeScript.
|
||||
Evite importações de tipo. Para impor esse padrão, uma regra do Oxlint verifica e relata quaisquer importações de tipos. Isso ajuda a manter a consistência e a legibilidade no código TypeScript.
|
||||
|
||||
```tsx
|
||||
// ❌ Bad
|
||||
@@ -281,10 +281,10 @@ import { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
* **Manutenção**: Melhora a manutenibilidade da base de código porque os desenvolvedores podem identificar e localizar importações somente de tipo ao revisar ou modificar o código.
|
||||
|
||||
### Oxlint Rule
|
||||
### Regra do Oxlint
|
||||
|
||||
An Oxlint rule, `typescript/consistent-type-imports`, enforces the no-type import standard. Esta regra gerará erros ou avisos para qualquer violação de importação de tipo.
|
||||
Uma regra do Oxlint, `typescript/consistent-type-imports`, aplica o padrão de não usar importações de tipos. Esta regra gerará erros ou avisos para qualquer violação de importação de tipo.
|
||||
|
||||
Observe que esta regra trata especificamente de casos isolados onde importações de tipos não intencionais ocorrem. O próprio TypeScript desencoraja essa prática, conforme mencionado nas [notas de lançamento do TypeScript 3.8](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html). Na maioria das situações, não é necessário usar importações somente de tipo.
|
||||
|
||||
To ensure your code complies with this rule, make sure to run Oxlint as part of your development workflow.
|
||||
Para garantir que seu código esteja em conformidade com essa regra, certifique-se de executar o Oxlint como parte do seu fluxo de trabalho de desenvolvimento.
|
||||
|
||||
@@ -99,27 +99,27 @@ my-twenty-app/
|
||||
.oxlintrc.json
|
||||
tsconfig.json
|
||||
README.md
|
||||
public/ # Public assets folder (images, fonts, etc.)
|
||||
public/ # Pasta de recursos públicos (imagens, fontes, etc.)
|
||||
src/
|
||||
├── application-config.ts # Required - main application configuration
|
||||
├── application-config.ts # Obrigatório - configuração principal da aplicação
|
||||
├── roles/
|
||||
│ └── default-role.ts # Default role for logic functions
|
||||
│ └── default-role.ts # Papel padrão para funções de lógica
|
||||
├── objects/
|
||||
│ └── example-object.ts # Example custom object definition
|
||||
│ └── example-object.ts # Exemplo de definição de objeto personalizado
|
||||
├── fields/
|
||||
│ └── example-field.ts # Example standalone field definition
|
||||
│ └── example-field.ts # Exemplo de definição de campo independente
|
||||
├── logic-functions/
|
||||
│ ├── hello-world.ts # Example logic function
|
||||
│ ├── pre-install.ts # Pre-install logic function
|
||||
│ └── post-install.ts # Post-install logic function
|
||||
│ ├── hello-world.ts # Exemplo de função de lógica
|
||||
│ ├── pre-install.ts # Função de lógica de pré-instalação
|
||||
│ └── post-install.ts # Função de lógica de pós-instalação
|
||||
├── front-components/
|
||||
│ └── hello-world.tsx # Example front component
|
||||
│ └── hello-world.tsx # Exemplo de componente de front-end
|
||||
├── views/
|
||||
│ └── example-view.ts # Example saved view definition
|
||||
│ └── example-view.ts # Exemplo de definição de visualização salva
|
||||
├── navigation-menu-items/
|
||||
│ └── example-navigation-menu-item.ts # Example sidebar navigation link
|
||||
│ └── example-navigation-menu-item.ts # Exemplo de link de navegação da barra lateral
|
||||
└── skills/
|
||||
└── example-skill.ts # Example AI agent skill definition
|
||||
└── example-skill.ts # Exemplo de definição de habilidade de agente de IA
|
||||
```
|
||||
|
||||
With `--minimal`, only the core files are created (`application-config.ts`, `roles/default-role.ts`, `logic-functions/pre-install.ts`, and `logic-functions/post-install.ts`). Com `--interactive`, você escolhe quais arquivos de exemplo incluir.
|
||||
@@ -130,7 +130,7 @@ Em alto nível:
|
||||
* **.gitignore**: Ignora artefatos comuns como `node_modules`, `.yarn`, `generated/` (cliente tipado), `dist/`, `build/`, pastas de cobertura, arquivos de log e arquivos `.env*`.
|
||||
* **yarn.lock**, **.yarnrc.yml**, **.yarn/**: Bloqueiam e configuram a ferramenta Yarn 4 usada pelo projeto.
|
||||
* **.nvmrc**: Fixa a versão do Node.js esperada pelo projeto.
|
||||
* **.oxlintrc.json** and **tsconfig.json**: Provide linting and TypeScript configuration for your app's TypeScript sources.
|
||||
* **.oxlintrc.json** e **tsconfig.json**: Fornecem lint e configuração do TypeScript para os fontes TypeScript do seu aplicativo.
|
||||
* **README.md**: Um README curto na raiz do aplicativo com instruções básicas.
|
||||
* **public/**: Uma pasta para armazenar recursos públicos (imagens, fontes, arquivos estáticos) que serão servidos com sua aplicação. Os arquivos colocados aqui são enviados durante a sincronização e ficam acessíveis em tempo de execução.
|
||||
* **src/**: O local principal onde você define seu aplicativo como código
|
||||
|
||||
@@ -53,7 +53,7 @@ Certifique-se de executar o yarn no diretório raiz e depois executar `npx nx se
|
||||
|
||||
#### Lint no Save não funcionando
|
||||
|
||||
This should work out of the box with the Oxc extension (`oxc.oxc-vscode`) installed. Se isso não funcionar, tente adicionar este trecho às suas configurações do vscode (no escopo do contêiner de desenvolvimento):
|
||||
Isso deve funcionar automaticamente com a extensão Oxc (`oxc.oxc-vscode`) instalada. Se isso não funcionar, tente adicionar este trecho às suas configurações do vscode (no escopo do contêiner de desenvolvimento):
|
||||
|
||||
```
|
||||
"editor.codeActionsOnSave": {
|
||||
|
||||
+4
-4
@@ -260,7 +260,7 @@ const StyledButton = styled.button`
|
||||
|
||||
## Impunerea Neprecizării Importurilor de Tip
|
||||
|
||||
Evită importurile de tip. To enforce this standard, an Oxlint rule checks for and reports any type imports. Acest lucru ajută la menținerea consistenței și lizibilității în codul TypeScript.
|
||||
Evită importurile de tip. Pentru a impune acest standard, o regulă Oxlint verifică și raportează orice importuri de tip. Acest lucru ajută la menținerea consistenței și lizibilității în codul TypeScript.
|
||||
|
||||
```tsx
|
||||
// ❌ Rău
|
||||
@@ -281,10 +281,10 @@ import { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
* **Întreținere**: Îmbunătățește întreținerea bazei de cod, deoarece dezvoltatorii pot identifica și localiza importurile doar de tip când revizuiesc sau modifică codul.
|
||||
|
||||
### Oxlint Rule
|
||||
### Regula Oxlint
|
||||
|
||||
An Oxlint rule, `typescript/consistent-type-imports`, enforces the no-type import standard. Această regulă va genera erori sau avertismente pentru orice încălcare a importurilor de tip.
|
||||
O regulă Oxlint, `typescript/consistent-type-imports`, impune standardul fără importuri de tip. Această regulă va genera erori sau avertismente pentru orice încălcare a importurilor de tip.
|
||||
|
||||
Rețineți că această regulă abordează în mod specific cazurile-limită rare în care apar importuri de tip neintenționate. TypeScript descurajează el însuși această practică, așa cum este menționat în notele de lansare [TypeScript 3.8](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html). În majoritatea situațiilor, nu ar trebui să aveți nevoie de importuri doar de tip.
|
||||
|
||||
To ensure your code complies with this rule, make sure to run Oxlint as part of your development workflow.
|
||||
Pentru a vă asigura că codul respectă această regulă, rulați Oxlint ca parte a fluxului de lucru de dezvoltare.
|
||||
|
||||
+4
-4
@@ -260,7 +260,7 @@ const StyledButton = styled.button`
|
||||
|
||||
## Запрещение импорта типов
|
||||
|
||||
Избегайте импорта типов. To enforce this standard, an Oxlint rule checks for and reports any type imports. Это помогает сохранить согласованность и читаемость кода TypeScript.
|
||||
Избегайте импорта типов. Чтобы обеспечить соблюдение этого стандарта, правило Oxlint проверяет и сообщает о любых импортах с ключевым словом type. Это помогает сохранить согласованность и читаемость кода TypeScript.
|
||||
|
||||
```tsx
|
||||
// ❌ Плохо
|
||||
@@ -281,10 +281,10 @@ import { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
* **Поддерживаемость**: Это повышает поддерживаемость кодовой базы, поскольку разработчики могут идентифицировать и находить импорты только типов при просмотре или изменении кода.
|
||||
|
||||
### Oxlint Rule
|
||||
### Правило Oxlint
|
||||
|
||||
An Oxlint rule, `typescript/consistent-type-imports`, enforces the no-type import standard. Это правило создаст ошибки или предупреждения для всех нарушений импорта типов.
|
||||
Правило Oxlint `typescript/consistent-type-imports` обеспечивает соблюдение стандарта импортов без ключевого слова type. Это правило создаст ошибки или предупреждения для всех нарушений импорта типов.
|
||||
|
||||
Обратите внимание, что это правило касается редких крайних случаев, когда случаются непреднамеренные импорты типов. Сам TypeScript не рекомендует эту практику, как указано в [примечаниях к выпуску TypeScript 3.8](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html). В большинстве случаев вам не нужно использовать импорты только типов.
|
||||
|
||||
To ensure your code complies with this rule, make sure to run Oxlint as part of your development workflow.
|
||||
Чтобы гарантировать соответствие вашего кода этому правилу, убедитесь, что вы запускаете Oxlint как часть вашего рабочего процесса разработки.
|
||||
|
||||
@@ -54,7 +54,7 @@ git config --global core.autocrlf false
|
||||
|
||||
#### Lint on Save не работает
|
||||
|
||||
This should work out of the box with the Oxc extension (`oxc.oxc-vscode`) installed. Если это не работает, попробуйте добавить это в настройки vscode (на уровне контейнера разработчика):
|
||||
Это должно работать из коробки с установленным расширением Oxc (`oxc.oxc-vscode`). Если это не работает, попробуйте добавить это в настройки vscode (на уровне контейнера разработчика):
|
||||
|
||||
```
|
||||
"editor.codeActionsOnSave": {
|
||||
|
||||
+4
-4
@@ -259,7 +259,7 @@ const StyledButton = styled.button`
|
||||
|
||||
## Tip içermeyen importları zorunlu kılma
|
||||
|
||||
Tip ithalatlarından kaçının. To enforce this standard, an Oxlint rule checks for and reports any type imports. Bu, TypeScript kodunda tutarlılık ve okunabilirliği sağlamaya yardımcı olur.
|
||||
Tip ithalatlarından kaçının. Bu standardı uygulamak için bir Oxlint kuralı, herhangi bir tür içe aktarmayı denetler ve raporlar. Bu, TypeScript kodunda tutarlılık ve okunabilirliği sağlamaya yardımcı olur.
|
||||
|
||||
```tsx
|
||||
// ❌ Kötü
|
||||
@@ -280,10 +280,10 @@ import { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
* **Bakım Kolaylığı**: Kod tabanının bakımını kolaylaştırır çünkü geliştiriciler kodu incelerken veya değiştirirken yalnızca tip ithalatlarını tanımlayabilir ve bulabilirler.
|
||||
|
||||
### Oxlint Rule
|
||||
### Oxlint Kuralı
|
||||
|
||||
An Oxlint rule, `typescript/consistent-type-imports`, enforces the no-type import standard. Bu kural, herhangi bir tip ithalat ihlali için hata veya uyarı üretir.
|
||||
Bir Oxlint kuralı, `typescript/consistent-type-imports`, tür içe aktarmalarının yasaklanması standardını uygular. Bu kural, herhangi bir tip ithalat ihlali için hata veya uyarı üretir.
|
||||
|
||||
Lütfen unutmayın ki bu kural, istemeden yapılan tip ithalatlarının gerçekleştiği nadir durumları özellikle ele alır. TypeScript'in kendisi, [TypeScript 3.8 sürüm notlarında](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html) belirtildiği gibi, bu uygulamayı caydırmaktadır. Çoğu durumda, yalnızca tip ithalatları kullanmanıza gerek yoktur.
|
||||
|
||||
To ensure your code complies with this rule, make sure to run Oxlint as part of your development workflow.
|
||||
Kodunuzun bu kurala uyduğundan emin olmak için, geliştirme iş akışınızın bir parçası olarak Oxlint'i çalıştırdığınızdan emin olun.
|
||||
|
||||
@@ -99,27 +99,27 @@ my-twenty-app/
|
||||
.oxlintrc.json
|
||||
tsconfig.json
|
||||
README.md
|
||||
public/ # Public assets folder (images, fonts, etc.)
|
||||
public/ # Genel varlıklar klasörü (görseller, yazı tipleri vb.)
|
||||
src/
|
||||
├── application-config.ts # Required - main application configuration
|
||||
├── application-config.ts # Gerekli - ana uygulama yapılandırması
|
||||
├── roles/
|
||||
│ └── default-role.ts # Default role for logic functions
|
||||
│ └── default-role.ts # Mantık fonksiyonları için varsayılan rol
|
||||
├── objects/
|
||||
│ └── example-object.ts # Example custom object definition
|
||||
│ └── example-object.ts # Örnek özel nesne tanımı
|
||||
├── fields/
|
||||
│ └── example-field.ts # Example standalone field definition
|
||||
│ └── example-field.ts # Örnek bağımsız alan tanımı
|
||||
├── logic-functions/
|
||||
│ ├── hello-world.ts # Example logic function
|
||||
│ ├── pre-install.ts # Pre-install logic function
|
||||
│ └── post-install.ts # Post-install logic function
|
||||
│ ├── hello-world.ts # Örnek mantık fonksiyonu
|
||||
│ ├── pre-install.ts # Kurulum öncesi mantık fonksiyonu
|
||||
│ └── post-install.ts # Kurulum sonrası mantık fonksiyonu
|
||||
├── front-components/
|
||||
│ └── hello-world.tsx # Example front component
|
||||
│ └── hello-world.tsx # Örnek ön bileşen
|
||||
├── views/
|
||||
│ └── example-view.ts # Example saved view definition
|
||||
│ └── example-view.ts # Örnek kaydedilmiş görünüm tanımı
|
||||
├── navigation-menu-items/
|
||||
│ └── example-navigation-menu-item.ts # Example sidebar navigation link
|
||||
│ └── example-navigation-menu-item.ts # Örnek kenar çubuğu gezinme bağlantısı
|
||||
└── skills/
|
||||
└── example-skill.ts # Example AI agent skill definition
|
||||
└── example-skill.ts # Örnek yapay zekâ ajanı yetenek tanımı
|
||||
```
|
||||
|
||||
`--minimal` ile yalnızca çekirdek dosyalar oluşturulur (`application-config.ts`, `roles/default-role.ts`, `logic-functions/pre-install.ts` ve `logic-functions/post-install.ts`). `--interactive` ile hangi örnek dosyaların dahil edileceğini siz seçersiniz.
|
||||
@@ -130,7 +130,7 @@ Genel hatlarıyla:
|
||||
* **.gitignore**: `node_modules`, `.yarn`, `generated/` (türlendirilmiş istemci), `dist/`, `build/`, kapsam klasörleri, günlük dosyaları ve `.env*` dosyaları gibi yaygın artifaktları yok sayar.
|
||||
* **yarn.lock**, **.yarnrc.yml**, **.yarn/**: Proje tarafından kullanılan Yarn 4 araç zincirini kilitler ve yapılandırır.
|
||||
* **.nvmrc**: Projenin beklediği Node.js sürümünü sabitler.
|
||||
* **.oxlintrc.json** and **tsconfig.json**: Provide linting and TypeScript configuration for your app's TypeScript sources.
|
||||
* **.oxlintrc.json** ve **tsconfig.json**: Uygulamanızın TypeScript kaynakları için linting ve TypeScript yapılandırması sağlar.
|
||||
* **README.md**: Uygulama kökünde temel talimatların yer aldığı kısa bir README.
|
||||
* **public/**: Uygulamanızla birlikte sunulacak genel varlıkları (görseller, yazı tipleri, statik dosyalar) depolamak için bir klasör. Buraya yerleştirilen dosyalar senkronizasyon sırasında yüklenir ve çalışma zamanında erişilebilir olur.
|
||||
* **src/**: Uygulamanızı kod olarak tanımladığınız ana yer
|
||||
|
||||
@@ -53,7 +53,7 @@ Kök dizinde yarn çalıştırdığınızdan ve ardından `npx nx server:dev twe
|
||||
|
||||
#### Kaydettiğinde lint çalışmıyor
|
||||
|
||||
This should work out of the box with the Oxc extension (`oxc.oxc-vscode`) installed. Bu işe yaramazsa, vscode ayarınıza (geliştirme konteyner kapsamında) bunu eklemeyi deneyin:
|
||||
Bu, kurulu Oxc uzantısıyla (`oxc.oxc-vscode`) kutudan çıktığı anda çalışmalıdır. Bu işe yaramazsa, vscode ayarınıza (geliştirme konteyner kapsamında) bunu eklemeyi deneyin:
|
||||
|
||||
```
|
||||
"editor.codeActionsOnSave": {
|
||||
|
||||
+4
-4
@@ -260,7 +260,7 @@ const StyledButton = styled.button`
|
||||
|
||||
## 强制不允许类型导入
|
||||
|
||||
避免类型导入。 To enforce this standard, an Oxlint rule checks for and reports any type imports. 这有助于在TypeScript代码中保持一致性和可读性。
|
||||
避免类型导入。 为强制实施此标准,Oxlint 规则会检查并报告所有类型导入。 这有助于在TypeScript代码中保持一致性和可读性。
|
||||
|
||||
```tsx
|
||||
// ❌ Bad
|
||||
@@ -281,10 +281,10 @@ import { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
* **可维护性**:它增强了代码库的可维护性,因为开发人员可以在审查或修改代码时识别和定位仅类型导入。
|
||||
|
||||
### Oxlint Rule
|
||||
### Oxlint 规则
|
||||
|
||||
An Oxlint rule, `typescript/consistent-type-imports`, enforces the no-type import standard. 该规则会生成错误或警告以提示任何类型导入的违规。
|
||||
Oxlint 规则,`typescript/consistent-type-imports`,强制执行不允许类型导入标准。 该规则会生成错误或警告以提示任何类型导入的违规。
|
||||
|
||||
请注意,此规则专门针对在罕见的边缘情况中发生的非预期类型导入。 TypeScript 本身也不鼓励这种做法,如[TypeScript 3.8 发行说明](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html)所述。 在大多数情况下,您不需要使用仅类型导入。
|
||||
|
||||
To ensure your code complies with this rule, make sure to run Oxlint as part of your development workflow.
|
||||
为确保您的代码符合此规则,请确保在开发工作流程中运行 Oxlint。
|
||||
|
||||
@@ -53,7 +53,7 @@ git config --global core.autocrlf false
|
||||
|
||||
#### 保存时 Lint 不起作用
|
||||
|
||||
This should work out of the box with the Oxc extension (`oxc.oxc-vscode`) installed. 如果这不起作用,请尝试将此添加到您的 vscode 设置(在开发容器范围内):
|
||||
这应在安装了 Oxc 扩展 (`oxc.oxc-vscode`) 后即可正常工作。 如果这不起作用,请尝试将此添加到您的 vscode 设置(在开发容器范围内):
|
||||
|
||||
```
|
||||
"editor.codeActionsOnSave": {
|
||||
|
||||
Reference in New Issue
Block a user