sheerun / prettier-standard

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

Ignore .editorconfig #79

Closed Windvis closed 5 years ago

Windvis commented 5 years ago

It seems like prettier-standard (or the Prettier side) uses the .editorconfig file if present. This makes it possible for a project to set the indent size to 4 spaces, which is not following the standard convention. It doesn't seem to trigger any linting errors either.

Is it somehow possible to ignore .editorconfig? We use prettier-standard in our company since it is easy to enforce and we don't want anyone to mess with linting / formatting rules. But is seems they still can though.. 😄

sheerun commented 5 years ago

There's no way to ignore editorconfig. If you don't want 4 spaces indentation then don't put such setting in this file

sheerun commented 5 years ago

I guess explicitly setting indentation to 2 spaces in .prettierrc should also help

Windvis commented 5 years ago

Yea, it's more about preventing other teams in our company to mess with these kind of things. There are some "stubborn" people who NEED their semicolons, etc 😄.

Anyway, it looks like prettier and prettierx have a --no-editorconfig cli option. If I run prettierx with the same options that prettier-standard passes to it and also add the --no-editorconfig option, everything is ok.

Maybe this can be added by default?

sheerun commented 5 years ago

You mean .editorconfig in user's home directory?