-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Yuki edited this page Jul 9, 2026
·
1 revision
npm install -D i18n-smell-detectorInstalling the package only adds the CLI. It does not create project files automatically.
Create a starter config:
npx i18n-smell-detector initThis writes i18n-smell.config.mjs in the current working directory.
To write the config somewhere else:
npx i18n-smell-detector init --config ./config/i18n-smell.config.mjsIf the config already exists, init refuses to overwrite it. Use --force only when replacing it intentionally:
npx i18n-smell-detector init --forceUpdate locales and source to match your project:
export default {
baseLocale: 'en',
locales: {
en: './src/locales/en.json',
zh: './src/locales/zh.json'
},
source: [
'src/**/*.{vue,js,jsx,ts,tsx}'
],
failOn: 'none'
};Paths inside the config are resolved relative to the config file.
Start in reporting mode:
npx i18n-smell-detector check --config i18n-smell.config.mjs --fail-on noneAfter tuning allowlists and baselines, enforce CI:
npx i18n-smell-detector check --config i18n-smell.config.mjs --fail-on highIf you see:
i18n-smell-detector: Config file not found: /path/to/i18n-smell.config.mjsCreate the config first with init, or pass the correct --config path.