DEV Community

Discussion on: Semicolon or No semicolon?

Collapse
 
bradtaniguchi profile image
Brad

My usual stance on this is whatever my auto-formatter adds automatically.

Prettier has an option to toggle this behavior on and off.

Few argue about spacing in code because it's usually automatically added/removed via tooling. As long as it's consistent within the codebase it usually isn't an area of contention.

I believe semi-colons should be in the same boat. Just let the computer add/remove/apply them. The few edge-cases should be handled by other tooling, like TypeScript.

Collapse
 
sayan3990 profile image
Sayan Bhattacharyya | Backend

Thanks it is something new to me