-
-
Notifications
You must be signed in to change notification settings - Fork 149
chore: fix prettier code style issues #1283
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc notes should most certainly be ignored from the linter, since they are automatically generated and will be replaced anyway as soon they are updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point will add the whole folder to .prettierignore then
| } | ||
|
|
||
| const HIDDEN_ATTRIBUTES = [ "originalFileName", "fileSize", "template", "inherit", "cssClass", "iconClass", "pageSize", "viewType", "geolocation", "docName" ]; | ||
| const HIDDEN_ATTRIBUTES = ["originalFileName", "fileSize", "template", "inherit", "cssClass", "iconClass", "pageSize", "viewType", "geolocation", "docName"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the spaces look nice, can we alter the rules to add them in?
src/public/app/types-fancytree.d.ts
Outdated
| ajax?: | ||
| | { | ||
| /** | ||
| * HTTP Method (default: 'GET') | ||
| */ | ||
| type: string; | ||
| /** | ||
| * false: Append random '_' argument to the request url to prevent caching. | ||
| */ | ||
| cache: boolean; | ||
| /** | ||
| * Default 'json' -> Expect json format and pass json object to callbacks. | ||
| */ | ||
| dataType: string; | ||
| } | ||
| | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rule feels kind of exaggerated, to be honest. 🤔
| type Response = | ||
| | { | ||
| success: true; | ||
| } | ||
| | { | ||
| success: false; | ||
| message: string; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, original looks better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, I prefer adding a space before and after a class, looks much more readable
|
as discussed on Element yesterday: Unfortunately prettier has some strong opinions which, I also don't tend to agree with always :-D These are the only configuration options: I think we have two (or three) options here:
for now I will edit the PR to address the issues above, so that we at least have some formatting going on already – and for the future we'll need to check regarding above options. Will update the PR by tomorrow evening likely |
|
edit: oops - ignore that I read the date wrong :-) |
|
@eliandoran |
Hi,
I've ran prettier with our current config and have commited most of the changes it wanted to fix.
I went through each file individually and left out a couple of changes:
A dozen of the proposed changes IMHO were making the code readability worse – I'll follow up on these with a separate PR that will either
a) check if we can finetune the config a tiny bit
or
b) add some
//prettier-ignorecomments:-)