Skip to content

Commit

Permalink
feat: add custom framework for i18n-ally and replace deprecated Jest …
Browse files Browse the repository at this point in the history
…VSCode configuration
  • Loading branch information
ixartz committed May 10, 2024
1 parent 226b5e9 commit a9889dc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .vscode/i18n-ally-custom-framework.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
languageIds:
- javascript
- typescript
- javascriptreact
- typescriptreact

usageMatchRegex:
- "[^\\w\\d]t\\(['\"`]({key})['\"`]"

scopeRangeRegex: "(?:useTranslations\\(|getTranslations\\(|namespace:)\\s*['\"`](.*?)['\"`]"

monopoly: true
11 changes: 5 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
"lucide-react"
],
"typescript.preferences.preferTypeOnlyAutoImports": true, // Prefer type-only imports
"jest.autoRun": {
"watch": false // Start the jest with the watch flag
// "onStartup": ["all-tests"] // Run all tests upon project launch
},
"jest.showCoverageOnLoad": true, // Show code coverage when the project is launched
"jest.autoRevealOutput": "on-exec-error", // Don't automatically open test explorer terminal on launch
"jest.runMode": {
"type": "on-save",
"testFileOnly": true,
"coverage": true
}, // Configure Jest extension
// Multiple language settings for json and jsonc files
"[json][jsonc][yaml]": {
"editor.formatOnSave": true,
Expand Down

0 comments on commit a9889dc

Please sign in to comment.