Prettier-vscode: How can ignore a rule?

Created on 25 Jul 2017  路  6Comments  路  Source: prettier/prettier-vscode

I want to ignore printWidth, can I do it?

locked

All 6 comments

Prettier is based on it, so this is a strange request.
You can have it to never wrap, set printWidth to a high number (never tried Infinity 9999). It will still wrap at some places. (statements)
You can have prettier to always wrap, set printWidth to a small number (never tried 0 1)

If you use 0 prettier tries to use as small as possible and if you use a big number prettier will break your linebreaks :S

The request is because I like to change singlewoute or tabwidth but I know how much chars I want per line, depending the line, the context, etc. Is not always like X chars per line.
It's tru that can have a max, like ok never use more than 120, but sometimes I need 50, sometimes 70, etc.

Seems prettier is not what you need then. Maybe eslint.
If your use case for line length is per file, there is #167 in the pipeline. If you change context in a single file, this won't suit your needs.

MAybe this si the problem but I can't find extensions for vscode that works with tslint

I've used tslint. I had one trouble: your tslint config must be at your workspace root.

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