eslint配置

新建 .eslintrc.js

module.exports = {
    env: {
        browser: true,
        es6: true,
        node: true
    },
    extends: ['plugin:vue/recommended', 'eslint:recommended'],
    globals: {
        wx: 'readonly',
        Atomics: 'readonly',
        WeixinJSBridge: 'readonly',
        SharedArrayBuffer: 'readonly'
    },
    parserOptions: {
        parser: 'babel-eslint',
        ecmaVersion: 2018,
        sourceType: 'module'
    },
    plugins: ['vue'],
    rules: {  //eslint配置
        "vue/max-attributes-per-line": ["error", {
            "singleline": 10, //每行最多10个属性
            "multiline": {
                "max": 5, //多行每行最多5个属性
                "allowFirstLine": false //第一行没有属性
            }
        }]
    }
};

你可能感兴趣的:(vue,uniapp)