{"id":25098,"library":"coffeelint","title":"CoffeeLint","description":"CoffeeLint is a style checker for CoffeeScript that helps keep code consistent and avoid common mistakes. Version 2.1.0 (stable, released 2019) targets Node.js >=6.9.1. It provides over 20 built-in rules covering spacing, naming, and syntax pitfalls. Alternatives like coffeelint-stylish offer custom reporters, but CoffeeLint remains the standard linter for the CoffeeScript ecosystem.","status":"active","version":"2.1.0","language":"javascript","source_language":"en","source_url":"git://github.com/clutchski/coffeelint","tags":["javascript","lint","coffeescript","coffee-script"],"install":[{"cmd":"npm install coffeelint","lang":"bash","label":"npm"},{"cmd":"yarn add coffeelint","lang":"bash","label":"yarn"},{"cmd":"pnpm add coffeelint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required to parse CoffeeScript files.","package":"coffee-script","optional":false},{"reason":"Used for file globbing patterns.","package":"glob","optional":false},{"reason":"Used to respect .gitignore rules.","package":"ignore","optional":false},{"reason":"Used for pattern matching.","package":"minimatch","optional":false}],"imports":[{"note":"CoffeeLint does not ship ES modules; use CommonJS require.","wrong":"import coffeelint from 'coffeelint';","symbol":"coffeelint","correct":"const coffeelint = require('coffeelint');"},{"note":"Second argument must be a config object (may be empty). Only two positional args besides optional callback.","wrong":"coffeelint.lint(source, options);","symbol":"coffeelint.lint","correct":"coffeelint.lint(source, config, options);"},{"note":"registerRule requires ruleName as second argument.","wrong":"coffeelint.registerRule(rule);","symbol":"coffeelint.registerRule","correct":"coffeelint.registerRule(rule, ruleName);"}],"quickstart":{"code":"const coffeelint = require('coffeelint');\nconst fs = require('fs');\nconst source = fs.readFileSync('./example.coffee', 'utf8');\nconst config = {\n  max_line_length: {\n    level: 'warn',\n    value: 80\n  },\n  no_trailing_whitespace: {\n    level: 'error'\n  }\n};\nconst errors = coffeelint.lint(source, config);\nif (errors.length) {\n  errors.forEach(err => console.log(`Line ${err.lineNumber}: ${err.message} (${err.rule})`));\n} else {\n  console.log('No lint errors!');\n}","lang":"javascript","description":"Lints a CoffeeScript file using a custom config and prints errors to console."},"warnings":[{"fix":"Update Node.js to v6.9.1 or later.","message":"v2.0.0 dropped Node.js 4 support; requires Node >=6.9.1.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use 'indentation' rule with 'tabs' option.","message":"Rule 'no_tabs' is deprecated in favor of 'indentation'.","severity":"deprecated","affected_versions":">=1.10.0"},{"fix":"Ensure level strings are lowercase exactly.","message":"Config option 'level' for a rule is case-sensitive; only 'error', 'warn', or 'ignore' accepted.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Pin coffee-script version to match your project's compiler version.","message":"CoffeeLint uses its own CoffeeScript parser (coffee-script) and may produce different results than the official compiler version.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use coffeelint.lint(source, config) – note, coffeelint is required, not coffeelint.lint.","cause":"Calling lint(source, configFunction) instead of lint(source, config). require('coffeelint') is not the lint function.","error":"TypeError: config is not a function"},{"fix":"Run npm install coffee-script --save-dev","cause":"coffee-script is a peer dependency not automatically installed.","error":"Error: Cannot find module 'coffee-script'"},{"fix":"Pass a custom glob pattern or rename your file to have .coffee extension.","cause":"CoffeeLint only scans .coffee and .litcoffee files by default.","error":"Ignoring file because extension is not .coffee or .litcoffee"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}