{"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,"search_vec":"'1.0.0':26 '2014':36 'altern':54 'api':51 'callback':49 'callback-styl':48 'catch':15 'ci':23,59,70,81 'cli':42 'common':16 'compar':52 'configur':24 'error':20 'file':13 'final':29 'javascript':75 'like':55 'lint':3,6,11,77 'linter':62 'minim':66 'misconfigur':17 'nativ':73 'outdat':68 'packag':32,64 'programmat':40 'provid':72 'releas':30 'reli':45 'sinc':35 'style':50 'support':38 'syntax':19 'tool':9 'travi':2,5,22,58,69,78,80 'travis-ci':79 'travis-lint':1,4 'travis.yml':12 'unmaintain':34 'usag':43 'valid':74 'version':25 'web':61 'yamllint':56 'yml':76","created_at":"2026-05-01T13:50:20.248408+00:00","updated_at":"2026-05-01T13:50:20.248408+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"travis-lint","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/pwmckenna/node-travis-lint","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/travis-lint","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-05-01","next_check":"2026-07-30","install_tag":null}}