I've just updated to v6.10.0 and enabled void-dom-elements-no-children.
It's crashing with this error:
TypeError: Cannot read property 'properties' of undefined
at EventEmitter.CallExpression ([...]/eslint-plugin-react/lib/rules/void-dom-elements-no-children.js:121:28)
[...]
It happens with this simple code:
document.createElement('img');
So here is the first problem:
- The rule thinks that every
.createElement( is the React.createElement.
Now testing with the actual React:
import React from 'react';
React.createElement('img');
The rule will crash too.
Second problem:
- The rule doesn't treat incomplete number of
createElement's arguments (as while typing React.createElement()).