{"id":25070,"library":"cilint","title":"CILint","description":"CILint is a team-oriented code linting tool for Git that focuses on checking only newly added lines during commits. Current stable version is 0.0.21. It integrates with ESLint for JavaScript syntax checking and Git hooks for team enforcement. Released sparsely, last update was in 2017. Unlike other linters that scan entire files, CILint only checks lines staged for commit, reducing noise and encouraging iterative improvements. It also supports automated initialization of configuration files and pre-commit hooks.","status":"maintenance","version":"0.0.21","language":"javascript","source_language":"en","source_url":"https://github.com/feix760/cilint","tags":["javascript","eslint","git","hook","code review"],"install":[{"cmd":"npm install cilint","lang":"bash","label":"npm"},{"cmd":"yarn add cilint","lang":"bash","label":"yarn"},{"cmd":"pnpm add cilint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used as the core linting engine for JavaScript code.","package":"eslint","optional":false}],"imports":[{"note":"Require works as well since package is CommonJS.","wrong":"const cilint = require('cilint'); cilint.initializer()","symbol":"initializer","correct":"import { initializer } from 'cilint'"},{"note":"Package exports a default object with methods.","wrong":"const cilint = require('cilint').default","symbol":"cilint (default)","correct":"import cilint from 'cilint'"},{"note":"Use npx if installed locally or globally; avoid path issues.","wrong":"npx cilint --init # may not resolve correctly","symbol":"cli command","correct":"cilint --init  # or ./node_modules/.bin/cilint"}],"quickstart":{"code":"// Install locally\nnpm install cilint --save-dev\n\n// Initialize configuration and pre-commit hook\nimport { initializer } from 'cilint';\ninitializer({\n    override: true,\n    cilintrcUrl: 'https://raw.githubusercontent.com/feix760/cilint/master/conf/cilintrc.js',\n    eslintrcUrl: 'https://raw.githubusercontent.com/feix760/cilint/master/conf/eslintrc.js',\n});\n\n// Or via CLI:\n// ./node_modules/.bin/cilint --init","lang":"typescript","description":"Installs cilint, runs initializer to set up config files and pre-commit hook, then demonstrates code usage."},"warnings":[{"fix":"Ensure ESLint and plugins are installed at the same level (e.g., both local or both global).","message":"Version 0.0.14 changed how ESLint is resolved; CILint now searches for a local or global ESLint before falling back to its bundled version. Previously it always used the bundled ESLint.","severity":"breaking","affected_versions":">=0.0.14"},{"fix":"Use const cilint = require('cilint'); then cilint.initializer() or cilint.run().","message":"Requiring 'cilint' with require('cilint') returns an object; using require('cilint').default may be undefined. The main export is not a function but an object containing initializer and run.","severity":"deprecated","affected_versions":">=0.0.1"},{"fix":"Use 'git add' to stage files before committing, or run CILint manually on a file with `cilint file.js`.","message":"CILint only lints staged changes (currently in Git index), not the working tree. If files are not staged, no linting occurs.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Install ESLint and plugins either all globally with `npm install -g eslint eslint-plugin-import` or all locally in your project.","message":"ESLint plugins must be at the same level as ESLint (both local or both global). Using global ESLint with local plugins will fail.","severity":"breaking","affected_versions":">=0.0.14"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install ESLint locally: `npm install eslint --save-dev` or globally: `npm install -g eslint`","cause":"ESLint is not installed in the same location as the package that requires it.","error":"Error: Cannot find module 'eslint'"},{"fix":"Install locally with `npm install cilint --save-dev` and use npx: `npx cilint --init` or run from node_modules: `./node_modules/.bin/cilint`","cause":"cilint is not installed or not in PATH.","error":"cilint: command not found"},{"fix":"Run `cilint --init` or call `initializer()` programmatically.","cause":"Initialization has not been run.","error":"Error: .cilintrc.js does not exist"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}