webxdc/calendar
13
9
Fork
You've already forked calendar
3

Trying out standard #89

Closed
rtn wants to merge 10 commits from try-standard into main
pull from: try-standard
merge into: webxdc:main
webxdc:main
webxdc:demo
webxdc:ndh/full-day-overlap
webxdc:weblate-webxdc-calendar
webxdc:wofwca-fix-href-january
webxdc:adb/use-webxdc-vite-plugin
Contributor
Copy link

I couldn't see a way of formatting / allowing if-statements with leading && and odd line breaks so I'm trying out standard to see the results. Main differences:

  • single quote strings
  • no semi colons
  • function functionNamesHaveSpaceBeforeTheFirstParenthesis () {} (easier to search for function definitions rather than just usage)
  • standard complains on var
  • standard catches let when it should be const
  • standard catches unused variables (big plus)
  • standard catches global variables (big plus)
I couldn't see a way of formatting / allowing if-statements with leading `&&` and odd line breaks so I'm trying out `standard` to see the results. Main differences: * single quote strings * no semi colons * `function functionNamesHaveSpaceBeforeTheFirstParenthesis () {}` (easier to search for function definitions rather than just usage) * standard complains on `var` * standard catches `let` when it should be `const` * standard catches unused variables (big plus) * standard catches global variables (big plus)
@ -640,0 +614,4 @@
if (event.summary === old.summary
&& event.dtStart === old.dtStart
&& event.dtEnd === old.dtEnd
&& event.color === old.color) {
Author
Contributor
Copy link

@r10s This is the format you're after, right?

@r10s This is the format you're after, right?
Owner
Copy link

yes, this is much better readable. but i would not die on that hill.

i am just noticing, that "prettier" fails in both, making code more readable and stopping discussions 😅

yes, this is much better readable. but i would not die on that hill. i am just noticing, that "prettier" fails in both, making code more readable _and_ stopping discussions 😅

to be fair it was the default prettier setup without any configuration file, which is not nice defaults, you can set the rules you want but I have not looked into it,

btw, @rtn maybe you could use this: https://github.com/sheerun/prettier-standard

to be fair it was the default prettier setup without any configuration file, which is not nice defaults, you can set the rules you want but I have not looked into it, btw, @rtn maybe you could use this: https://github.com/sheerun/prettier-standard
Author
Contributor
Copy link

I looked at the configuration and it's very limited. I'll try out prettier-standard

I looked at the configuration and it's very limited. I'll try out `prettier-standard`
@ -58,0 +59,4 @@
- [`Standard`](https://standardjs.com) for `.js`
- [`Prettier`](https://github.com/prettier/prettier) for `.html`, `.css` and `.md`
After you modify the code, run:
Owner
Copy link

the code style: prettier-badge atop is a bit misleading then. maybe just remove it.

the ![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)-badge atop is a bit misleading then. maybe just remove it.
Author
Contributor
Copy link

Aye. Let me try prettier-standard first. And we're still using prettier for html and css.

Aye. Let me try `prettier-standard` first. And we're still using prettier for html and css.
rtn closed this pull request 2023年07月15日 01:48:25 +02:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
webxdc/calendar!89
Reference in a new issue
webxdc/calendar
No description provided.
Delete branch "try-standard"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?