@momsfriendlydevco/eslint-config 2.1.2 → 2.1.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 +20 -19
  2. package/package.json +5 -5
package/index.js CHANGED
@@ -4,7 +4,7 @@ import pluginUnicorn from 'eslint-plugin-unicorn';
4
4
  import pluginVue from 'eslint-plugin-vue';
5
5
 
6
6
  // Rules shared by both .doop + .vue files
7
- let jsCommonRules = {
7
+ export let JSCommon = {
8
8
  // Generic rules
9
9
  'html-closing-bracket-spacing': ['off'], // Annoying doesn't allow <this-kind-of-thing/>
10
10
  'no-debugger': ['warn'], // Debuggers are fine, just warn
@@ -46,32 +46,33 @@ export default [
46
46
  ...pluginUnicorn.configs['flat/recommended'],
47
47
  rules: {
48
48
  ...pluginUnicorn.configs['flat/recommended'].rules,
49
- 'unicorn/no-anonymous-default-export': ['off'],
50
- 'unicorn/prefer-string-replace-all': ['off'], // Gets annoying pretty fast and its rarely correct
51
- 'unicorn/prefer-dom-node-append': ['warn'],
52
- 'unicorn/prefer-global-this': ['warn'], // Disabled in .vue files to allow 'window' directly
53
- 'unicorn/prefer-ternary': ['warn'],
54
- 'unicorn/no-magic-array-flat-depth': ['warn'],
55
- 'unicorn/switch-case-braces': ['warn', 'avoid'],
56
- 'unicorn/consistent-function-scoping': ['off'], // This rule means well and its more optimal but makes functions with constants harder to read
57
- 'unicorn/prefer-ternary': ['off'], // This rule means well but it can screw up perfectly readable code
58
49
  'unicorn/catch-error-name': ['off'],
50
+ 'unicorn/consistent-function-scoping': ['off'], // This rule means well and its more optimal but makes functions with constants harder to read
59
51
  'unicorn/explicit-length-check': ['off'],
60
52
  'unicorn/filename-case': ['off'], // Disabled globally (gets re-enabled for .vue files)
53
+ 'unicorn/no-anonymous-default-export': ['off'],
61
54
  'unicorn/no-array-callback-reference': ['off'], // Overly aggressively attaches itself to all .find() operations
55
+ 'unicorn/no-array-for-each': ['off'],
56
+ 'unicorn/no-array-reduce': ['off'],
62
57
  'unicorn/no-await-expression-member': ['off'], // There is nothing wrong with `(await thing).prop`
63
58
  'unicorn/no-empty-file': ['off'], // Breaks interface files + schema files with just JSDoc
59
+ 'unicorn/no-magic-array-flat-depth': ['warn'],
60
+ 'unicorn/no-negated-condition': ['off'],
61
+ 'unicorn/no-nested-ternary': ['off'],
62
+ 'unicorn/no-null': ['off'],
64
63
  'unicorn/no-this-assignment': ['off'], // Not allowing escape hatches to `this` when nesting functions is just dumb
65
64
  'unicorn/no-useless-promise-resolve-reject': ['off'], // Constant complaints about using `throw` within simple promise chains
65
+ 'unicorn/prefer-dom-node-append': ['warn'],
66
+ 'unicorn/prefer-global-this': ['warn'], // Disabled in .vue files to allow 'window' directly
66
67
  'unicorn/prefer-logical-operator-over-ternary': ['off'],
67
- 'unicorn/prefer-string-raw': ['off'], // Just a downright weird rule
68
68
  'unicorn/prefer-spread': ['off'],
69
- 'unicorn/no-array-reduce': ['off'],
70
- 'unicorn/no-nested-ternary': ['off'],
71
- 'unicorn/no-negated-condition': ['off'],
72
- 'unicorn/no-array-for-each': ['off'],
73
- 'unicorn/no-null': ['off'],
69
+ 'unicorn/prefer-string-raw': ['off'], // Just a downright weird rule
70
+ 'unicorn/prefer-string-replace-all': ['off'], // Gets annoying pretty fast and its rarely correct
71
+ 'unicorn/prefer-ternary': ['off'], // This rule means well but it can screw up perfectly readable code
72
+ 'unicorn/prefer-ternary': ['warn'],
73
+ 'unicorn/prefer-type-error': ['off'], // Too TS specific
74
74
  'unicorn/prevent-abbreviations': ['off'],
75
+ 'unicorn/switch-case-braces': ['warn', 'avoid'],
75
76
  },
76
77
  },
77
78
 
@@ -90,7 +91,7 @@ export default [
90
91
  },
91
92
  rules: {
92
93
  'vue/comment-directive': ['off'], // Screws up block parsing and we don't have <template/> anyway
93
- ...jsCommonRules,
94
+ ...JSCommon,
94
95
  },
95
96
  },
96
97
  // }}}
@@ -99,7 +100,7 @@ export default [
99
100
  {
100
101
  files: ['**/*.js', '**/*.mjs'],
101
102
  rules: {
102
- ...jsCommonRules,
103
+ ...JSCommon,
103
104
  },
104
105
  },
105
106
  // }}}
@@ -224,7 +225,7 @@ export default [
224
225
  ],
225
226
  }],
226
227
 
227
- ...jsCommonRules,
228
+ ...JSCommon,
228
229
  },
229
230
  },
230
231
  // }}}
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.1.2",
4
+ "version": "2.1.5",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "test": "eslint --config index.js test/data"
@@ -24,10 +24,10 @@
24
24
  },
25
25
  "homepage": "https://github.com/MomsFriendlyDevCo/eslint#readme",
26
26
  "dependencies": {
27
- "eslint-plugin-jsdoc": "^50.6.2",
28
- "eslint-plugin-unicorn": "^56.0.1",
29
- "eslint-plugin-vue": "^9.32.0",
30
- "vue-eslint-parser": "^9.4.3"
27
+ "eslint-plugin-jsdoc": "^50.6.9",
28
+ "eslint-plugin-unicorn": "^58.0.0",
29
+ "eslint-plugin-vue": "^10.0.0",
30
+ "vue-eslint-parser": "^10.1.3"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "eslint": ">=9.2.0"