{"id":25097,"library":"coffeelint-cjsx","title":"CoffeeLint CJSX","description":"A fork of CoffeeLint that adds support for React's CJSX syntax. Version 2.0.2 is the latest stable release; it uses coffee-react-transform 2.x, compatible with React 0.12. The package has irregular releases tied to React version changes. Key differentiators: enables CoffeeScript linting with JSX-like syntax, useful for legacy React projects using CoffeeScript. Current maintainer: Evan Morikawa. Note: This is a fork of the original coffeelint, aiming to merge back when possible.","status":"maintenance","version":"2.0.2","language":"javascript","source_language":"en","source_url":"git://github.com/emorikawa/coffeelint-cjsx","tags":["javascript","lint","coffeescript","coffee-script"],"install":[{"cmd":"npm install coffeelint-cjsx","lang":"bash","label":"npm"},{"cmd":"yarn add coffeelint-cjsx","lang":"bash","label":"yarn"},{"cmd":"pnpm add coffeelint-cjsx","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime dependency for CoffeeScript parsing","package":"coffee-script","optional":false},{"reason":"Transforms CJSX to CoffeeScript for linting","package":"coffee-react-transform","optional":false},{"reason":"Used for file matching in CLI","package":"glob","optional":false}],"imports":[{"note":"Package uses CommonJS, but import works in bundlers. Use require for Node.","wrong":"const CoffeeLint = require('coffeelint-cjsx')","symbol":"CoffeeLint","correct":"import CoffeeLint from 'coffeelint-cjsx'"},{"note":"Named export available for programmatic linting.","symbol":"lint","correct":"import { lint } from 'coffeelint-cjsx'"},{"note":"CommonJS require is the native import style for this package.","wrong":"import CoffeeLint from 'coffeelint-cjsx'","symbol":"CoffeeLint","correct":"const CoffeeLint = require('coffeelint-cjsx')"}],"quickstart":{"code":"const CoffeeLint = require('coffeelint-cjsx');\nconst source = '<div>Hello</div>';\nconst config = { no_plusplus: { level: 'error' } };\ntry {\n  const errors = CoffeeLint.lint(source, config);\n  errors.forEach(e => console.log(`${e.line}: ${e.message}`));\n} catch (err) {\n  console.error('Lint error:', err.message);\n}","lang":"javascript","description":"Shows how to require coffeelint-cjsx, lint a CJSX string with custom config, and output errors."},"warnings":[{"fix":"Update React to >=0.12 or stay on coffeelint-cjsx@1.x.","message":"v2.0.0 uses coffee-react-transform 2.x, which drops support for React <0.12. Upgrade your React version or use v1.x.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Consider migrating from CoffeeScript to JavaScript or TypeScript.","message":"CoffeeScript itself is deprecated in favor of modern JavaScript/TypeScript. This package is no longer actively developed.","severity":"deprecated","affected_versions":"all"},{"fix":"Create a 'coffeelint.json' file with desired rule configurations.","message":"The package expects a 'coffeelint.json' config file in the project root; otherwise uses defaults. Missing config may cause unexpected linting errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Install as devDependency: npm install --save-dev coffeelint-cjsx","message":"Global installation may conflict with other CoffeeLint variants (e.g., original coffeelint). Use local devDependencies.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: npm install coffee-react-transform","cause":"Missing peer dependency coffee-react-transform.","error":"Error: Cannot find module 'coffee-react-transform'"},{"fix":"Use const CoffeeLint = require('coffeelint-cjsx');","cause":"Incorrect import or require statement (e.g., using `import` in Node without transpilation).","error":"ReferenceError: CoffeeLint is not defined"},{"fix":"Ensure coffee-react-transform >= 2.0.0 is installed.","cause":"CJSX syntax not recognized by CoffeeScript parser; npm install coffee-react-transform might be missing or outdated.","error":"Syntax error: unexpected <"},{"fix":"Run via npx: npx coffeelint-cjsx or install locally: npm install --save-dev coffeelint-cjsx","cause":"CLI tool not installed globally or in PATH.","error":"coffeelint: command not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}