-
Notifications
You must be signed in to change notification settings - Fork 91
/
.eslintrc.js
85 lines (84 loc) · 2.07 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
env: {
browser: true,
node: true
},
parser: 'vue-eslint-parser',
parserOptions: {
ecmaVersion: 2021,
ecmaFeatures: {
jsx: true
},
parser: {
'<template>': 'espree'
},
tsconfigRootDir: __dirname,
project: ['./tsconfig.json']
},
extends: [
'eslint:recommended',
'plugin:vue/vue3-essential',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier'
// './.eslintrc-auto-import.json'
],
rules: {
'prettier/prettier': 2,
'no-var': 'error',
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'vue/html-self-closing': [
'error',
{
html: {
component: 'always'
}
}
],
'vue/require-explicit-emits': [
'error',
{
allowProps: true
}
],
'vue/one-component-per-file': 'off',
'vue/require-default-prop': 'off',
'vue/require-prop-types': 'off',
'vue/custom-event-name-casing': 'off',
// temp
'vue/multi-word-component-names': 'off',
'vue/require-valid-default-prop': 'off',
'vue/no-reserved-component-names': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'no-unused-vars': 'warn',
'no-undef': 'warn'
// bad update...
// https://github.com/prettier/prettier/issues/7972#issuecomment-610255024
// 'space-before-function-paren': 0,
// '@typescript-eslint/space-before-function-paren': 0
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)'
],
env: {
mocha: true
}
}
],
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
ipcRenderer: 'readonly'
}
}