I have a difficulty with setting up JSCS to work with JSX/React and ES6 (stage-0). It throws such errors:
Expected end of node list but "Punctuator" found at ./src/base/react/architecture/components/Dummy.component.jsx :
1 |import React, { PropTypes, Component } from 'react';
--------^
and
Expected end of node list but "Punctuator" found at ./src/base/react/architecture/utils/redux-ext.js :
1 |import React from 'react';
--------^
2 |import Immutable from 'immutable';
3 |import * as reactRedux from 'react-redux';
I wasn't able either to fix it or to find the cause of this problem.
My configuration is:
{
"preset": "airbnb",
"validateIndentation": 4,
"fileExtensions": [
".js",
".jsx"
],
"maxErrors": -1,
"excludeFiles": [
"**/ammap.js",
"**/worldHigh.js",
"**/worldLow.js",
"node_modules/*",
"**/assets/*"
]
}
I had the same problem. After some digging, I nailed it down to the semi-colon in my static propTypes. I am on JSCS 3.0.7 as well. Current workaround (still looking for a better fix):