11import js from '@eslint/js'
22import vue from 'eslint-plugin-vue'
3- import vueParser from 'vue-eslint-parser'
43import prettierConfig from 'eslint-config-prettier'
54import globals from 'globals'
65
76export default [
87 // Base ESLint recommended rules
98 js . configs . recommended ,
109
10+ // Vue recommended rules (uses flat config)
11+ ...vue . configs [ 'flat/recommended' ] ,
12+
1113 // Prettier configuration to disable conflicting rules
1214 {
1315 rules : {
@@ -16,55 +18,28 @@ export default [
1618 }
1719 } ,
1820
19- // Vue plugin configuration
21+ // Vue specific rule overrides
2022 {
2123 files : [ '**/*.vue' ] ,
22- languageOptions : {
23- parser : vueParser ,
24- parserOptions : {
25- ecmaVersion : 'latest' ,
26- sourceType : 'module'
27- }
28- } ,
29- plugins : {
30- vue
31- } ,
3224 rules : {
33- // Combine base and recommended Vue rules
34- ...vue . configs . base . rules ,
35- ...vue . configs [ 'vue3-recommended' ] . rules ,
36-
3725 '@stylistic/js/indent' : 'off' ,
3826 '@stylistic/js/quotes' : 'off' ,
3927
4028 // Disable specific Vue rules
4129 'vue/no-v-html' : 'off' ,
42- 'vue/comment-directive' : 'off'
43-
44- // You can add other Vue-specific rules here
30+ 'vue/comment-directive' : 'off' ,
31+ 'vue/no-v-text-v-html-on-component' : 'off'
4532 }
4633 } ,
4734
48- // General JavaScript rules (for .js and .vue files)
49- {
50- files : [ '**/*.{js,vue}' ] ,
51- rules : {
52- // Disable general ESLint rules
53- // 'no-undef': 'off'
54- }
55- } ,
56-
57- // Custom rules (if any)
35+ // Global variables
5836 {
5937 languageOptions : {
6038 globals : {
6139 ...globals . browser ,
6240 route : 'readonly' ,
6341 grecaptcha : 'readonly'
6442 }
65- } ,
66- rules : {
67- // Add your custom rules here
6843 }
6944 } ,
7045
0 commit comments