| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- import globals from 'globals'
- import withNuxt from './.nuxt/eslint.config.mjs'
- // Polyfill for structuredClone if it doesn't exist
- if (typeof structuredClone !== 'function') {
- globalThis.structuredClone = function (obj) {
- return JSON.parse(JSON.stringify(obj))
- }
- }
- // Configuration de base personnalisée
- const customConfig = [
- {
- ignores: [
- '**/.nuxt',
- 'coverage/*',
- 'vendor/*',
- 'dist/*',
- 'models/models.ts',
- ],
- },
- {
- 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',
- },
- },
- rules: {
- 'no-console': 0,
- 'vue/valid-v-slot': [
- 'error',
- {
- allowModifiers: true,
- },
- ],
- 'vue/multi-word-component-names': 0,
- '@typescript-eslint/no-inferrable-types': 0,
- '@typescript-eslint/no-extraneous-class': 0,
- 'vue/html-self-closing': 0,
- },
- },
- // Directory-specific configurations
- {
- files: ['**/*.vue'],
- rules: {
- '@typescript-eslint/no-unused-vars': 0,
- },
- },
- {
- files: ['layouts/**/*.vue'],
- rules: {
- 'vue/multi-word-component-names': 0,
- },
- },
- {
- files: ['pages/**/*.vue'],
- rules: {
- 'vue/multi-word-component-names': 0,
- },
- },
- {
- files: ['tests/**/*'],
- rules: {
- '@typescript-eslint/ban-ts-comment': 0,
- '@typescript-eslint/no-unused-vars': 0,
- '@typescript-eslint/no-explicit-any': 0,
- 'require-await': 0,
- },
- },
- ]
- // Utiliser withNuxt avec l'option standalone: false pour éviter les conflits
- export default withNuxt(customConfig)
|