jaredly / jaredly/stylecleanup
Unexpected token error
- Dominant language
- JavaScript
- Stars
- 112
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
I tried running `stylecleaup check` on webapp, but babylon runs into some syntax it doesn't expect. Here's some of the output:
```
... javascript/wonder-blocks-package/fixtures_test.js javascript/ycla-package/ycla.js javascript/ycla-package/you-can-learn-anything-entry.js javascript/zero-rating-package/fixtures_test.js javascript/zero-rating-package/login-warning-modal.jsx.fixture.js
/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:4457
throw err;
^
SyntaxError: Unexpected token (9:12)
at Parser.pp$5.raise (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:4454:13)
at Parser.pp.unexpected (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:1761:8)
at Parser.pp$3.parseExprAtom (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:3627:50)
at Parser.parseExprAtom (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:7238:22)
at Parser.pp$3.parseExprSubscripts (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:3494:19)
at Parser.pp$3.parseMaybeUnary (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:3474:19)
at Parser.pp$3.parseExprOps (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:3404:19)
at Parser.pp$3.parseMaybeConditional (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:3381:19)
at Parser.pp$3.parseMaybeAssign (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:3344:19)
at Parser.parseMaybeAssign (/Users/kevinbarabash/.config/yarn/global/node_modules/babylon/lib/index.js:6474:20)
```
I'll try adding some console.logs to get some more info.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing `stylecleaup check` on the webapp and inspect the Babylon stack trace at line 9:12. Trace which JavaScript file from the reported file list reaches the parser, then identify the syntax that causes the unexpected-token error. Done means the check completes or reports the syntax problem clearly and the relevant case is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 24/100