1.1.0 • Published 6 years ago
eslint-plugin-portal-childapp-bound v1.1.0
eslint-plugin-portal-childapp-bound
portal-childapp-bound 是一个ESLint插件,对代码中如下写法作出警告:
- 添加全局变量/方法
- 使用cookie
安装
如果你想让 ESLint 成为你项目构建系统的一部分,建议在本地安装:
$ npm i eslint --save-dev
紧接着你应该设置一个配置文件:
$ ./node_modules/.bin/eslint --init
之后你就可以安装 eslint-plugin-portal-childapp-bound
:
$ npm install eslint-plugin-portal-childapp-bound --save-dev
使用
添加 portal-childapp-bound
到 .eslintrc
配置文件中:
{
"plugins": [
"portal-childapp-bound"
]
}
配置相应规则:
{
"rules": {
"portal-childapp-bound/no-global-declaration": 2,
"portal-childapp-bound/no-write-cookie": 2
}
}