-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
Use case
Run import-sort on an entire code base to programatically sort imports in all files according to a non-default import style.
Current Workaround
Temporarily modify the root package.json by adding the following field:
"importSort": {
".js, .jsx, .ts, .tsx": {
"parser": "MY_PARSER",
"style": "MY_STYLE"
}
}Optionally install the style if not already present in node_modules.
Then run the import sort CLI:
npx import-sort-cli ./path/to/my-filesThen delete the importSort field in package.json because it's no longer needed.
Question
Is this the recommended way to run the CLI? I couldn't find any documentation in the README for how to set the style when running the CLI. The command-line options listed in the README don't include a style option.
Metadata
Metadata
Assignees
Labels
No labels