Skip to content

Parsing error: Unexpected token = null #85

Description

@webchaz

I created an issue here: standard/standard#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:

      {
        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:

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions