Update package-lock.json and package.json to include 'globals' dependency and improve code formatting in various components for better readability.
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 54s
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 54s
This commit is contained in:
95
eslint.config.js
Normal file
95
eslint.config.js
Normal file
@@ -0,0 +1,95 @@
|
||||
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'],
|
||||
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',
|
||||
'defineNuxtRouteMiddleware': 'readonly',
|
||||
'defineEventHandler': 'readonly',
|
||||
'readBody': 'readonly',
|
||||
'getCookie': 'readonly',
|
||||
'setCookie': 'readonly',
|
||||
'deleteCookie': 'readonly',
|
||||
'getHeader': 'readonly',
|
||||
'getRouterParam': 'readonly',
|
||||
'getQuery': 'readonly',
|
||||
'sendStream': 'readonly',
|
||||
'sendRedirect': 'readonly',
|
||||
'createError': 'readonly',
|
||||
'useRuntimeConfig': '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: '^_',
|
||||
varsIgnorePattern: '^_'
|
||||
}],
|
||||
'vue/no-unused-vars': ['warn', {
|
||||
ignorePattern: '^_'
|
||||
}],
|
||||
'no-undef': 'warn',
|
||||
'no-console': 'off'
|
||||
}
|
||||
},
|
||||
{
|
||||
ignores: [
|
||||
'node_modules/**',
|
||||
'.output/**',
|
||||
'.nuxt/**',
|
||||
'.next/**',
|
||||
'dist/**',
|
||||
'build/**',
|
||||
'*.config.js',
|
||||
'*.config.ts',
|
||||
'*.config.cjs',
|
||||
'*.cjs',
|
||||
'temp/**',
|
||||
'backups/**',
|
||||
'public/**',
|
||||
'tests/**',
|
||||
'scripts/**'
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user