azz / prettier-tslint

Code ➡️ prettier ➡️ tslint --fix ➡️ Formatted Code ✨
https://npm.im/prettier-tslint
MIT License
225 stars 13 forks source link

Translate TSLint max-line-length into Prettier printWidth automatically #25

Open aleclarson opened 5 years ago

aleclarson commented 5 years ago

Prettier's printWidth defaults to 80, which (if left unchanged) makes TSLint's max-line-length look broken. The reality is that users should be using Prettier options to control the maximum line length.

To ease the pain, this package could probably translate TSLint's max-line-length into Prettier's printWidth automatically when printWidth is not explicitly defined.

We could also warn when both are defined, but have different values.

Related: #15

sveyret commented 5 years ago

Well, probably the initial #15 issue was not correctly written, but this is exactly what was expected (I mean, set the printWidth with max-line-length value). Wouldn't it be better to track this issue with the initial issue, as many people added comments which may be useful for dev ?