{"action":"created","issue":{"url":"https://api.github.com/repos/processing/p5.js-sound/issues/186","repository_url":"https://api.github.com/repos/processing/p5.js-sound","labels_url":"https://api.github.com/repos/processing/p5.js-sound/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/processing/p5.js-sound/issues/186/comments","events_url":"https://api.github.com/repos/processing/p5.js-sound/issues/186/events","html_url":"https://github.com/processing/p5.js-sound/pull/186","id":237125927,"number":186,"title":"Linting: add grunt lint task, .eslintrc and .editorconfig","user":{"login":"therewasaguy","id":504124,"avatar_url":"https://avatars1.githubusercontent.com/u/504124?v=3","gravatar_id":"","url":"https://api.github.com/users/therewasaguy","html_url":"https://github.com/therewasaguy","followers_url":"https://api.github.com/users/therewasaguy/followers","following_url":"https://api.github.com/users/therewasaguy/following{/other_user}","gists_url":"https://api.github.com/users/therewasaguy/gists{/gist_id}","starred_url":"https://api.github.com/users/therewasaguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/therewasaguy/subscriptions","organizations_url":"https://api.github.com/users/therewasaguy/orgs","repos_url":"https://api.github.com/users/therewasaguy/repos","events_url":"https://api.github.com/users/therewasaguy/events{/privacy}","received_events_url":"https://api.github.com/users/therewasaguy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-20T08:08:44Z","updated_at":"2017-06-20T21:10:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/processing/p5.js-sound/pulls/186","html_url":"https://github.com/processing/p5.js-sound/pull/186","diff_url":"https://github.com/processing/p5.js-sound/pull/186.diff","patch_url":"https://github.com/processing/p5.js-sound/pull/186.patch"},"body":"Adds linting, which is optional (for now) but hopefully helpful for developers who choose to use it. The goal is to have some consistent styles that nudge all contributors towards good standards/best practices without the need to get nitpicky in code review.\r\n\r\n- Replaces the jshint task (which was similar to p5's) with an eslint task.\r\n- Sets some linting rules in `src/.eslintrc`. Rules are based on [p5's jshint](https://github.com/processing/p5.js/blob/master/src/.jshintrc) and [jscs](https://github.com/processing/p5.js/blob/master/.jscsrc), with some additional suggestions. This is all open to input! Check out the list of available rules [here](http://eslint.org/docs/rules/).\r\n- Adds an .editorconfig file [borrowed from p5 here](https://github.com/processing/p5.js/blob/master/.editorconfig)\r\n- Lints source code to meet linting standards\r\n\r\nI'm thinking we could add linting as a pre-commit hook, and then also set up linting on PR's, but I want to make sure this is done in a way that encourages, rather than deters, potential contributors. I would love some feedback on this idea!\r\n\r\n### How to use it\r\n\r\n##### Lint task\r\n`npm install` to update dependencies\r\n`grunt lint` lints `src/` directory\r\n\r\n##### auto-fix errors\r\nYou can also run lint individual files from the terminal, with the optional -fix flag that will fix some (but not all) linting errors\r\n\r\n##### Linting hints in your IDE\r\n`npm install -g eslint`\r\n`eslint src/audioin.js --fix`\r\n\r\nYou can also install tools for your code editor:\r\n- eslint http://eslint.org/docs/user-guide/integrations\r\n- editor config: http://editorconfig.org/#download\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/processing/p5.js-sound/issues/comments/309892680","html_url":"https://github.com/processing/p5.js-sound/pull/186#issuecomment-309892680","issue_url":"https://api.github.com/repos/processing/p5.js-sound/issues/186","id":309892680,"user":{"login":"lmccart","id":191056,"avatar_url":"https://avatars0.githubusercontent.com/u/191056?v=3","gravatar_id":"","url":"https://api.github.com/users/lmccart","html_url":"https://github.com/lmccart","followers_url":"https://api.github.com/users/lmccart/followers","following_url":"https://api.github.com/users/lmccart/following{/other_user}","gists_url":"https://api.github.com/users/lmccart/gists{/gist_id}","starred_url":"https://api.github.com/users/lmccart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmccart/subscriptions","organizations_url":"https://api.github.com/users/lmccart/orgs","repos_url":"https://api.github.com/users/lmccart/repos","events_url":"https://api.github.com/users/lmccart/events{/privacy}","received_events_url":"https://api.github.com/users/lmccart/received_events","type":"User","site_admin":false},"created_at":"2017-06-20T21:10:30Z","updated_at":"2017-06-20T21:10:30Z","body":"interesting! planning to take a look in the next few days"}}
{"actor":{"display_login":"lmccart"}}