lint-fn is a Node.js library (v2.45.0) that runs ESLint with automatic fixes using predefined rules based on file path. It supports JavaScript and TypeScript files, has a peer dependency on TypeScript 4.7.4, and requires Node.js >15. Differentiators include file-path-based rule selection and environment variable support for skipping specific ESLint rules. The package ships TypeScript types, but has a known issue with linting certain TypeScript declaration files like rambda/files/index.d.ts. Development appears slow, with a TODO item referencing lack of ESLint debug config. The library is published on npm and hosted on GitHub under selfrefactor/services.
npm install lint-fnNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing lintFn and using it to lint a TypeScript file with custom rules and env variable to skip a rule.
Use import syntax or upgrade to Node.js >15 and set 'type': 'module' in package.json.
Switch to import { lintFn } from 'lint-fn'.Add ESLint debug configuration or avoid linting .d.ts files directly.
Ensure custom rules are passed in the options object; check documentation for path-based rule precedence.
Use dynamic import: import('lint-fn') or switch to ES modules.Use import lintFn from 'lint-fn' for default, or import { lintFn } for named.npm install typescript@4.7.4 --save-dev