Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ho991217/ts-plugin-prefers-barrel-imports
A typescript plugin that helps your auto-import have priority on index files
https://github.com/ho991217/ts-plugin-prefers-barrel-imports
plugin typescript
Last synced: about 7 hours ago
JSON representation
A typescript plugin that helps your auto-import have priority on index files
- Host: GitHub
- URL: https://github.com/ho991217/ts-plugin-prefers-barrel-imports
- Owner: ho991217
- Created: 2024-10-27T13:01:55.000Z (23 days ago)
- Default Branch: main
- Last Pushed: 2024-10-28T00:57:47.000Z (23 days ago)
- Last Synced: 2024-10-28T04:52:26.120Z (23 days ago)
- Topics: plugin, typescript
- Language: TypeScript
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## `ts-plugin-prefers-barrel-imports`
This is a TypeScript plugin that enforces the use of barrel imports in your project. It will automatically fix your imports to use barrel imports when possible.
| before | after |
| ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|![before](https://github.com/user-attachments/assets/cfddb430-8d95-425d-aeab-e4e4e11bc424)|![after](https://github.com/user-attachments/assets/8608a5d3-32f1-46b6-b425-33373cdbd004)|### TODOs
- [x] Sort import suggestions to prioritize barrel imports
- [ ] Auto-import completion for barrel imports
- [ ] Add tests