|
| 1 | +/* eslint-disable no-undef */ |
| 2 | +module.exports = { |
| 3 | + env: { |
| 4 | + browser: true, |
| 5 | + es2021: true, |
| 6 | + }, |
| 7 | + extends: [ |
| 8 | + 'eslint:recommended', |
| 9 | + 'plugin:@typescript-eslint/recommended', |
| 10 | + 'plugin:vue/vue3-recommended', |
| 11 | + ], |
| 12 | + parserOptions: { |
| 13 | + ecmaVersion: 12, |
| 14 | + parser: '@typescript-eslint/parser', |
| 15 | + sourceType: 'module', |
| 16 | + }, |
| 17 | + plugins: ['vue', '@typescript-eslint'], |
| 18 | + ignorePatterns: ['docs', 'temp', '**/shims-vue.d.ts'], |
| 19 | + rules: { |
| 20 | + '@typescript-eslint/ban-types': 'off', |
| 21 | + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', |
| 22 | + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', |
| 23 | + }, |
| 24 | + overrides: [ |
| 25 | + { |
| 26 | + files: ['**/__tests__/**', 'test-dts/**'], |
| 27 | + rules: { |
| 28 | + 'no-restricted-globals': 'off', |
| 29 | + 'no-restricted-syntax': 'off', |
| 30 | + }, |
| 31 | + }, |
| 32 | + { |
| 33 | + files: ['packages/*/src/**/*.ts'], |
| 34 | + rules: { |
| 35 | + quotes: ['error', 'single'], |
| 36 | + 'vue/require-default-prop': 'off', |
| 37 | + '@typescript-eslint/ban-ts-comment': 'off', |
| 38 | + }, |
| 39 | + }, |
| 40 | + { |
| 41 | + files: ['scripts/**/*.ts', '*.ts', '*.js'], |
| 42 | + rules: { |
| 43 | + '@typescript-eslint/no-var-requires': 'off', |
| 44 | + '@typescript-eslint/no-empty-function': 'off', |
| 45 | + '@typescript-eslint/no-extra-semi': 'off', |
| 46 | + }, |
| 47 | + env: { |
| 48 | + node: true, |
| 49 | + commonjs: true, |
| 50 | + }, |
| 51 | + }, |
| 52 | + ], |
| 53 | +} |
0 commit comments