Parsing error: Unexpected token const

Viewed 12784

I am currently setting up a meteor application and I am using eslint and babel, but I get the following error for the following code snippet:

const Navigation = props => (
  const classes = props.classes;

  return (
    <div className={classes.root}>
    </div>
  )
);

Error:

2:4 - Parsing error: Unexpected token const

I have recreated my eslint config here. My .babelrc config is the following:

{
  "presets": ["env", "react"]
}
2 Answers
Related