{"action":"created","issue":{"url":"https://api.github.com/repos/jshint/jshint/issues/2146","labels_url":"https://api.github.com/repos/jshint/jshint/issues/2146/labels{/name}","comments_url":"https://api.github.com/repos/jshint/jshint/issues/2146/comments","events_url":"https://api.github.com/repos/jshint/jshint/issues/2146/events","html_url":"https://github.com/jshint/jshint/issues/2146","id":56417120,"number":2146,"title":"A ton of es6 errors with an upgrade from 2.5.x to 2.6.0","user":{"login":"kentcdodds","id":1500684,"avatar_url":"https://avatars.githubusercontent.com/u/1500684?v=3","gravatar_id":"","url":"https://api.github.com/users/kentcdodds","html_url":"https://github.com/kentcdodds","followers_url":"https://api.github.com/users/kentcdodds/followers","following_url":"https://api.github.com/users/kentcdodds/following{/other_user}","gists_url":"https://api.github.com/users/kentcdodds/gists{/gist_id}","starred_url":"https://api.github.com/users/kentcdodds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentcdodds/subscriptions","organizations_url":"https://api.github.com/users/kentcdodds/orgs","repos_url":"https://api.github.com/users/kentcdodds/repos","events_url":"https://api.github.com/users/kentcdodds/events{/privacy}","received_events_url":"https://api.github.com/users/kentcdodds/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-03T18:29:38Z","updated_at":"2015-02-03T18:36:50Z","closed_at":null,"body":"Something in [this sizeable change](https://github.com/jshint/jshint/compare/2.5.11...2.6.0) took me from 0 errors/warnings to this (using webpack):\r\n\r\n```\r\nWARNING in ./app/index.common.js\r\njshint results in errors\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 2 char 1\r\n    let angular = require('angular');\r\n\r\nWARNING in ./app/custom.ignored.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 11 char 34\r\n    angular.element(document).ready(() => {\r\n\r\nWARNING in ./app/ssApp/index.js\r\njshint results in errors\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 1 char 1\r\n    let _ = require('lodash');\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 2 char 1\r\n    let stateUtils = require('stateUtils');\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 3 char 1\r\n    let utils = require('utils');\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 5 char 1\r\n    let ssCommonModuleName = require('ngCommon').name;\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 7 char 1\r\n    let rootStates = require('../states');\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 8 char 1\r\n    let allStates = stateUtils.getStates(rootStates);\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 9 char 1\r\n    let allStateModules = utils.flatten(rootStates, 'data/children');\r\n\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 14 char 37\r\n      stateModule.config($stateProvider => $stateProvider.state(state));\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 17 char 1\r\n    let deps = _.union([\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 21 char 1\r\n    let ngModule = require('registerModule')(__filename, deps);\r\n\r\nWARNING in ./app/shared/registerModule.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 4 char 35\r\n    module.exports = (filename, common) => {\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 5 char 3\r\n      let deps;\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 13 char 3\r\n      let moduleSuffix;\r\n\r\n  Unexpected '`'. @ line 15 char 20\r\n        moduleSuffix = `${filename}Module`;\r\n\r\n  Expected an identifier and instead saw '}'. @ line 16 char 3\r\n      } else {\r\n\r\n  Missing semicolon. @ line 16 char 4\r\n      } else {\r\n\r\n  Expected an identifier and instead saw 'else'. @ line 16 char 5\r\n      } else {\r\n\r\n  Expected an assignment or function call and instead saw an expression. @ line 16 char 5\r\n      } else {\r\n\r\n  Missing semicolon. @ line 16 char 9\r\n      } else {\r\n\r\n  Unexpected '`'. @ line 17 char 20\r\n        moduleSuffix = `${count++}Module${_.random(999999)}`;\r\n\r\n  Expected an identifier and instead saw '}'. @ line 18 char 3\r\n      }\r\n\r\n  Missing semicolon. @ line 18 char 4\r\n      }\r\n\r\n  Unexpected '`'. @ line 19 char 25\r\n      return angular.module(`${modulePrefix}${moduleSuffix}`, deps);\r\n\r\n  Expected an identifier and instead saw '}'. @ line 20 char 1\r\n    };\r\n\r\n  Expected ')' and instead saw ';'. @ line 20 char 2\r\n    };\r\n\r\n  Missing semicolon. @ line 20 char 3\r\n    };\r\n\r\n  Unmatched '{'. @ line 16 char 10\r\n      } else {\r\n\r\n  Unmatched '{'. @ line 14 char 15\r\n      if (ON_DEV) {\r\n\r\n  Unmatched '{'. @ line 4 char 40\r\n    module.exports = (filename, common) => {\r\n\r\n  Missing semicolon. @ line 23 char 1\r\n    \r\n\r\nWARNING in ./app/shared/ngCommon/index.js\r\njshint results in errors\r\n  Expected an assignment or function call and instead saw an expression. @ line 7 char 68\r\n    require('angular-animate/angular-animate') && deps.push('ngAnimate');\r\n\r\n  Expected an assignment or function call and instead saw an expression. @ line 8 char 59\r\n    require('angular-aria/angular-aria') && deps.push('ngAria');\r\n\r\n  Expected an assignment or function call and instead saw an expression. @ line 9 char 71\r\n    require('angular-messages/angular-messages') && deps.push('ngMessages');\r\n\r\n  Expected an assignment or function call and instead saw an expression. @ line 10 char 71\r\n    require('angular-sanitize/angular-sanitize') && deps.push('ngSanitize');\r\n\r\n  Expected an assignment or function call and instead saw an expression. @ line 19 char 57\r\n    require('angular-bootstrap') && deps.push('ui.bootstrap');\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 27 char 1\r\n    let ngModule = require('registerModule')(__filename, deps);\r\n\r\nWARNING in ./app/shared/ngCommon/services/stateUtils.js\r\njshint results in errors\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 1 char 1\r\n    let _ = require('lodash');\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 2 char 1\r\n    let utils = require('utils');\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 3 char 1\r\n    let internal = {};\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 4 char 1\r\n    let stateResponders = {};\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 6 char 1\r\n    let stateUtils = module.exports = {\r\n\r\n  'object short notation' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 26 char 27\r\n          _.extend(internal, {$injector});\r\n\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 32 char 42\r\n    module.exports.createProvider = ngModule => {\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 88 char 3\r\n      let states = [];\r\n\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 105 char 63\r\n        _.each(utils.arrayify(state.data.activationEvents), event => {\r\n\r\n  Unexpected '`'. @ line 108 char 11\r\n              `Only one state can respond to an activation event: ${event}, ${stateResponders[event].url}, ${state.url}`\r\n\r\n  'spread/rest operator' is only available in ES6 (use esnext option). @ line 150 char 28\r\n      return invokeState('go', ...arguments);\r\n\r\n  'spread/rest operator' is only available in ES6 (use esnext option). @ line 154 char 30\r\n      return invokeState('href', ...arguments);\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 158 char 3\r\n      let state = getStateForEvent(event);\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 159 char 3\r\n      let $state = internal.$injector.get('$state');\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 164 char 3\r\n      let $location = internal.$injector.get('$location');\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 165 char 3\r\n      let path = $location.path();\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 174 char 3\r\n      let state = stateResponders[event];\r\n\r\n  'spread/rest operator' is only available in ES6 (use esnext option). @ line 179 char 25\r\n          'listener args:', ...arguments\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 186 char 3\r\n      let activateableState = state;\r\n\r\nWARNING in ./app/shared/ngCommon/services/utils.js\r\njshint results in errors\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 37 char 1\r\n    let internal = {};\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 38 char 1\r\n    let objectPrototype = Object.getPrototypeOf({});\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 39 char 1\r\n    let arrayPrototype = Object.getPrototypeOf([]);\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 40 char 1\r\n    let _ = require('lodash');\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 42 char 1\r\n    let utils = module.exports = {\r\n\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 60 char 42\r\n    module.exports.createProvider = ngModule => {\r\n\r\n  'default parameters' is only available in ES6 (use esnext option). @ line 199 char 45\r\n    function flatten(items, property, flatItems = []) {\r\n\r\nWARNING in ./app/shared/ngCommon/services/index.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 1 char 27\r\n    module.exports = ngModule => {\r\n\r\nWARNING in ./app/shared/ngCommon/constants/index.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 1 char 27\r\n    module.exports = ngModule => {\r\n\r\nWARNING in ./app/shared/ngCommon/config/index.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 1 char 27\r\n    module.exports = ngModule => {\r\n\r\nWARNING in ./app/shared/ngCommon/directives/index.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 1 char 27\r\n    module.exports = ngModule => {\r\n\r\nWARNING in ./app/shared/ngCommon/services/ssError.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 1 char 27\r\n    module.exports = ngModule => {\r\n\r\nWARNING in ./app/shared/ngCommon/constants/onDev.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 1 char 27\r\n    module.exports = ngModule => {\r\n\r\nWARNING in ./app/shared/ngCommon/constants/onTest.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 1 char 27\r\n    module.exports = ngModule => {\r\n\r\nWARNING in ./app/shared/ngCommon/constants/onProd.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 1 char 27\r\n    module.exports = ngModule => {\r\n\r\nWARNING in ./app/shared/ngCommon/constants/isIE.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 1 char 27\r\n    module.exports = ngModule => {\r\n\r\n  'const' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 2 char 3\r\n      const ua = window.navigator.userAgent;\r\n\r\n  'const' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 3 char 3\r\n      const isIE = ua.indexOf('MSIE ') > 0 || ua.indexOf('Trident/') > 0;\r\n\r\nWARNING in ./app/shared/ngCommon/directives/ss-event-navigate.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 1 char 27\r\n    module.exports = ngModule => {\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 6 char 9\r\n            let tagName = el[0].tagName;\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 7 char 9\r\n            let expressionRegex = /^(.*?)(\\((.*?)(,(.*?))?\\))?$/;\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 13 char 13\r\n                let args = getEventArgs(value);\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 14 char 13\r\n                let href = stateUtils.eventHref(...args);\r\n\r\n  'spread/rest operator' is only available in ES6 (use esnext option). @ line 14 char 45\r\n                let href = stateUtils.eventHref(...args);\r\n\r\n  'spread/rest operator' is only available in ES6 (use esnext option). @ line 25 char 86\r\n              throw ssError('ss-event-navigate must be on an <a> or <button> tag only!', ...arguments);\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 28 char 11\r\n              let args = getEventArgs(attrs.ssEventNavigate);\r\n\r\n  'spread/rest operator' is only available in ES6 (use esnext option). @ line 29 char 36\r\n              stateUtils.eventNavigate(...args);\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 33 char 11\r\n              let [,event,,props,,options] = value.match(expressionRegex) || [];\r\n\r\n  'destructuring expression' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 33 char 11\r\n              let [,event,,props,,options] = value.match(expressionRegex) || [];\r\n\r\nWARNING in ./app/shared/ngCommon/directives/ng-form.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 1 char 27\r\n    module.exports = ngModule => {\r\n\r\nWARNING in ./app/shared/ngCommon/directives/ss-icon.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 1 char 27\r\n    module.exports = ngModule => {\r\n\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 6 char 28\r\n      _.each(iconSets, iconSet => require('material-design-icons/sprites/svg-sprite/svg-sprite-' + iconSet + '.css'));\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 14 char 9\r\n            let size = getIconSize(attrs.size);\r\n\r\n  Unexpected '`'. @ line 16 char 26\r\n            el.attr('style', `height:${size}px;width:${size}px`);\r\n\r\n  Expected ')' and instead saw '}'. @ line 28 char 7\r\n          }\r\n\r\n  Missing semicolon. @ line 28 char 8\r\n          }\r\n\r\n  Expected '}' to match '{' from line 9 and instead saw ';'. @ line 29 char 6\r\n        };\r\n\r\n  Missing semicolon. @ line 29 char 7\r\n        };\r\n\r\nWARNING in ./app/shared/registerState.js\r\njshint results in errors\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 1 char 1\r\n    let utils = require('utils');\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 2 char 1\r\n    let _ = require('lodash');\r\n\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 3 char 48\r\n    module.exports = (filename, dependencies, state) => {\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 4 char 3\r\n      let deps;\r\n\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 13 char 3\r\n      let ngModule = require('registerModule')(filename.replace(/\\./g, '-'), dependencies);\r\n\r\n  Unexpected '`'. @ line 14 char 32\r\n      var templateAttrs = ON_DEV ? ` data-state-url=\"${state.url}\" data-state-name=\"${ngModule.name}\"` : '';\r\n\r\n  Unexpected '`'. @ line 18 char 15\r\n        template: `<div ui-view${templateAttrs}></div>`\r\n\r\n  Expected an identifier and instead saw '}'. @ line 19 char 3\r\n      });\r\n\r\n  Expected '}' to match '{' from line 15 and instead saw ')'. @ line 19 char 4\r\n      });\r\n\r\n  Expected ')' and instead saw ';'. @ line 19 char 5\r\n      });\r\n\r\n  Expected ':' and instead saw 'return'. @ line 20 char 3\r\n      return {state, ngModule};\r\n\r\n  'object short notation' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 20 char 11\r\n      return {state, ngModule};\r\n\r\n  'object short notation' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 20 char 18\r\n      return {state, ngModule};\r\n\r\nWARNING in ./app/shared/ngCommon/config/formly/index.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 1 char 27\r\n    module.exports = ngModule => {\r\n\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 2 char 40\r\n      ngModule.config((formlyConfigProvider) => {\r\n\r\nWARNING in ./app/states/root/shared/ngCommon/index.js\r\njshint results in errors\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 1 char 1\r\n    let ngModule = require('registerModule')(__filename, require('ngCommon'));\r\n\r\nWARNING in ./app/states/root/children/welcome/index.js\r\njshint results in errors\r\n  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 1 char 1\r\n    let {state, ngModule} = require('registerState')(__filename, require('ngCommon'), {\r\n\r\n  'destructuring expression' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 1 char 1\r\n    let {state, ngModule} = require('registerState')(__filename, require('ngCommon'), {\r\n\r\n  'concise methods' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 10 char 3\r\n      onEnter /*@ngInject*/ (rbb, _) {\r\n\r\n  'concise methods' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). @ line 17 char 3\r\n      onExit /*@ngInject*/ (rbb) {\r\n\r\nWARNING in ./app/states/root/shared/ngCommon/services/index.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 1 char 27\r\n    module.exports = ngModule => {\r\n\r\nWARNING in ./app/states/root/shared/ngCommon/services/AuthToken.js\r\njshint results in errors\r\n  'arrow function syntax (=>)' is only available in ES6 (use esnext option). @ line 1 char 27\r\n    module.exports = ngModule => {\r\n```\r\n\r\nDidn't change any of my code or `.jshintrc` but in case it's useful here's my jshint (it does include the `esnext` option):\r\n\r\n```json\r\n{\r\n  \"curly\": true,\r\n  \"eqeqeq\": true,\r\n  \"bitwise\": true,\r\n  \"camelcase\": true,\r\n  \"esnext\": true,\r\n  \"expr\": true,\r\n  \"forin\": true,\r\n  \"freeze\": true,\r\n  \"immed\": true,\r\n  \"indent\": 2,\r\n  \"latedef\": \"nofunc\",\r\n  \"newcap\": true,\r\n  \"noarg\": true,\r\n  \"noempty\": true,\r\n  \"nonbsp\": true,\r\n  \"quotmark\": \"single\",\r\n  \"undef\": true,\r\n  \"unused\": \"vars\",\r\n  \"trailing\": true,\r\n  \"maxdepth\": 4,\r\n  \"maxstatements\": 30,\r\n  \"maxcomplexity\": 5,\r\n  \"maxlen\": 120,\r\n  \"browser\": true,\r\n  \"node\": true,\r\n  \"globals\": {\r\n    \"angular\": true,\r\n\r\n    \"describe\": true,\r\n    \"before\": true,\r\n    \"after\": true,\r\n    \"beforeEach\": true,\r\n    \"afterEach\": true,\r\n    \"it\": true,\r\n    \"expect\": true,\r\n    \"inject\": true,\r\n\r\n    \"ON_DEV\": true,\r\n    \"ON_TEST\": true,\r\n    \"ON_PROD\": true\r\n  }\r\n}\r\n```\r\n\r\nI'm going to hard code `2.5.11` in my package.json for now. Thanks for your work!"},"comment":{"url":"https://api.github.com/repos/jshint/jshint/issues/comments/72707532","html_url":"https://github.com/jshint/jshint/issues/2146#issuecomment-72707532","issue_url":"https://api.github.com/repos/jshint/jshint/issues/2146","id":72707532,"user":{"login":"kentcdodds","id":1500684,"avatar_url":"https://avatars.githubusercontent.com/u/1500684?v=3","gravatar_id":"","url":"https://api.github.com/users/kentcdodds","html_url":"https://github.com/kentcdodds","followers_url":"https://api.github.com/users/kentcdodds/followers","following_url":"https://api.github.com/users/kentcdodds/following{/other_user}","gists_url":"https://api.github.com/users/kentcdodds/gists{/gist_id}","starred_url":"https://api.github.com/users/kentcdodds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentcdodds/subscriptions","organizations_url":"https://api.github.com/users/kentcdodds/orgs","repos_url":"https://api.github.com/users/kentcdodds/repos","events_url":"https://api.github.com/users/kentcdodds/events{/privacy}","received_events_url":"https://api.github.com/users/kentcdodds/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T18:36:50Z","updated_at":"2015-02-03T18:36:50Z","body":"Sure, here's the AuthToken.js file it mentions at the end of the errors:\r\n\r\n```js\r\nmodule.exports = ngModule => {\r\n  ngModule.factory('AuthToken', AuthTokenFactory);\r\n\r\n  function AuthTokenFactory($window) {\r\n    var tokenKey = 'auth-token';\r\n    var store = $window.localStorage;\r\n    var token = getToken();\r\n    return {\r\n      getToken: getToken,\r\n      setToken: setToken\r\n    };\r\n\r\n    function getToken() {\r\n      if (!token) {\r\n        token = store.getItem(tokenKey);\r\n      }\r\n      return token;\r\n    }\r\n\r\n    function setToken(givenToken) {\r\n      token = givenToken;\r\n      if (givenToken) {\r\n        store.setItem(tokenKey, givenToken);\r\n      } else {\r\n        store.removeItem(tokenKey);\r\n      }\r\n    }\r\n  }\r\n};\r\n```"}}