-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
.eslintrc.js
41 lines (41 loc) · 1.32 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
module.exports = {
ignorePatterns: ['dist', 'node_modules'],
root: true,
env: {
browser: true,
es2021: true,
node: true,
'vue/setup-compiler-macros': true, // required for `<script setup>`
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2022,
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:vue/base',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended',
'prettier',
],
// add your custom rules here
rules: {
'vue/script-setup-uses-vars': 'error', // required for `<script setup>`
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/array-type': ['error', { default: 'array' }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': 'warn',
'vue/component-tags-order': ['error', { order: ['script', 'template', 'style'] }],
'vue/attribute-hyphenation': ['error', 'never', { ignore: [] }],
'vue/v-on-event-hyphenation': ['error', 'never'],
},
globals: {
defineProps: 'readonly', // required for `<script setup>`
defineEmits: 'readonly', // required for `<script setup>`
},
}