-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
44 lines (43 loc) · 1.2 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
import globals from 'globals'
import tsParser from '@typescript-eslint/parser'
import tsPlugin from '@typescript-eslint/eslint-plugin'
import vueParser from 'vue-eslint-parser'
import vuePlugin from 'eslint-plugin-vue'
export default [
{
ignores: ['dist/*', 'node_modules/*']
},
{
files: ['**/*.{js,ts,tsx,vue}'],
languageOptions: {
globals: {
...globals.browser,
...globals.es2021
},
parser: vueParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: tsParser,
extraFileExtensions: ['.vue']
}
},
plugins: {
'@typescript-eslint': tsPlugin,
'vue': vuePlugin
},
rules: {
...tsPlugin.configs.recommended.rules,
...vuePlugin.configs.recommended.rules,
'vue/multi-word-component-names': 'off',
'vue/no-v-html': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': ['warn', {
argsIgnorePattern: '^_',
varsIgnorePattern: '^_'
}],
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
}
}
]