121 lines
3.1 KiB
JavaScript
Executable File
121 lines
3.1 KiB
JavaScript
Executable File
import js from '@eslint/js'
|
|
import vue from 'eslint-plugin-vue'
|
|
import parser from 'vue-eslint-parser'
|
|
import globals from 'globals'
|
|
|
|
export default [
|
|
js.configs.recommended,
|
|
...vue.configs['flat/recommended'],
|
|
{
|
|
files: ['**/*.vue', '**/*.js', '**/*.mjs', '**/*.cjs'],
|
|
languageOptions: {
|
|
parser: parser,
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module',
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
...globals.es2021,
|
|
// Nuxt/Vue specific globals
|
|
'$fetch': 'readonly',
|
|
'useAuthStore': 'readonly',
|
|
'useRoute': 'readonly',
|
|
'useRouter': 'readonly',
|
|
'navigateTo': 'readonly',
|
|
'useHead': 'readonly',
|
|
'useFetch': 'readonly',
|
|
'definePageMeta': 'readonly',
|
|
'defineNuxtPlugin': 'readonly',
|
|
'defineNitroPlugin': 'readonly',
|
|
'defineNuxtRouteMiddleware': 'readonly',
|
|
'defineEventHandler': 'readonly',
|
|
'readBody': 'readonly',
|
|
'getMethod': 'readonly',
|
|
'getCookie': 'readonly',
|
|
'setCookie': 'readonly',
|
|
'deleteCookie': 'readonly',
|
|
'getHeader': 'readonly',
|
|
'getRequestURL': 'readonly',
|
|
'setHeader': 'readonly',
|
|
'setResponseStatus': 'readonly',
|
|
'getRouterParam': 'readonly',
|
|
'getQuery': 'readonly',
|
|
'sendStream': 'readonly',
|
|
'sendRedirect': 'readonly',
|
|
'createError': 'readonly',
|
|
'useRuntimeConfig': 'readonly',
|
|
'hasAnyRole': 'readonly',
|
|
'hasRole': 'readonly',
|
|
'hasAllRoles': 'readonly',
|
|
'process': 'readonly',
|
|
// Vue Composition API
|
|
'onUnmounted': 'readonly',
|
|
'provide': 'readonly',
|
|
'inject': 'readonly',
|
|
'ref': 'readonly',
|
|
'reactive': 'readonly',
|
|
'computed': 'readonly',
|
|
'watch': 'readonly',
|
|
'onMounted': 'readonly',
|
|
'defineComponent': 'readonly',
|
|
'defineProps': 'readonly',
|
|
'defineEmits': 'readonly',
|
|
'defineExpose': 'readonly'
|
|
},
|
|
parserOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module'
|
|
}
|
|
},
|
|
rules: {
|
|
'vue/multi-word-component-names': 'off',
|
|
'vue/no-v-html': 'warn',
|
|
'no-unused-vars': ['warn', {
|
|
argsIgnorePattern: '^_|^event$',
|
|
varsIgnorePattern: '^_',
|
|
caughtErrorsIgnorePattern: '^_|^e$|^err$|^error$'
|
|
}],
|
|
'vue/no-unused-vars': ['warn', {
|
|
ignorePattern: '^_'
|
|
}],
|
|
'no-undef': 'warn',
|
|
'no-console': 'off'
|
|
}
|
|
},
|
|
{
|
|
ignores: [
|
|
'node_modules/**',
|
|
'.output/**',
|
|
'.nuxt/**',
|
|
'**/.output/**',
|
|
'**/.nuxt/**',
|
|
'.next/**',
|
|
'dist/**',
|
|
'build/**',
|
|
'*.config.js',
|
|
'*.config.ts',
|
|
'*.config.cjs',
|
|
'*.cjs',
|
|
'**/*.cjs',
|
|
'temp/**',
|
|
'backups/**',
|
|
'public/**',
|
|
'tests/**',
|
|
'scripts/**'
|
|
]
|
|
},
|
|
{
|
|
files: [
|
|
'pages/cms/newsletter.vue',
|
|
'pages/verein/geschichte.vue',
|
|
'pages/verein/satzung.vue',
|
|
'pages/verein/tt-regeln.vue',
|
|
'pages/verein/ueber-uns.vue'
|
|
],
|
|
rules: {
|
|
'vue/no-v-html': 'off'
|
|
}
|
|
}
|
|
]
|
|
|