@momsfriendlydevco/eslint-config 2.0.1 → 2.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.
Files changed (2) hide show
  1. package/index.js +32 -4
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -4,17 +4,45 @@ 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', '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
+ mode: 'jsdoc',
35
+ tagNamePreference: {
36
+ // Prefer 'emits' over 'fires' to match Vue terminology {{{
37
+ emits: 'emits',
38
+ fires: 'emits',
39
+ // }}}
40
+ },
41
+ },
42
+ },
43
+ },
44
+
45
+ // eslint-plugin-vue
18
46
  ...pluginVue.configs['flat/recommended'],
19
47
 
20
48
  // .doop backend Files {{{
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.2",
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"