An open-source implementation of Google's internal IFTTT (IfThisThenThat) linter tool for enforcing atomic pull requests. It analyzes diffs and source files to ensure that when certain files or code regions change, specified dependent files or regions also change. Current stable version is v0.11.1, released periodically. Key differentiators include high-concurrency parallel linting using Node.js worker threads, support for labeled regions, and both CLI and programmatic APIs. It is typed with TypeScript, supports Node.js >=18.18, and integrates with GitHub Actions.
npm install ifttt-lintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates programmatic usage: reading a git diff, linting with ignore patterns, and checking errors.
Upgrade Node.js to v18.18 or later.
Use direct file argument instead of --scan.
Upgrade to v0.11.0 or later which handles binary diffs gracefully.
Use `import` syntax; switch to dynamic import if required from CJS modules.
Ensure every `LINT.Label('name')` has a matching `LINT.EndLabel`.Use single quotes: `-i '**/*.bak'`.
Add `"type": "module"` to your package.json or use dynamic import.
Ignore binary files via `-i '*.png'` or upgrade to v0.11.0+.
Check that each `LINT.EndLabel` is preceded by a `LINT.Label` with the same name.
Use `import { IfThenElse } from 'ifttt-lint'`.