@momsfriendlydevco/eslint-config 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -3
- package/index.js +49 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
@MomsFriendlyDevCo/
|
|
2
|
-
|
|
1
|
+
@MomsFriendlyDevCo/ESLint-Config
|
|
2
|
+
================================
|
|
3
3
|
ESLint Rules for Mom's Friendly Dev Co.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Installation
|
|
6
|
+
------------
|
|
7
|
+
Merge the following into `package.json`:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"scripts": {
|
|
12
|
+
"lint": "eslint --ext .doop --ext .js --ext .vue ."
|
|
13
|
+
},
|
|
14
|
+
"eslintConfig": {
|
|
15
|
+
"extends": [
|
|
16
|
+
"@momsfriendlydevco"
|
|
17
|
+
],
|
|
18
|
+
"parserOptions": {
|
|
19
|
+
"ecmaVersion": "latest"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
See [@Doop/ESM-Loader](https://github.com/MomsFriendlyDevCo/doop-esm-loader) for more integration details.
|
package/index.js
CHANGED
|
@@ -42,7 +42,7 @@ module.exports = {
|
|
|
42
42
|
app: 'readable', // Global frontend app object
|
|
43
43
|
},
|
|
44
44
|
rules: {
|
|
45
|
-
'vue/attributes-order': ['
|
|
45
|
+
'vue/attributes-order': ['warn', {
|
|
46
46
|
'order': [
|
|
47
47
|
'DEFINITION',
|
|
48
48
|
'LIST_RENDERING',
|
|
@@ -51,24 +51,66 @@ module.exports = {
|
|
|
51
51
|
'GLOBAL',
|
|
52
52
|
['UNIQUE', 'SLOT'],
|
|
53
53
|
'TWO_WAY_BINDING',
|
|
54
|
-
'OTHER_DIRECTIVES',
|
|
55
|
-
'EVENTS',
|
|
54
|
+
['OTHER_DIRECTIVES', 'EVENTS'],
|
|
56
55
|
'CONTENT',
|
|
57
56
|
'OTHER_ATTR',
|
|
58
57
|
],
|
|
59
|
-
'alphabetical': false
|
|
58
|
+
'alphabetical': false,
|
|
60
59
|
}],
|
|
61
60
|
'vue/component-definition-name-casing': ['off', 'PascalCase'], // FIXME: Doesn't support camelCase yet
|
|
62
61
|
'vue/html-closing-bracket-spacing': ['warn', {
|
|
63
|
-
|
|
62
|
+
selfClosingTag: 'never'
|
|
64
63
|
}],
|
|
65
64
|
'vue/html-indent': ['error', 'tab'],
|
|
66
65
|
'vue/max-attributes-per-line': ['warn', {
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
singleline: 4,
|
|
67
|
+
multiline: 1,
|
|
69
68
|
}],
|
|
70
69
|
'vue/multi-word-component-names': ['off'],
|
|
70
|
+
'vue/multiline-html-element-content-newline': ['warn', {
|
|
71
|
+
allowEmptyLines: true,
|
|
72
|
+
}],
|
|
71
73
|
'vue/mustache-interpolation-spacing': ['warn', 'never'],
|
|
74
|
+
'vue/order-in-components': ['warn', {
|
|
75
|
+
'order': [
|
|
76
|
+
'el',
|
|
77
|
+
'name',
|
|
78
|
+
'key',
|
|
79
|
+
'parent',
|
|
80
|
+
'functional',
|
|
81
|
+
['delimiters', 'comments'],
|
|
82
|
+
['components', 'directives', 'filters'],
|
|
83
|
+
'extends',
|
|
84
|
+
'mixins',
|
|
85
|
+
['provide', 'inject'],
|
|
86
|
+
'ROUTER_GUARDS',
|
|
87
|
+
'layout',
|
|
88
|
+
'middleware',
|
|
89
|
+
'validate',
|
|
90
|
+
'scrollToTop',
|
|
91
|
+
'transition',
|
|
92
|
+
'loading',
|
|
93
|
+
'inheritAttrs',
|
|
94
|
+
'model',
|
|
95
|
+
['data', 'asyncData', 'props', 'propsData'],
|
|
96
|
+
'computed',
|
|
97
|
+
'emits',
|
|
98
|
+
'setup',
|
|
99
|
+
'fetch',
|
|
100
|
+
'head',
|
|
101
|
+
'methods',
|
|
102
|
+
'LIFECYCLE_HOOKS',
|
|
103
|
+
'watch',
|
|
104
|
+
'watchQuery',
|
|
105
|
+
['template', 'render'],
|
|
106
|
+
'renderError'
|
|
107
|
+
]
|
|
108
|
+
}],
|
|
109
|
+
'vue/require-default-prop': ['off'],
|
|
110
|
+
'vue/singleline-html-element-content-newline': ['warn', {
|
|
111
|
+
ignoreWhenNoAttributes: true,
|
|
112
|
+
ignores: ['pre', 'textarea', 'div', 'INLINE_ELEMENTS'],
|
|
113
|
+
}],
|
|
72
114
|
},
|
|
73
115
|
},
|
|
74
116
|
// }}}
|