jscs-dev/node-jscs — pull request #830 by yannickcr (2014-12-11 23:36:16+00:00)
Title: Extend estraverse rules to support JSX

The addition of estraverse (#817) makes impossible for us to use a custom esprima version like [esprima-fb](https://github.com/facebook/esprima) to parse JSX, since it will produce some unknown node types.

```javascript
var HelloMessage = React.createClass({
render: function(path) {
return

Hello {this.props.name}

;
}
});
React.render(, mountNode);
```

```bash
$ jscs test.jsx --esprima=esprima-fb
Error: Unknown node type XJSElement.
at Controller.traverse (D:\Development\node-jscs\node_modules\estraverse\estraverse.js:513:31)
at Object.traverse (D:\Development\node-jscs\node_modules\estraverse\estraverse.js:705:27)
at Object.iterate (D:\Development\node-jscs\lib\tree-iterator.js:9:20)
at Object.JsFile.iterate (D:\Development\node-jscs\lib\js-file.js:275:29)
at Object.JsFile (D:\Development\node-jscs\lib\js-file.js:28:10)
at StringChecker.checkString (D:\Development\node-jscs\lib\string-checker.js:96:20)
at null. (D:\Development\node-jscs\lib\checker.js:40:25)
at Array.0 (D:\Development\node-jscs\node_modules\vow-fs\node_modules\vow\lib\vow.js:555:39)
at Object.callFns [as _onImmediate] (D:\Development\node-jscs\node_modules\vow-fs\node_modules\vow\lib\vow.js:1148:35)
at processImmediate [as _immediateCallback] (timers.js:345:15)
```

This patch will extend estraverse traversing to XJS nodes, making JSX support possible.