| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- import vue from 'eslint-plugin-vue'
- import typescriptEslint from '@typescript-eslint/eslint-plugin'
- import globals from 'globals'
- import parser from 'vue-eslint-parser'
- import path from 'node:path'
- import { fileURLToPath } from 'node:url'
- import js from '@eslint/js'
- import { FlatCompat } from '@eslint/eslintrc'
- const __filename = fileURLToPath(import.meta.url)
- const __dirname = path.dirname(__filename)
- const compat = new FlatCompat({
- baseDirectory: __dirname,
- recommendedConfig: js.configs.recommended,
- allConfig: js.configs.all,
- })
- export default [
- {
- ignores: [
- '**/.nuxt',
- 'coverage/*',
- 'vendor/*',
- 'dist/*',
- 'models/models.ts',
- ],
- },
- ...compat.extends(
- '@nuxtjs/eslint-config-typescript',
- 'plugin:nuxt/recommended',
- 'eslint:recommended',
- 'plugin:@typescript-eslint/recommended',
- 'plugin:vue/vue3-recommended',
- 'plugin:prettier/recommended',
- 'plugin:you-dont-need-lodash-underscore/compatible',
- ),
- {
- plugins: {
- vue,
- '@typescript-eslint': typescriptEslint,
- },
- languageOptions: {
- globals: {
- ...globals.browser,
- ...globals.node,
- useRuntimeConfig: 'readonly',
- useAsyncData: 'readonly',
- navigateTo: 'readonly',
- computed: 'readonly',
- ref: 'readonly',
- definePageMeta: 'readonly',
- useRouter: 'readonly',
- useRoute: 'readonly',
- useI18n: 'readonly',
- onMounted: 'readonly',
- onUnmounted: 'readonly',
- watch: 'readonly',
- useRepo: 'readonly',
- },
- parser: parser,
- ecmaVersion: 2020,
- sourceType: 'module',
- parserOptions: {
- parser: '@typescript-eslint/parser',
- tsconfigRootDir: '/home/workspace',
- },
- },
- rules: {
- 'no-console': 0,
- 'vue/valid-v-slot': [
- 'error',
- {
- allowModifiers: true,
- },
- ],
- 'vue/multi-word-component-names': 0,
- '@typescript-eslint/no-inferrable-types': 0,
- },
- },
- ]
|