Registry / devops / ilib-lint-webos

ilib-lint-webos

JSON →
library1.3.0jsnpmunverified

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.

npm install ilib-lint-webos
INSTALL
IMPORT
SIG · ILIB-LINT-WEBOS
I
ilib-lint-webos
devopsjavascriptv1.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import plugin from 'ilib-lint-webos'
const plugin = require('ilib-lint-webos')
ESM-only since v1.0; CommonJS require() will throw ERR_REQUIRE_ESM.
PluginClass
import { PluginClass } from 'ilib-lint-webos'
const { PluginClass } = require('ilib-lint-webos')
Named exports available only via ESM import.
rules
import { rules } from 'ilib-lint-webos'
import rules from 'ilib-lint-webos/rules'
Rules are exported as part of the main package, not from a subpath.

Import the ilib-lint-webos plugin and use it with ilib-lint to lint a webOS XLIFF file.

import plugin from 'ilib-lint-webos'; import { Linter } from 'ilib-lint'; const linter = new Linter({ plugins: [plugin], files: ['path/to/webos-strings.xliff'], rules: { 'webos-no-unused-strings': 'error' } }); const results = await linter.lint(); console.log(JSON.stringify(results, null, 2));
Debug
Known issues
breakingESM-only: this module is ESM-only and cannot be required with require().
fix
Use import syntax or set type: 'module' in package.json.
affects: >=1.0
deprecatedThe method 'lintWebOS()' was deprecated in v1.2.0 and removed in v1.3.0.
fix
Replace with 'lint(type: 'xlf')' from ilib-lint directly.
affects: >=1.2 <1.3
gotchaPlugin configuration requires 'plugins' array in ilib-lint-config.json, not 'extends'.
fix
Add "plugins": ["ilib-lint-webos"] to your config file.
affects: >=1.0
gotchaXLIFF files must use webOS namespace URI 'https://webostv.developer.lge.com/xliff'.
fix
Ensure your XLIFF files have the correct namespace or the plugin will skip them.
affects: >=1.0
Errors
Common errors & fixes
const plugin = require('ilib-lint-webos'); Error [ERR_REQUIRE_ESM]: require() of ES Module ...
The package is ESM-only; using require() is not supported.
fix
Use import plugin from 'ilib-lint-webos' and ensure your project uses ESM.
Failed to load plugin: TypeError: plugin is not a constructor
Trying to instantiate the plugin class directly instead of passing it to ilib-lint.
fix
Pass the imported plugin object to ilib-lint's constructor or config, do not call new plugin().
Rule 'webos-no-unused-strings' is not registered
Plugin not loaded or rule name misspelled.
fix
Verify plugin is in 'plugins' config and use correct rule name: 'no-unused-strings' (without webos- prefix).
Upgrade
Version history
1.3.0latest on npm
Audit
Dependencies
ilib-lintrequiredPeer dependency; the plugin is designed to extend ilib-lint functionality and requires ilib-lint to be installed.
Agent activity
16 hits · last 30 days
node
16
Resources
ilib-lint-webos — npm install ilib-lint-webos · libregistry