-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
71 lines (70 loc) · 1.92 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
module.exports = {
root: true,
parser: 'vue-eslint-parser',
parserOptions: {
parser: 'espree',
ecmaVersion: 2022,
sourceType: 'module',
},
env: {
browser: true,
node: true,
},
extends: ['@nuxtjs', 'plugin:prettier/recommended'],
// add your custom rules here
rules: {
'no-console': 'off',
// We have a lot of legacy code which doesn't define emits.
'vue/require-explicit-emits': 'off',
// no-v-model-argument rule is broken for Vue3, which requires that syntax for .sync.
'vue/no-v-model-argument': 'off',
'vue/multi-word-component-names': [
'error',
{
// error page for custom errors triggers this, so ignore it.
ignores: ['error'],
},
],
'vue/script-setup-uses-vars': 'error',
},
overrides: [
{
files: ['layouts/*.vue', 'pages/**/*.vue'],
rules: {
// Not sure why we have two copies of this, one above and one here, but this one makes [id] work.
'vue/multi-word-component-names': 'off',
},
},
],
globals: {
process: 'readonly',
defineAsyncComponent: 'readonly',
defineExpose: 'readonly',
defineProps: 'readonly',
definePageMeta: 'readonly',
useRuntimeConfig: 'readonly',
defineNuxtConfig: 'readonly',
defineNuxtPlugin: 'readonly',
defineNitroPlugin: 'readonly',
defineEmits: 'readonly',
defineNuxtRouteMiddleware: 'readonly',
defineEventHandler: 'readonly',
getCurrentInstance: 'readonly',
useAsyncData: 'readonly',
useLazyAsyncData: 'readonly',
createApp: 'readonly',
useNuxtApp: 'readonly',
useLoadingIndicator: 'readonly',
useHead: 'readonly',
useRouter: 'readonly',
ref: 'readonly',
computed: 'readonly',
watch: 'readonly',
onMounted: 'readonly',
onBeforeUnmount: 'readonly',
usePinia: 'readonly',
navigateTo: 'readonly',
sendRedirect: 'readonly',
setResponseStatus: 'readonly',
},
}