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
- Combined keyboard shortcuts (settings, compare, blog navigation)
- Merged package.json dependencies (kept main versions, added blog dependencies)
- Added presetTypography and presetRtl to uno config
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+27-7Lines changed: 27 additions & 7 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` 💪
@@ -301,6 +307,14 @@ For example to check if all Japanese translation keys are up-to-date, run:
301
307
pnpm i18n:check ja-JP
302
308
```
303
309
310
+
To automatically add missing keys with English placeholders, use `--fix`:
311
+
312
+
```bash
313
+
pnpm i18n:check:fix fr-FR
314
+
```
315
+
316
+
This will add missing keys with `"EN TEXT TO REPLACE: {english text}"` as placeholder values, making it easier to see what needs translation.
317
+
304
318
#### Country variants (advanced)
305
319
306
320
Most languages only need a single locale file. Country variants are only needed when you want to support regional differences (e.g., `es-ES` for Spain vs `es-419` for Latin America).
@@ -361,13 +375,17 @@ We recommend the [i18n-ally](https://marketplace.visualstudio.com/items?itemName
361
375
362
376
The extension is included in our workspace recommendations, so VSCode should prompt you to install it.
363
377
364
-
### Formatting with locale
378
+
### Formatting numbers and dates
365
379
366
-
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:
367
381
368
-
```typescript
369
-
const { locale } =useI18n()
370
-
const formatted =formatNumber(12345, locale.value) // "12,345" in en-US
All new components should have a basic accessibility test in `test/nuxt/components.spec.ts`. These tests use [axe-core](https://github.com/dequelabs/axe-core) to catch common accessibility violations.
412
+
All Vue components should have accessibility tests in `test/nuxt/a11y.spec.ts`. These tests use [axe-core](https://github.com/dequelabs/axe-core) to catch common accessibility violations and run in a real browser environment via Playwright.
The `runAxe` helper handles DOM isolation and disables page-level rules that don't apply to isolated component testing.
413
431
432
+
A coverage test in `test/unit/a11y-component-coverage.spec.ts` ensures all components are either tested or explicitly skipped with justification. When you add a new component, this test will fail until you add accessibility tests for it.
433
+
414
434
> [!IMPORTANT]
415
435
> Just because axe-core doesn't find any obvious issues, it does not mean a component is accessible. Please do additional checks and use best practices.
0 commit comments