@momsfriendlydevco/eslint-config 2.0.1 → 2.0.3

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 +41 -4
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -4,17 +4,46 @@ import pluginVue from 'eslint-plugin-vue';
4
4
 
5
5
  // Rules shared by both .doop + .vue files
6
6
  let jsCommonRules = {
7
+ // Generic rules
7
8
  'html-closing-bracket-spacing': ['off'], // Annoying doesn't allow <this-kind-of-thing/>
8
- 'jsdoc/check-alignment': ['off'], // Disable the JSDoc parser insisting on correct indents
9
- 'jsdoc/check-types': ['off'], // Disable the JSDoc parser being fussy about `@param {String}` vs `@param {string}`
10
- 'jsdoc/tag-lines': ['off'], // Disable the JSDoc parser being fussy about new-line spacing
11
9
  'no-debugger': ['warn'], // Debuggers are fine, just warn
12
10
  'no-useless-escape': ['off'], // ESlint frequently gets what should and shouldn't be escaped wrong
13
11
  'no-unused-vars': ['warn'], // Dont make unused vars the end of the world
12
+
13
+ // JSDoc
14
+ 'jsdoc/check-alignment': ['off'], // Disable the JSDoc parser insisting on correct indents
15
+ 'jsdoc/check-tag-names': ['warn', { // Extend JSDoc allowed tags
16
+ definedTags: ['date', 'slot', 'url'],
17
+ }],
18
+ 'jsdoc/check-types': ['off'], // Disable the JSDoc parser being fussy about `@param {String}` vs `@param {string}`
19
+ 'jsdoc/no-defaults': ['off'], // Disable the JSDoc parser that complains about optional params as its just silly
20
+ 'jsdoc/no-undefined-types': ['warn', {disableReporting: true}], // Disable the JSDoc parser for "undefined" types which it usually gets wrong. Ask eslint to still mark these as used though
21
+ 'jsdoc/require-returns-description': ['off'], // Disable the JSDoc parse being fussy about return descriptions
22
+ 'jsdoc/tag-lines': ['off'], // Disable the JSDoc parser being fussy about new-line spacing
23
+
24
+ // Vue
25
+ 'vue/no-v-html': ['off'], // Disable Vue complaining about v-html being used
14
26
  };
15
27
 
16
28
  export default [
17
- pluginJSDoc.configs['flat/recommended'],
29
+ // eslint-plugin-jsdoc (with custom settings)
30
+ {
31
+ ...pluginJSDoc.configs['flat/recommended'],
32
+ settings: {
33
+ jsdoc: {
34
+ // NOTE that some specs - like vue - can add to this config
35
+ mode: 'jsdoc',
36
+ tagNamePreference: {
37
+ // Prefer 'emits' over 'fires' to match Vue terminology {{{
38
+ emits: 'emits',
39
+ fires: 'emits',
40
+ // }}}
41
+ },
42
+ },
43
+ },
44
+ },
45
+
46
+ // eslint-plugin-vue
18
47
  ...pluginVue.configs['flat/recommended'],
19
48
 
20
49
  // .doop backend Files {{{
@@ -59,6 +88,14 @@ export default [
59
88
  },
60
89
  },
61
90
  },
91
+ settings: {
92
+ jsdoc: {
93
+ tagNamePreference: {
94
+ // Allow 'prop' in Vue mode to match Vue terminology
95
+ prop: 'prop',
96
+ },
97
+ },
98
+ },
62
99
  rules: {
63
100
  'vue/attributes-order': ['warn', {
64
101
  'order': [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@momsfriendlydevco/eslint-config",
3
3
  "description": "ESLint plugin for @MomsFriendlyDevCo projects",
4
- "version": "2.0.1",
4
+ "version": "2.0.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "test": "eslint --config index.js test/data"
@@ -24,9 +24,9 @@
24
24
  },
25
25
  "homepage": "https://github.com/MomsFriendlyDevCo/eslint#readme",
26
26
  "dependencies": {
27
- "eslint-plugin-jsdoc": "^48.2.3",
28
- "eslint-plugin-vue": "^9.25.0",
29
- "vue-eslint-parser": "^9.4.2"
27
+ "eslint-plugin-jsdoc": "^48.8.3",
28
+ "eslint-plugin-vue": "^9.27.0",
29
+ "vue-eslint-parser": "^9.4.3"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "eslint": ">=9.2.0"