Skip to content

Commands

Yuki edited this page Jul 10, 2026 · 2 revisions

Commands

init

Create a starter config file.

npx i18n-smell-detector init

init writes i18n-smell.config.mjs. When it finds locale JSON files in common directories such as src/locales, src/i18n, locales, or i18n, it adds them to the generated locales map automatically.

Options:

npx i18n-smell-detector init --config ./config/i18n-smell.config.mjs
npx i18n-smell-detector init --force

check

Run all enabled checks.

npx i18n-smell-detector check --config i18n-smell.config.mjs

check-identical

Run only copied base-locale value detection.

npx i18n-smell-detector check-identical --config i18n-smell.config.mjs

check-placeholders

Run only placeholder mismatch detection.

npx i18n-smell-detector check-placeholders --config i18n-smell.config.mjs

check-hardcoded

Run only hardcoded string detection.

npx i18n-smell-detector check-hardcoded --config i18n-smell.config.mjs

Shared Options

Option Description
-c, --config <path> Config file path.
--format <format> console, json, markdown, sarif, or html.
--fail-on <level> high, medium, low, or none.
--output <path> Write the full report to a file.
--baseline <path> Suppress issues listed in a baseline.
--update-baseline Write current issues to the baseline file.
--include-ignored Include ignored issues in reports.
--debug Print stack traces and error codes for troubleshooting.
-h, --help Show help.

Exit Codes

Code Meaning
0 Command completed and no visible issue reached failOn.
1 Command completed and at least one visible issue reached failOn.
2 Runtime or configuration error.

Clone this wiki locally