123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- module.exports = {
- root: true,
- globals: {
- defineEmits: 'readonly',
- defineProps: 'readonly',
- ElMessage: 'readonly',
- ElMessageBox: 'readonly'
- },
- extends: ['plugin:@typescript-eslint/recommended', 'plugin:vue/vue3-recommended', 'airbnb-base'],
- parserOptions: {
- parser: '@typescript-eslint/parser',
- ecmaVersion: 2020
- },
- rules: {
- 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
- 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
- 'no-bitwise': 'off',
- 'no-tabs': 'off',
- 'array-element-newline': ['error', 'consistent'],
- indent: ['error', 2, { MemberExpression: 0, SwitchCase: 1, ignoredNodes: ['TemplateLiteral'] }],
- quotes: ['error', 'single'],
- 'comma-dangle': ['error', 'always-multiline'],
- 'object-curly-spacing': ['error', 'always'],
- 'max-len': ['error', 120],
- 'no-new': 'off',
- 'linebreak-style': 'off',
- 'import/extensions': 'off',
- 'eol-last': 'off',
- 'no-shadow': 'off',
- 'no-unused-vars': 'warn',
- 'import/no-cycle': 'off',
- 'arrow-parens': 'off',
- semi: ['error', 'never'],
- eqeqeq: 'on',
- 'no-param-reassign': 'off',
- 'import/prefer-default-export': 'off',
- 'no-use-before-define': 'on',
- 'no-continue': 'off',
- 'prefer-destructuring': 'off',
- 'no-plusplus': 'off',
- 'prefer-const': 'warn',
- 'global-require': 'off',
- 'no-prototype-builtins': 'off',
- 'consistent-return': 'off',
- 'one-var-declaration-per-line': 'off',
- 'one-var': 'off',
- 'import/named': 'off',
- 'object-curly-newline': 'off',
- 'default-case': 'off',
- 'no-trailing-spaces': 'on',
- 'func-names': 'off',
- radix: 'off',
- 'no-unused-expressions': 'off',
- 'no-underscore-dangle': 'off',
- 'no-nested-ternary': 'off',
- 'no-restricted-syntax': 'off',
- 'no-await-in-loop': 'off',
- 'import/no-extraneous-dependencies': 'off',
- 'import/no-unresolved': 'off',
- 'template-curly-spacing': ['error', 'always'],
- '@typescript-eslint/no-var-requires': 'on',
- '@typescript-eslint/no-empty-function': 'off',
- '@typescript-eslint/no-explicit-any': 'off',
- 'guard-for-in': 'off',
- 'class-methods-use-this': 'off',
- 'vue/html-indent': ['error', 2],
- 'vue/html-self-closing': 'off',
- 'vue/max-attributes-per-line': [
-
- 'warn',
- {
- singleline: {
- max: 5,
- allowFirstLine: true
- },
- multiline: {
- max: 1,
- allowFirstLine: false
- }
- }
- ],
- 'vue/singleline-html-element-content-newline': 'off'
- }
- }
|