-
-
Notifications
You must be signed in to change notification settings - Fork 209
/
.eslintrc.js
68 lines (67 loc) · 2.43 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
env: {
browser: true,
mocha: true,
node: true,
es2021: true,
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'eslint:recommended',
'plugin:vue/essential',
'plugin:prettier/recommended',
],
// required to lint *.vue files
plugins: ['vue', 'babel'],
// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
'vue/no-deprecated-v-bind-sync': 'off',
'vue/no-mutating-props': 'off',
'vue/experimental-script-setup-vars': 'off',
'vue/no-side-effects-in-computed-properties': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-unused-vars': ['error', { vars: 'local' }],
'vue/multi-word-component-names': 'off',
'vue/no-v-text-v-html-on-component': 'off',
},
overrides: [
{
files: ['*.ts', '*.tsx'],
parserOptions: {
ecmaVersion: 12,
parser: '@typescript-eslint/parser',
sourceType: 'module',
project: './tsconfig.eslint.json',
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
// Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
'plugin:prettier/recommended',
],
// add your custom rules here
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-implied-eval': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
},
},
],
}