{"action":"created","comment":{"url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/pulls/comments/216155760","pull_request_review_id":153580061,"id":216155760,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjE1NTc2MA==","diff_hunk":"@@ -51,6 +51,19 @@ function isTag(path, tagName, allowGlobal = false) {\n   );\n }\n \n+function isStyled(path, styledTag) {\n+  if (styledTag) {\n+    return (\n+      t.isCallExpression(path.node.tag) &&\n+      path.get('tag.callee.name').node === styledTag\n+    );\n+  }\n+  return (\n+    t.isCallExpression(path.node.tag) &&\n+    path.get('tag.callee').referencesImport('css-literal-loader/styled')","path":"src/plugin.js","position":13,"original_position":13,"commit_id":"a674b63154abd142aebe5fc594824b4904b6beef","original_commit_id":"a674b63154abd142aebe5fc594824b4904b6beef","user":{"login":"ai","id":19343,"node_id":"MDQ6VXNlcjE5MzQz","avatar_url":"https://avatars1.githubusercontent.com/u/19343?v=4","gravatar_id":"","url":"https://api.github.com/users/ai","html_url":"https://github.com/ai","followers_url":"https://api.github.com/users/ai/followers","following_url":"https://api.github.com/users/ai/following{/other_user}","gists_url":"https://api.github.com/users/ai/gists{/gist_id}","starred_url":"https://api.github.com/users/ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ai/subscriptions","organizations_url":"https://api.github.com/users/ai/orgs","repos_url":"https://api.github.com/users/ai/repos","events_url":"https://api.github.com/users/ai/events{/privacy}","received_events_url":"https://api.github.com/users/ai/received_events","type":"User","site_admin":false},"body":"In other words, if you missed `styledTag` we will use old behavior. If you will set it, you can miss the import.","created_at":"2018-09-09T12:10:42Z","updated_at":"2018-09-09T12:10:42Z","html_url":"https://github.com/4Catalyzer/css-literal-loader/pull/36#discussion_r216155760","pull_request_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/pulls/36","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/4Catalyzer/css-literal-loader/pulls/comments/216155760"},"html":{"href":"https://github.com/4Catalyzer/css-literal-loader/pull/36#discussion_r216155760"},"pull_request":{"href":"https://api.github.com/repos/4Catalyzer/css-literal-loader/pulls/36"}},"in_reply_to_id":216155567},"pull_request":{"url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/pulls/36","id":214139463,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MTM5NDYz","html_url":"https://github.com/4Catalyzer/css-literal-loader/pull/36","diff_url":"https://github.com/4Catalyzer/css-literal-loader/pull/36.diff","patch_url":"https://github.com/4Catalyzer/css-literal-loader/pull/36.patch","issue_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/issues/36","number":36,"state":"open","locked":false,"title":"Add styledTag option","user":{"login":"ai","id":19343,"node_id":"MDQ6VXNlcjE5MzQz","avatar_url":"https://avatars1.githubusercontent.com/u/19343?v=4","gravatar_id":"","url":"https://api.github.com/users/ai","html_url":"https://github.com/ai","followers_url":"https://api.github.com/users/ai/followers","following_url":"https://api.github.com/users/ai/following{/other_user}","gists_url":"https://api.github.com/users/ai/gists{/gist_id}","starred_url":"https://api.github.com/users/ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ai/subscriptions","organizations_url":"https://api.github.com/users/ai/orgs","repos_url":"https://api.github.com/users/ai/repos","events_url":"https://api.github.com/users/ai/events{/privacy}","received_events_url":"https://api.github.com/users/ai/received_events","type":"User","site_admin":false},"body":"`css-literal-loader` has `tagName` option to replace `css`.\r\n\r\nBut I need also the same for `styled`, because right now I am moving the big project to `css-literal-loader` and found 2 problems:\r\n\r\n1. We have “auto-import” Babel plugin which inserts `import React from 'react'`, etc. It will be nice to have the same for `styled` (because we used it in every component), but it will not work with `path.get('tag.callee').referencesImport('css-literal-loader/styled')`.\r\n2. We have automatic spelling check. To do this, we execute components in Node. Without babel loader, `css` throws “not in runtime” error. The fastest way to fix it just to replace `import styled from '../lib/styled'`, where we will hack `styled.css`.\r\n\r\nI know, that both reasons are very unique. But the fact that we have 2 reasons for it in the single project shows that customizing `styled` tag could be very useful for advanced developers.","created_at":"2018-09-09T10:50:06Z","updated_at":"2018-09-09T12:10:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1683bdf861f828f335d4cbcd90a28b85b675acdf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/pulls/36/commits","review_comments_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/pulls/36/comments","review_comment_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/pulls/comments{/number}","comments_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/issues/36/comments","statuses_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/statuses/a674b63154abd142aebe5fc594824b4904b6beef","head":{"label":"ai:styledTag","ref":"styledTag","sha":"a674b63154abd142aebe5fc594824b4904b6beef","user":{"login":"ai","id":19343,"node_id":"MDQ6VXNlcjE5MzQz","avatar_url":"https://avatars1.githubusercontent.com/u/19343?v=4","gravatar_id":"","url":"https://api.github.com/users/ai","html_url":"https://github.com/ai","followers_url":"https://api.github.com/users/ai/followers","following_url":"https://api.github.com/users/ai/following{/other_user}","gists_url":"https://api.github.com/users/ai/gists{/gist_id}","starred_url":"https://api.github.com/users/ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ai/subscriptions","organizations_url":"https://api.github.com/users/ai/orgs","repos_url":"https://api.github.com/users/ai/repos","events_url":"https://api.github.com/users/ai/events{/privacy}","received_events_url":"https://api.github.com/users/ai/received_events","type":"User","site_admin":false},"repo":{"id":148010239,"node_id":"MDEwOlJlcG9zaXRvcnkxNDgwMTAyMzk=","name":"css-literal-loader","full_name":"ai/css-literal-loader","owner":{"login":"ai","id":19343,"node_id":"MDQ6VXNlcjE5MzQz","avatar_url":"https://avatars1.githubusercontent.com/u/19343?v=4","gravatar_id":"","url":"https://api.github.com/users/ai","html_url":"https://github.com/ai","followers_url":"https://api.github.com/users/ai/followers","following_url":"https://api.github.com/users/ai/following{/other_user}","gists_url":"https://api.github.com/users/ai/gists{/gist_id}","starred_url":"https://api.github.com/users/ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ai/subscriptions","organizations_url":"https://api.github.com/users/ai/orgs","repos_url":"https://api.github.com/users/ai/repos","events_url":"https://api.github.com/users/ai/events{/privacy}","received_events_url":"https://api.github.com/users/ai/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ai/css-literal-loader","description":"Parse css tagged template literals as CSS files","fork":true,"url":"https://api.github.com/repos/ai/css-literal-loader","forks_url":"https://api.github.com/repos/ai/css-literal-loader/forks","keys_url":"https://api.github.com/repos/ai/css-literal-loader/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ai/css-literal-loader/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ai/css-literal-loader/teams","hooks_url":"https://api.github.com/repos/ai/css-literal-loader/hooks","issue_events_url":"https://api.github.com/repos/ai/css-literal-loader/issues/events{/number}","events_url":"https://api.github.com/repos/ai/css-literal-loader/events","assignees_url":"https://api.github.com/repos/ai/css-literal-loader/assignees{/user}","branches_url":"https://api.github.com/repos/ai/css-literal-loader/branches{/branch}","tags_url":"https://api.github.com/repos/ai/css-literal-loader/tags","blobs_url":"https://api.github.com/repos/ai/css-literal-loader/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ai/css-literal-loader/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ai/css-literal-loader/git/refs{/sha}","trees_url":"https://api.github.com/repos/ai/css-literal-loader/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ai/css-literal-loader/statuses/{sha}","languages_url":"https://api.github.com/repos/ai/css-literal-loader/languages","stargazers_url":"https://api.github.com/repos/ai/css-literal-loader/stargazers","contributors_url":"https://api.github.com/repos/ai/css-literal-loader/contributors","subscribers_url":"https://api.github.com/repos/ai/css-literal-loader/subscribers","subscription_url":"https://api.github.com/repos/ai/css-literal-loader/subscription","commits_url":"https://api.github.com/repos/ai/css-literal-loader/commits{/sha}","git_commits_url":"https://api.github.com/repos/ai/css-literal-loader/git/commits{/sha}","comments_url":"https://api.github.com/repos/ai/css-literal-loader/comments{/number}","issue_comment_url":"https://api.github.com/repos/ai/css-literal-loader/issues/comments{/number}","contents_url":"https://api.github.com/repos/ai/css-literal-loader/contents/{+path}","compare_url":"https://api.github.com/repos/ai/css-literal-loader/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ai/css-literal-loader/merges","archive_url":"https://api.github.com/repos/ai/css-literal-loader/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ai/css-literal-loader/downloads","issues_url":"https://api.github.com/repos/ai/css-literal-loader/issues{/number}","pulls_url":"https://api.github.com/repos/ai/css-literal-loader/pulls{/number}","milestones_url":"https://api.github.com/repos/ai/css-literal-loader/milestones{/number}","notifications_url":"https://api.github.com/repos/ai/css-literal-loader/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ai/css-literal-loader/labels{/name}","releases_url":"https://api.github.com/repos/ai/css-literal-loader/releases{/id}","deployments_url":"https://api.github.com/repos/ai/css-literal-loader/deployments","created_at":"2018-09-09T09:16:08Z","updated_at":"2018-09-09T09:16:11Z","pushed_at":"2018-09-09T10:44:28Z","git_url":"git://github.com/ai/css-literal-loader.git","ssh_url":"git@github.com:ai/css-literal-loader.git","clone_url":"https://github.com/ai/css-literal-loader.git","svn_url":"https://github.com/ai/css-literal-loader","homepage":"","size":462,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"4Catalyzer:master","ref":"master","sha":"d61683cb3ecace5f468fff5bf35eb6e65bcfa4a7","user":{"login":"4Catalyzer","id":13967986,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTY3OTg2","avatar_url":"https://avatars1.githubusercontent.com/u/13967986?v=4","gravatar_id":"","url":"https://api.github.com/users/4Catalyzer","html_url":"https://github.com/4Catalyzer","followers_url":"https://api.github.com/users/4Catalyzer/followers","following_url":"https://api.github.com/users/4Catalyzer/following{/other_user}","gists_url":"https://api.github.com/users/4Catalyzer/gists{/gist_id}","starred_url":"https://api.github.com/users/4Catalyzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4Catalyzer/subscriptions","organizations_url":"https://api.github.com/users/4Catalyzer/orgs","repos_url":"https://api.github.com/users/4Catalyzer/repos","events_url":"https://api.github.com/users/4Catalyzer/events{/privacy}","received_events_url":"https://api.github.com/users/4Catalyzer/received_events","type":"Organization","site_admin":false},"repo":{"id":71260883,"node_id":"MDEwOlJlcG9zaXRvcnk3MTI2MDg4Mw==","name":"css-literal-loader","full_name":"4Catalyzer/css-literal-loader","owner":{"login":"4Catalyzer","id":13967986,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTY3OTg2","avatar_url":"https://avatars1.githubusercontent.com/u/13967986?v=4","gravatar_id":"","url":"https://api.github.com/users/4Catalyzer","html_url":"https://github.com/4Catalyzer","followers_url":"https://api.github.com/users/4Catalyzer/followers","following_url":"https://api.github.com/users/4Catalyzer/following{/other_user}","gists_url":"https://api.github.com/users/4Catalyzer/gists{/gist_id}","starred_url":"https://api.github.com/users/4Catalyzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4Catalyzer/subscriptions","organizations_url":"https://api.github.com/users/4Catalyzer/orgs","repos_url":"https://api.github.com/users/4Catalyzer/repos","events_url":"https://api.github.com/users/4Catalyzer/events{/privacy}","received_events_url":"https://api.github.com/users/4Catalyzer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/4Catalyzer/css-literal-loader","description":"Parse css tagged template literals as CSS files","fork":false,"url":"https://api.github.com/repos/4Catalyzer/css-literal-loader","forks_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/forks","keys_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/teams","hooks_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/hooks","issue_events_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/issues/events{/number}","events_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/events","assignees_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/assignees{/user}","branches_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/branches{/branch}","tags_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/tags","blobs_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/git/refs{/sha}","trees_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/statuses/{sha}","languages_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/languages","stargazers_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/stargazers","contributors_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/contributors","subscribers_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/subscribers","subscription_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/subscription","commits_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/commits{/sha}","git_commits_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/git/commits{/sha}","comments_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/comments{/number}","issue_comment_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/issues/comments{/number}","contents_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/contents/{+path}","compare_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/merges","archive_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/downloads","issues_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/issues{/number}","pulls_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/pulls{/number}","milestones_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/milestones{/number}","notifications_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/labels{/name}","releases_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/releases{/id}","deployments_url":"https://api.github.com/repos/4Catalyzer/css-literal-loader/deployments","created_at":"2016-10-18T15:09:36Z","updated_at":"2018-09-08T14:19:16Z","pushed_at":"2018-09-09T10:50:07Z","git_url":"git://github.com/4Catalyzer/css-literal-loader.git","ssh_url":"git@github.com:4Catalyzer/css-literal-loader.git","clone_url":"https://github.com/4Catalyzer/css-literal-loader.git","svn_url":"https://github.com/4Catalyzer/css-literal-loader","homepage":"","size":459,"stargazers_count":483,"watchers_count":483,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":19,"open_issues":8,"watchers":483,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/4Catalyzer/css-literal-loader/pulls/36"},"html":{"href":"https://github.com/4Catalyzer/css-literal-loader/pull/36"},"issue":{"href":"https://api.github.com/repos/4Catalyzer/css-literal-loader/issues/36"},"comments":{"href":"https://api.github.com/repos/4Catalyzer/css-literal-loader/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/4Catalyzer/css-literal-loader/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/4Catalyzer/css-literal-loader/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/4Catalyzer/css-literal-loader/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/4Catalyzer/css-literal-loader/statuses/a674b63154abd142aebe5fc594824b4904b6beef"}},"author_association":"NONE"}}
{"actor":{"display_login":"ai"}}