Skip to content

docs: align type import guidelines with ESLint configuration#17275

Merged
FelixMalfait merged 2 commits intotwentyhq:mainfrom
kratisinghh:docs/fix-type-import-style-guide
Jan 24, 2026
Merged

docs: align type import guidelines with ESLint configuration#17275
FelixMalfait merged 2 commits intotwentyhq:mainfrom
kratisinghh:docs/fix-type-import-style-guide

Conversation

@kratisinghh
Copy link
Copy Markdown
Contributor

@kratisinghh kratisinghh commented Jan 20, 2026

Summary

The style guide currently discourages type imports, which contradicts the enforced ESLint rule
@typescript-eslint/consistent-type-imports and existing code usage (e.g. Storybook stories).

This PR updates the documentation to recommend inline type imports, aligning the style guide
with tooling and preventing contributor confusion.

Why

  • Aligns documentation with enforced ESLint configuration
  • Prevents ESLint auto-fix conflicts
  • Improves contributor experience

Fixes #<### Summary
The style guide currently discourages type imports, which contradicts the enforced ESLint rule
@typescript-eslint/consistent-type-imports and existing code usage (e.g. Storybook stories).

This PR updates the documentation to recommend inline type imports, aligning the style guide
with tooling and preventing contributor confusion.

Why

  • Aligns documentation with enforced ESLint configuration
  • Prevents ESLint auto-fix conflicts
  • Improves contributor experience

Fixes #<#17222>


Note

Updates documentation to match tooling and current usage.

  • Replaces "Enforcing No-Type Imports" with Type Imports, recommending inline type imports
  • Updates examples to prefer import { type X } from ... and avoid importing types as runtime values
  • Clarifies ESLint @typescript-eslint/consistent-type-imports configuration to prefer explicit type imports and enforce inline-type-imports fix style
  • Changes confined to packages/twenty-docs/l/fr/developers/contribute/capabilities/frontend-development/style-guide.mdx

Written by Cursor Bugbot for commit e2250e4. This will update automatically on new commits. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Jan 20, 2026

Greptile Summary

Updated documentation to recommend inline type imports (import { type Meta }) instead of discouraging them, aligning with the enforced ESLint rule @typescript-eslint/consistent-type-imports configured with fixStyle: 'inline-type-imports'.

  • Reversed the "bad" and "good" examples to match ESLint configuration (eslint.config.mjs:132-138)
  • Aligns with existing codebase patterns (e.g., Storybook stories consistently use inline type imports)
  • Matches .cursor/rules/typescript-guidelines.mdc:167 which demonstrates inline type imports
  • Eliminates confusion where documentation contradicted automatic ESLint fixes

Confidence Score: 5/5

  • This PR is safe to merge with no risk - it's a documentation-only change that improves accuracy
  • Score reflects that this is a documentation-only change that corrects a documented standard to match the enforced ESLint configuration, existing codebase usage, and internal guidelines. No code changes, no runtime impact, and the documentation now accurately reflects the enforced tooling configuration.
  • No files require special attention

Important Files Changed

Filename Overview
packages/twenty-docs/l/fr/developers/contribute/capabilities/frontend-development/style-guide.mdx Updated documentation to recommend inline type imports, aligning with ESLint configuration and existing codebase usage

Sequence Diagram

sequenceDiagram
    participant D as Developer
    participant SG as Style Guide (Documentation)
    participant ESL as ESLint Config
    participant CB as Codebase

    Note over D,CB: Documentation Alignment Flow

    D->>SG: Reads style guide
    Note over SG: Previously: Discouraged type imports<br/>(contradicted ESLint)
    
    D->>CB: Writes code following style guide
    D->>ESL: Code triggers ESLint check
    ESL-->>D: ❌ Error: Must use inline type imports
    Note over D: Confusion: Documentation vs Tooling
    
    Note over SG: After this PR: Recommends inline type imports
    
    D->>SG: Reads updated style guide
    Note over SG: Now: Prefer inline type imports<br/>(aligns with ESLint)
    
    D->>CB: Writes code with inline type imports
    D->>ESL: Code triggers ESLint check
    ESL-->>D: ✅ Pass: Correct inline type imports
    Note over D: Consistency: Documentation matches Tooling
Loading

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Jan 20, 2026

Greptile found no issues!

From now on, if a review finishes and we haven't found any issues, we will not post anything, but you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@prastoin
Copy link
Copy Markdown
Contributor

Thanks for your contribution !

Copy link
Copy Markdown
Member

@FelixMalfait FelixMalfait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@FelixMalfait FelixMalfait added this pull request to the merge queue Jan 24, 2026
Merged via the queue into twentyhq:main with commit 21ce7ea Jan 24, 2026
45 of 50 checks passed
camilo-agudelo-uma pushed a commit to innovation-grupo-uma/twenty-uma that referenced this pull request Feb 2, 2026
…q#17275)

### Summary
The style guide currently discourages type imports, which contradicts
the enforced ESLint rule
`@typescript-eslint/consistent-type-imports` and existing code usage
(e.g. Storybook stories).

This PR updates the documentation to recommend inline type imports,
aligning the style guide
with tooling and preventing contributor confusion.

### Why
- Aligns documentation with enforced ESLint configuration
- Prevents ESLint auto-fix conflicts
- Improves contributor experience

Fixes #<### Summary
The style guide currently discourages type imports, which contradicts
the enforced ESLint rule
`@typescript-eslint/consistent-type-imports` and existing code usage
(e.g. Storybook stories).

This PR updates the documentation to recommend inline type imports,
aligning the style guide
with tooling and preventing contributor confusion.

### Why
- Aligns documentation with enforced ESLint configuration
- Prevents ESLint auto-fix conflicts
- Improves contributor experience

Fixes #<twentyhq#17222>

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Updates documentation to match tooling and current usage.
> 
> - Replaces "Enforcing No-Type Imports" with **Type Imports**,
recommending inline type imports
> - Updates examples to prefer `import { type X } from ...` and avoid
importing types as runtime values
> - Clarifies ESLint `@typescript-eslint/consistent-type-imports`
configuration to prefer explicit type imports and enforce
`inline-type-imports` fix style
> - Changes confined to
`packages/twenty-docs/l/fr/developers/contribute/capabilities/frontend-development/style-guide.mdx`
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e2250e4. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants