Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: update format & lint config #9162

Merged
merged 16 commits into from
Dec 26, 2023
Merged

style: update format & lint config #9162

merged 16 commits into from
Dec 26, 2023

Conversation

sxzz
Copy link
Member

@sxzz sxzz commented Sep 7, 2023

Changes

  • add trailing commas
  • enable sort-imports rule
  • prefer import node: protocol
  • enable prefer-ts-expect-error rule
  • prefer import type & replace import { type A } with import type { A }

@netlify
Copy link

netlify bot commented Sep 7, 2023

Deploy Preview for vue-sfc-playground failed.

Name Link
🔨 Latest commit 26424b8
🔍 Latest deploy log https://app.netlify.com/sites/vue-sfc-playground/deploys/64f98179fa74660008834b36

@netlify
Copy link

netlify bot commented Sep 7, 2023

Deploy Preview for vue-next-template-explorer failed.

Name Link
🔨 Latest commit 26424b8
🔍 Latest deploy log https://app.netlify.com/sites/vue-next-template-explorer/deploys/64f98179a7092900087a3c10

@sxzz sxzz marked this pull request as draft September 7, 2023 07:55
@github-actions
Copy link

github-actions bot commented Sep 7, 2023

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 89.6 kB (+2.48 kB) 34.1 kB (+937 B) 30.7 kB (+804 B)
vue.global.prod.js 147 kB (+13.5 kB) 53.4 kB (+3.39 kB) 47.7 kB (+2.85 kB)

Usages

Name Size Gzip Brotli
createApp 49.7 kB (+1.38 kB) 19.5 kB (+454 B) 17.8 kB (+458 B)
createSSRApp 53.1 kB (+1.47 kB) 20.8 kB (+469 B) 19 kB (+439 B)
defineCustomElement 52 kB (+1.27 kB) 20.2 kB (+426 B) 18.5 kB (+415 B)
overall 63.2 kB (+1.48 kB) 24.4 kB (+528 B) 22.2 kB (+506 B)

@sxzz
Copy link
Member Author

sxzz commented Sep 7, 2023

Are there any other PRs about stylistic? We can change the base branch to chore/style. /cc @Alfred-Skyblue

.prettierrc Outdated
"semi": false,
"singleQuote": true,
"printWidth": 80,
"trailingComma": "all",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we making this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For convenience and to reduce extra changes in the git history.
If we want to add a new property, we needn't add a comma into the last line, but only add a new line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know what trailing commas offer. Just not sure why change this now…additions may not be that frequent at the moment. I’m not against it though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discussion, we decided to

  • work on stylistic PRs that worth merging regularly (like every minor), when most of PRs are merged.
  • avoid conflicting useful PRs
  • merge PRs to a branch, and then squash merge to main branch, and add the commit to .git-blame-ignore-revs file.

@Alfred-Skyblue
Copy link
Member

This is great, we can merge eslint related PRs together.

@Alfred-Skyblue
Copy link
Member

Are there any other PRs about stylistic? We can change the base branch to chore/style. /cc @Alfred-Skyblue

#9028

@sxzz
Copy link
Member Author

sxzz commented Sep 8, 2023

@Alfred-Skyblue This PR is actually not about style. We can merge it separately.

Copy link

codspeed-hq bot commented Dec 19, 2023

CodSpeed Performance Report

Merging #9162 will not alter performance

Comparing chore/style (b96fea8) with main (bae79dd)

Summary

✅ 53 untouched benchmarks

@sxzz sxzz changed the base branch from main to minor December 19, 2023 09:31
@sxzz sxzz changed the title style: add trailing comma style: update format&lint config Dec 19, 2023
@sxzz sxzz force-pushed the chore/style branch 6 times, most recently from 8ee5b89 to 8ceb2e5 Compare December 19, 2023 23:14
@sxzz sxzz marked this pull request as ready for review December 19, 2023 23:16
@sxzz sxzz force-pushed the chore/style branch 2 times, most recently from ab8ccb5 to abee7f2 Compare December 19, 2023 23:33
@sxzz sxzz changed the title style: update format&lint config style: update format & lint config Dec 20, 2023
@sxzz
Copy link
Member Author

sxzz commented Dec 26, 2023

/ecosystem-ci run

@vue-bot
Copy link
Contributor

vue-bot commented Dec 26, 2023

📝 Ran ecosystem CI: Open

suite result latest scheduled
language-tools failure failure
nuxt failure success
pinia success success
quasar success success
router success success
test-utils success success
vant success success
vite-plugin-vue failure success
vitepress success failure
vue-i18n success success
vue-macros failure success
vuetify failure success
vueuse failure success
vue-simple-compiler success success

@vue-bot
Copy link
Contributor

vue-bot commented Dec 26, 2023

📝 Ran ecosystem CI: Open

suite result latest scheduled
language-tools failure failure
nuxt failure success
pinia failure success
quasar success success
router success success
test-utils success success
vant success success
vite-plugin-vue success success
vitepress success failure
vue-i18n success success
vue-macros failure success
vuetify success success
vueuse success success
vue-simple-compiler success success

@sxzz sxzz merged commit bfe6b45 into minor Dec 26, 2023
6 checks passed
@sxzz sxzz deleted the chore/style branch December 26, 2023 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

4 participants