Skip to content

Conversation

@zdunecki
Copy link

Description

This PR introduces a new ESLint configuration concept that enforces consistent code style and import ordering across the Univer codebase.

Note

It's a concept only. If you like that, I can apply that to other packages.

Changes

  • ESLint Configuration Refactor: Reorganized rules into modular presets with comprehensive documentation
  • Import Ordering:
    • Type imports separated from value imports
    • Grouped by source: external → @univerjs → local
    • Added newlines between groups
  • Code Style: Fixed comma-dangle, indentation, and end-of-file newlines

Example Import Order

// Type imports
import type { IKeyValue } from '@univerjs/core';

// External packages
import { Disposable, EventSubject } from '@univerjs/core';

// Local alias type imports
import type { IButtonProps } from '@/components/button';

// Local alias imports
import { Button } from '@/components/button';

// Relative type imports
import type { IDragEvent } from './basics/i-events';

// Relative imports
import { CURSOR_TYPE } from './basics/const';

@zdunecki zdunecki requested review from Jocs and jikkai as code owners December 30, 2025 17:28
@github-actions
Copy link

github-actions bot commented Dec 30, 2025

View Deployment

#20608468311

🥐 🍔 🥓 🥗 🥘 🌯 🍚 🍛 🍖 🍭 🍧 🍝 🥪 🥖 🍪
Still cooking, please come back later
🥙 🥮 🥨 🌭 🍦 🍙 🍕 🍰 🍮 🍜 🍡 🍱 🍿 🍕 🥟

@zdunecki zdunecki marked this pull request as draft December 30, 2025 17:38
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.

1 participant