-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.js
50 lines (49 loc) · 1.33 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
import tsPlug from '@typescript-eslint/eslint-plugin'
import tsParser from '@typescript-eslint/parser'
import prettier from 'eslint-plugin-prettier'
import sisPlug from 'eslint-plugin-simple-import-sort'
import vuePlug from 'eslint-plugin-vue'
import vueParser from 'vue-eslint-parser'
export default [
...vuePlug.configs['flat/strongly-recommended'],
{
languageOptions: {
parser: vueParser,
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
parser: tsParser,
},
},
files: [
'src/**/*.{vue,js,ts,json}',
'vite.config.{js,ts}',
'eslint.config.js',
],
plugins: {
ts: tsPlug,
vue: vuePlug,
prettier,
'simple-import-sort': sisPlug,
},
rules: {
'linebreak-style': ['error', 'unix'],
quotes: ['warn', 'single'],
semi: ['warn', 'never'],
'no-undef': 'off',
// sis
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
// ts
'ts/no-unused-vars': 'warn',
'ts/no-explicit-any': 'warn',
// prettier
'prettier/prettier': 'warn',
// vue
'vue/singleline-html-element-content-newline': 'off',
'vue/max-attributes-per-line': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
},
]