Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix options can be undefined instead of having a default value (#10)
When an import is something like the below, import something from '../../some/folder'; Currently this plugin cannot fix that to be like, import something from 'src/some/folder'; This because the `rootDir` variable in the `isParentFolder` function is treated as `undefined` unless a user set that variable by its option. So that this patch will fix this that `rootDir` not to be `undefined`, rather it makes that an empty string by setting a default value. In the case of `allowSameFolder`, `undefined` will be treated as `false` so it has been doing as it should be. It fixes #9. Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
- Loading branch information