editconfig

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

.eslintrc

module.exports = {
    root: true,
    parserOptions: {
        parser: 'babel-eslint'
    },
    env: {
        browser: true,
    },
    extends: [
        // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
        // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
        'plugin:vue/essential',
        // https://github.com/standard/standard/blob/master/docs/RULES-en.md
        'standard'
    ],
    // required to lint *.vue files
    plugins: [
        'vue'
    ],
    // add your custom rules here
    rules: {
        // allow async-await
        'generator-star-spacing': 'off',
        'object-curly-spacing': 'off',
        // allow debugger during development
        'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
    }
};

相关文章:

  • 2021-11-16
  • 2021-11-26
  • 2021-10-21
  • 2021-07-06
  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2021-11-23
猜你喜欢
  • 2021-11-30
  • 2021-11-23
  • 2021-07-25
  • 2022-02-14
  • 2021-08-23
  • 2022-01-22
  • 2022-01-21
相关资源
相似解决方案