chore: install @nextcloud/prettier-config, eslint-config-prettier#6510
chore: install @nextcloud/prettier-config, eslint-config-prettier#6510luka-nextcloud wants to merge 1 commit intomainfrom
Conversation
Signed-off-by: Luka Trovic <luka@nextcloud.com>
max-nextcloud
left a comment
There was a problem hiding this comment.
Thanks for looking into this @luka-nextcloud
I'm all for standardizing things and linting them. I'll point out a few things that i am not so sure about though.
| (t) => | ||
| t.status === STATUS_SCHEDULED || t.status === STATUS_RUNNING, |
There was a problem hiding this comment.
I don't like splitting the arrow function like this. Maybe just personal taste.
| return s.toString() | ||
| .split('&').join('&') | ||
| .split('<').join('<') | ||
| .split('>').join('>') | ||
| .split('"').join('"') | ||
| .split('\'').join(''') | ||
| return s | ||
| .toString() | ||
| .split('&') | ||
| .join('&') | ||
| .split('<') | ||
| .join('<') | ||
| .split('>') | ||
| .join('>') | ||
| .split('"') | ||
| .join('"') | ||
| .split("'") | ||
| .join(''') |
There was a problem hiding this comment.
I prefer the previous version as these calls come im pairs of split(..).join(...) and that's easier to see in the original.
Normally I would agree that it's a good idea to put every function call on a new line... But here I don't. So I wonder if the rule that enforces this is really a good idea.
| <NcActionButton v-for="type in taskTypes" | ||
| <NcActionButton | ||
| v-for="type in taskTypes" |
There was a problem hiding this comment.
I think pretty much everywhere else in nextcloud we have the first attribute on the line with the tag name just like this was before.
I actually like the separation - but I care about consistency more. So not sure what best to do here.
There was a problem hiding this comment.
Agreed, we should avoid custom rules like this. If we consider them useful, we should propose them upstream to our shared prettier config
|
@max-nextcloud I have checked through prettier config options. The only way to avoid line break is rising the value of |
|
I like the fact that prettier has so little options. |
|
@luka-nextcloud What are the next steps here? Do we want to continue or close this? |
|
@max-nextcloud @juliusknorr
|
📝 Summary