{"id":26507,"library":"travis-lint","title":"travis-lint","description":"Travis-lint is a tool for linting .travis.yml files to catch common misconfigurations and syntax errors in Travis CI configuration. Version 1.0.0 is the final release; the package is unmaintained since 2014. It supports both programmatic and CLI usage, but relies on a callback-style API. Compared to alternatives like yamllint or Travis CI's web linter, this package is minimal and outdated; Travis CI now provides native validation.","status":"abandoned","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/pwmckenna/node-travis-lint","tags":["javascript","yml","lint","travis","travis-ci"],"install":[{"cmd":"npm install travis-lint","lang":"bash","label":"npm"},{"cmd":"yarn add travis-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add travis-lint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"parses YAML content","package":"js-yaml","optional":false}],"imports":[{"note":"Package does not support ES modules; only CommonJS require works.","wrong":"import lint from 'travis-lint';","symbol":"lint","correct":"const lint = require('travis-lint');"}],"quickstart":{"code":"const fs = require('fs');\nconst lint = require('travis-lint');\nconst yaml = fs.readFileSync('.travis.yml', 'utf8');\nlint(yaml, function(err, warnings) {\n  if (err) throw err;\n  if (warnings.length === 0) {\n    console.log('No issues found.');\n  } else {\n    warnings.forEach(function(w) { console.log(w); });\n  }\n});","lang":"javascript","description":"Read .travis.yml file synchronously and lint it, printing any warnings."},"warnings":[{"fix":"Use Travis CI's native linting (travis lint command) or yamllint with a Travis schema.","message":"Package is unmaintained and may produce false positives/negatives for current Travis CI configuration.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Always provide encoding: fs.readFileSync('.travis.yml', 'utf8')","message":"The lint function expects a string, not a Buffer. Passing fs.readFileSync without encoding may cause errors.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Wrap in a Promise if needed: new Promise((resolve, reject) => lint(yaml, (err, w) => err ? reject(err) : resolve(w)))","message":"Callback pattern is used; no promise or async/await support.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure input is a string: const yaml = fs.readFileSync('.travis.yml', 'utf8');","cause":"lint() called with a non-string/non-Buffer value (e.g., undefined or stream).","error":"TypeError: First argument must be a string or Buffer"},{"fix":"Add: const lint = require('travis-lint');","cause":"Forgot to require the module or misspelled the import.","error":"ReferenceError: lint is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}