-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
51 lines (51 loc) · 1.22 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
module.exports = {
env: {
browser: true,
es2020: true,
node: true,
},
extends: [
'plugin:vue/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2020,
sourceType: 'module',
},
plugins: ['vue', 'prettier', '@typescript-eslint', 'unicorn'],
rules: {
'no-trailing-spaces': 'error',
'unicorn/no-for-loop': 'error',
'brace-style': ['error', '1tbs', { allowSingleLine: false }],
'no-restricted-syntax': [
'error',
{
selector: 'IfStatement > :not(BlockStatement).consequent',
message: 'Use blockstatement after if, please check STYLE_GUIDE.md',
},
],
'no-useless-catch': 1,
'no-var': 'error',
'linebreak-style': 0,
quotes: ['error', 'single'],
semi: ['error', 'never'],
'max-classes-per-file': ['error', 2],
'sort-imports': [
'warn',
{
ignoreDeclarationSort: true,
allowSeparatedGroups: true,
},
],
'vue/multi-word-component-names': 'off',
},
ignorePatterns: ['*.md'],
overrides: [
{
files: ['layouts/**/*.{js,ts,vue}', 'pages/**/*.vue'],
},
],
}