-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
108 lines (106 loc) · 2.4 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path')
module.exports = {
env: {
'node': true,
'vue/setup-compiler-macros': true,
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
ecmaVersion: 2020,
ecmaFeatures: {
jsx: true,
},
},
plugins: ['@typescript-eslint'],
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:vue/vue3-recommended',
'plugin:prettier/recommended',
],
settings: {
'import/resolver': {
typescript: {
project: path.resolve(__dirname, './tsconfig.json'),
},
},
},
globals: {
JSX: true,
},
rules: {
'prettier/prettier': 2,
// report debug messages on production
'no-console': process.env.NODE_ENV === 'production' ? 2 : 0,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
// vue-eslint rules modification
'vue/block-tag-newline': 1,
'vue/script-indent': [
'error',
2,
{
switchCase: 1,
},
],
'vue/singleline-html-element-content-newline': 0,
'vue/no-v-html': 0,
'vue/no-v-text': 1,
'vue/multiline-html-element-content-newline': 0,
'vue/multi-word-component-names': 0,
'vue/require-default-prop': 0,
// import-plugin rules modification
'import/no-extraneous-dependencies': 0,
'import/extensions': [
2,
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'import/order': [
1,
{
pathGroups: [
{
pattern: '@/**',
group: 'external',
position: 'after',
},
],
groups: [
'builtin',
'external',
'internal',
'unknown',
'parent',
'sibling',
'index',
'object',
'type',
],
},
],
// other rules modification
'no-param-reassign': 0,
'@typescript-eslint/no-explicit-any': 0,
'prefer-regex-literals': 0,
'no-plusplus': 0,
'class-methods-use-this': 0,
'vue/max-attributes-per-line': 0,
'no-use-before-define': 0,
'@typescript-eslint/no-use-before-define': [
1,
{
typedefs: false,
},
],
},
}