| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- // Eslint 9.x flat config
- const js = require('@eslint/js');
- const tseslint = require('typescript-eslint');
- const vuePlugin = require('eslint-plugin-vue');
- const vueParser = require('vue-eslint-parser');
- module.exports = [
- js.configs.recommended,
- ...tseslint.configs.recommended,
- ...vuePlugin.configs['flat/vue3-recommended'],
- {
- languageOptions: {
- ecmaVersion: 'latest',
- sourceType: 'module',
- parser: vueParser,
- parserOptions: {
- parser: tseslint.parser,
- ecmaVersion: 'latest',
- sourceType: 'module'
- },
- globals: {
- // Browser globals
- window: 'readonly',
- document: 'readonly',
- navigator: 'readonly',
- console: 'readonly',
- localStorage: 'readonly',
- sessionStorage: 'readonly',
- fetch: 'readonly',
- // Node globals
- process: 'readonly',
- module: 'readonly',
- require: 'readonly',
- __dirname: 'readonly',
- __filename: 'readonly',
- // ES2021 globals
- Promise: 'readonly',
- Symbol: 'readonly',
- Map: 'readonly',
- Set: 'readonly',
- Array: 'readonly',
- Object: 'readonly',
- String: 'readonly',
- Number: 'readonly',
- Boolean: 'readonly',
- Date: 'readonly',
- Error: 'readonly',
- setTimeout: 'readonly',
- clearTimeout: 'readonly',
- setInterval: 'readonly',
- clearInterval: 'readonly'
- }
- },
- rules: {
- // TypeScript rules
- '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
- '@typescript-eslint/no-explicit-any': 'warn',
- '@typescript-eslint/explicit-module-boundary-types': 'off',
- // Vue rules
- 'vue/multi-word-component-names': 'off',
- 'vue/no-v-html': 'warn',
- 'vue/require-default-prop': 'off',
- 'vue/require-explicit-emits': 'warn',
- // General rules
- 'no-console': 'warn',
- 'no-debugger': 'warn'
- }
- },
- {
- ignores: [
- '**/node_modules/**',
- '**/dist/**',
- '**/*.d.ts'
- ]
- }
- ];
|