{"id":25751,"library":"ilib-lint-webos","title":"ilib-lint-webos","description":"Ilib-lint-webos is a plugin for ilib-lint that adds support for parsing webOS XLIFF files and provides linting rules specific to webOS internationalization. Version 1.3.0, released January 2025, targets Node.js >=14 and uses ESM modules. It is part of the iLib mono-webos repository and focuses on ensuring correct i18n practices for webOS apps. Key differentiators include built-in support for webOS XLIFF format and custom rules for webOS localization constraints.","status":"active","version":"1.3.0","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/iLib-js/ilib-mono-webos","tags":["javascript","internationalization","i18n","g11n","lint","xliff","webOS"],"install":[{"cmd":"npm install ilib-lint-webos","lang":"bash","label":"npm"},{"cmd":"yarn add ilib-lint-webos","lang":"bash","label":"yarn"},{"cmd":"pnpm add ilib-lint-webos","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; the plugin is designed to extend ilib-lint functionality and requires ilib-lint to be installed.","package":"ilib-lint","optional":false}],"imports":[{"note":"ESM-only since v1.0; CommonJS require() will throw ERR_REQUIRE_ESM.","wrong":"const plugin = require('ilib-lint-webos')","symbol":"default","correct":"import plugin from 'ilib-lint-webos'"},{"note":"Named exports available only via ESM import.","wrong":"const { PluginClass } = require('ilib-lint-webos')","symbol":"PluginClass","correct":"import { PluginClass } from 'ilib-lint-webos'"},{"note":"Rules are exported as part of the main package, not from a subpath.","wrong":"import rules from 'ilib-lint-webos/rules'","symbol":"rules","correct":"import { rules } from 'ilib-lint-webos'"}],"quickstart":{"code":"import plugin from 'ilib-lint-webos';\nimport { Linter } from 'ilib-lint';\n\nconst linter = new Linter({\n  plugins: [plugin],\n  files: ['path/to/webos-strings.xliff'],\n  rules: {\n    'webos-no-unused-strings': 'error'\n  }\n});\n\nconst results = await linter.lint();\nconsole.log(JSON.stringify(results, null, 2));","lang":"javascript","description":"Import the ilib-lint-webos plugin and use it with ilib-lint to lint a webOS XLIFF file."},"warnings":[{"fix":"Use import syntax or set type: 'module' in package.json.","message":"ESM-only: this module is ESM-only and cannot be required with require().","severity":"breaking","affected_versions":">=1.0"},{"fix":"Replace with 'lint(type: 'xlf')' from ilib-lint directly.","message":"The method 'lintWebOS()' was deprecated in v1.2.0 and removed in v1.3.0.","severity":"deprecated","affected_versions":">=1.2 <1.3"},{"fix":"Add \"plugins\": [\"ilib-lint-webos\"] to your config file.","message":"Plugin configuration requires 'plugins' array in ilib-lint-config.json, not 'extends'.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Ensure your XLIFF files have the correct namespace or the plugin will skip them.","message":"XLIFF files must use webOS namespace URI 'https://webostv.developer.lge.com/xliff'.","severity":"gotcha","affected_versions":">=1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use import plugin from 'ilib-lint-webos' and ensure your project uses ESM.","cause":"The package is ESM-only; using require() is not supported.","error":"const plugin = require('ilib-lint-webos');\nError [ERR_REQUIRE_ESM]: require() of ES Module ..."},{"fix":"Pass the imported plugin object to ilib-lint's constructor or config, do not call new plugin().","cause":"Trying to instantiate the plugin class directly instead of passing it to ilib-lint.","error":"Failed to load plugin: TypeError: plugin is not a constructor"},{"fix":"Verify plugin is in 'plugins' config and use correct rule name: 'no-unused-strings' (without webos- prefix).","cause":"Plugin not loaded or rule name misspelled.","error":"Rule 'webos-no-unused-strings' is not registered"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}