sheerun / prettier-standard

Formats with Prettier and lints with ESLint+Standard! (✿◠‿◠)
MIT License
868 stars 44 forks source link

lint by default #106

Open brodycj opened 4 years ago

brodycj commented 4 years ago

I discovered pretty recently that the --lint option is needed to enable some of the lint rules from standard.

I would favor that this option is enabled by default, considering that this utility seems to be intended to apply a combination of both Prettier formatting and standard code lint functionality.

I would also love to see an option to both fix the formatting and fix as many eslint issues as possible at the same time.

Thanks again for making and maintaining this utility!

sheerun commented 4 years ago

I think it makes sense, still some people seem surprised that it can lint things

sheerun commented 4 years ago

On the other hand prettier-standard is used for auto-formatting (e.g. when saving files) without linting. I think it would break many setups if I enabled linting by default because it would cause formatting to fail even if single linting error is present. Maybe just a message at the end that you can use --lint would be enough?

brodycj commented 4 years ago

just a message at the end that you can use --lint would be enough?

+1, yes

GxDesign commented 4 years ago

Hey @sheerun, thanks for the formatter! On the topic of linting, I noticed that we are not able to fix fixable rules picked up by the --lint flag by usingprettier-standard --fix, and attempting to use eslint . --fix results in missing plugin errors. Is there a different syntax for fixing lint errors? Otherwise, we'd need to install all of the plugins that were already installed by this package.

sheerun commented 4 years ago

prettier-standard doesn't fix linting errors by default (only formatting ones). I guess I could introduce prettier-standard eslint command so you can do it manually if really needed

klondikemarlen commented 3 years ago

Supporting the combo prettierx + eslint --fix would be amazing (like https://github.com/prettier/prettier-eslint but with SublimeText support)

ridvanaltun commented 3 years ago

prettier-standard doesn't fix linting errors by default (only formatting ones). I guess I could introduce prettier-standard eslint command so you can do it manually if really needed

+1

daksh-varshneya commented 2 years ago

Hi, Sorry for asking this unrelated question but I'm stuck on this for a while and can't find a way for this.

Can you please guide me how can I enable prettier-standard for auto-formatting when saving files in VS Code. Any help would be highly appreciated