{"id":19712,"library":"eslint-plugin-coffee","title":"eslint-plugin-coffee","description":"An ESLint plugin that provides a custom parser and rules for linting CoffeeScript source files. Version 0.1.15 requires CoffeeScript >=2.5.0 and ESLint >=6.0.0. It adapts the CoffeeScript compiler's AST to be compatible with ESLint, enabling many existing ESLint rules to work with CoffeeScript, and also supplies CoffeeScript-specific rules and compatible versions of rules from popular plugins like eslint-plugin-react, eslint-plugin-import, eslint-plugin-react-native, and eslint-plugin-jsx-a11y. The project is actively maintained with recent fixes for code path analysis and shorthand-this rule.","status":"active","version":"0.1.15","language":"javascript","source_language":"en","source_url":"https://github.com/helixbass/eslint-plugin-coffee","tags":["javascript","eslint","coffeescript","eslint-plugin","eslintplugin"],"install":[{"cmd":"npm install eslint-plugin-coffee","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-coffee","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-coffee","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: requires ESLint >=6.0.0 to function as a plugin","package":"eslint","optional":false}],"imports":[{"note":"This package exposes a custom parser at 'eslint-plugin-coffee/parser' and a plugin. Configure both in ESLint config.","wrong":"Using require('eslint-plugin-coffee') as a parser without specifying plugin","symbol":"plugin","correct":"// In .eslintrc: { \"plugins\": [\"coffee\"], \"parser\": \"eslint-plugin-coffee/parser\" }"},{"note":"The parser is an ESM module; use import or configure via parser path in ESLint config (automatic).","wrong":"const parser = require('eslint-plugin-coffee/parser')","symbol":"parser","correct":"import parser from 'eslint-plugin-coffee/parser'"},{"note":"Rules are part of the plugin and should be configured under 'coffee/' prefix, not imported directly.","wrong":"Direct import of rules: import { rules } from 'eslint-plugin-coffee'","symbol":"rules","correct":"// Access rules via 'eslint-plugin-coffee' plugin, e.g., rules: { 'coffee/rule-name': 'error' }"}],"quickstart":{"code":"// Install dependencies:\n// npm install --save-dev coffeescript@^2.5.0 eslint@^6.0.0 eslint-plugin-coffee\n\n// .eslintrc.json\n{\n  \"parser\": \"eslint-plugin-coffee/parser\",\n  \"plugins\": [\"coffee\"],\n  \"rules\": {\n    \"coffee/boolean-keywords\": \"error\",\n    \"coffee/no-danger-with-children\": \"warn\",\n    \"coffee/shorthand-this\": \"error\",\n    \"semi\": \"error\",\n    \"no-unused-vars\": \"error\"\n  }\n}\n\n// Example CoffeeScript file (test.coffee):\n# This will lint with ESLint rules\nx = 5\nconsole.log x\n\n// To lint:\n// npx eslint test.coffee","lang":"javascript","description":"Configures ESLint to lint CoffeeScript files using the custom parser and the eslint-plugin-coffee plugin, with a mix of CoffeeScript-specific and standard ESLint rules."},"warnings":[{"fix":"If you relied on `id-length` being recommended, you must explicitly enable it: `'coffee/id-length': 'error'`.","message":"The `id-length` rule was changed to not be recommended (v0.1.13).","severity":"deprecated","affected_versions":">=0.1.13"},{"fix":"Check the supported rules list in the README before enabling standard rules. Use `'coffee/rule-name'` for compatible versions.","message":"Not all ESLint rules work out of the box; many require CoffeeScript-compatible custom alternatives provided by this plugin.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Ensure your project uses CoffeeScript 2.5.0+ and ESLint 6.0.0+.","message":"Requires CoffeeScript >=2.5.0 and ESLint >=6.0.0; does not work with older versions.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Refer to the README for supported CoffeeScript version and be aware that some newer CoffeeScript features might not be linted correctly.","message":"The parser may not fully support the latest CoffeeScript syntax or all ES modern features.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Update to v0.1.13 or later to get proper handling of spread props.","message":"The `no-danger-with-children` rule now handles spread props correctly since v0.1.13.","severity":"deprecated","affected_versions":"<0.1.13"},{"fix":"Update to v0.1.14 or later to avoid potential crashes with code path analysis.","message":"ESLint code path analysis monkeypatching issue was fixed in v0.1.14.","severity":"breaking","affected_versions":"<0.1.14"},{"fix":"Use CommonJS or transpile your CoffeeScript project before linting.","message":"The plugin only supports CommonJS modules for now; ESM projects may need transpilation.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Ensure `eslint-plugin-coffee` is installed as a dev dependency: `npm install --save-dev eslint-plugin-coffee`.","cause":"The parser module is not installed or cannot be resolved.","error":"Error: Cannot find module 'eslint-plugin-coffee/parser'"},{"fix":"Add `\"plugins\": [\"coffee\"]` to your ESLint config.","cause":"The plugin was not added to the `plugins` array.","error":"ESLint configuration error: \"coffee\" plugin not found"},{"fix":"Ensure you have set `\"parser\": \"eslint-plugin-coffee/parser\"` in your ESLint config and that your CoffeeScript version is >= 2.5.0.","cause":"The CoffeeScript file might have syntax that the parser does not support, or the parser is not configured correctly.","error":"Parsing error: Unexpected token"},{"fix":"Run `npm install --save-dev coffeescript@^2.5.0`.","cause":"CoffeeScript is not installed or the version is too old.","error":"Cannot find module 'coffeescript'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}