-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
117 lines (108 loc) · 2.78 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
109
110
111
112
113
114
115
116
117
/*
* @file: \.eslintrc.js
* @desc: https://vueschool.io/articles/vuejs-tutorials/eslint-and-prettier-with-vite-and-vue-js-3/
* -------------------------------------------
* Created Date: 11th November 2023
* Modified: 01 August 2024 - 08:21:44
*/
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
// If you have multiple rulesets in your extend section,
// each following ruleset will extend or overwrite the previous ones.
// So you will only have one setting for each rule
extends: [
'eslint:recommended',
// "plugin:vue/vue3-essential" ... base, plus rules to prevent errors or unintended behavior.
// "plugin:vue/vue3-strongly-recommended" ... Above, plus rules to considerably improve code readability and/or dev experience.
// "plugin:vue/vue3-recommended" ... Above, plus rules to enforce subjective community defaults to ensure consistency.
'plugin:vue/vue3-strongly-recommended',
'@nuxt/eslint-config',
'prettier',
],
globals: {
markRaw: true,
useNuxtApp: true,
useRoute: true,
useRouter: true,
useCookie: true,
navigateTo: true,
mapStores: true,
defineStore: true,
acceptHMRUpdate: true,
defineNuxtConfig: true,
defineNuxtPlugin: true,
defineNuxtRouteMiddleware: true,
useDataStore: true,
useUserStore: true,
useGameStore: true,
useStateStore: true,
useJournalStore: true,
useRepositoryStore: true,
log: true,
delay: true,
dates: true,
},
ignorePatterns: [
'node_modules',
'build',
'dist',
'public',
'dist',
'node_modules',
'schema',
'**/*.tmpl.*',
'sw.js',
],
rules: {
'vue/first-attribute-linebreak': 'off',
'vue/no-multiple-template-root': 'off',
'vue/no-v-html': 'off',
'vue/order-in-components': [
'error',
{
order: [
'el',
'name',
'key',
'parent',
'functional',
['delimiters', 'comments'],
['components', 'directives', 'filters'],
'extends',
'mixins',
['provide', 'inject'],
'ROUTER_GUARDS',
'layout',
'middleware',
'validate',
'scrollToTop',
'transition',
'loading',
'inheritAttrs',
'model',
['props', 'propsData'],
'emits',
'setup',
'asyncData',
'data',
'fetch',
'head',
'computed',
'watch',
'watchQuery',
'methods',
'LIFECYCLE_HOOKS',
['template', 'render'],
'renderError',
],
},
],
// override/add rules settings here, such as:
// 'vue/no-unused-vars': 'error'
// "vue/require-default-prop": "off",
},
}