eslint-plugin-gm

1.2.2 • Public • Published

小农女eslint配置

配置中使用了eslint推荐配置

也使用了eslint-plugin-react

使用方法

npm install -g eslint eslint-plugin-react eslint-plugin-gm

项目中新建.eslintrc.js

module.exports = {
    "plugins": [
        "gm"
    ],
    "extends": ["plugin:gm/recommended"]
};

配置方法

rule配置http://eslint.org/docs/user-guide/configuring

"规则名": 0|1|2

  • "off" or 0 - turn the rule off
  • "warn" or 1 - turn the rule on as a warning (doesn’t affect exit code)
  • "error" or 2 - turn the rule on as an error (exit code is 1 when triggered)

忽略单行检查 // eslint-disable-line

忽略多行检查

/*eslint-disable */
     mutil line code
/*eslint-enable */

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-plugin-gm

Weekly Downloads

1

Version

1.2.2

License

ISC

Last publish

Collaborators

  • gmfe