forked from verbb/formie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
132 lines (129 loc) · 3.81 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
module.exports = {
'env': {
'browser': true,
'es6': true
},
'extends': [
'eslint:recommended',
'plugin:vue/recommended',
'plugin:import/errors'
],
'globals': {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly'
},
'parserOptions': {
'parser': 'babel-eslint',
'ecmaVersion': 2017,
'sourceType': 'module'
},
'plugins': [
'vue'
],
'rules': {
'indent': ['warn', 4, { 'SwitchCase': 1 }],
'linebreak-style': ['warn', 'unix'],
'no-console': 0,
'no-undef': 0,
'no-unused-vars': 0,
'quotes': ['warn','single'],
'semi': ['warn','always'],
'eol-last': 1,
'comma-dangle': ['warn', {
'arrays': 'always-multiline',
'objects': 'always-multiline',
'imports': 'always-multiline',
'exports': 'always-multiline',
'functions': 'ignore'
}],
'camelcase': ['warn', {
'properties': 'always'
}],
'object-curly-spacing': ['warn', 'always'],
'space-before-function-paren': ['warn', {
'anonymous': 'never',
'named': 'never',
'asyncArrow': 'never'
}],
'lines-between-class-members': ['warn', 'always', {
'exceptAfterSingleLine': false
}],
// ES6 specific rules
'prefer-arrow-callback': 'warn',
'prefer-destructuring': ['warn', {
'array': true,
'object': true
}],
'object-shorthand': ['warn', 'always'],
// Vue specific rules
'vue/script-indent': ['warn', 4, {
'baseIndent': 0
}],
'vue/html-indent': ['warn', 4, {
'attribute': 1,
'baseIndent': 1,
'closeBracket': 0,
'alignAttributesVertically': true,
'ignores': []
}],
'vue/max-attributes-per-line': ['warn', {
'singleline': 5,
'multiline': {
'max': 5,
'allowFirstLine': false
}
}],
'vue/html-self-closing': ['warn', {
'html': {
'void': 'never',
'normal': 'never',
'component': 'always'
},
'svg': 'always',
'math': 'always'
}],
'vue/order-in-components': ['warn', {
'order': [
'el',
'name',
'parent',
'functional',
['delimiters', 'comments'],
['components', 'directives', 'filters'],
'extends',
'mixins',
'inheritAttrs',
'model',
['props', 'propsData'],
'data',
'computed',
'watch',
'LIFECYCLE_HOOKS',
'methods',
['template', 'render'],
'renderError'
]
}],
'vue/this-in-template': ['warn', 'never'],
'vue/singleline-html-element-content-newline': 0,
'vue/v-bind-style': ['warn', 'shorthand'],
'vue/v-on-style': ['warn', 'shorthand'],
'vue/v-on-function-call': ['warn', 'never'],
'vue/name-property-casing': ['warn', 'PascalCase'],
'vue/prop-name-casing': ['warn', 'camelCase'],
'vue/require-valid-default-prop': 1,
'vue/require-prop-types': 1,
'vue/mustache-interpolation-spacing': ['warn', 'always'],
'vue/no-v-html': 'off'
},
// Standard indentation rule needs to be disabled for .vue files
// as it conflicts with the vue indent rule.
'overrides': [
{
'files': ['*.vue'],
'rules': {
'indent': 'off'
}
}
]
}