generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 15
/
eslint.config.js
77 lines (69 loc) · 1.88 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import js from '@eslint/js'
import vue from 'eslint-plugin-vue'
import vueParser from 'vue-eslint-parser'
import prettierConfig from 'eslint-config-prettier'
export default [
// Base ESLint recommended rules
js.configs.recommended,
// Vue plugin configuration
{
files: ['**/*.vue'],
languageOptions: {
parser: vueParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
}
},
plugins: {
vue
},
rules: {
// Combine base and recommended Vue rules
...vue.configs.base.rules,
...vue.configs['vue3-recommended'].rules,
// Disable specific Vue rules
'vue/no-v-html': 'off',
'vue/comment-directive': 'off' // Previously disabled
// You can add other Vue-specific rules here
}
},
// General JavaScript rules (for .js and .vue files)
{
files: ['**/*.{js,vue}'],
rules: {
// Disable general ESLint rules
// 'no-undef': 'off'
}
},
// Prettier configuration to disable conflicting rules
{
rules: {
...prettierConfig.rules
}
},
// Custom rules (if any)
{
languageOptions: {
globals: {
document: 'readonly',
window: 'readonly',
FileReader: 'readonly',
FormData: 'readonly',
URLSearchParams: 'readonly',
localStorage: 'readonly',
fetch: 'readonly',
alert: 'readonly',
console: 'readonly',
route: 'readonly'
}
},
rules: {
// Add your custom rules here
}
},
// Ignore patterns
{
ignores: ['node_modules/*', 'vendor/*']
}
]