An ESM-only (since v5.0.0) CLI and API tool for linting, formatting, sorting, and deduplicating i18n locale JSON files. It detects cross-file type conflicts, duplicate translations, and enforces consistent property naming and alphabetical ordering. Zero runtime dependencies, ships TypeScript types, and can auto-fix issues. Released under MIT, maintained actively by Simonwep. Unlike general JSON linters, li18nt is purpose-built for translation workflows.
npm install li18ntNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installs li18nt, creates a configuration file with common rules, and runs the linter with auto-fix on locale JSON files.
Switch to ES modules ("type": "module" in package.json) or use dynamic import().Rename li18nt.config.js to .li18ntrc.json.
Ensure your naming patterns use regex syntax correctly, e.g., "^[a-z]" matches lowercase start.
Run li18nt from the project root, or use --config to specify an explicit path.
Consider using lowercase keys or adjust sorting expectations.
Switch to import statement: import { li18nt } from 'li18nt'.Use strict JSON for .json configs, or switch to .js file with module.exports.
Create a configuration file, for example .li18ntrc.json in the project root.
Run npm install li18nt or npx li18nt.
No dependency data recorded yet.