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

must-colocate-fragment-spreads gives false errors with yarn workspaces #103

Open
tbergquist-godaddy opened this issue Aug 10, 2020 · 1 comment

Comments

@tbergquist-godaddy
Copy link
Contributor

Hi, we have a monorepo setup with yarn workspaces, where we have 2 apps, and a workspace of shared fragments between these apps.

Importing import { MyComponent } from '@org/fragments triggers error from this rule, even if its fragment is correctly used in the importing component.

I tried having a look at the code and see if I could come up with a fix, but it seems like this rule is based on matching the ImportDeclaration value against the name of the fragment.

I am not sure how eslint can extract this from the workspace name.

@hosmelq
Copy link

hosmelq commented Sep 23, 2020

I am having the same issue. I am importing my components in the following way.

import {Section} from './components'

If I import in the following way it works well.

import {Section} from './components/Section/Section'

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

No branches or pull requests

2 participants