{"action":"created","issue":{"url":"https://api.github.com/repos/mobify/mobify-code-style/issues/61","labels_url":"https://api.github.com/repos/mobify/mobify-code-style/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/mobify/mobify-code-style/issues/61/comments","events_url":"https://api.github.com/repos/mobify/mobify-code-style/issues/61/events","html_url":"https://github.com/mobify/mobify-code-style/pull/61","id":92698539,"number":61,"title":"Fix eslint for Atom","user":{"login":"marlowpayne","id":1747353,"avatar_url":"https://avatars.githubusercontent.com/u/1747353?v=3","gravatar_id":"","url":"https://api.github.com/users/marlowpayne","html_url":"https://github.com/marlowpayne","followers_url":"https://api.github.com/users/marlowpayne/followers","following_url":"https://api.github.com/users/marlowpayne/following{/other_user}","gists_url":"https://api.github.com/users/marlowpayne/gists{/gist_id}","starred_url":"https://api.github.com/users/marlowpayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marlowpayne/subscriptions","organizations_url":"https://api.github.com/users/marlowpayne/orgs","repos_url":"https://api.github.com/users/marlowpayne/repos","events_url":"https://api.github.com/users/marlowpayne/events{/privacy}","received_events_url":"https://api.github.com/users/marlowpayne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-02T18:09:12Z","updated_at":"2015-07-02T22:43:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mobify/mobify-code-style/pulls/61","html_url":"https://github.com/mobify/mobify-code-style/pull/61","diff_url":"https://github.com/mobify/mobify-code-style/pull/61.diff","patch_url":"https://github.com/mobify/mobify-code-style/pull/61.patch"},"body":"Status: **Ready for Review**\r\nOwner: @marlowpayne\r\nReviewers: @donnielrt @Helen-Mobify \r\n\r\n## Changes\r\nAtom currently has issues parsing our eslint settings due to improper quote marks in certain settings.\r\n![atomeslintconfigerror](https://cloud.githubusercontent.com/assets/1747353/8483220/058eb862-20a4-11e5-910d-55432a3392c6.png)\r\nIn addition, Atom will not overwrite default eslint settings unless they are explicitly whitelisted in the supplied eslint config. These changes:\r\n- Fix rules that Atom previously could not parse correctly\r\n- Extend our eslint config on top of a blank slate of disabled default rules\r\n\r\nThese changes are compatible with our usage of eslint in Adaptive.js projects.\r\n\r\n## Todos:\r\n- [ ] Engineer +1\r\n\r\n### Feedback:\r\n_none so far_\r\n\r\n## How to Test\r\nA couple things to test here:\r\n### Test on-the-fly linting in Atom\r\n- Download and install [Atom](https://atom.io/)\r\n- Install the [linter](https://atom.io/packages/linter) package\r\n- Install the [linter-eslint](https://atom.io/packages/linter-eslint) package\r\n- Update your local copy of the code-style by running `npm install -g git+ssh://git@github.com:mobify/mobify-code-style.git#fix-eslint-for-atom`\r\n- Create a symlink to the updated eslint config files by navigating to your main projects directory (holding all your Mobify projects) and running:\r\n\r\n`ln -s /path/to/your/local/node_modules/mobify-code-style/javascript/.eslintrc ./.eslintrc`\r\nand\r\n`ln -s /path/to/your/local/node_modules/mobify-code-style/javascript/.eslintrc-defaults ./.eslintrc-defaults`\r\n- Open your Atom settings for the `linter-eslint` package and make sure your path is set for the eslint rules\r\n![rulespath](https://cloud.githubusercontent.com/assets/1747353/8483662/089455aa-20a7-11e5-88b8-e413260455ef.png)\r\n- Restart Atom\r\n- Open a JS file and check that linting works\r\n\r\n### Test that project linting still works\r\n- Open an Adaptive.js project built from the generator version 1.8 or higher (uses eslint)\r\n- Update `package.json` to use this branch's version of eslint config by changing the entry for `mobify-code-style` to:\r\n\r\n`\"mobify-code-style\": \"git+ssh://git@github.com:mobify/mobify-code-style.git#fix-eslint-for-atom\",`\r\n- Refresh the project node modules with: `rm -rf node_modules && npm install`\r\n- Verify linting runs against the new rules with: `grunt lint`"},"comment":{"url":"https://api.github.com/repos/mobify/mobify-code-style/issues/comments/118186731","html_url":"https://github.com/mobify/mobify-code-style/pull/61#issuecomment-118186731","issue_url":"https://api.github.com/repos/mobify/mobify-code-style/issues/61","id":118186731,"user":{"login":"donnielrt","id":1524374,"avatar_url":"https://avatars.githubusercontent.com/u/1524374?v=3","gravatar_id":"","url":"https://api.github.com/users/donnielrt","html_url":"https://github.com/donnielrt","followers_url":"https://api.github.com/users/donnielrt/followers","following_url":"https://api.github.com/users/donnielrt/following{/other_user}","gists_url":"https://api.github.com/users/donnielrt/gists{/gist_id}","starred_url":"https://api.github.com/users/donnielrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donnielrt/subscriptions","organizations_url":"https://api.github.com/users/donnielrt/orgs","repos_url":"https://api.github.com/users/donnielrt/repos","events_url":"https://api.github.com/users/donnielrt/events{/privacy}","received_events_url":"https://api.github.com/users/donnielrt/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T22:43:44Z","updated_at":"2015-07-02T22:43:44Z","body":"@marlowpayne does the inclusion of the default rules mean that we might have more failures than expected? Have you tested this on existing projects?"}}