generated from sapphi-red/vite-boilerplate-plus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
59 lines (52 loc) · 1.13 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
import globals from 'globals'
import eslint from '@eslint/js'
import tsESLint from 'typescript-eslint'
import eslintPluginVue from 'eslint-plugin-vue'
const commonLint = {
languageOptions: {
globals: {
...globals.browser
}
}
}
const vueLint = {
files: ['*.vue', '**/*.vue'],
languageOptions: {
parserOptions: {
parser: '@typescript-eslint/parser'
}
},
rules: {
'no-console': 'warn',
'no-debugger': 'warn',
'no-restricted-imports': [
'error',
{
name: '/@/lib/apis/generated',
message: 'Please use /@/lib/apis instead.'
}
],
'vue/custom-event-name-casing': ['error', 'camelCase'],
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'always',
component: 'always'
},
svg: 'always',
math: 'always'
}
],
'vue/singleline-html-element-content-newline': ['off'],
'vue/html-indent': ['off']
}
}
export default [
eslint.configs.recommended,
...tsESLint.configs.recommended,
...eslintPluginVue.configs['flat/recommended'],
commonLint,
vueLint
]