-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
53 lines (53 loc) · 1.39 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
env: {
browser: true,
node: true,
es2021: true
},
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended',
'prettier',
'plugin:@typescript-eslint/recommended'
],
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
// sourceType: 'module',
},
plugins: ['vue', 'prettier', '@typescript-eslint'],
ignorePatterns: ['server.js'],
rules: {
// Prettier
'prettier/prettier': ['error'],
// Classic
'no-unused-vars': 'off',
'comma-dangle': ['error', 'never'],
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'max-len': 'off',
'no-underscore-dangle': [2, { allow: ['_id'] }],
'no-plusplus': 'off',
'class-methods-use-this': 'off',
'no-empty': ['error', { allowEmptyCatch: true }],
'lines-between-class-members': 'off',
'no-unused-expressions': ['error', { allowShortCircuit: true }],
'import/prefer-default-export': 'off',
// Vue
'vue/no-v-html': 'off',
'vue/comma-dangle': ['error', 'never'],
'vue/multi-word-component-names': 'off',
'vue/script-indent': ['error', 'tab', { baseIndent: 0 }],
// TS
'@typescript-eslint/no-unused-vars': 'error'
},
settings: {
'import/resolver': {
node: {
extensions: ['.vue', '.ts', '.tsx'],
moduleDirectory: ['node_modules/', 'src/']
}
}
}
};