eslint-config-winfe
v0.0.6
Published
ESLint Config for winchannel fe team
Downloads
12
Readme
eslint-config-winfe
Winchannel JS 代码检查规范
Usage
eslint-config-winfe
JS 检查
npm install eslint eslint-config-winfe --save-dev
- 在 .eslintrc 中添加
{
"extends": ["winfe"]
}
React
npm install eslint-plugin-react --save-dev
- 在 .eslintrc 中添加
{
"extends": ["winfe", "winfe/react"]
}
Only JSX
- 在 .eslintrc 中添加
{
"extends": ["winfe", "winfe/jsx"]
}
ES6 新特性
ESLint 目前不支持部分 es6/7 的新特性: class properties, decorators, types,如果想要检查使用了这些新特性的代码,需安装 babel-eslint npm install babel-eslint --save-dev
,并在 .eslintrc 中添加
{
"parser": "babel-eslint"
}
License
MIT