-
Notifications
You must be signed in to change notification settings - Fork 14
/
eslint.config.js
40 lines (38 loc) · 1.3 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
import { includeIgnoreFile } from '@eslint/compat'
import js from '@eslint/js'
import eslintPluginVue from 'eslint-plugin-vue'
import ts from 'typescript-eslint'
import eslintConfigPrettier from 'eslint-config-prettier'
import pluginCypress from 'eslint-plugin-cypress/flat'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const gitignorePath = path.resolve(__dirname, '.gitignore')
export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...eslintPluginVue.configs['flat/vue2-recommended'],
{
files: ['*.vue', '**/*.vue'],
languageOptions: {
parserOptions: {
parser: '@typescript-eslint/parser',
},
},
},
pluginCypress.configs.recommended,
eslintConfigPrettier,
{
rules: {
'no-undef': 'off',
'vue/multi-word-component-names': 'off',
'vue/valid-v-slot': ['error', { allowModifiers: true }], // allow vuetify slot modifier
'vue/html-self-closing': ['error', { html: { void: 'any' } }], // not conflict with prettier
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
},
{ ignores: ['public/mockServiceWorker.js'] },
)