-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
.eslintrc.js
54 lines (45 loc) · 1.41 KB
/
.eslintrc.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
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
// the ts-eslint recommended ruleset sets the parser so we need to set it back
parser: 'vue-eslint-parser',
extends: [
'plugin:vue/vue3-recommended',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
parserOptions: {
ecmaVersion: 2020,
parser: '@typescript-eslint/parser',
extraFileExtensions: ['.vue'],
ecmaFeatures: {
jsx: true,
},
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
rules: {
'vue/script-setup-uses-vars': 'error',
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'@typescript-eslint/ban-ts-comment': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'@typescript-eslint/no-unused-vars': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'@typescript-eslint/no-explicit-any': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
// this rule, if on, would require explicit return type on the `render` function
'@typescript-eslint/explicit-function-return-type': 'off',
'vue/no-ref-as-operand': 'off',
},
ignorePatterns: ['public/**'],
overrides: [
{
files: ['*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
],
}