{"action":"created","issue":{"url":"https://api.github.com/repos/18F/dol-whd-14c/issues/444","repository_url":"https://api.github.com/repos/18F/dol-whd-14c","labels_url":"https://api.github.com/repos/18F/dol-whd-14c/issues/444/labels{/name}","comments_url":"https://api.github.com/repos/18F/dol-whd-14c/issues/444/comments","events_url":"https://api.github.com/repos/18F/dol-whd-14c/issues/444/events","html_url":"https://github.com/18F/dol-whd-14c/pull/444","id":275890049,"number":444,"title":"Standardize lint and fix errors","user":{"login":"mgwalker","id":1775733,"avatar_url":"https://avatars3.githubusercontent.com/u/1775733?v=4","gravatar_id":"","url":"https://api.github.com/users/mgwalker","html_url":"https://github.com/mgwalker","followers_url":"https://api.github.com/users/mgwalker/followers","following_url":"https://api.github.com/users/mgwalker/following{/other_user}","gists_url":"https://api.github.com/users/mgwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/mgwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgwalker/subscriptions","organizations_url":"https://api.github.com/users/mgwalker/orgs","repos_url":"https://api.github.com/users/mgwalker/repos","events_url":"https://api.github.com/users/mgwalker/events{/privacy}","received_events_url":"https://api.github.com/users/mgwalker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-11-21T23:04:50Z","updated_at":"2017-11-22T16:27:02Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/18F/dol-whd-14c/pulls/444","html_url":"https://github.com/18F/dol-whd-14c/pull/444","diff_url":"https://github.com/18F/dol-whd-14c/pull/444.diff","patch_url":"https://github.com/18F/dol-whd-14c/pull/444.patch"},"body":"#### What's this PR do?\r\n\r\nThe previous lint config included a ton of customized rules, including many that were disabled (like the rule that disallows the use of undefined variables).  Those custom rules have been removed in favor of the standard `eslint:recommended` ruleset.  Additionally, the config file has been renamed to a JSON file to match eslint's new preference.\r\n\r\nI fixed most resulting lint errors  The remaining ones are mainly `console.log` statements.  These need to be removed, but I left them in case they represent places where the logging API should be used.\r\n\r\n#### Where should the reviewer start?\r\n\r\nSkim the changes to make sure they make sense.  Pull the code and run `npm run lint` to scan the code and take a look at the few remaining errors.\r\n\r\n#### Any background context you want to provide?\r\n\r\nThe [contract's Quality Assurance Surveillance Plan (QASP)](https://github.com/18F/bpa-DOL-WHD-14-c/blob/master/solicitation_documents/QASP.md) states the code must have \"0 linting errors and 0 warnings\" and refers to the [18F Front End Guide](https://frontend.18f.gov/#js-style) as the performance standard.  That guide recommends the [Airbnb style guide](https://github.com/airbnb/javascript).  The primary motivation of this QASP requirement, however, is that compliance should be against a ***standard*** style guide with minimum deviation.  This PR will get us nearly in line with that performance standard.  I am 100% okay with not enforcing the Airbnb rules, since the eslint:recommended ruleset is well-used and well-supported.\r\n\r\n### ❗️❗️❗️ The next step is to fix the remaining linting errors. ❗️❗️❗️\r\n\r\nI take responsibility for not digging into the customized style rules earlier (I really should have done it in the first engagement).  Once I saw how many rules were being disabled, I realized it was not an acceptable ruleset.\r\n\r\nHere are a few code review rules I'll be enforcing going forward:\r\n* any linting rule customizations must be justified in the PR where they are submitted\r\n* any one-off rule exceptions should be [disabled with inline comments](https://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments), usually on the specific line that needs the exception\r\n* PRs must pass `npm lint` with no errors or warnings (if CodeClimate will honor the repo's rules, I will make it a required check)"},"comment":{"url":"https://api.github.com/repos/18F/dol-whd-14c/issues/comments/346402133","html_url":"https://github.com/18F/dol-whd-14c/pull/444#issuecomment-346402133","issue_url":"https://api.github.com/repos/18F/dol-whd-14c/issues/444","id":346402133,"user":{"login":"mgwalker","id":1775733,"avatar_url":"https://avatars3.githubusercontent.com/u/1775733?v=4","gravatar_id":"","url":"https://api.github.com/users/mgwalker","html_url":"https://github.com/mgwalker","followers_url":"https://api.github.com/users/mgwalker/followers","following_url":"https://api.github.com/users/mgwalker/following{/other_user}","gists_url":"https://api.github.com/users/mgwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/mgwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgwalker/subscriptions","organizations_url":"https://api.github.com/users/mgwalker/orgs","repos_url":"https://api.github.com/users/mgwalker/repos","events_url":"https://api.github.com/users/mgwalker/events{/privacy}","received_events_url":"https://api.github.com/users/mgwalker/received_events","type":"User","site_admin":false},"created_at":"2017-11-22T16:27:02Z","updated_at":"2017-11-22T16:27:02Z","author_association":"MEMBER","body":"Oh you are correct, it's `npm run lint`.  As for the other errors, make sure you run `npm install` to get the most recent dependency versions.  I updated `eslint` to the latest version.\r\n\r\nAs for what that part of the eslintrc is doing, it's overriding the global configuration for the files that match `**/*.test.js` (all the test files) and defining globals for them.  That local override config is newly supported in eslint 4.x, so if you're running an older eslint, that would explain the jasmine error in particular!"}}
{"actor":{"display_login":"mgwalker"}}