-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.rc
91 lines (90 loc) · 2.1 KB
/
eslint.rc
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
const IS_DEV = process.env.NODE_ENV === 'development';
module.exports = {
root: true,
env: {
browser: true,
jest: true,
},
plugins: ['sort-class-members', 'prettier', 'vue'],
extends: ['plugin:vue/recommended', 'eslint:recommended', '@vue/airbnb', 'prettier', 'prettier/vue'],
rules: {
camelcase: [
'error',
{
properties: 'always',
},
],
'consistent-return': 'off',
curly: ['error', 'all'],
'import/extensions': 'off',
'import/no-cycle': 'off',
'import/no-relative-parent-imports': 'off',
'import/order': [
'error',
{
'newlines-between': 'always',
},
],
'import/prefer-default-export': 'off',
'no-console': IS_DEV ? 'warn' : 'error',
'no-debugger': IS_DEV ? 'warn' : 'error',
'no-return-assign': ['error', 'always'],
'object-curly-newline': 'off',
'object-shorthand': [
'error',
'always',
{
avoidQuotes: false,
},
],
'prettier/prettier': [
'error',
{
arrowParens: 'always',
printWidth: 120,
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
},
],
quotes: ['error', 'single', { allowTemplateLiterals: false, avoidEscape: true }],
radix: ['error', 'always'],
'sort-class-members/sort-class-members': [
'error',
{
accessorPairPositioning: 'getThenSet',
order: [
'[static-properties]',
'[static-methods]',
'[properties]',
'[conventional-private-properties]',
'constructor',
'[methods]',
'[conventional-private-methods]',
],
},
],
'vue/attribute-hyphenation': ['error', 'never'],
},
overrides: [
{
files: ['src/store/*'],
rules: {
'no-param-reassign': 'off',
},
},
{
files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'],
env: {
jest: true,
},
},
],
parserOptions: {
parser: 'babel-eslint',
},
settings: {
'import/core-modules': ['path', 'os'],
},
};