import-js / eslint-plugin-import

ESLint plugin with rules that help validate proper imports.
MIT License
5.54k stars 1.57k forks source link

no import-relative-path #2254

Open wineSu opened 3 years ago

wineSu commented 3 years ago

Consider supporting non relative path usage.

Examples of incorrect code for this rule: import x from '../../x'; require('../inner');

Examples of correct code for this rule: import x from 'x'; require('inner');

ljharb commented 3 years ago

I'm not sure what you mean "supporting". Those can only work if x or inner are in node_modules, or if you've configured an import resolver to indicate they're an alias (via babel, or webpack, or typescript, etc).