Installation
Requirements
- Node.js ≥ 20
- A React project with
.tsxor.jsxfiles
Global install (recommended for local use)
npm install -g @cognitivelint/cli
Then run anywhere:
cognitivelint scan
npx (no install)
npx @cognitivelint/cli scan
Project-local install (recommended for CI)
npm install --save-dev @cognitivelint/cli
Add to package.json:
{
"scripts": {
"lint:ux": "cognitivelint scan --min-score 80"
}
}
Then run:
npm run lint:ux
Verify installation
cognitivelint --version
What gets analyzed
CognitiveLint scans all .tsx and .jsx files matched by the include glob (default: src/**/*.tsx, src/**/*.jsx). It excludes test files, stories, and node_modules by default.
No runtime. No instrumentation. Pure static analysis on your source code AST.