Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint by default #106

Open
brodybits opened this issue Jul 9, 2020 · 8 comments
Open

lint by default #106

brodybits opened this issue Jul 9, 2020 · 8 comments

Comments

@brodybits
Copy link

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
Copy link
Owner

sheerun commented Jul 9, 2020

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

@sheerun
Copy link
Owner

sheerun commented Jul 9, 2020

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?

@brodybits
Copy link
Author

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

+1, yes

@GxDesign
Copy link

GxDesign commented Aug 5, 2020

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 using prettier-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
Copy link
Owner

sheerun commented Aug 5, 2020

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
Copy link

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

@ridvanaltun
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants