forked from Haythamasalama/cipherTool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
66 lines (63 loc) · 2.37 KB
/
.eslintrc.cjs
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
require('@rushstack/eslint-patch/modern-module-resolution');
module.exports = {
root: true,
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-typescript'],
parserOptions: {
ecmaVersion: 'latest',
},
rules: {
// general
semi: ['error', 'always'],
quotes: ['error', 'single'],
'comma-dangle': ['error', 'never'],
'object-curly-spacing': ['error', 'always'],
'keyword-spacing': ['error', { before: true, after: true }],
'comma-spacing': ['error', { before: false, after: true }],
'space-before-blocks': ['error', 'always'],
'space-infix-ops': ['error', { int32Hint: false }],
'no-multi-spaces': ['error', { ignoreEOLComments: true }],
'key-spacing': ['error', { beforeColon: false, afterColon: true, mode: 'strict' }],
'arrow-spacing': ['error', { before: true, after: true }],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
],
'no-console': 'off',
'no-debugger': 'off',
// typescript
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/member-delimiter-style': 'error',
// vuejs
'vue/comma-spacing': ['error', { before: false, after: true }],
'vue/keyword-spacing': ['error', { before: true, after: true }],
'vue/object-curly-spacing': ['error', 'always'],
'vue/array-bracket-spacing': ['error', 'never'],
'vue/arrow-spacing': ['error', { before: true, after: true }],
'vue/key-spacing': ['error', { beforeColon: false, afterColon: true, mode: 'strict' }],
'vue/block-spacing': ['error', 'always'],
'vue/brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
'vue/comma-dangle': ['error', 'always-multiline'],
'vue/html-indent': ['error', 2],
'vue/script-indent': ['error', 2, { baseIndent: 1 }],
'vue/multi-word-component-names': 0,
'vue/no-multiple-template-root': 0,
'vue/require-default-prop': 'off',
'vue/max-attributes-per-line': [
'error',
{
singleline: {
max: 3,
},
},
],
'vue/component-name-in-template-casing': [
'error',
'PascalCase',
{
registeredComponentsOnly: false,
},
],
},
};