.eslintrc.js 940 Bytes
/*
 * @Description:
 * @LastEditors: Please set LastEditors
 * @Date: 2021-02-02 21:32:37
 */
module.exports = {
  root: true,
  env: {
    node: true,
    browser: true
  },
  extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/prettier'],
  plugins: ['prettier'],
  parserOptions: {
    parser: 'babel-eslint'
  },
  rules: {
    'prettier/prettier': [
      'error',
      {
        jsxBracketSameLine: false,
        semi: true,
        trailingComma: 'all',
        singleQuote: true,
        printWidth: 80,
        tabWidth: 2,
        endOfLine: 'auto',
        trailingComma: 'none',
        arrowParens: 'avoid',
        htmlWhitespaceSensitivity: 'ignore'
      }
    ],

    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    quotes: [1, 'single'],
    semi: [0],
    'space-before-function-paren': [0, 'always']
  }
};