@momsfriendlydevco/eslint-config 1.0.3 → 1.0.5

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.
Files changed (2) hide show
  1. package/index.js +23 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // Rules shared by both .doop + .vue files
2
- let vueCommonRules = {
2
+ let jsCommonRules = {
3
3
  'html-closing-bracket-spacing': ['off'], // Annoying doesn't allow <this-kind-of-thing/>
4
+ 'no-debugger': ['warn'], // Debuggers are fine, just warn
4
5
  'no-useless-escape': ['off'], // ESlint frequently gets what should and shouldn't be escaped wrong
5
6
  'no-unused-vars': ['warn'], // Dont make unused vars the end of the world
6
7
  };
@@ -19,6 +20,7 @@ module.exports = {
19
20
  ecmaVersion: 'latest',
20
21
  },
21
22
  overrides: [
23
+
22
24
  // .doop backend Files {{{
23
25
  {
24
26
  files: ['*.doop'],
@@ -29,10 +31,20 @@ module.exports = {
29
31
  },
30
32
  rules: {
31
33
  'vue/comment-directive': ['off'], // Screws up block parsing and we don't have <template/> anyway
32
- ...vueCommonRules,
34
+ ...jsCommonRules,
35
+ },
36
+ },
37
+ // }}}
38
+
39
+ // .mjs / .js regular files {{{
40
+ {
41
+ files: ['*.js', '*.mjs'],
42
+ rules: {
43
+ ...jsCommonRules,
33
44
  },
34
45
  },
35
46
  // }}}
47
+
36
48
  // .vue frontend Files {{{
37
49
  {
38
50
  files: ['*.vue'],
@@ -68,6 +80,13 @@ module.exports = {
68
80
  selfClosingTag: 'never'
69
81
  }],
70
82
  'vue/html-indent': ['error', 'tab'],
83
+ 'vue/html-self-closing': ['warn', {
84
+ html: {
85
+ void: 'always',
86
+ normal: 'any',
87
+ component: 'always',
88
+ },
89
+ }],
71
90
  'vue/max-attributes-per-line': ['warn', {
72
91
  singleline: 4,
73
92
  multiline: 1,
@@ -117,9 +136,10 @@ module.exports = {
117
136
  ignoreWhenNoAttributes: true,
118
137
  ignores: ['pre', 'textarea', 'div', 'INLINE_ELEMENTS'],
119
138
  }],
120
- ...vueCommonRules,
139
+ ...jsCommonRules,
121
140
  },
122
141
  },
123
142
  // }}}
143
+
124
144
  ],
125
145
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momsfriendlydevco/eslint-config",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "ESLint plugin for @MomsFriendlyDevCo projects",
5
5
  "main": "index.js",
6
6
  "scripts": {