-
-
Notifications
You must be signed in to change notification settings - Fork 260
Expand file tree
/
Copy patheslint.config.js
More file actions
103 lines (102 loc) · 2.89 KB
/
Copy patheslint.config.js
File metadata and controls
103 lines (102 loc) · 2.89 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import js from '@eslint/js'
import pluginVue from 'eslint-plugin-vue'
import tseslint from 'typescript-eslint'
import tailwind from 'eslint-plugin-tailwindcss'
import vueParser from 'vue-eslint-parser'
import tsParser from '@typescript-eslint/parser'
export default [
{
ignores: [
'dist/**',
'dev-dist/**',
'node_modules/**',
'*.config.js',
'public/**',
'pnpm-lock.yaml',
'scripts/**',
'*.json',
'storybook-static/**'
]
},
js.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs['flat/essential'],
...tailwind.configs['flat/recommended'],
{
files: ['**/*.vue', '**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
languageOptions: {
parser: vueParser,
parserOptions: {
parser: tsParser,
ecmaVersion: 'latest',
sourceType: 'module',
extraFileExtensions: ['.vue'],
ecmaFeatures: {
jsx: true
}
},
globals: {
// Browser globals
window: 'readonly',
document: 'readonly',
navigator: 'readonly',
console: 'readonly',
HTMLElement: 'readonly',
HTMLInputElement: 'readonly',
Event: 'readonly',
CustomEvent: 'readonly',
DragEvent: 'readonly',
MouseEvent: 'readonly',
InputEvent: 'readonly',
ClipboardEvent: 'readonly',
ProgressEvent: 'readonly',
File: 'readonly',
FileReader: 'readonly',
Blob: 'readonly',
URL: 'readonly',
URLSearchParams: 'readonly',
Image: 'readonly',
createImageBitmap: 'readonly',
ImageBitmap: 'readonly',
ResizeObserver: 'readonly',
requestAnimationFrame: 'readonly',
Document: 'readonly',
Node: 'readonly',
XMLSerializer: 'readonly',
DOMParser: 'readonly',
FontFaceSet: 'readonly',
HTMLAnchorElement: 'readonly',
HTMLImageElement: 'readonly',
HTMLCanvasElement: 'readonly',
SVGSVGElement: 'readonly',
TextEncoder: 'readonly',
CanvasRenderingContext2D: 'readonly',
ClipboardItem: 'readonly',
CSS: 'readonly',
DataTransferItemList: 'readonly',
RequestInit: 'readonly',
Response: 'readonly',
localStorage: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
fetch: 'readonly',
// Node globals
process: 'readonly',
__dirname: 'readonly',
__filename: 'readonly'
}
},
rules: {
'tailwindcss/no-custom-classname': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' }
],
'@typescript-eslint/no-explicit-any': 'warn',
'vue/multi-word-component-names': 'off',
'no-undef': 'error'
}
}
]