forked from kyvg/vue3-notification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
91 lines (89 loc) · 2.68 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/* eslint-disable quote-props */
module.exports = {
root: true,
env: {
node: true,
},
plugins: [
'vue',
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended',
],
rules: {
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }],
'@typescript-eslint/prefer-interface': 'off',
'brace-style': ['error', '1tbs'],
'comma-dangle': ['error', 'always-multiline'],
curly: 'error',
'eol-last': 'error',
'eqeqeq': 'error',
'jsx-quotes': ['error', 'prefer-single'],
'no-case-declarations': 'error',
'no-console': ['warn', { 'allow': ['warn', 'error'] }],
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-multi-spaces': 'error',
'no-multiple-empty-lines': 'error',
'no-shadow': ['error', { 'allow': ['required', 'numeric', 'between', 'minLength'] }],
'no-unused-vars': 'off',
'no-var': 'error',
'object-curly-spacing': ['error', 'always'],
'object-shorthand': 'error',
'prefer-const': 'error',
'quote-props': ['error', 'as-needed'],
'quotes': ['error', 'single', 'avoid-escape'],
'semi': 'error',
// 'sort-keys': 'error',
'space-before-function-paren': ['error', {
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
}],
'vue/component-definition-name-casing': ['error', 'kebab-case'],
'vue/component-name-in-template-casing': ['error', 'kebab-case', {
'registeredComponentsOnly': true,
'ignores': [],
}],
'vue/eqeqeq': 'error',
'vue/html-quotes': ['error', 'double'],
'vue/match-component-file-name': ['error', {
'extensions': ['vue'],
'shouldMatchCase': false,
}],
'vue/max-attributes-per-line': ['error', {
'singleline': {
'max': 2,
},
'multiline': {
'max': 1,
},
}],
'vue/no-deprecated-scope-attribute': 'error',
'vue/no-deprecated-slot-scope-attribute': 'error',
'vue/no-irregular-whitespace': 'error',
'vue/no-static-inline-styles': 'error',
'vue/require-name-property': 'error',
'vue/singleline-html-element-content-newline': 'off',
'vue/v-slot-style': 'error',
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
},
overrides: [
{
files: '*.d.ts',
rules: {
'@typescript-eslint/indent': ['error', 4],
},
},
],
};