Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New rule: no-absolute-path #530

Closed
jfmengels opened this issue Aug 28, 2016 · 3 comments · Fixed by #538
Closed

New rule: no-absolute-path #530

jfmengels opened this issue Aug 28, 2016 · 3 comments · Fixed by #538

Comments

@jfmengels
Copy link
Collaborator

Based off this comment

This rule should forbid the use of imports with an absolute path. This is valid in Node.js, but should not appear in code in npm packages or in production, or better: never.

Invalid

import Foo from '/some/absolute/path.js';

Valid

import Foo from './some/relative/path.js';
import Foo from 'foo';
@benmosher
Copy link
Member

I feel like I've already said this somewhere else (can't remember for sure), but what about no-absolute-path(s)?

@benmosher
Copy link
Member

In the interest of pairing well with the plugin+/: import/no-absolute-path

@jfmengels
Copy link
Collaborator Author

👍 for import/no-absolute-path

@jfmengels jfmengels changed the title New rule: no-absolute-imports New rule: no-absolute-path Aug 29, 2016
jfmengels added a commit that referenced this issue Aug 30, 2016
jfmengels added a commit that referenced this issue Aug 30, 2016
jfmengels added a commit that referenced this issue Aug 30, 2016
benmosher pushed a commit that referenced this issue Sep 1, 2016
* Add `no-absolute-path` rule (fixes #530)

* fix typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants