0.0.7 • Published 4 years ago

ch168vueeslint v0.0.7

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

发布在私有的仓库

http://172.30.0.51:4873/#/detail/eslint-config-168

继承自 eslint-config-standardeslint-plugin-vue 的规则,可以根据团队习惯自定义规则

module.exports = {
    "env": {
        "browser": true,
        "es6": true,
        "commonjs": true,
        "node": true
    },
    "extends": [
        'standard',
        'plugin:vue/recommended'
    ],
    "globals": {
        "Atomics": "readonly",
        "SharedArrayBuffer": "readonly"
    },
    "plugins": [
        "vue",
        "standard",
        "promise"
    ],
    "parserOptions": {
        "parser": "babel-eslint",
        "ecmaVersion": 2018,
        "sourceType": "module"
    },
    "rules": {
        "indent": ["error", 4],
        "vue/html-indent": ["error", 4],
        "vue/script-indent": ["error", 4]
    }
};

使用

1.安装

#使用公司内部私有源 http://172.30.0.51:4873
npm i -D eslint-config-168

2.在项目中创建eslint规则文件.eslintrc.js

module.exports = {
    "extends": [ "168" ]
}

PS 相关编辑器的自动保存,自动纠正功能请谷歌