0.1.1 • Published 4 years ago

@cj97/eslint-config-base v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

@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)
    }