question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ESLint | error | undefined | Parsing error: Unexpected token =

See original GitHub issue

Working through some react relay tasks and I came across this error reported by eslint. Not quite sure what it means or how to configure .eslintrc to allow this.

import Relay from 'react-relay';

export default class extends Relay.Route {
  static queries = { // ESLint | error | undefined | Parsing error: Unexpected token =
    viewer: () => Relay.QL`
      query {
        viewer
      }
    `,
  };
  static routeName = 'AppHomeRoute';
}

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
hzoocommented, Dec 8, 2015

If you are going to use class properties you will have to use https://github.com/babel/babel-eslint

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESLint Parsing error: Unexpected token - Stack Overflow
Unexpected token errors in ESLint parsing occur due to incompatibility between your development environment and ESLint's current parsing ...
Read more >
ESLint: "Parsing error: Unexpected token" in Visual Studio Code
Unexpected token errors are caused by incompatibilities in your parser options and the code you're writing. In this case, I'm using a number...
Read more >
Parsing error: Unexpected token = (fatal) #11259 - GitHub
When writing components for a react project I am working on I have noticed a strange issue occuring with regards to linting.
Read more >
[ESLint] Parsing error: unexpected token - DEV Community ‍ ‍
What is this article about? This is a solution when I saw these errors. Warning: React version not specified in eslint-plugin-react settings. ...
Read more >
How To Fix - "Parsing error: Unexpected Token" in React.js or ...
Such “Unexpected token” signify a common behavioural problem – somewhere in your code a specific construct was supplied, but the system expected something ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found