import-js/eslint-plugin-import
GitHub で見るLinter mistakenly assumes global module is a parent directory of the project
Open
#1,291 opened on 2019年2月19日
bughelp wanted
説明
I have code doing an import like:
import {all} from 'redux-saga/effects';
import {REHYDRATE} from 'redux-persist/constants';
Producing the linter errors below:
1:25 error Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `session.js` to same directory as `redux-persist/constants` or consider making `redux-persist/constants` a package import/no-relative-parent-imports
11:8 error Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `index.js` to same directory as `redux-saga/effects` or consider making `redux-saga/effects` a package import/no-relative-parent-imports
Clearly the suggested resolution in the error doesn't make sense but I'm not sure why it thinks this should be the case. #793 has some similarities but I'm not sure if those are superficial or real.