TypeError: Cannot read property 'value' of undefined
See original GitHub issueWhat version of ESLint are you using? 2.10.0
What parser (default, Babel-ESLint, etc.) are you using? babel-eslint
Please show your full configuration:
{
"parser": "babel-eslint",
"extends": "airbnb",
"env": {
"browser": true,
"mocha": true,
"node": true
},
"rules": {
"react/jsx-no-bind": 0,
"react/prefer-stateless-function": 0,
"comma-dangle": 0,
"no-use-before-define": 0,
"consistent-return": 0
},
"plugins": [
"react"
]
}
What did you do? Please include the actual source code causing the issue. Just ran eslint on my project as normal
What did you expect to happen? No parser error
What actually happened? Please include the actual, raw output from ESLint. Get the following error: TypeError: Cannot read property ‘value’ of undefined
On linting this file:
module.exports = {
'Home.Company': 'Comapny ABC'
};
Cannot read property ‘value’ of undefined TypeError: Cannot read property ‘value’ of undefined at isEnclosedInParens (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/eslint/lib/rules/no-return-assign.js:23:21) at EventEmitter.AssignmentExpression (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/eslint/lib/rules/no-return-assign.js:51:32) at emitOne (events.js:95:20) at EventEmitter.emit (events.js:182:7) at NodeEventGenerator.enterNode (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/eslint/lib/util/node-event-generator.js:40:22) at CodePathAnalyzer.enterNode (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:607:23) at CommentEventGenerator.enterNode (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/eslint/lib/util/comment-event-generator.js:97:23) at Controller.traverser.traverse.enter (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/eslint/lib/eslint.js:886:36) at Controller.__execute (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/estraverse/estraverse.js:397:31) at Controller.traverse (/Users/Shared/Jenkins/Home/workspace/Bulk-Downloader-Test/node_modules/estraverse/estraverse.js:501:28)
This was working on 2.9.0
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
Also see https://github.com/eslint/eslint/issues/6158
@meeber Plz log a separate issue for that rule. thanks