NullVoxPopuli / eslint-plugin-decorator-position

ESLint plugin for enforcing decorator position

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Too many "printWidth not set" warnings

EvgenyOrekhov opened this issue ยท comments

eslint-plugin-decorator-position is spamming my terminal, it gives me the "printWidth not set" warning for every file:

image

That's not useful.

Does it go away if you set printWidth in prettier's config?

๐ŸŽ‰ This issue has been resolved in version 2.2.10 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

Does it go away if you set printWidth in prettier's config?

I'm not using a Prettier config in that project, I'm using the defaults.

We actually have the "always use defaults" policy for Prettier for all our projects. We don't use custom Prettier configs (with some rare exceptions when we need to use some experimental feature, like Glimmer parser).

And I don't see why this warning has to exist at all. The lack of a Prettier config or the lack of the printWidth option is usually not a mistake, it is intentional.

That's a good point. Hmm

I guess if we could get the prettier default value from prettier itself, instead of hard coding, this custom stuff can all go away

ah-ha: https://github.com/prettier/prettier/blob/3d7016e2dc38e3b03df8129c52dd85b1ff9aec60/src/main/core-options.js#L192-L199

If this data is used, then we don't need to warn or use a hard-coded value. the upstream default can be used, which is much safer

added here: #202

if there are any issues, pls let me know.
I'm sure this project is still missing a few key test cases