i18n-validate
Advanced tools
Comparing version 1.2.1 to 1.2.2-next.10a388c.0
#!/usr/bin/env node | ||
import { parseOptionsFile, log, parseFile, ValidationError, validateKey } from './chunk-PCOSWKCS.js'; | ||
import { parseOptionsFile, log, parseFile, ValidationError, validateKey } from './chunk-3JHARYVQ.js'; | ||
import process from 'node:process'; | ||
@@ -7,3 +7,3 @@ import { Command } from 'commander'; | ||
var command = new Command().version("1.2.1").usage("[options] <file ...>").option("-c, --config <config>", "Path to the config file", "./i18n-validate.json").option("--log-level <logLevel>", "Log level").option("--exclude <exclude...>", "Exclude files from parsing").option("--exit-on-error", "Exit immediately if an error is found"); | ||
var command = new Command().version("1.2.2-next.10a388c.0").usage("[options] <file ...>").option("-c, --config <config>", "Path to the config file", "./i18n-validate.json").option("--log-level <logLevel>", "Log level").option("--exclude <exclude...>", "Exclude files from parsing").option("--exit-on-error", "Exit immediately if an error is found"); | ||
command.on("--help", () => { | ||
@@ -57,2 +57,5 @@ console.log(""); | ||
} | ||
if (errorCount > 0 && options.exitOnError) { | ||
break; | ||
} | ||
} | ||
@@ -59,0 +62,0 @@ if (errorCount > 0) { |
@@ -1,3 +0,3 @@ | ||
export { ValidationError, parseFile, parseOptionsFile, validateKey } from './chunk-PCOSWKCS.js'; | ||
export { ValidationError, parseFile, parseOptionsFile, validateKey } from './chunk-3JHARYVQ.js'; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "i18n-validate", | ||
"version": "1.2.1", | ||
"version": "1.2.2-next.10a388c.0", | ||
"description": "A cli tool to find invalid i18n keys, missing variables and many more", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -53,3 +53,3 @@ <div align="center"> | ||
> **Note**: Currently, `i18n-validate` only supports `ts`, `tsx`, `js` and `jsx` source files and `json` translation files. | ||
> **Note**: Currently, `i18n-validate` only supports `typescript` and `javascript` (including `tsx` and `jsx`) source files and only `json`, `js` translation files. | ||
@@ -95,2 +95,14 @@ ### Use with lint-staged | ||
## TODO | ||
- [ ] Add support for `yaml`, `json5` translation files | ||
- [ ] Add support for other framework specific source files (e.g. `vue`, `svelte`, `angular` etc.) | ||
- [ ] Detect unused translation keys | ||
- [ ] A vscode extension | ||
- [ ] A github action | ||
- [ ] An eslint plugin | ||
- [ ] A `--fix` flag to remove unused keys and variables | ||
_Any help to complete these tasks will be highly appreciated._ | ||
## Contributors ✨ | ||
@@ -97,0 +109,0 @@ |
Sorry, the diff of this file is not supported yet
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
45177
113
1
2
1