{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/2071","labels_url":"https://api.github.com/repos/eslint/eslint/issues/2071/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/2071/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/2071/events","html_url":"https://github.com/eslint/eslint/issues/2071","id":62130725,"number":2071,"title":"ES6 Module Issues","user":{"login":"wavded","id":26638,"avatar_url":"https://avatars.githubusercontent.com/u/26638?v=3","gravatar_id":"","url":"https://api.github.com/users/wavded","html_url":"https://github.com/wavded","followers_url":"https://api.github.com/users/wavded/followers","following_url":"https://api.github.com/users/wavded/following{/other_user}","gists_url":"https://api.github.com/users/wavded/gists{/gist_id}","starred_url":"https://api.github.com/users/wavded/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wavded/subscriptions","organizations_url":"https://api.github.com/users/wavded/orgs","repos_url":"https://api.github.com/users/wavded/repos","events_url":"https://api.github.com/users/wavded/events{/privacy}","received_events_url":"https://api.github.com/users/wavded/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/accepted","name":"accepted","color":"0052cc"},{"url":"https://api.github.com/repos/eslint/eslint/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-16T16:17:48Z","updated_at":"2015-03-16T16:48:25Z","closed_at":null,"body":"Using 0.17, given this code (with es6 env and modules turned on):\r\n\r\n```js\r\nimport auth from 'basic-auth'\r\nvar foo = {}\r\nvar creds = auth(foo)\r\nfoo.creds = {\r\n  username: creds.name,\r\n  password: creds.pass\r\n}\r\n```\r\n\r\nGives this error:\r\n\r\n```\r\n/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/lib/rules/no-func-assign.js:42\r\n                if (def.name.name === name && def.type === \"FunctionName\") {\r\n                            ^\r\nTypeError: Cannot read property 'name' of undefined\r\n    at checkIfIdentifierIsFunction (/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/lib/rules/no-func-assign.js:42:29)\r\n    at EventEmitter.AssignmentExpression (/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/lib/rules/no-func-assign.js:73:17)\r\n    at emitOne (events.js:82:20)\r\n    at EventEmitter.emit (events.js:166:7)\r\n    at Controller.controller.traverse.enter (/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/lib/eslint.js:735:25)\r\n    at Controller.__execute (/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/node_modules/estraverse/estraverse.js:393:31)\r\n    at Controller.traverse (/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/node_modules/estraverse/estraverse.js:491:28)\r\n    at EventEmitter.module.exports.api.verify (/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/lib/eslint.js:728:24)\r\n    at processFile (/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/lib/cli-engine.js:193:27)\r\n    at /Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/lib/cli-engine.js:293:26\r\n```\r\n\r\nAnother one is this code:\r\n\r\n```js\r\nimport auth from 'basic-auth'\r\n```\r\n\r\nGives this error:\r\n\r\n```\r\n/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/lib/rules/no-unused-vars.js:43\r\n            if (definition.type === \"VariableDeclarator\") {\r\n                          ^\r\nTypeError: Cannot read property 'type' of undefined\r\n    at isExported (/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/lib/rules/no-unused-vars.js:43:27)\r\n    at EventEmitter.Program:exit (/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/lib/rules/no-unused-vars.js:120:70)\r\n    at emitOne (events.js:82:20)\r\n    at EventEmitter.emit (events.js:166:7)\r\n    at Controller.controller.traverse.leave (/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/lib/eslint.js:743:25)\r\n    at Controller.__execute (/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/node_modules/estraverse/estraverse.js:393:31)\r\n    at Controller.traverse (/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/node_modules/estraverse/estraverse.js:481:28)\r\n    at EventEmitter.module.exports.api.verify (/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/lib/eslint.js:728:24)\r\n    at processFile (/Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/lib/cli-engine.js:193:27)\r\n    at /Users/wavded/.nvm/versions/io.js/v1.5.1/lib/node_modules/eslint/lib/cli-engine.js:293:26\r\n```"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/81794317","html_url":"https://github.com/eslint/eslint/issues/2071#issuecomment-81794317","issue_url":"https://api.github.com/repos/eslint/eslint/issues/2071","id":81794317,"user":{"login":"btmills","id":1709537,"avatar_url":"https://avatars.githubusercontent.com/u/1709537?v=3","gravatar_id":"","url":"https://api.github.com/users/btmills","html_url":"https://github.com/btmills","followers_url":"https://api.github.com/users/btmills/followers","following_url":"https://api.github.com/users/btmills/following{/other_user}","gists_url":"https://api.github.com/users/btmills/gists{/gist_id}","starred_url":"https://api.github.com/users/btmills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btmills/subscriptions","organizations_url":"https://api.github.com/users/btmills/orgs","repos_url":"https://api.github.com/users/btmills/repos","events_url":"https://api.github.com/users/btmills/events{/privacy}","received_events_url":"https://api.github.com/users/btmills/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T16:48:25Z","updated_at":"2015-03-16T16:48:25Z","body":"Upon further reading, it appears #2060 also reports the `no-func-assign` issue. #2061 is a PR to fix it. I propose closing this to track in #2060?"}}