@gaoding/eslint-config-base
v2.0.2
Published
Gaoding's JS ESLint config
Downloads
17
Readme
@gaoding/eslint-config-base
Gaoding's JS base ESLint config
Install
npm install --save-dev @gaoding/eslint-config-base
Usage
Add "extends": ["@gaoding/eslint-config-base"] to your .eslintrc
example
{
"extends": ["@gaoding/eslint-config-base"]
}
代码规范
继承于 eslint-config-standard Standard 代码规范
重写规则
关键字后面加空格。
eslint: keyword-spacing 目前
if
for
white
catch
function
关键字后面不加空格
if(condition) { ... } // ✓ ok
if (condition) { ... } // ✗ avoid
使用4个空格缩进
eslint:
indent
function hello(name) { console.log('hi', name) }