{"id":41003,"library":"eslint-formatter-jslint-xml","title":"ESLint JSLint XML Formatter","description":"Standalone ESLint formatter that outputs JSLint-compatible XML for integration with CI/CD pipelines or Jenkins. Current stable version is 9.0.1, maintained by Fregante. This package is part of a collection of standalone ESLint formatters, offering lightweight extraction without depending on ESLint's full packages. No release cadence specified; library is released alongside ESLint major versions. Differentiators: zero dependencies, ships TypeScript types, supports Node 18+. Works exclusively with ESLint >=9 (flat config only).","status":"active","version":"9.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/fregante/eslint-formatters","tags":["javascript","lint","ecmascript","typescript"],"install":[{"cmd":"npm install eslint-formatter-jslint-xml","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-formatter-jslint-xml","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-formatter-jslint-xml","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The module exports a default function; named export does not exist.","wrong":"import { eslintFormatterJslintXml } from 'eslint-formatter-jslint-xml'","symbol":"eslintFormatterJslintXml","correct":"import eslintFormatterJslintXml from 'eslint-formatter-jslint-xml'"},{"note":"CJS require is allowed but deprecated; prefer ESM imports.","symbol":"eslintFormatterJslintXml","correct":"const eslintFormatterJslintXml = require('eslint-formatter-jslint-xml')"},{"note":"TypeScript users: type-only export. Not available in CJS.","wrong":"import { FormatterFunction } from 'eslint-formatter-jslint-xml'","symbol":"type FormatterFunction","correct":"import type { FormatterFunction } from 'eslint-formatter-jslint-xml'"}],"quickstart":{"code":"import eslintFormatterJslintXml from 'eslint-formatter-jslint-xml';\nimport { ESLint } from 'eslint';\n\nconst eslint = new ESLint();\nconst results = await eslint.lintFiles(['src/**/*.js']);\nconst xml = eslintFormatterJslintXml(results, results[0]?.filePath);\nconsole.log(xml);","lang":"typescript","description":"Demonstrates using the formatter with ESLint's flat config (ESLint >=9). Lints files and outputs JSLint XML."},"warnings":[{"fix":"Create eslint.config.js (or .mjs/.cjs) and ensure eslint >=9.","message":"ESLint flat config required: \".eslintrc.*\" files are ignored in ESLint 9+. Use eslint.config.js.","severity":"breaking","affected_versions":">=9"},{"fix":"Use 'import eslintFormatterJslintXml from \\'eslint-formatter-jslint-xml\\'' in ESM context.","message":"CommonJS require() is deprecated for this package. Prefer ESM import.","severity":"deprecated","affected_versions":">=9"},{"fix":"Ensure second argument is a string (file path) or undefined. For results from multiple files, pass the results array directly and don't pass a second argument for aggregated output.","message":"Second argument to formatter is the file path, not options. Passing wrong type may produce empty <file> elements.","severity":"gotcha","affected_versions":">=9"},{"fix":"Handle XML parsing carefully; expect optional attributes on <issue> for fatal errors.","message":"Output XML may contain fatal errors with missing 'line' or 'char' attributes. Some parsers may reject this.","severity":"gotcha","affected_versions":">=9"},{"fix":"Sanitize lint messages manually if needed. The issue is present in upstream ESLint as well.","message":"Formatter does not escape XML special characters in reason/evidence fields. This can produce invalid XML if lint messages contain <>&.","severity":"gotcha","affected_versions":">=8"}],"env_vars":null,"search_vec":"'18':69 '9':74 '9.0.1':25 'alongsid':57 'cadenc':52 'ci/cd':17 'collect':35 'compat':12 'config':76 'current':21 'depend':44,63 'differenti':61 'ecmascript':80 'eslint':1,6,38,46,58,73 'exclus':71 'extract':42 'flat':75 'formatt':4,7,39 'fregant':28 'full':48 'integr':15 'javascript':78 'jenkin':20 'jslint':2,11 'jslint-compat':10 'librari':54 'lightweight':41 'lint':79 'maintain':26 'major':59 'node':68 'offer':40 'output':9 'packag':30,49 'part':32 'pipelin':18 'releas':51,56 'ship':64 'specifi':53 'stabl':22 'standalon':5,37 'support':67 'type':66 'typescript':65,81 'version':23,60 'without':43 'work':70 'xml':3,13 'zero':62","created_at":"2026-06-04T18:50:17.988867+00:00","updated_at":"2026-06-04T18:50:17.988867+00:00","problems":[{"fix":"Install package: npm install eslint-formatter-jslint-xml","cause":"Package not installed or not in node_modules path.","error":"Error: Cannot find module 'eslint-formatter-jslint-xml'"},{"fix":"Use: import eslintFormatterJslintXml from 'eslint-formatter-jslint-xml'","cause":"Incorrect import: using named import instead of default import.","error":"TypeError: eslintFormatterJslintXml is not a function"},{"fix":"Upgrade to eslint@^9 and create eslint.config.js.","cause":"ESLint version <9 or using legacy config (.eslintrc).","error":"Error: This formatter requires ESLint 9+ with flat config"},{"fix":"Use dynamic import: const eslintFormatterJslintXml = (await import('eslint-formatter-jslint-xml')).default; or switch to ESM.","cause":"Trying to require() the package in a CommonJS context without transpilation.","error":"SyntaxError: Unexpected token 'export'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/fregante/eslint-formatters/tree/main/packages/eslint-formatter-jslint-xml","github":"https://github.com/fregante/eslint-formatters","docs":null,"changelog":null,"pypi":null,"npm":"eslint-formatter-jslint-xml","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}