{"action":"created","issue":{"url":"https://api.github.com/repos/migme/javascript/issues/10","repository_url":"https://api.github.com/repos/migme/javascript","labels_url":"https://api.github.com/repos/migme/javascript/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/migme/javascript/issues/10/comments","events_url":"https://api.github.com/repos/migme/javascript/issues/10/events","html_url":"https://github.com/migme/javascript/pull/10","id":177600285,"number":10,"title":"Add eslint config for preact","user":{"login":"achichen","id":218933,"avatar_url":"https://avatars.githubusercontent.com/u/218933?v=3","gravatar_id":"","url":"https://api.github.com/users/achichen","html_url":"https://github.com/achichen","followers_url":"https://api.github.com/users/achichen/followers","following_url":"https://api.github.com/users/achichen/following{/other_user}","gists_url":"https://api.github.com/users/achichen/gists{/gist_id}","starred_url":"https://api.github.com/users/achichen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achichen/subscriptions","organizations_url":"https://api.github.com/users/achichen/orgs","repos_url":"https://api.github.com/users/achichen/repos","events_url":"https://api.github.com/users/achichen/events{/privacy}","received_events_url":"https://api.github.com/users/achichen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-17T19:13:11Z","updated_at":"2016-09-17T19:30:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/migme/javascript/pulls/10","html_url":"https://github.com/migme/javascript/pull/10","diff_url":"https://github.com/migme/javascript/pull/10.diff","patch_url":"https://github.com/migme/javascript/pull/10.patch"},"body":"Create [preact rules](https://github.com/migme/javascript/blob/ac7f3f19e4ac50e9584f82e0d0d8c26fed965391/packages/eslint-config-migme/rules/preact.js) based on [react rules](https://github.com/migme/javascript/blob/master/packages/eslint-config-migme/rules/react.js)\r\n\r\nThe difference is that it checks `preact` instead of `react`.\r\n\r\nIn preact project, we can use this setting in `.eslintrc` to use it:\r\n\r\n```\r\n{\r\n  \"extends\": \"migme/preact\"\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/migme/javascript/issues/comments/247801667","html_url":"https://github.com/migme/javascript/pull/10#issuecomment-247801667","issue_url":"https://api.github.com/repos/migme/javascript/issues/10","id":247801667,"user":{"login":"achichen","id":218933,"avatar_url":"https://avatars.githubusercontent.com/u/218933?v=3","gravatar_id":"","url":"https://api.github.com/users/achichen","html_url":"https://github.com/achichen","followers_url":"https://api.github.com/users/achichen/followers","following_url":"https://api.github.com/users/achichen/following{/other_user}","gists_url":"https://api.github.com/users/achichen/gists{/gist_id}","starred_url":"https://api.github.com/users/achichen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achichen/subscriptions","organizations_url":"https://api.github.com/users/achichen/orgs","repos_url":"https://api.github.com/users/achichen/repos","events_url":"https://api.github.com/users/achichen/events{/privacy}","received_events_url":"https://api.github.com/users/achichen/received_events","type":"User","site_admin":false},"created_at":"2016-09-17T19:30:16Z","updated_at":"2016-09-17T19:30:16Z","body":"NOTE: a React project usually applies eslint rule [react-in-jsx-scope](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md) to check if `React` is imported in a file containing JSX. \r\n\r\nThis is actually quite dump. A possible solution is to automatically generate this import using babel. As what babel plugin [transform-react-require](https://github.com/cloudkite/babel-plugin-transform-react-require) does, generating commonjs `var React = require('react')` automatically. However, because [webpack 2 requires **ES2015 import** to do tree-shaking](www.2ality.com/2015/12/webpack-tree-shaking.html), it would be better to have a newer plugin output ES2015 `import` rather than `require`."}}
{"actor":{"display_login":"achichen"}}