Describe the feature
Summary
Currently the unimport package provides powerful importing matchings, however lacks a builtin way to output or persist results of the matched imports. This sometimes makes it difficult for devs to review / audit or integrate the imports into their workflows or CICD.
Originally, I hope such function should exist in our CICD pipeline to leave a trace relating to auto-imports.
Meanwhile, I think it could be a good method for devs to be aware of the imported modules during development to help quickly address the issues with the verbose printouts.
How should it work?
- The
report function should accept the matched imports and options for output.
- It should support:
- Printing to the console in various formats.
- Writing the output to a file in a chosen format.
- Customizable formatting and output handlers.
- The function should be easy to use and integrate into existing unimport workflows, with sensible defaults and clear error handling.
Example Usage:
Unimport.vite({
dirs: ['./composables/**/*'],
reportMatchedOptions: {
enable: true,
format: 'json'
...
}
})
Additional information
Describe the feature
Summary
Currently the unimport package provides powerful importing matchings, however lacks a builtin way to output or persist results of the matched imports. This sometimes makes it difficult for devs to review / audit or integrate the imports into their workflows or CICD.
Originally, I hope such function should exist in our CICD pipeline to leave a trace relating to auto-imports.
Meanwhile, I think it could be a good method for devs to be aware of the imported modules during development to help quickly address the issues with the verbose printouts.
How should it work?
reportfunction should accept the matched imports and options for output.Example Usage:
Additional information