Registry / testing / cilint

cilint

JSON →
library0.0.21jsnpmunverified

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.

npm install cilint
INSTALL
IMPORT
SIG · CILINT
C
cilint
testingjavascriptv0.0.21
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

initializer
✓ import { initializer } from 'cilint'
✗ const cilint = require('cilint'); cilint.initializer()
Require works as well since package is CommonJS.
cilint (default)
✓ import cilint from 'cilint'
✗ const cilint = require('cilint').default
Package exports a default object with methods.
cli command
✓ cilint --init # or ./node_modules/.bin/cilint
✗ npx cilint --init # may not resolve correctly
Use npx if installed locally or globally; avoid path issues.

Installs cilint, runs initializer to set up config files and pre-commit hook, then demonstrates code usage.

// Install locally npm install cilint --save-dev // Initialize configuration and pre-commit hook import { initializer } from 'cilint'; initializer({ override: true, cilintrcUrl: 'https://raw.githubusercontent.com/feix760/cilint/master/conf/cilintrc.js', eslintrcUrl: 'https://raw.githubusercontent.com/feix760/cilint/master/conf/eslintrc.js', }); // Or via CLI: // ./node_modules/.bin/cilint --init
cilint --version
Debug
Known issues
breakingVersion 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.
fix
Ensure ESLint and plugins are installed at the same level (e.g., both local or both global).
affects: >=0.0.14
deprecatedRequiring '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.
fix
Use const cilint = require('cilint'); then cilint.initializer() or cilint.run().
affects: >=0.0.1
gotchaCILint only lints staged changes (currently in Git index), not the working tree. If files are not staged, no linting occurs.
fix
Use 'git add' to stage files before committing, or run CILint manually on a file with `cilint file.js`.
affects: >=0.0.1
breakingESLint plugins must be at the same level as ESLint (both local or both global). Using global ESLint with local plugins will fail.
fix
Install ESLint and plugins either all globally with `npm install -g eslint eslint-plugin-import` or all locally in your project.
affects: >=0.0.14
Errors
Common errors & fixes
Error: Cannot find module 'eslint'
ESLint is not installed in the same location as the package that requires it.
fix
Install ESLint locally: `npm install eslint --save-dev` or globally: `npm install -g eslint`
cilint: command not found
cilint is not installed or not in PATH.
fix
Install locally with `npm install cilint --save-dev` and use npx: `npx cilint --init` or run from node_modules: `./node_modules/.bin/cilint`
Error: .cilintrc.js does not exist
Initialization has not been run.
fix
Run `cilint --init` or call `initializer()` programmatically.
Upgrade
Version history
0.0.21latest on npm
Audit
Dependencies
eslintrequiredUsed as the core linting engine for JavaScript code.
Agent activity
18 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources
cilint — npm install cilint · libregistry