-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.js
More file actions
85 lines (81 loc) · 2.45 KB
/
eslint.config.js
File metadata and controls
85 lines (81 loc) · 2.45 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import js from '@eslint/js'
import tseslint from 'typescript-eslint'
import pluginVue from 'eslint-plugin-vue'
import pluginAstro from 'eslint-plugin-astro'
import prettier from 'eslint-config-prettier'
export default [
{ ignores: ['**/dist/', '**/node_modules/', '**/target/', '**/*.d.ts'] },
js.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs['flat/recommended'],
...pluginAstro.configs.recommended,
prettier,
{
files: ['packages/app/src/**/*.{ts,vue}'],
languageOptions: {
globals: {
window: 'readonly',
document: 'readonly',
navigator: 'readonly',
localStorage: 'readonly',
sessionStorage: 'readonly',
console: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
fetch: 'readonly',
requestAnimationFrame: 'readonly',
cancelAnimationFrame: 'readonly',
HTMLElement: 'readonly',
HTMLImageElement: 'readonly',
HTMLCanvasElement: 'readonly',
Event: 'readonly',
KeyboardEvent: 'readonly',
MouseEvent: 'readonly',
StorageEvent: 'readonly',
MediaQueryListEvent: 'readonly',
IntersectionObserver: 'readonly',
MutationObserver: 'readonly',
ResizeObserver: 'readonly',
crypto: 'readonly',
HTMLDivElement: 'readonly',
Image: 'readonly',
__APP_VERSION__: 'readonly',
},
parserOptions: {
parser: tseslint.parser,
},
},
rules: {
'vue/multi-word-component-names': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/max-attributes-per-line': 'off',
'vue/html-self-closing': [
'warn',
{ html: { void: 'always', normal: 'never', component: 'always' } },
],
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/consistent-type-imports': ['warn', { prefer: 'type-imports' }],
'no-console': ['warn', { allow: ['warn', 'error'] }],
},
},
{
files: ['packages/site/src/**/*.{ts,js}'],
languageOptions: {
globals: {
window: 'readonly',
document: 'readonly',
localStorage: 'readonly',
console: 'readonly',
},
},
rules: {
'no-console': 'off',
},
},
]