Gitlab-ci-lint is a CLI tool and Node.js library to validate .gitlab-ci.yml files against a GitLab instance's CI lint API. The current stable version is 1.1.0, with a low release cadence. It supports custom GitLab URLs and personal access tokens, making it suitable for self-hosted GitLab. No official alternatives exist.
npm install gitlab-ci-lintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to lint a .gitlab-ci.yml file using async/await with environment variables for URL and token.
Ensure GitLab instance is reachable and token has 'api' scope.
Use default import or named import with ES modules; require('gitlab-ci-lint') works for CommonJS.Use import instead of require, or set 'type': 'module' in package.json.
Run 'npm install -g gitlab-ci-lint' or install locally with 'npm install --save-dev gitlab-ci-lint'.
Use 'import { lintFile } from 'gitlab-ci-lint'' or 'const { lintFile } = require('gitlab-ci-lint')' in CommonJS.Provide a valid token via --token flag or GITLAB_TOKEN environment variable.
No dependency data recorded yet.