coffeescope2

coffeelint plugin that handles variables and their scope

MIT 29 个版本
安装
npm install coffeescope2
yarn add coffeescope2
pnpm add coffeescope2
bun add coffeescope2
README

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

版本列表
0.5.1 2018-05-23
0.5.0 2017-12-12
0.4.6 2017-09-12
0.4.5 2017-01-16
0.4.4 2016-12-14
0.4.3 2016-10-05
0.4.2 2016-09-14
0.4.1 2016-08-02
0.4.0 2016-07-14
0.3.10 2016-06-29
0.3.9 2016-06-29
0.3.8 2016-06-29
0.3.7 2016-06-16
0.3.6 2016-06-16
0.3.5 2016-06-14
0.3.4 2016-06-14
0.3.3 2016-06-14
0.3.2 2016-06-08
0.3.1 2016-06-08
0.3.0 2016-05-08
0.2.3 2016-04-11
0.2.2 2016-04-11
0.2.1 2016-03-07
0.2.0 2016-03-03
0.1.4 2016-02-26
0.1.3 2016-02-26
0.1.2 2016-02-25
0.1.1 2016-02-25
0.1.0 2016-02-25