JSON Key CheckerA VS Code extension that validates method calls against keys in your JSON files. ✨ Features
⚙️ Extension SettingsThis extension contributes the following settings:
|
Property | Type | Description |
---|---|---|
name |
string |
A name for this pattern group. |
jsonFiles |
array<string> |
JSON file patterns (supports * wildcards). |
methodPatterns |
array<string> |
Regex patterns for method calls. |
fileExtensions |
array<string> |
File extensions to check. |
🔧 Example Configuration
Add the following to your VS Code settings.json
to configure the extension:
{
"jsonKeyChecker.enabled": true,
"jsonKeyChecker.patterns": [
{
"name": "UI Texts",
"jsonFiles": ["locales/*.json"],
"methodPatterns": ["t\\(['\"](https://github.com/lpdalmont/json-key-checker/blob/HEAD/[a-zA-Z0-9_.-]+)['\"]\\)"],
"fileExtensions": [".ts", ".tsx", ".js"]
},
{
"name": "Error Messages",
"jsonFiles": ["errors/*.json"],
"methodPatterns": ["error\\(['\"](https://github.com/lpdalmont/json-key-checker/blob/HEAD/[a-zA-Z0-9_.-]+)['\"]\\)"],
"fileExtensions": [".ts", ".js"]
}
]
}
Release Notes
0.0.1
This is a pre-release.