-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
40 lines (40 loc) · 1.26 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
'shared-node-browser': true,
es2024: true,
// This key must be true, or when using defineProps
// without import at <script setup></script>,
// the code will be taken as a mistake
'vue/setup-compiler-macros': true,
},
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/typescript/recommended',
'plugin:prettier/recommended',
'prettier',
],
parser: 'vue-eslint-parser',
parserOptions: {
ecmaVersion: 2024,
sourceType: 'module',
parser: '@typescript-eslint/parser',
ecmaFeatures: {
jsx: true,
modules: true,
},
},
plugins: ['prettier', '@typescript-eslint', 'vue'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
semi: ['error', 'always'],
quotes: ['error', 'single', { avoidEscape: true }],
indent: ['error', 4, { SwitchCase: 1 }],
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
'vue/multi-word-component-names': 'off',
},
};