-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy patheslint.config.js
41 lines (40 loc) · 1.01 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
import pluginVue from 'eslint-plugin-vue'
import js from '@eslint/js'
import eslintConfigPrettier from 'eslint-config-prettier'
import globals from 'globals'
export default [
...pluginVue.configs['flat/recommended'],
js.configs.recommended,
eslintConfigPrettier,
{
files: ['**/*.js,**/*.vue,**/*.cjs'],
rules: {
'no-console': 'off', // It may be worth re-enabling this is we add proper error logging
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
'prefer-const': [
'error',
{
destructuring: 'all',
},
],
'vue/no-v-model-argument': 'off',
},
},
{
ignores: ['dist/**/*.js', 'docs/**/*.js'],
},
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.node,
...globals.jest,
// Global vitest and Cypress variables so they don't violate no-undef
vi: 'readonly',
cy: 'readonly',
Cypress: 'readonly',
},
},
},
]