Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error: Unexpected token = null #85

Open
webchaz opened this issue Jun 23, 2017 · 2 comments
Open

Parsing error: Unexpected token = null #85

webchaz opened this issue Jun 23, 2017 · 2 comments

Comments

@webchaz
Copy link

webchaz commented Jun 23, 2017

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?

@timoxley
Copy link
Contributor

how are you configuring your babel presets?

@RyanWarner
Copy link

Did you yarn add babel-eslint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants