ESLint plugin providing two custom CloudFlare-specific linting rules: `no-substr` (prevents use of `String.prototype.substr`, considered legacy) and `no-this-assignment` (prevents assigning `this` to a variable). Current stable version is 1.0.0, initially released with no further updates. It requires ESLint as a peer dependency. Differentiators: lightweight and focused exclusively on patterns flagged internally by CloudFlare; minimal setup and no extra dependencies. Release cadence: single release, no maintenance indicated.
npm install eslint-plugin-cflintVerified import paths — ran on the pinned version, not inferred.
Configuration to enable both CloudFlare rules and examples of code that triggers them.
Review the rules list; supplement with other ESLint plugins if needed.
Consider using built-in ESLint rules like 'no-restricted-properties' for substr.
Add 'cflint/no-substr' and 'cflint/no-this-assignment' manually to rules.
Run `npm install eslint-plugin-cflint --save-dev` and ensure node_modules contains the package.
Use 'error', 'warn', 'off' (or 2, 1, 0) as rule values.