-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
71 lines (70 loc) · 1.81 KB
/
eslint.config.js
File metadata and controls
71 lines (70 loc) · 1.81 KB
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
import js from '@eslint/js';
import vuePlugin from 'eslint-plugin-vue';
export default [
js.configs.recommended,
...vuePlugin.configs['flat/recommended'],
{
files: ['**/*.js', '**/*.vue', '**/*.ts'],
languageOptions: {
globals: {
// Browser globals
window: 'readonly',
document: 'readonly',
console: 'readonly',
fetch: 'readonly',
URL: 'readonly',
Blob: 'readonly',
Buffer: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
clearInterval: 'readonly',
setInterval: 'readonly',
navigator: 'readonly',
CustomEvent: 'readonly',
IntersectionObserver: 'readonly',
ResizeObserver: 'readonly',
MutationObserver: 'readonly',
requestAnimationFrame: 'readonly',
cancelAnimationFrame: 'readonly',
getComputedStyle: 'readonly',
performance: 'readonly',
Path2D: 'readonly',
OffscreenCanvas: 'readonly',
DOMException: 'readonly',
AbortController: 'readonly',
Response: 'readonly',
Headers: 'readonly',
Document: 'readonly',
// Nuxt globals
$fetch: 'readonly',
useRuntimeConfig: 'readonly',
navigateTo: 'readonly',
// Vue globals
ref: 'readonly',
reactive: 'readonly',
computed: 'readonly',
}
},
plugins: {
vue: vuePlugin,
},
rules: {
'no-console': 'warn',
'no-unused-vars': ['error', {
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true
}],
// Allow console in built files
'no-undef': 'off',
},
},
{
// Ignore generated files and dist
ignores: [
'.nuxt/**/*',
'dist/**/*',
'node_modules/**/*',
]
},
];