{"id":25067,"library":"chromex-locale-lint","title":"chromex-locale-lint","description":"CLI tool for validating Chrome extension localization files (`_locales/*/messages.json`). Version 0.1.0 is the latest stable release. It checks for missing keys across locales and validates locale directory names against Google Chrome's supported locales list. Integrates easily with CI/CD pipelines, supporting a `--strict` flag to treat warnings as errors. Lightweight alternative to rolling custom locale validation scripts.","status":"active","version":"0.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/okaryo/chromex-locale-lint","tags":["javascript","chrome","chrome-extension","locale","i18n","lint"],"install":[{"cmd":"npm install chromex-locale-lint","lang":"bash","label":"npm"},{"cmd":"yarn add chromex-locale-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add chromex-locale-lint","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package provides a CLI tool; the import is for programmatic use, but it's primarily designed to be run via npx or as a bin script.","wrong":"const chromexLocaleLint = require('chromex-locale-lint')","symbol":"default","correct":"import chromexLocaleLint from 'chromex-locale-lint'"},{"note":"No named exports are documented; the package exports a default function for programmatic use in Node.js (ESM-only since v0.1.0? unknown).","wrong":"","symbol":"runLint (hypothetical)","correct":"import { runLint } from 'chromex-locale-lint'"},{"note":"The CLI option is --localesDir, not --dir. Use npx or run via package.json scripts.","wrong":"npx chromex-locale-lint --dir ./_locales","symbol":"bin","correct":"npx chromex-locale-lint --localesDir ./_locales --baseLang en"}],"quickstart":{"code":"npx chromex-locale-lint --localesDir ./_locales --baseLang en --strict","lang":"javascript","description":"Runs locale validation on the _locales directory using English as the base language, with strict mode enabled to treat warnings as errors."},"warnings":[{"fix":"Use absolute path or relative path from project root: --localesDir ./src/_locales","message":"If --localesDir is not specified, defaults to '_locales/' relative to current working directory. Ensure correct path.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Use 'en', 'de', 'ja', etc. See Chrome supported locales.","message":"--baseLang must exactly match a locale directory name (e.g., 'en' not 'en_US'). Chrome uses BCP 47 tags.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Upgrade to >=0.0.3 or apply locale list from Chrome manually.","message":"Version 0.0.3 introduced updated supported locales list; older v0.0.2 may report false positives for valid locales.","severity":"deprecated","affected_versions":"0.0.2"},{"fix":"Add --strict argument to maintain same behavior, or update CI to handle exit codes.","message":"In version 0.1.0, the --strict flag was added. Previously, warnings did not cause exit code failure. Enabling --strict will break CI builds that ignore warnings.","severity":"breaking","affected_versions":"<0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Rename directory to 'en' or use a valid BCP 47 tag like 'en-US'? Chrome uses 'en', 'en_US' is invalid. Check Chrome documentation.","cause":"Using region subtag where only language tag is expected (e.g., en_US instead of en).","error":"Error: Locale directory 'en_US' is not supported by Google Chrome."},{"fix":"Specify correct path: npx chromex-locale-lint --localesDir ./src/_locales","cause":"The --localesDir path is incorrect or the directory does not exist.","error":"Error: ENOENT: no such file or directory, scandir '_locales/'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}