import-sort icon indicating copy to clipboard operation
import-sort copied to clipboard

Use process.cwd() instead of target file dir to locate style module

Open b1f6c1c4 opened this issue 7 years ago • 0 comments

./.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.

b1f6c1c4 avatar Feb 22 '18 06:02 b1f6c1c4