@mikey-pro/eslint-config 7.1.1 → 7.2.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 +125 -109
  2. package/package.json +12 -12
package/index.js CHANGED
@@ -54,10 +54,9 @@ module.exports = {
54
54
  },
55
55
  plugins: ['@typescript-eslint'],
56
56
  rules: {
57
- '@typescript-eslint/unbound-method': 0,
58
- '@typescript-eslint/naming-convention': 0,
59
-
60
- 'prettier/prettier': [1, { parser: 'typescript' }],
57
+ '@typescript-eslint/unbound-method': 'off',
58
+ '@typescript-eslint/naming-convention': 'off',
59
+ 'prettier/prettier': ['warn', { parser: 'typescript' }],
61
60
  },
62
61
  settings: {
63
62
  'import/parsers': {
@@ -73,19 +72,19 @@ module.exports = {
73
72
  {
74
73
  files: ['*.css'],
75
74
  rules: {
76
- 'prettier/prettier': [1, { parser: 'css' }],
75
+ 'prettier/prettier': ['warn', { parser: 'css' }],
77
76
  },
78
77
  },
79
78
  {
80
79
  files: ['*.scss'],
81
80
  rules: {
82
- 'prettier/prettier': [1, { parser: 'scss' }],
81
+ 'prettier/prettier': ['warn', { parser: 'scss' }],
83
82
  },
84
83
  },
85
84
  {
86
85
  files: ['*.less'],
87
86
  rules: {
88
- 'prettier/prettier': [1, { parser: 'less' }],
87
+ 'prettier/prettier': ['warn', { parser: 'less' }],
89
88
  },
90
89
  },
91
90
  {
@@ -93,8 +92,8 @@ module.exports = {
93
92
  files: ['*.yaml', '*.yml'],
94
93
  parser: 'yaml-eslint-parser',
95
94
  rules: {
96
- 'yml/quotes': [1, { prefer: 'double', avoidEscape: true }],
97
- 'prettier/prettier': [1, { parser: 'yaml', singleQuote: false }],
95
+ 'yml/quotes': ['warn', { prefer: 'double', avoidEscape: true }],
96
+ 'prettier/prettier': ['warn', { parser: 'yaml', singleQuote: false }],
98
97
  },
99
98
  },
100
99
  {
@@ -102,7 +101,7 @@ module.exports = {
102
101
  files: ['*.toml'],
103
102
  parser: 'toml-eslint-parser',
104
103
  rules: {
105
- 'prettier/prettier': 0,
104
+ 'prettier/prettier': 'off',
106
105
  },
107
106
  },
108
107
  {
@@ -110,15 +109,15 @@ module.exports = {
110
109
  parser: 'eslint-plugin-markdownlint/parser',
111
110
  extends: ['plugin:markdownlint/recommended'],
112
111
  rules: {
113
- 'markdownlint/md033': 0,
114
- 'markdownlint/md041': 0,
115
- 'prettier/prettier': [1, { parser: 'markdown' }],
112
+ 'markdownlint/md033': 'off',
113
+ 'markdownlint/md041': 'off',
114
+ 'prettier/prettier': ['warn', { parser: 'markdown' }],
116
115
  },
117
116
  },
118
117
  {
119
118
  files: ['package.json'],
120
119
  rules: {
121
- 'prettier/prettier': [1, { parser: 'json' }],
120
+ 'prettier/prettier': ['warn', { parser: 'json' }],
122
121
  },
123
122
  settings: {
124
123
  'json/json-with-comments-files': [],
@@ -155,7 +154,7 @@ module.exports = {
155
154
  {
156
155
  files: ['*.md.json'],
157
156
  rules: {
158
- 'prettier/prettier': [1, { parser: 'json' }],
157
+ 'prettier/prettier': ['warn', { parser: 'json' }],
159
158
  },
160
159
  },
161
160
  {
@@ -164,15 +163,15 @@ module.exports = {
164
163
  parser: '@html-eslint/parser',
165
164
  plugins: ['@html-eslint'],
166
165
  rules: {
167
- '@html-eslint/indent': 0,
168
- '@html-eslint/no-extra-spacing-attrs': 0,
169
- '@html-eslint/require-closing-tags': 0,
166
+ '@html-eslint/indent': 'off',
167
+ '@html-eslint/no-extra-spacing-attrs': 'off',
168
+ '@html-eslint/require-closing-tags': 'off',
170
169
  'disable-autofix/@html-eslint/require-closing-tags': [
171
- 1,
170
+ 'warn',
172
171
  { selfClosing: 'always' },
173
172
  ],
174
- 'spaced-comment': 0,
175
- 'prettier/prettier': [1, { parser: 'html' }],
173
+ 'spaced-comment': 'off',
174
+ 'prettier/prettier': ['warn', { parser: 'html' }],
176
175
  },
177
176
  },
178
177
  {
@@ -180,7 +179,7 @@ module.exports = {
180
179
  files: ['*.jsonc', '*rc'],
181
180
  parser: 'jsonc-eslint-parser',
182
181
  rules: {
183
- 'prettier/prettier': [1, { parser: 'json' }],
182
+ 'prettier/prettier': ['warn', { parser: 'json' }],
184
183
  },
185
184
  },
186
185
  {
@@ -188,16 +187,32 @@ module.exports = {
188
187
  files: ['*.json5'],
189
188
  parser: 'jsonc-eslint-parser',
190
189
  rules: {
191
- 'prettier/prettier': [1, { parser: 'json5' }],
190
+ 'prettier/prettier': ['warn', { parser: 'json5' }],
192
191
  },
193
192
  },
194
193
  {
195
- files: ['*.test.*'],
194
+ files: ['*.test.js'],
196
195
  plugins: ['jest'],
197
196
  extends: ['plugin:jest/all'],
197
+ env: {
198
+ jest: true,
199
+ },
200
+ rules: {
201
+ 'unicorn/no-array-callback-reference': 'off',
202
+ 'jest/unbound-method': 'off',
203
+ },
204
+ },
205
+ {
206
+ files: ['*.test.ts'],
207
+ parser: '@typescript-eslint/parser',
208
+ plugins: ['@typescript-eslint', 'jest'],
209
+ extends: ['plugin:jest/all'],
210
+ env: {
211
+ jest: true,
212
+ },
198
213
  rules: {
199
- 'unicorn/no-array-callback-reference': 0,
200
- 'jest/unbound-method': 0,
214
+ 'unicorn/no-array-callback-reference': 'off',
215
+ 'jest/unbound-method': 'off',
201
216
  },
202
217
  },
203
218
  {
@@ -236,23 +251,23 @@ module.exports = {
236
251
  ],
237
252
  root: true,
238
253
  rules: {
239
- camelcase: 1,
240
- 'class-methods-use-this': 0,
241
- 'constructor-super': 1,
242
- 'dot-notation': 1,
243
- 'func-names': 0,
244
- 'import/extensions': [1, 'never', { ignorePackages: true }],
245
- 'import/no-commonjs': 0,
246
- 'import/default': 0,
247
- 'import/named': 0,
248
- 'import/namespace': 0,
249
- 'import/no-named-as-default-member': 0,
254
+ camelcase: 'warn',
255
+ 'class-methods-use-this': 'off',
256
+ 'constructor-super': 'warn',
257
+ 'dot-notation': 'warn',
258
+ 'func-names': 'off',
259
+ 'import/extensions': ['warn', 'never', { ignorePackages: true }],
260
+ 'import/no-commonjs': 'off',
261
+ 'import/default': 'off',
262
+ 'import/named': 'off',
263
+ 'import/namespace': 'off',
264
+ 'import/no-named-as-default-member': 'off',
250
265
  'import/no-unresolved': [
251
- 1,
266
+ 'warn',
252
267
  { amd: true, commonjs: true, ignore: ['^node:'] },
253
268
  ],
254
269
  'import/order': [
255
- 1,
270
+ 'warn',
256
271
  {
257
272
  alphabetize: {
258
273
  order: 'asc',
@@ -260,33 +275,33 @@ module.exports = {
260
275
  'newlines-between': 'always',
261
276
  },
262
277
  ],
263
- 'jsx-quotes': 1,
264
- 'keyword-spacing': 1,
265
- 'no-caller': 1,
266
- 'no-confusing-arrow': 1,
267
- 'no-console': 0,
268
- 'no-const-assign': 1,
269
- 'no-delete-var': 1,
270
- 'no-dupe-class-members': 1,
271
- 'no-dupe-keys': 1,
272
- 'no-duplicate-imports': 1,
273
- 'no-else-return': 1,
274
- 'no-empty': 0,
275
- 'no-empty-pattern': 0,
276
- 'no-extra-parens': 0,
277
- 'no-extra-bind': 1,
278
- 'no-extra-semi': 1,
279
- 'no-floating-decimal': 1,
280
- 'no-iterator': 1,
281
- 'no-lonely-if': 1,
282
- 'no-mixed-spaces-and-tabs': [1, 'smart-tabs'],
283
- 'no-multi-str': 1,
284
- 'no-new-wrappers': 1,
285
- 'no-process-exit': 0,
286
- 'no-proto': 1,
287
- 'no-redeclare': 1,
278
+ 'jsx-quotes': 'warn',
279
+ 'keyword-spacing': 'warn',
280
+ 'no-caller': 'warn',
281
+ 'no-confusing-arrow': 'warn',
282
+ 'no-console': 'off',
283
+ 'no-const-assign': 'warn',
284
+ 'no-delete-var': 'warn',
285
+ 'no-dupe-class-members': 'warn',
286
+ 'no-dupe-keys': 'warn',
287
+ 'no-duplicate-imports': 'warn',
288
+ 'no-else-return': 'warn',
289
+ 'no-empty': 'off',
290
+ 'no-empty-pattern': 'off',
291
+ 'no-extra-parens': 'off',
292
+ 'no-extra-bind': 'warn',
293
+ 'no-extra-semi': 'warn',
294
+ 'no-floating-decimal': 'warn',
295
+ 'no-iterator': 'warn',
296
+ 'no-lonely-if': 'warn',
297
+ 'no-mixed-spaces-and-tabs': ['warn', 'smart-tabs'],
298
+ 'no-multi-str': 'warn',
299
+ 'no-new-wrappers': 'warn',
300
+ 'no-process-exit': 'off',
301
+ 'no-proto': 'warn',
302
+ 'no-redeclare': 'warn',
288
303
  'no-restricted-syntax': [
289
- 1,
304
+ 'warn',
290
305
  {
291
306
  message:
292
307
  'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
@@ -303,68 +318,68 @@ module.exports = {
303
318
  selector: 'WithStatement',
304
319
  },
305
320
  ],
306
- 'no-shadow': 0,
307
- 'no-shadow-restricted-names': 1,
308
- 'no-spaced-func': 1,
309
- 'no-this-before-super': 1,
310
- 'no-undef-init': 1,
311
- 'no-underscore-dangle': 0,
312
- 'no-unneeded-ternary': 1,
321
+ 'no-shadow': 'off',
322
+ 'no-shadow-restricted-names': 'warn',
323
+ 'no-spaced-func': 'warn',
324
+ 'no-this-before-super': 'warn',
325
+ 'no-undef-init': 'warn',
326
+ 'no-underscore-dangle': 'off',
327
+ 'no-unneeded-ternary': 'warn',
313
328
  'no-unused-vars': [
314
- 1,
329
+ 'warn',
315
330
  {
316
331
  args: 'after-used',
317
332
  ignoreRestSiblings: true,
318
333
  },
319
334
  ],
320
- 'no-useless-call': 1,
321
- 'no-useless-computed-key': 1,
322
- 'no-useless-concat': 1,
323
- 'no-useless-constructor': 1,
324
- 'no-useless-escape': 1,
325
- 'no-useless-rename': 1,
326
- 'no-useless-return': 1,
327
- 'no-var': 1,
328
- 'no-with': 1,
329
- 'object-curly-spacing': [0, 'always'],
330
- 'object-shorthand': 1,
331
- 'prefer-arrow-callback': 1,
335
+ 'no-useless-call': 'warn',
336
+ 'no-useless-computed-key': 'warn',
337
+ 'no-useless-concat': 'warn',
338
+ 'no-useless-constructor': 'warn',
339
+ 'no-useless-escape': 'warn',
340
+ 'no-useless-rename': 'warn',
341
+ 'no-useless-return': 'warn',
342
+ 'no-var': 'warn',
343
+ 'no-with': 'warn',
344
+ 'object-curly-spacing': ['off', 'always'],
345
+ 'object-shorthand': 'warn',
346
+ 'prefer-arrow-callback': 'warn',
332
347
  'prefer-destructuring': [
333
- 1,
348
+ 'warn',
334
349
  {
335
350
  array: false,
336
351
  object: true,
337
352
  },
338
353
  ],
339
- 'prefer-rest-params': 1,
340
- 'prefer-spread': 1,
341
- 'prefer-template': 1,
342
- 'prefer-const': 0,
343
- 'disable-autofix/prefer-const': 1,
344
- 'prettier/prettier': [1, { parser: 'babel' }],
345
- 'quote-props': [1, 'as-needed'],
354
+ 'prefer-rest-params': 'warn',
355
+ 'prefer-spread': 'warn',
356
+ 'prefer-template': 'warn',
357
+ 'prefer-const': 'off',
358
+ 'disable-autofix/prefer-const': 'warn',
359
+ 'prettier/prettier': ['warn', { parser: 'babel' }],
360
+ 'quote-props': ['warn', 'as-needed'],
346
361
  quotes: [
347
- 0,
362
+ 'off',
348
363
  'single',
349
364
  {
350
365
  allowTemplateLiterals: true,
351
366
  avoidEscape: true,
352
367
  },
353
368
  ],
354
- radix: 1,
355
- 'filenames/match-regex': 0,
356
- 'require-atomic-updates': 0,
357
- 'sort-imports': 0,
358
- 'rest-spread-spacing': 0,
359
- semi: 0,
360
- 'sort-vars': 1,
369
+ radix: 'warn',
370
+ 'filenames/match-regex': 'off',
371
+ 'require-atomic-updates': 'off',
372
+ 'sort-imports': 'off',
373
+ 'rest-spread-spacing': 'off',
374
+ semi: 'off',
375
+ 'sort-vars': 'warn',
361
376
  'space-before-function-paren': [
362
- 0,
377
+ 'off',
363
378
  { anonymous: 'always', asyncArrow: 'always', named: 'never' },
364
379
  ],
365
- 'space-in-parens': [0, 'never'],
380
+ 'space-in-parens': ['off', 'never'],
366
381
  'spaced-comment': [
367
- 1,
382
+ 'warn',
368
383
  'always',
369
384
  {
370
385
  block: {
@@ -378,10 +393,10 @@ module.exports = {
378
393
  },
379
394
  },
380
395
  ],
381
- strict: [1, 'never'],
382
- 'unicode-bom': 1,
396
+ strict: ['warn', 'never'],
397
+ 'unicode-bom': 'warn',
383
398
  'unicorn/filename-case': [
384
- 1,
399
+ 'warn',
385
400
  {
386
401
  cases: {
387
402
  camelCase: true,
@@ -390,8 +405,9 @@ module.exports = {
390
405
  ignore: ['.*.md'],
391
406
  },
392
407
  ],
393
- 'unicorn/import-index': [1, { ignoreImports: true }],
394
- 'valid-jsdoc': 0,
408
+ 'unicorn/import-index': ['warn', { ignoreImports: true }],
409
+ '@cypress/json/json-with-comments':
410
+ '[**/tsconfig.json, .vscode/**, **/cypress.json, **/cypress.jsonc, **/cypress.json5]',
395
411
  },
396
412
  settings: {
397
413
  polyfills: ['Promise'],
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@mikey-pro/eslint-config",
3
- "version": "7.1.1",
3
+ "version": "7.2.2",
4
4
  "description": "Mikey Pro ESLint configuration",
5
5
  "main": "index.js",
6
6
  "dependencies": {
7
- "@babel/core": "^7.23.9",
8
- "@babel/eslint-parser": "^7.23",
7
+ "@babel/core": "^7.24.3",
8
+ "@babel/eslint-parser": "^7.24",
9
9
  "@babel/eslint-plugin": "^7.23",
10
- "@babel/preset-env": "^7.23",
10
+ "@babel/preset-env": "^7.24",
11
11
  "@cypress/eslint-plugin-json": "^3.2.3",
12
- "@html-eslint/eslint-plugin": "^0.23.1",
13
- "@html-eslint/parser": "^0.23.0",
14
- "@typescript-eslint/eslint-plugin": "^7.0.2",
15
- "@typescript-eslint/parser": "^7.0.2",
12
+ "@html-eslint/eslint-plugin": "^0.24.0",
13
+ "@html-eslint/parser": "^0.24.0",
14
+ "@typescript-eslint/eslint-plugin": "^7.4.0",
15
+ "@typescript-eslint/parser": "^7.4.0",
16
16
  "eslint-config-prettier": "^9.1",
17
17
  "eslint-import-resolver-typescript": "^3.6.1",
18
18
  "eslint-plugin-compat": "^4.2",
@@ -21,16 +21,16 @@
21
21
  "eslint-plugin-disable-autofix": "^4.2.0",
22
22
  "eslint-plugin-import": "^2.29.1",
23
23
  "eslint-plugin-jest": "^27.9.0",
24
- "eslint-plugin-jsonc": "^2.13.0",
24
+ "eslint-plugin-jsonc": "^2.14.1",
25
25
  "eslint-plugin-markdownlint": "^0.5.0",
26
26
  "eslint-plugin-n": "^16.6.2",
27
27
  "eslint-plugin-only-warn": "^1.1.0",
28
28
  "eslint-plugin-prettier": "^5.1",
29
29
  "eslint-plugin-promise": "^6.1.1",
30
- "eslint-plugin-toml": "^0.9.2",
30
+ "eslint-plugin-toml": "^0.10.0",
31
31
  "eslint-plugin-unicorn": "^51.0.1",
32
- "eslint-plugin-yml": "^1.12.2",
33
- "postcss": "^8.4.35",
32
+ "eslint-plugin-yml": "^1.13.2",
33
+ "postcss": "^8.4.38",
34
34
  "postcss-scss": "^4.0.9",
35
35
  "yaml-eslint-parser": "^1.2.2"
36
36
  },