eslint-plugin-coffeescript

Transpiles coffee files (.coffee, .cjsx) and runs through eslint. Reports errors with original line numbers.

Usage no npm install needed!

<script type="module">
  import eslintPluginCoffeescript from 'https://cdn.skypack.dev/eslint-plugin-coffeescript';
</script>

README

eslint-plugin-coffeescript

Transpiles .coffee and .cjsx files before with coffeescript, then runs eslint checks on them. The plugin ignores some rules that are impossible to satisfy from coffeescript (see this file)

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-coffeescript:

$ npm install eslint-plugin-coffeescript --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-coffeescript globally.

Usage

Add coffeescript to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "coffeescript", // ...
    ]
}

To have imports resolve properly with the eslint-plugins-imports module, you must set this plugin to wrap your default parser:

{
  "parser": "eslint-plugin-coffeescript",
  "parserOptions": { 
    "parser": "babel-eslint", // original parser goes here (you must specify one to use this option).
    "sourceType": "module", // any original parser config options you had.
    "ecmaVersion": 6
  }
}

Contributors

Big thanks for awesome contributors: