Open webchaz opened 7 years ago
I created an issue here: https://github.com/standard/standard/issues/931
However, it seems this may be related to standard-loader. When running standard --parser babel-eslint the code checks out fine. However, when running through webpack, with the following config:
standard-loader
standard --parser babel-eslint
{ enforce: 'pre', test: /\.jsx?$/, loader: 'standard-loader', exclude: /(node_modules|bower_components)/, options: { error: false, snazzy: true, parser: 'babel-eslint' } },
This returns the following error: Parsing error: Unexpected token = null for the static in the following code:
Parsing error: Unexpected token = null
static
export default class SelectDropdown extends React.Component { static propTypes = { selected: PropTypes.object.isRequired, onChange: PropTypes.func.isRequired, data: PropTypes.arrayOf(PropTypes.shape({ key: PropTypes.string.isRequired, label: PropTypes.string.isRequired }).isRequired).isRequired }
Any idea if I'm missing something?
how are you configuring your babel presets?
Did you yarn add babel-eslint?
yarn add babel-eslint
I created an issue here: https://github.com/standard/standard/issues/931
However, it seems this may be related to
standard-loader
. When runningstandard --parser babel-eslint
the code checks out fine. However, when running through webpack, with the following config:This returns the following error:
Parsing error: Unexpected token = null
for thestatic
in the following code:Any idea if I'm missing something?