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

It stops working when we define variable within template #57

Closed
ezhlobo opened this issue Dec 29, 2018 · 1 comment
Closed

It stops working when we define variable within template #57

ezhlobo opened this issue Dec 29, 2018 · 1 comment
Labels

Comments

@ezhlobo
Copy link
Owner

ezhlobo commented Dec 29, 2018

For example this code will break eslint:

pug`
  - const test = 'test'
`

The error message is not useful, but stacktrace reveals that babel doesn't like it and doesn't want to parse:

Unexpected token (1:1)
SyntaxError: Unexpected token (1:1)
  at Parser.raise (~/node_modules/@babel/parser/lib/index.js:4028:15)
  at Parser.unexpected (~/node_modules/@babel/parser/lib/index.js:5343:16)
  at Parser.parseExprAtom (~/node_modules/@babel/parser/lib/index.js:6432:20)
  at Parser.parseExprSubscripts (~/node_modules/@babel/parser/lib/index.js:6019:21)
  at Parser.parseMaybeUnary (~/node_modules/@babel/parser/lib/index.js:5998:21)
  at Parser.parseExprOps (~/node_modules/@babel/parser/lib/index.js:5907:21)
  at Parser.parseMaybeConditional (~/node_modules/@babel/parser/lib/index.js:5879:21)
  at Parser.parseMaybeAssign (~/node_modules/@babel/parser/lib/index.js:5826:21)
  at Parser.parseParenAndDistinguishExpression (~/node_modules/@babel/parser/lib/index.js:6588:28)
  at Parser.parseExprAtom (~/node_modules/@babel/parser/lib/index.js:6388:21)
@ezhlobo ezhlobo added the bug label Dec 29, 2018
@ezhlobo
Copy link
Owner Author

ezhlobo commented Feb 10, 2019

Fixed in v0.5.7

@ezhlobo ezhlobo closed this as completed Feb 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant