i18n-validate
Advanced tools
Comparing version 0.0.0 to 0.1.0-next.0b81611.0
{ | ||
"name": "i18n-validate", | ||
"version": "0.0.0", | ||
"version": "0.1.0-next.0b81611.0", | ||
"description": "A cli tool to find invalid i18n keys, missing variables and many more", | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"browser": "dist/index.global.js", | ||
"unpkg": "dist/index.global.js", | ||
"types": "dist/index.d.ts", | ||
"exports": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.js" | ||
}, | ||
"main": "./dist/index.js", | ||
"bin": "./dist/cli.js", | ||
"type": "module", | ||
"sideEffects": false, | ||
@@ -19,6 +12,5 @@ "license": "MIT", | ||
"scripts": { | ||
"docs": "typedoc", | ||
"lint": "eslint src tests --fix --cache", | ||
"format": "prettier --write . --cache", | ||
"test": "vitest run", | ||
"test": "true || vitest run", | ||
"test:watch": "vitest", | ||
@@ -43,2 +35,7 @@ "update": "yarn upgrade-interactive", | ||
], | ||
"dependencies": { | ||
"commander": "^11.0.0", | ||
"glob": "^10.3.3", | ||
"typescript": "^5.1.6" | ||
}, | ||
"devDependencies": { | ||
@@ -49,7 +46,9 @@ "@commitlint/cli": "^17.6.6", | ||
"@favware/npm-deprecate": "^1.0.7", | ||
"@types/is-ci": "^3.0.0", | ||
"@types/node": "^20.4.2", | ||
"@vitest/coverage-v8": "^0.33.0", | ||
"cz-conventional-changelog": "^3.3.0", | ||
"esbuild-plugin-version-injector": "^1.2.0", | ||
"eslint": "^8.45.0", | ||
"eslint-config-mahir": "^0.0.27", | ||
"eslint-config-mahir": "^0.0.29", | ||
"husky": "^8.0.3", | ||
@@ -60,4 +59,2 @@ "lint-staged": "^13.2.3", | ||
"tsup": "^7.1.0", | ||
"typedoc": "^0.24.8", | ||
"typescript": "^5.1.6", | ||
"vitest": "^0.33.0" | ||
@@ -64,0 +61,0 @@ }, |
@@ -21,12 +21,45 @@ <div align="center"> | ||
```ts | ||
```sh | ||
npx i18n-validate | ||
``` | ||
<!-- prettier-ignore-start --> | ||
```sh | ||
Usage: i18n-validate [options] <file ...> | ||
Options: | ||
-V, --version output the version number | ||
-c, --config <config> Path to the config file (default: | ||
"./i18n-validate.json") | ||
--log-level <logLevel> Log level (default: "info") | ||
--exclude <exclude...> Exclude files from parsing (default: | ||
"**/node_modules/**") | ||
--exit-on-error Exit immediately if an error is found (default: | ||
false) | ||
-h, --help display help for command | ||
Examples: | ||
$ i18next-validate "/path/to/src/app.js" | ||
$ i18next-validate --config i18n-validate-custom.json 'src/**/*.{js,jsx}' | ||
$ i18next-validate --exclude "**/node_modules/**" "src/**/*.{js,jsx}" | ||
``` | ||
<!-- prettier-ignore-end --> | ||
You can disable the `i18n-validate` for a specific line by adding `// i18n-validate-disable-next-line` before the line. | ||
> **Note**: Currently, `i18n-validate` only supports `ts`, `tsx`, `js` and `jsx` source files and `json` translation files. | ||
## Configuration | ||
You can customize the behavior of `i18n-validate` by adding a `i18n-validate.config.json` file to the root of your project. | ||
You can customize the behavior of `i18n-validate` by adding a `i18n-validate.json` file to the root of your project. | ||
<!-- Add info --> | ||
```json | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/imranbarbhuiya/i18n-validate/main/.github/i18n-validate.schema.json" | ||
} | ||
``` | ||
> **Note**: You can also use `js`, `cjs` or `mjs` file and with any name you want. Just make sure to pass the path of the config file to `i18n-validate` using `--config` option. | ||
## Buy me some doughnuts | ||
@@ -33,0 +66,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
37625
12
396
79
Yes
3
1
+ Addedcommander@^11.0.0
+ Addedglob@^10.3.3
+ Addedtypescript@^5.1.6
+ Added@isaacs/cliui@8.0.2(transitive)
+ Added@pkgjs/parseargs@0.11.0(transitive)
+ Addedansi-regex@5.0.16.1.0(transitive)
+ Addedansi-styles@4.3.06.2.1(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@2.0.1(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedcommander@11.1.0(transitive)
+ Addedcross-spawn@7.0.6(transitive)
+ Addedeastasianwidth@0.2.0(transitive)
+ Addedemoji-regex@8.0.09.2.2(transitive)
+ Addedforeground-child@3.3.0(transitive)
+ Addedglob@10.4.5(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjackspeak@3.4.3(transitive)
+ Addedlru-cache@10.4.3(transitive)
+ Addedminimatch@9.0.5(transitive)
+ Addedminipass@7.1.2(transitive)
+ Addedpackage-json-from-dist@1.0.1(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedpath-scurry@1.11.1(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedsignal-exit@4.1.0(transitive)
+ Addedstring-width@4.2.35.1.2(transitive)
+ Addedstrip-ansi@6.0.17.1.0(transitive)
+ Addedtypescript@5.7.3(transitive)
+ Addedwhich@2.0.2(transitive)
+ Addedwrap-ansi@7.0.08.1.0(transitive)