Until now I've always tried to stick to 80 characters per line and it worked just fine in plain ol' JavaScript, however after adopting TypeScript it feels like it's not enough with all these type declarations, sometimes code becomes harder to read, an example:
export const setCommunity: ActionCreator<SetCommunityAction> = (
id: string
) => ({
type: '@@community/SET_COMMUNITY',
payload: {
id
}
});
Whereas if limit would be 100, this becomes more readable:
export const setCommunity: ActionCreator<SetCommunityAction> = (id: string) => ({
type: '@@community/SET_COMMUNITY',
payload: {
id
}
});
Of course this is a single example that was frustrating me.
What max line length do you use and what are the reasons behind it?









































Why stick to an arbitrary max length at all?
Make lines as long as is natural for the code without having to horizontally scroll.