This repository was archived by the owner on Nov 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.js
More file actions
90 lines (88 loc) · 3.49 KB
/
.eslintrc.js
File metadata and controls
90 lines (88 loc) · 3.49 KB
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
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
extends: [
'@nuxtjs/eslint-config-typescript',
'plugin:nuxt/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'plugin:vue/recommended',
],
// add your custom rules here
rules: {
'vue/first-attribute-linebreak': ['error', {
singleline: 'ignore',
multiline: 'below',
}],
'vue/multi-word-component-names': ['warn', { ignores: [] }],
'func-call-spacing': 'off',
'@typescript-eslint/func-call-spacing': ['error'],
'key-spacing': ['error', {
beforeColon: false, afterColon: true, align: 'value',
}],
'object-curly-spacing': ['error', 'always'],
'object-curly-newline': ['error', {
ObjectExpression: { multiline: true, minProperties: 3 },
ImportDeclaration: { multiline: true, minProperties: 3 },
ExportDeclaration: { multiline: true, minProperties: 3 },
}],
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
'no-multiple-empty-lines': ['error', {
max: 1, maxEOF: 0, maxBOF: 0,
}],
'import/order': ['error', {
groups: ['builtin', 'external', ['internal'], ['parent', 'sibling'], 'index'],
'newlines-between': 'always',
alphabetize: { order: 'asc', caseInsensitive: true },
pathGroups: [
{
pattern: 'src/**',
group: 'internal',
position: 'after',
},
],
},
],
'import/no-cycle': [2, { maxDepth: 1 }],
'import/newline-after-import': ['error', { count: 1 }],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
indent: 'off',
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/explicit-member-accessibility': 'off',
quotes: ['error', 'single', { allowTemplateLiterals: true }],
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/class-name-casing': 0,
'@typescript-eslint/prefer-interface': 0,
'@typescript-eslint/no-namespace': 0,
'interface-over-type-literal': 0,
'@typescript-eslint/no-var-requires': 1,
'@typescript-eslint/no-inferrable-types': 2,
semi: 'off',
'@typescript-eslint/semi': ['error'],
curly: ['error'],
'prefer-const': ['error', {
destructuring: 'all',
ignoreReadBeforeAssign: false,
}],
'no-var': 2,
'prefer-spread': 'error',
'comma-dangle': [2, 'always-multiline'],
'sort-imports': ['error', {
ignoreCase: true,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
}],
'dot-notation': 2,
'operator-linebreak': ['error', 'before'],
'brace-style': 'error',
'no-useless-call': 'error',
},
};