import-sort
import-sort copied to clipboard
Use process.cwd() instead of target file dir to locate style module
./.importsortrc
{
".js": {
"parser": "babylon",
"style": "./internals/import-sort"
}
}
./internals/import-sort.js
module.exports = (styleApi) => {
return [...]
};
Then I run
yarn import-sort app/app.js app/components/file1.js app/containers/file2.js
IMO it'd be better if import-sort-config use the working directory to determine the style module. In that case, I can simply use "style": "./internals/import-sort" instead of adjusting that according to each target file.