fkling / fkling/astexplorer

Getting Parsing Error

Open
#442 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6.5k
Forks
772
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Getting the parsing error when adding styled components.

**To Reproduce**
Steps to reproduce the behavior:

1. Paste the below piece of code
`const wrongCssTag = css`
`${myStyles as any};`
`;
`
2. You could see the error `Line 2: Unexpected token, expected }` in the bottom right pane .

**Expected behavior**
It shouldn't throw any error .

**Screenshots**
Screenshot 2019-09-18 at 9 12 27 PM

**Browser (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**astexplorer settings:**
- Selected parser: @typescript-eslint/parser
- Selected transformer (if applicable): ESLint v3
- Contents of the local storage key `explorerSettingsV1` (code can be removed if you don't want it to be public)

**Additional context**
Tested this with the help of `ruleTester` in my machine . It seems to work fine .

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the error in AST Explorer with the @typescript-eslint/parser, ESLint v3 transformer, and the styled-components snippet from the issue. Start by tracing how this parser and transformer handle the pasted code; done means the example parses without the reported “Unexpected token, expected }” error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
devtools, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.