Scope linter for coffeescript
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src Linting & coverage May 23, 2018
test
.gitignore
ISSUE_TEMPLATE.md
LICENSE.md
README.md
circle.yml Fix #31 Dec 12, 2017
coffeelint.json Add support for unused_exceptions May 23, 2018
package.json New release May 23, 2018

README.md

coffeescope2

Circle CI Dependencies Dev Dependencies Coverage Status

coffeelint plugin that handles variables and their scope. It can detect:

  • attempting to access an undefined variable
  • overwriting or shadowing a variable from an outer scope
  • unused variables and arguments

Table of Contents

Installation

Add coffeescope to your project's dependencies

npm install --save coffeescope2

Insert this somewhere into your coffeelint.json file (I like to keep my custom rules at the bottom):

"check_scope": {
    "module": "coffeescope2",
    "level": "warn",
    "environments": ["es5"],
    "globals": {
        "jQuery": true,
        "$": true
    },
    "overwrite": true,
    "shadow": true,
    "shadow_builtins": false,
    "shadow_exceptions": ["err", "next"],
    "undefined": true,
    "hoist_local": true,
    "hoist_parent": true,
    "unused_variables": true,
    "unused_arguments": false,
    "unused_classes": true
},

Full list of options and values

↑ Back to top

License

coffeescope2 is licensed under the MIT license.

↑ Back to top