Closed mesqueeb closed 5 years ago
this is what prettier enforces. if you don't like prettier rules, you can just use standard --fix
or make a PR to prettier that fixes this behavior
@sheerun Oh I see! I thought that only the rules of Standard were applied, but the instant formatting functionality of Prettier.
Does Prettier have a ruleset itself which also gets applied, other from the max. 90 char line length?
Best regards.
@sheerun After more research I found out that:
The brace-style of standard is 1tbs.
Together with "allowSingleLine": true
.
However, the brace-style prettier-standard uses is stroustrup.
Together with "allowSingleLine": false
.
See here ESlint for more details on these differences.
Can you please change the repository to 1tbs.
Together with "allowSingleLine": true
?
Dear @sheerun I took a look further into this repository. It seems like you correctly import the standard-ruleset from here: https://github.com/sheerun/eslint-config-standard/blob/master/eslintrc.json
This in turn does have the correct brace-style.
So I think there is something else that's messing with the brace-style option inside your app, I'm not sure where yet.
@sheerun
Any ideas what could be changing the brace-style behaviour of "brace-style": ["error", "1tbs", { "allowSingleLine": true }],
?
Because you correctly pull the settings from eslintrc, yet prettier-standard is using { "allowSingleLine": false }
...
This tool seems to be ignoring the .eslintrc
file. Overriding rules doesn't work.
prettier-standard 9.0.0 now directly uses prettierx for formatting, so if you'd like to customize formatting you need to contribute there: https://github.com/brodybits/prettierx
then you'll be able to customize formatting in your repository by creating custom .prettierrc file
I have a problem with the following:
get's fixed to:
However, I don't think this rule is written anywhere in the standard ruleset. And I'd like prettier-standard to not touch these lines...
Any idea how to fix this?