{"action":"created","issue":{"url":"https://api.github.com/repos/benmosher/eslint-plugin-import/issues/1125","repository_url":"https://api.github.com/repos/benmosher/eslint-plugin-import","labels_url":"https://api.github.com/repos/benmosher/eslint-plugin-import/issues/1125/labels{/name}","comments_url":"https://api.github.com/repos/benmosher/eslint-plugin-import/issues/1125/comments","events_url":"https://api.github.com/repos/benmosher/eslint-plugin-import/issues/1125/events","html_url":"https://github.com/benmosher/eslint-plugin-import/issues/1125","id":335837060,"node_id":"MDU6SXNzdWUzMzU4MzcwNjA=","number":1125,"title":"How to treat imports inside a monorepo as internal","user":{"login":"bensampaio","id":1700178,"node_id":"MDQ6VXNlcjE3MDAxNzg=","avatar_url":"https://avatars3.githubusercontent.com/u/1700178?v=4","gravatar_id":"","url":"https://api.github.com/users/bensampaio","html_url":"https://github.com/bensampaio","followers_url":"https://api.github.com/users/bensampaio/followers","following_url":"https://api.github.com/users/bensampaio/following{/other_user}","gists_url":"https://api.github.com/users/bensampaio/gists{/gist_id}","starred_url":"https://api.github.com/users/bensampaio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensampaio/subscriptions","organizations_url":"https://api.github.com/users/bensampaio/orgs","repos_url":"https://api.github.com/users/bensampaio/repos","events_url":"https://api.github.com/users/bensampaio/events{/privacy}","received_events_url":"https://api.github.com/users/bensampaio/received_events","type":"User","site_admin":false},"labels":[{"id":726095640,"node_id":"MDU6TGFiZWw3MjYwOTU2NDA=","url":"https://api.github.com/repos/benmosher/eslint-plugin-import/labels/import/export%20ordering","name":"import/export ordering","color":"c99f2c","default":false},{"id":187330418,"node_id":"MDU6TGFiZWwxODczMzA0MTg=","url":"https://api.github.com/repos/benmosher/eslint-plugin-import/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-26T14:08:09Z","updated_at":"2018-07-10T21:11:58Z","closed_at":null,"author_association":"NONE","body":"I am working on a monorepo where I have some files with a list of imports that looks like this:\r\n\r\n```\r\nimport React from 'react';\r\n\r\nimport MyComponent from '@my/src/MyComponent';\r\n\r\nimport styles from './styles.scss';\r\n```\r\n\r\nIn this example, the second import refers to a package inside the monorepo and I would like it to be treated as an internal import by `import/order`. Is this possible to achieve?"},"comment":{"url":"https://api.github.com/repos/benmosher/eslint-plugin-import/issues/comments/403967440","html_url":"https://github.com/benmosher/eslint-plugin-import/issues/1125#issuecomment-403967440","issue_url":"https://api.github.com/repos/benmosher/eslint-plugin-import/issues/1125","id":403967440,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzk2NzQ0MA==","user":{"login":"bensampaio","id":1700178,"node_id":"MDQ6VXNlcjE3MDAxNzg=","avatar_url":"https://avatars3.githubusercontent.com/u/1700178?v=4","gravatar_id":"","url":"https://api.github.com/users/bensampaio","html_url":"https://github.com/bensampaio","followers_url":"https://api.github.com/users/bensampaio/followers","following_url":"https://api.github.com/users/bensampaio/following{/other_user}","gists_url":"https://api.github.com/users/bensampaio/gists{/gist_id}","starred_url":"https://api.github.com/users/bensampaio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensampaio/subscriptions","organizations_url":"https://api.github.com/users/bensampaio/orgs","repos_url":"https://api.github.com/users/bensampaio/repos","events_url":"https://api.github.com/users/bensampaio/events{/privacy}","received_events_url":"https://api.github.com/users/bensampaio/received_events","type":"User","site_admin":false},"created_at":"2018-07-10T21:11:58Z","updated_at":"2018-07-10T21:11:58Z","author_association":"NONE","body":"I don't think that is possible in a monorepo. The packages inside a monorepo will always have valid package names since you have to create a package.json for each one of them. Besides that, I need  my packages in the monorepo to be scoped. This is also how other projects like babel and jest are doing it.\r\n\r\nAnother option would also be to check via the root package.json if the current project is a monorepo, to determine where the modules are located and consider those internal (I mean by reading the [workspaces](https://yarnpkg.com/lang/en/docs/workspaces/) property). Or is this the wrong way around?"}}
{"actor":{"display_login":"bensampaio"}}