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

import/order incorrectly classifies linked in modules. #882

Closed
jsg2021 opened this issue Jun 26, 2017 · 6 comments
Closed

import/order incorrectly classifies linked in modules. #882

jsg2021 opened this issue Jun 26, 2017 · 6 comments

Comments

@jsg2021
Copy link

jsg2021 commented Jun 26, 2017

I have a project where I link in a library I'm working on at the same time as the app... the import/oder lint rules change based on linked state... even though the library's link is under node_modules.

@danny-andrews
Copy link
Contributor

I have the same problem.

@danny-andrews
Copy link
Contributor

.eslintrc:

rules:
  import/order:
    - error
    - groups: [builtin, external, internal, [sibling, index]]
      newlines-between: always

package.json:

{
  "dependencies": {
    "@own-local/platform-dtd": "link:../platform-dtd"
  }
}

Code:

import { injectIntl } from 'react-intl';
import type { Category, Business as BusinessType } from '@own-local/platform-dtd/lib/types';

Expected: no error

Actual: There should be at least one empty line between import groups (import/order)

@danny-andrews
Copy link
Contributor

Update: Looks like this is caused by the hyphen in our scoped module name: @own-local. This PR fixes the issue! #744

@jsg2021
Copy link
Author

jsg2021 commented Jul 26, 2017 via email

@danny-andrews
Copy link
Contributor

Ah, bummer, was hoping you had the same problem. Best of luck, mate!

@jsg2021
Copy link
Author

jsg2021 commented Feb 21, 2021

Closing because it's irrelevant now

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

No branches or pull requests

3 participants