-
Notifications
You must be signed in to change notification settings - Fork 132
Closed
Description
When I'm working in Atom with the linter-eslint plugin, I often encounter a TypeError
that originates in the no-used-styles
rule while I'm typing. I have linter-eslint configured to lint as I type.
I have found that the code that triggers the error contains the fragment <View style>
. So, I'm in the process of adding style information, but before I can add the = {}
, I get the type error.
I'm using eslint-plugin-react-native 2.0.0.
Here's the stack trace:
TypeError: Cannot read property 'type' of null
at Object.astHelpers.hasArrayOfStyleReferences (/path/to/myProject/node_modules/eslint-plugin-react-native/lib/util/stylesheet.js:312:11)
at Object.astHelpers.collectStyleReferences (/path/to/myProject/node_modules/eslint-plugin-react-native/lib/util/stylesheet.js:157:20)
at EventEmitter.JSXAttribute (/path/to/myProject/node_modules/eslint-plugin-react-native/lib/rules/no-unused-styles.js:46:35)
at emitOne (events.js:95:20)
at EventEmitter.emit (events.js:182:7)
at NodeEventGenerator.enterNode (/path/to/myProject/node_modules/eslint/lib/util/node-event-generator.js:40:22)
at CodePathAnalyzer.enterNode (/path/to/myProject/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:608:23)
at CommentEventGenerator.enterNode (/path/to/myProject/node_modules/eslint/lib/util/comment-event-generator.js:97:23)
at Controller.enter (/path/to/myProject/node_modules/eslint/lib/eslint.js:895:36)
at Controller.__execute (/path/to/myProject/node_modules/eslint/node_modules/estraverse/estraverse.js:397:31)
Metadata
Metadata
Assignees
Labels
No labels