coffeescope2中文文档|coffeescope2 js中文教程|解析
安装命令:npm i coffeescope2
coffeescope2
处理变量及其作用域的coffeelint插件。它可以检测:
- 试图访问未定义的变量
- 从外部作用域覆盖或隐藏变量
- 未使用的变量和参数
目录
安装
将 coffeescope 添加到项目的依赖项中
npm install --save coffeescope2
将此插入到您的coffeelint.json
文件中(我喜欢将自定义规则保留在底部):
"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
},
执照
项目issue数量: 1
项目贡献人员列表: