Prettier-vscode: Prettier format, How can I get rid of the semicolon after the arrow function?

Created on 8 May 2018  路  5Comments  路  Source: prettier/prettier-vscode

Prettier format, How can I get rid of the semicolon after the arrow function? e.g.:
prettier format submitForm = ($event: any) => {} then submitForm = ($event: any) => {};,but I don't need a semicolon.

locked

Most helpful comment

thank you! But it doesn't apply.Because I want to get rid of the semicolon at the end of the arrow function, and I want a semicolon in the other rows.The arrow function should also be treated as a method body.

All 5 comments

Have you tried this option?

https://github.com/prettier/prettier-vscode#prettiersemi-default-true

thank you! But it doesn't apply.Because I want to get rid of the semicolon at the end of the arrow function, and I want a semicolon in the other rows.The arrow function should also be treated as a method body.

I think that an arrow function is just an expression. So if you want to get rid of the semi colon there you would have to use an eslint rule for that.

thanks

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings