You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,12 @@ The connector will check your npm authentication, generate a connection token, a
105
105
106
106
## Code style
107
107
108
+
When committing changes, try to keep an eye out for unintended formatting updates. These can make a pull request look noisier than it really is and slow down the review process. Sometimes IDEs automatically reformat files on save, which can unintentionally introduce extra changes.
109
+
110
+
To help with this, the project uses `oxfmt` to handle formatting via a pre-commit hook. The hook will automatically reformat files when needed. If something can’t be fixed automatically, it will let you know what needs to be updated before you can commit.
111
+
112
+
If you want to get ahead of any formatting issues, you can also run `pnpm lint:fix` before committing to fix formatting across the whole project.
113
+
108
114
### Typescript
109
115
110
116
- We care about good types – never cast things to `any` 💪
@@ -369,13 +375,17 @@ We recommend the [i18n-ally](https://marketplace.visualstudio.com/items?itemName
369
375
370
376
The extension is included in our workspace recommendations, so VSCode should prompt you to install it.
371
377
372
-
### Formatting with locale
378
+
### Formatting numbers and dates
373
379
374
-
When formatting numbers or dates that should respect the user's locale, pass the locale:
380
+
Use vue-i18n's built-in formatters for locale-aware formatting:
375
381
376
-
```typescript
377
-
const { locale } =useI18n()
378
-
const formatted =formatNumber(12345, locale.value) // "12,345" in en-US
0 commit comments