`SyntaxError: Unexpected token` for prettier definition
See original GitHub issueDo you want to request a feature or report a bug? Bug
What is the current behavior?
Prettier linting throws an error on recent flow-typed update
script command: "qa::lint": "eslint --ext .jsx --ext .js src tests"
SyntaxError: Unexpected token (5:55)
3 |
4 | declare module "prettier" {
> 5 | declare export type AST = { [key: string]: any, ... };
| ^
6 | declare export type Doc = {
7 | [key: string]: any,
8 | ...
If the current behavior is a bug, please provide the steps to reproduce. Run above script cmd and it throws and error.
What is the expected behavior? Linting passes without errors
Local Environment Information https://gist.github.com/NigelGreenway/206fbe6b7c0e3b0004e6edcb9876a054
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Unexpected token, expected ";" for .css files using Prettier ...
When I am running npm run prettier -- --list-different all of my css files are getting the error SyntaxError: Unexpected token, expected ";" ......
Read more >SyntaxError: Unexpected token - JavaScript - MDN Web Docs
The JavaScript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided.
Read more >Prettier 1.19: Long awaited Vue option, TypeScript 3.7 and ...
Prettier 1.18 SyntaxError: Unexpected token (1:23) > 1 | const addOne = add(1, ?) ... which means Prettier's idempotence rule was broken.
Read more >Syntax Error : Unexpected Token **RESOLVED** | Codecademy
Pretty sure there are some flaws in my method here; but I can't seem to get past this "Syntax Error: Unexpected Token" error....
Read more >doctype html unexpected token - You.com | The AI Search ...
The error message indicates a JavaScript syntax error. The code you quoted is XHTML, which is not JavaScript. Trying to treat it as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@NigelGreenway
Add to you
.eslintignore
Hi @NigelGreenway,
as @retyui said, you should definitely not lint the
flow-typed
directory.