{"id":25788,"library":"jflint","title":"jflint","description":"jflint is a CLI tool that helps lint a Declarative Jenkinsfile by wrapping the Jenkins Pipeline linting API. It sends the Jenkinsfile content to a specified Jenkins server and displays the validation result. The current stable version is 0.3.2. The tool supports Node.js v4–v7 (older versions). Unlike official Jenkins CLI methods (SSH/curl), jflint provides a simpler command-line interface, optional configuration file, and built-in handling of authentication and CSRF. It is a lightweight npm package with no external dependencies.","status":"active","version":"0.3.2","language":"javascript","source_language":"en","source_url":"https://github.com/miyajan/jflint","tags":["javascript","jenkins","lint"],"install":[{"cmd":"npm install jflint","lang":"bash","label":"npm"},{"cmd":"yarn add jflint","lang":"bash","label":"yarn"},{"cmd":"pnpm add jflint","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"jflint is a CLI tool, not a library. It should be invoked from the command line, not imported.","wrong":"require('jflint')","symbol":"jflint","correct":"npx jflint Jenkinsfile"}],"quickstart":{"code":"// Install globally, then run\n$ npm install -g jflint\n$ jflint -j http://jenkins.example.com -u admin -p password /path/to/Jenkinsfile\n\n// Or use npx without install\n$ npx jflint -j http://jenkins.example.com -u admin -p password /path/to/Jenkinsfile\n\n// With config file .jflintrc\n{\n  \"jenkinsUrl\": \"http://jenkins.example.com\",\n  \"username\": \"admin\",\n  \"password\": \"p@ssword\"\n}\n$ jflint /path/to/Jenkinsfile","lang":"javascript","description":"Shows install and run commands for jflint CLI tool, including global install, npx usage, and config file example."},"warnings":[{"fix":"Upgrade Node.js to a modern version (v12+), though jflint may not be actively maintained for newer Node.","message":"Node.js >=4 required; Node.js versions 4-7 are end-of-life and insecure.","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Ensure a Jenkins server is accessible and the URL is correct.","message":"jflint does not actually lint Jenkinsfiles locally; it sends the file to a Jenkins server for validation. A running Jenkins instance is required.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use the config file to avoid exposing credentials in command line, or set environment variables.","message":"Credentials (username/password) are passed as command-line arguments, which can be visible in process lists or command history.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Specify --csrf-disabled if Jenkins CSRF protection is turned off, or configure Jekins to accept CSRF token.","message":"CSRF protection must be handled via --csrf-disabled flag if disabled; otherwise requests will fail.","severity":"breaking","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Check jenkinsUrl in config or -j option, ensure Jenkins is reachable.","cause":"Invalid Jenkins URL or network issue.","error":"Error: getaddrinfo ENOTFOUND"},{"fix":"Provide valid credentials via -u, -p, or config file.","cause":"Missing or incorrect username/password.","error":"HTTP 401 Unauthorized"},{"fix":"Use --csrf-disabled if CSRF is disabled, or generate a crumb token.","cause":"CSRF protection enabled but not handled.","error":"HTTP 403 No valid crumb was included in the request"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}