prettier / pretty-quick

⚡ Get Pretty Quick
https://npm.im/pretty-quick
MIT License
2.22k stars 83 forks source link

SyntaxError: '(' expected #194

Closed avrim-tr closed 4 months ago

avrim-tr commented 4 months ago

HI,

I have been using pretty-quick for sometime, today I saw an error, which I do not know why:

I am using Angular and this line: private readonly modalRef: MatDialogRef<any> = inject(MatDialogRef<any>) is causing this error:

SyntaxError: '(' expected.

Any ideas?

Versions details:

"pretty-quick": "3.1.3" "prettier": "2.6.2" "eslint-config-prettier": "^8.8.0" node js: 16.14.0 angular: 14.3.0

JounQin commented 4 months ago

That's mostly like that your prettier version does not recognize the TypeScript syntax, it has nothing related to pretty-quick.

avrim-tr commented 4 months ago

That's mostly like that your prettier version does not recognize the TypeScript syntax, it has nothing related to pretty-quick.

Any suggestions then?

JounQin commented 4 months ago

Upgrade prettier to match your typescript version.