t0il3ts0ap
t0il3ts0ap

Reputation: 550

ESLint Parsing error: Unexpected token in module.exports

I am using eslint v3.0.1 with vim syntastic. For some reason I am unable to make any changes to config which removes this error

config/routes.js|16 col 16 error| Parsing error: Unexpected token routes [javascript/eslint]

in

var routes = (
  <Router>
    <Route path='/' component={Main}>
    </Route>
  </Router>
);

module.exports routes;

I am using a very generic .eslintrc right now

{
  "plugins": [
    "react"
  ],
  "extends": ["eslint:recommended", "plugin:react/recommended"]
}

Upvotes: 0

Views: 922

Answers (1)

TN1ck
TN1ck

Reputation: 691

The last line is incorrect, you need to write module.exports = routes.

Upvotes: 1

Related Questions