{"action":"closed","issue":{"url":"https://api.github.com/repos/mozilla/webcompat-blipz-experiment/issues/5","repository_url":"https://api.github.com/repos/mozilla/webcompat-blipz-experiment","labels_url":"https://api.github.com/repos/mozilla/webcompat-blipz-experiment/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/webcompat-blipz-experiment/issues/5/comments","events_url":"https://api.github.com/repos/mozilla/webcompat-blipz-experiment/issues/5/events","html_url":"https://github.com/mozilla/webcompat-blipz-experiment/issues/5","id":319670207,"number":5,"title":"A few warnings/recommendations via ESLint","user":{"login":"pdehaan","id":557895,"avatar_url":"https://avatars2.githubusercontent.com/u/557895?v=4","gravatar_id":"","url":"https://api.github.com/users/pdehaan","html_url":"https://github.com/pdehaan","followers_url":"https://api.github.com/users/pdehaan/followers","following_url":"https://api.github.com/users/pdehaan/following{/other_user}","gists_url":"https://api.github.com/users/pdehaan/gists{/gist_id}","starred_url":"https://api.github.com/users/pdehaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdehaan/subscriptions","organizations_url":"https://api.github.com/users/pdehaan/orgs","repos_url":"https://api.github.com/users/pdehaan/repos","events_url":"https://api.github.com/users/pdehaan/events{/privacy}","received_events_url":"https://api.github.com/users/pdehaan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-05-02T18:50:19Z","updated_at":"2018-05-03T01:17:14Z","closed_at":"2018-05-03T01:17:14Z","author_association":"NONE","body":"A few random things noted by ESLint:\r\n\r\n### package.json:\r\n\r\n```json\r\n{\r\n  \"name\": \"webcompat-blipz-experiment\",\r\n  \"version\": \"1.0.0\",\r\n  \"author\": \"Mozilla\",\r\n  \"bugs\": {\r\n    \"url\": \"https://github.com/mozilla/webcompat-blipz-experiment/issues\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"eslint\": \"4.19.1\",\r\n    \"eslint-plugin-json\": \"1.2.0\",\r\n    \"eslint-plugin-mozilla\": \"0.11.0\",\r\n    \"eslint-plugin-no-unsanitized\": \"3.0.0\"\r\n  },\r\n  \"homepage\": \"https://github.com/mozilla/webcompat-blipz-experiment#readme\",\r\n  \"keywords\": [],\r\n  \"license\": \"MPL-2.0\",\r\n  \"private\": true,\r\n  \"repository\": \"mozilla/webcompat-blipz-experiment\",\r\n  \"scripts\": {\r\n    \"lint\": \"eslint webextension --ext=js,jsm,json\",\r\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\r\n  }\r\n}\r\n```\r\n\r\n---\r\n\r\n### .eslintrc.js:\r\n\r\n```js\r\nmodule.exports = {\r\n  env: {\r\n    browser: true,\r\n    es6: true,\r\n    webextensions: true\r\n  },\r\n  extends: [\r\n    'eslint:recommended',\r\n    'plugin:mozilla/recommended'\r\n  ],\r\n  plugins: [\r\n    'json',\r\n    'mozilla'\r\n  ],\r\n  root: true,\r\n  rules: {\r\n    'eqeqeq': 'error',\r\n    'no-console': 'warn',\r\n    'no-var': 'error',\r\n    'one-var': ['error', 'never'],\r\n    'prefer-const': 'error'\r\n  }\r\n};\r\n```\r\n\r\n---\r\n\r\n### Output:\r\n\r\n```sh\r\n$ npm run lint\r\n\r\n> webcompat-blipz-experiment@1.0.0 lint /Users/pdehaan/dev/github/mozilla/webcompat-blipz-experiment\r\n> eslint webextension --ext=js,jsm,json\r\n\r\n\r\n/Users/pdehaan/dev/github/mozilla/webcompat-blipz-experiment/webextension/background.js\r\n    9:1   error    Unexpected var, use let or const instead                       no-var\r\n   11:1   error    Unexpected var, use let or const instead                       no-var\r\n   12:7   error    'TabStates' is never reassigned. Use 'const' instead           prefer-const\r\n   22:13  error    'info' is never reassigned. Use 'const' instead                prefer-const\r\n   31:21  error    'name' is never reassigned. Use 'const' instead                prefer-const\r\n   31:27  error    'value' is never reassigned. Use 'const' instead               prefer-const\r\n   32:17  error    use .includes instead of .indexOf                              mozilla/use-includes-instead-of-indexOf\r\n   78:19  error    'name' is never reassigned. Use 'const' instead                prefer-const\r\n   78:25  error    'value' is never reassigned. Use 'const' instead               prefer-const\r\n   91:11  error    'report' is never reassigned. Use 'const' instead              prefer-const\r\n   97:13  warning  Unexpected console statement                                   no-console\r\n  120:4   error    Missing semicolon                                              semi\r\n  124:3   warning  Unexpected console statement                                   no-console\r\n  129:9   error    'tabId' is never reassigned. Use 'const' instead               prefer-const\r\n  130:7   error    'tabState' is never reassigned. Use 'const' instead            prefer-const\r\n  153:9   error    'tabId' is never reassigned. Use 'const' instead               prefer-const\r\n  167:77  error    Expected to return a value at the end of async arrow function  consistent-return\r\n  168:9   error    'tabId' is never reassigned. Use 'const' instead               prefer-const\r\n  168:16  error    'type' is never reassigned. Use 'const' instead                prefer-const\r\n  168:22  error    'action' is never reassigned. Use 'const' instead              prefer-const\r\n  170:7   error    'tabState' is never reassigned. Use 'const' instead            prefer-const\r\n  193:5   error    Unexpected lexical declaration in case block                   no-case-declarations\r\n  194:11  error    'imgUrl' is never reassigned. Use 'const' instead              prefer-const\r\n  210:9   warning  Unexpected console statement                                   no-console\r\n\r\n/Users/pdehaan/dev/github/mozilla/webcompat-blipz-experiment/webextension/popup.js\r\n    9:5   error  'gState' is never reassigned. Use 'const' instead    prefer-const\r\n   15:13  error  'value' is never reassigned. Use 'const' instead     prefer-const\r\n   15:20  error  'msgId' is never reassigned. Use 'const' instead     prefer-const\r\n   27:13  error  'selector' is never reassigned. Use 'const' instead  prefer-const\r\n   27:23  error  'msgId' is never reassigned. Use 'const' instead     prefer-const\r\n   31:9   error  'input' is never reassigned. Use 'const' instead     prefer-const\r\n   35:11  error  'message' is never reassigned. Use 'const' instead   prefer-const\r\n   67:14  error  'section' is never reassigned. Use 'const' instead   prefer-const\r\n   76:12  error  'name' is never reassigned. Use 'const' instead      prefer-const\r\n   92:7   error  'img' is never reassigned. Use 'const' instead       prefer-const\r\n  105:7   error  'img' is never reassigned. Use 'const' instead       prefer-const\r\n  133:9   error  'action' is never reassigned. Use 'const' instead    prefer-const\r\n  134:9   error  'message' is never reassigned. Use 'const' instead   prefer-const\r\n  136:11  error  'form' is never reassigned. Use 'const' instead      prefer-const\r\n  142:16  error  'field' is never reassigned. Use 'const' instead     prefer-const\r\n\r\n✖ 39 problems (36 errors, 3 warnings)\r\n  31 errors, 0 warnings potentially fixable with the `--fix` option.\r\n\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\nnpm ERR! webcompat-blipz-experiment@1.0.0 lint: `eslint webextension --ext=js,jsm,json`\r\nnpm ERR! Exit status 1\r\nnpm ERR!\r\nnpm ERR! Failed at the webcompat-blipz-experiment@1.0.0 lint script.\r\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\r\n```\r\n"}}
{"actor":{"display_login":"wisniewskit"}}