mirror of
https://github.com/robonen/tools.git
synced 2026-03-20 02:44:45 +00:00
28 lines
541 B
Markdown
28 lines
541 B
Markdown
# imports preset
|
|
|
|
## Purpose
|
|
|
|
Чистые границы модулей и предсказуемые импорты.
|
|
|
|
## Key Rules
|
|
|
|
- `import/no-duplicates`.
|
|
- `import/no-self-import`.
|
|
- `import/no-cycle` (warn).
|
|
- `import/no-mutable-exports`.
|
|
- `import/consistent-type-specifier-style`: `prefer-top-level`.
|
|
|
|
## Examples
|
|
|
|
```ts
|
|
// ✅ Good
|
|
import type { User } from './types';
|
|
import { getUser } from './service';
|
|
|
|
// ❌ Bad
|
|
import { getUser } from './service';
|
|
import { getUser as getUser2 } from './service';
|
|
|
|
export let state = 0;
|
|
```
|