Skip to content

TypeError: Cannot read property 'toLowerCase' of undefined in jsx-no-target-blank #821

Closed
@chalisegrogan

Description

@chalisegrogan

As of fa99e13#diff-05dfa6b555ee6724cba772b5d07e4d1c, installing eslint/eslint-plugin-react with

npm install eslint eslint-plugin-react

and running the following eslint command in Codeship...

node_modules/eslint/bin/eslint.js -c .eslintrc --ext .jsx,.js path/to/code

is resulting in:

Cannot read property 'toLowerCase' of 
TypeError: Cannot read property 'toLowerCase' of undefined
at EventEmitter.JSXAttribute (/home/rof/src/github.com/newsela/newsela/node_modules/eslint-plugin-react/lib/rules/jsx-no-target-blank.js:28:60)
at emitOne (events.js:82:20)
at EventEmitter.emit (events.js:169:7)
at NodeEventGenerator.enterNode (/home/rof/src/github.com/newsela/newsela/node_modules/eslint/lib/util/node-event-generator.js:40:22)
at CodePathAnalyzer.enterNode (/home/rof/src/github.com/newsela/newsela/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:608:23)
at CommentEventGenerator.enterNode (/home/rof/src/github.com/newsela/newsela/node_modules/eslint/lib/util/comment-event-generator.js:97:23)
at Controller.enter (/home/rof/src/github.com/newsela/newsela/node_modules/eslint/lib/eslint.js:918:36)
at Controller.__execute (/home/rof/src/github.com/newsela/newsela/node_modules/eslint/node_modules/estraverse/estraverse.js:397:31)
at Controller.traverse (/home/rof/src/github.com/newsela/newsela/node_modules/eslint/node_modules/estraverse/estraverse.js:501:28)
at Controller.Traverser.controller.traverse (/home/rof/src/github.com/newsela/newsela/node_modules/eslint/lib/util/traverser.js:36:33)

To be clear, this seems to be only happening on Codeship. We've temporarily solved this by commenting out the offending rule (jsx-no-target-blank). Is this something others are seeing or should I bring this up with Codeship instead?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions