{"id":25746,"library":"ilib-lint-apple","title":"ilib-lint-apple","description":"A plugin for ilib-lint that validates Apple platform string parameters, specifically ensuring Swift string interpolation placeholders like \\(name) are correctly preserved in translated targets. Version 1.0.1 is current, with node.js 14+ and ESM support required. Unlike generic string linters, it targets Apple ecosystem files and provides a dedicated 'resource-swift-params' rule along with an 'apple' ruleset for easy integration into XLIFF file type checking.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","ilib","lint","apple","swift","objective-c","localization","i18n"],"install":[{"cmd":"npm install ilib-lint-apple","lang":"bash","label":"npm"},{"cmd":"yarn add ilib-lint-apple","lang":"bash","label":"yarn"},{"cmd":"pnpm add ilib-lint-apple","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core linting framework; plugin is designed to extend ilib-lint functionality","package":"ilib-lint","optional":false}],"imports":[{"note":"The plugin is exported as default; no named exports are provided.","symbol":"plugin","correct":"import plugin from 'ilib-lint-apple'"},{"note":"Rule classes are named exports; do not use default import.","wrong":"import ResourceSwiftParamsRule from 'ilib-lint-apple'","symbol":"ResourceSwiftParamsRule","correct":"import { ResourceSwiftParamsRule } from 'ilib-lint-apple'"},{"note":"Rule sets are also named exports.","symbol":"AppleRuleSet","correct":"import { AppleRuleSet } from 'ilib-lint-apple'"}],"quickstart":{"code":"// Install: npm install --save-dev ilib-lint-apple\n// In ilib-lint-config.json:\n{\n  \"plugins\": [\"ilib-lint-apple\"],\n  \"filetypes\": {\n    \"xliff\": {\n      \"ruleset\": [\"apple\"]\n    }\n  }\n}\n// Run: npx ilib-lint check -f xliff translations.xliff","lang":"json","description":"Shows how to install and configure the plugin to validate Swift string parameters in XLIFF files."},"warnings":[{"fix":"Use import syntax or set type: 'module' in package.json. Alternatively, upgrade to Node 14+.","message":"Plugin requires node.js 14+ and ESM module system. CJS require() will not work.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"For Objective-C format specifiers, use additional rules from other plugins or configure ilib-lint's built-in format checking.","message":"The rule 'resource-swift-params' only checks for Swift-style interpolation \\(param). Other placeholders (e.g., %@) are not validated.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ignore false positives via ilib-lint's inline suppression comments like // eslint-disable-next-line or resource-level ignore flags.","message":"Plugin may produce false positives for strings containing literal \\(... ) that are not Swift interpolation (e.g., in code comments).","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.1':32 '14':37 'along':60 'appl':4,13,48,63,76 'c':80 'check':72 'correct':26 'current':34 'dedic':54 'easi':66 'ecosystem':49 'ensur':18 'esm':39 'file':50,70 'generic':43 'i18n':82 'ilib':2,9,74 'ilib-lint':8 'ilib-lint-appl':1 'integr':67 'interpol':21 'javascript':73 'like':23 'lint':3,10,75 'linter':45 'local':81 'name':24 'node.js':36 'object':79 'objective-c':78 'param':58 'paramet':16 'placehold':22 'platform':14 'plugin':6 'preserv':27 'provid':52 'requir':41 'resourc':56 'resource-swift-param':55 'rule':59 'ruleset':64 'specif':17 'string':15,20,44 'support':40 'swift':19,57,77 'target':30,47 'translat':29 'type':71 'unlik':42 'valid':12 'version':31 'xliff':69","created_at":"2026-05-01T13:46:21.578909+00:00","updated_at":"2026-05-01T13:46:21.578909+00:00","problems":[{"fix":"Change project to ESM (type: 'module' in package.json) or use dynamic import(). Ensure node version >=14.","cause":"Using require() on an ESM-only module; ilib-lint-apple is ESM, but project may use CommonJS.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/ilib-lint-apple/index.js from /path/to/project/ilib-lint-config.json not supported."},{"fix":"Add 'ruleset': ['apple'] under the appropriate filetype in ilib-lint-config.json.","cause":"Plugin loaded but rule set not enabled for the file type.","error":"Parsing error: The 'resource-swift-params' rule is not configured."},{"fix":"Reinstall ilib-lint-apple and ensure ilib-lint is up-to-date. Run npm install --save-dev ilib-lint-apple@latest.","cause":"Corrupted or mismatched plugin version. Possibly the plugin not properly loaded or incompatible with ilib-lint version.","error":"TypeError: Cannot read properties of undefined (reading 'swiftParams')"},{"fix":"Run npm install --save-dev ilib-lint-apple and verify the package is in package.json devDependencies.","cause":"Plugin missing from node_modules or not listed in plugins array.","error":"Error: Plugin 'ilib-lint-apple' not found. Did you install it?"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/ilib-lint-apple","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}