Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint: introduce type import/exports checks #31350

Open
Hotell opened this issue May 13, 2024 · 0 comments
Open

lint: introduce type import/exports checks #31350

Hotell opened this issue May 13, 2024 · 0 comments

Comments

@Hotell
Copy link
Contributor

Hotell commented May 13, 2024

1. introduce type import/export lint rules for v9

2. implement custom rule to disallow usage of inline type import/export

After investigation of "consistent-type-exports" rule, it wont prevent usage of inline type exports ecport {type A} from '...' -> ts-eslint team doesn't support old TS versions typescript-eslint/typescript-eslint#7524.

We have 2 options:
- bump v9 minbar to 4.5
- write custom rule that will dissallow any inline type imports/exports

❌ incorrect code

import { type A } from './foo';
export { type B} from './moo';

✅ correct code

import type { A } from './foo'
export type { B } from './moo';

Related issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants