@mikey-pro/eslint-config 3.2.6 → 3.2.10

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/package.json +7 -7
  2. package/index.cjs +0 -519
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@mikey-pro/eslint-config",
3
- "version": "3.2.6",
3
+ "version": "3.2.10",
4
4
  "description": "Mikey Pro ESLint configuration",
5
5
  "main": "index.cjs",
6
6
  "dependencies": {
7
- "@babel/core": "^7.16.0",
7
+ "@babel/core": "^7.16.5",
8
8
  "@babel/eslint-parser": "^7.16",
9
- "@babel/eslint-plugin": "^7.14",
10
- "@babel/plugin-transform-react-jsx": "^7.16.0",
9
+ "@babel/eslint-plugin": "^7.16",
10
+ "@babel/plugin-transform-react-jsx": "^7.16.5",
11
11
  "@babel/preset-env": "^7.16",
12
12
  "@html-eslint/eslint-plugin": "^0.13.0",
13
13
  "@html-eslint/parser": "^0.13.0",
14
- "@typescript-eslint/eslint-plugin": "^5.5.0",
15
- "@typescript-eslint/parser": "^5.5.0",
14
+ "@typescript-eslint/eslint-plugin": "^5.7.0",
15
+ "@typescript-eslint/parser": "^5.7.0",
16
16
  "@vue/babel-plugin-jsx": "^1.1.1",
17
17
  "@vue/eslint-config-airbnb": "^6.0",
18
18
  "babel-preset-airbnb": "^5.0.0",
@@ -39,7 +39,7 @@
39
39
  "eslint-plugin-svelte3": "^3.2.1",
40
40
  "eslint-plugin-toml": "^0.3.0",
41
41
  "eslint-plugin-unicorn": "^39.0.0",
42
- "eslint-plugin-vue": "^8.1",
42
+ "eslint-plugin-vue": "^8.2",
43
43
  "eslint-plugin-yaml": "^0.5.0",
44
44
  "vue-eslint-parser": "^8.0"
45
45
  },
package/index.cjs DELETED
@@ -1,519 +0,0 @@
1
- module.exports = {
2
- extends: [
3
- 'airbnb',
4
- 'standard',
5
- 'eslint:recommended',
6
- 'plugin:unicorn/all',
7
- 'plugin:github/recommended',
8
- 'plugin:jsx-a11y/recommended',
9
- 'plugin:sonarjs/recommended',
10
- 'plugin:compat/recommended',
11
- 'plugin:css-modules/recommended',
12
- 'plugin:prettier/recommended',
13
- ],
14
- overrides: [
15
- {
16
- files: ['*.ts'],
17
- parser: '@typescript-eslint/parser',
18
- parserOptions: {
19
- tsconfigRootDir: __dirname,
20
- project: ['../../../tsconfig.json'],
21
- extraFileExtensions: ['.vue', '.svelte'],
22
- sourceType: 'module',
23
- ecmaVersion: 'latest',
24
- ecmaFeatures: {
25
- jsx: true,
26
- },
27
- },
28
- plugins: ['@typescript-eslint'],
29
- extends: [
30
- 'airbnb-typescript',
31
- 'plugin:@typescript-eslint/recommended',
32
- 'plugin:@typescript-eslint/recommended-requiring-type-checking',
33
- ],
34
- rules: {
35
- 'import/named': 0,
36
- 'import/namespace': 0,
37
- 'import/default': 0,
38
- 'import/no-named-as-default-member': 0,
39
- '@typescript-eslint/indent': 0,
40
- 'prettier/prettier': [2, { parser: 'typescript' }],
41
- },
42
- },
43
- {
44
- files: ['*.tsx'],
45
- parser: '@typescript-eslint/parser',
46
- extends: [
47
- 'airbnb-typescript',
48
- 'plugin:react/recommended',
49
- 'plugin:react-hooks/recommended',
50
- 'plugin:@typescript-eslint/recommended',
51
- 'plugin:@typescript-eslint/recommended-requiring-type-checking',
52
- ],
53
- plugins: ['@typescript-eslint', 'react', 'react-hooks'],
54
- parserOptions: {
55
- tsconfigRootDir: __dirname,
56
- project: ['../../../tsconfig.json'],
57
- extraFileExtensions: ['.vue', '.svelte'],
58
- sourceType: 'module',
59
- ecmaVersion: 'latest',
60
- ecmaFeatures: {
61
- jsx: true,
62
- },
63
- },
64
- rules: {
65
- 'import/named': 0,
66
- 'import/namespace': 0,
67
- 'import/default': 0,
68
- 'import/no-named-as-default-member': 0,
69
- '@typescript-eslint/indent': 0,
70
- 'react/state-in-constructor': 0,
71
- 'react/no-deprecated': 2,
72
- 'react/react-in-jsx-scope': 0,
73
- 'react/display-name': [1, { ignoreTranspilerName: false }],
74
- 'react/jsx-no-bind': [
75
- 1,
76
- {
77
- ignoreRefs: true,
78
- allowFunctions: true,
79
- allowArrowFunctions: true,
80
- },
81
- ],
82
- 'react/no-string-refs': 2,
83
- 'react/no-find-dom-node': 2,
84
- 'react/jsx-no-comment-textnodes': 2,
85
- 'react/jsx-curly-spacing': 2,
86
- 'react/jsx-no-undef': 2,
87
- 'react/jsx-uses-react': 2,
88
- 'react/jsx-uses-vars': 2,
89
- 'react/function-component-definition': 0,
90
- 'react/jsx-no-duplicate-props': 2,
91
- 'react/jsx-no-target-blank': 2,
92
- 'react/jsx-tag-spacing': [2, { beforeSelfClosing: 'always' }],
93
- 'react/jsx-key': [2, { checkFragmentShorthand: true }],
94
- 'react/self-closing-comp': 2,
95
- 'react/prefer-es6-class': 2,
96
- 'react/prefer-stateless-function': 1,
97
- 'react/require-render-return': 2,
98
- 'react/no-danger': 1,
99
- 'react/no-did-mount-set-state': 2,
100
- 'react/no-did-update-set-state': 2,
101
- 'react/no-is-mounted': 2,
102
- 'react-hooks/rules-of-hooks': 2,
103
- 'react-hooks/exhaustive-deps': 1,
104
- 'prettier/prettier': [2, { parser: 'typescript' }],
105
- },
106
- },
107
- {
108
- files: ['*.css'],
109
- rules: {
110
- 'prettier/prettier': [2, { parser: 'css' }],
111
- },
112
- },
113
- {
114
- files: ['*.scss'],
115
- rules: {
116
- 'prettier/prettier': [2, { parser: 'scss' }],
117
- },
118
- },
119
- {
120
- files: ['*.less'],
121
- rules: {
122
- 'prettier/prettier': [2, { parser: 'less' }],
123
- },
124
- },
125
- {
126
- files: ['*.yaml', '*.yml'],
127
- plugins: ['yaml'],
128
- extends: ['plugin:yaml/recommended'],
129
- rules: {
130
- 'prettier/prettier': [2, { parser: 'yaml' }],
131
- },
132
- },
133
- {
134
- files: ['*.toml'],
135
- parser: 'toml-eslint-parser',
136
- extends: ['plugin:toml/standard'],
137
- rules: {
138
- 'prettier/prettier': 0,
139
- },
140
- },
141
- {
142
- files: ['*.jsx'],
143
- extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
144
- plugins: ['react', 'react-hooks'],
145
- parser: '@babel/eslint-parser',
146
- parserOptions: {
147
- requireConfigFile: false,
148
- ecmaVersion: 'latest',
149
- sourceType: 'module',
150
- babelOptions: {
151
- presets: [
152
- [
153
- '@babel/preset-env',
154
- {
155
- targets: {
156
- node: 'current',
157
- },
158
- },
159
- ],
160
- '@babel/preset-react',
161
- 'airbnb',
162
- ],
163
- },
164
- },
165
- rules: {
166
- 'react/no-deprecated': 2,
167
- 'react/react-in-jsx-scope': 0,
168
- 'react/display-name': [1, { ignoreTranspilerName: false }],
169
- 'react/jsx-no-bind': [
170
- 1,
171
- {
172
- ignoreRefs: true,
173
- allowFunctions: true,
174
- allowArrowFunctions: true,
175
- },
176
- ],
177
- 'react/no-string-refs': 2,
178
- 'react/no-find-dom-node': 2,
179
- 'react/jsx-no-comment-textnodes': 2,
180
- 'react/jsx-curly-spacing': 2,
181
- 'react/jsx-no-undef': 2,
182
- 'react/jsx-uses-react': 2,
183
- 'react/jsx-uses-vars': 2,
184
- 'react/function-component-definition': 0,
185
- 'react/state-in-constructor': 0,
186
- 'react/jsx-no-duplicate-props': 2,
187
- 'react/jsx-no-target-blank': 2,
188
- 'react/jsx-tag-spacing': [2, { beforeSelfClosing: 'always' }],
189
- 'react/jsx-key': [2, { checkFragmentShorthand: true }],
190
- 'react/self-closing-comp': 2,
191
- 'react/prefer-es6-class': 2,
192
- 'react/prefer-stateless-function': 1,
193
- 'react/require-render-return': 2,
194
- 'react/no-danger': 1,
195
- 'react/no-did-mount-set-state': 2,
196
- 'react/no-did-update-set-state': 2,
197
- 'react/no-is-mounted': 2,
198
- 'react-hooks/rules-of-hooks': 2,
199
- 'react-hooks/exhaustive-deps': 1,
200
- },
201
- },
202
- {
203
- files: ['*.md'],
204
- parser: 'markdown-eslint-parser',
205
- extends: ['plugin:md/recommended'],
206
- rules: {
207
- 'md/remark': [
208
- 2,
209
- {
210
- plugins: [
211
- 'preset-lint-markdown-style-guide',
212
- ['lint-emphasis-marker', '_'],
213
- ],
214
- },
215
- ],
216
- 'prettier/prettier': [2, { parser: 'markdown' }],
217
- },
218
- },
219
- {
220
- files: ['*.md.json'],
221
- rules: {
222
- 'prettier/prettier': [2, { parser: 'json' }],
223
- },
224
- },
225
- {
226
- files: ['*.html'],
227
- parser: '@html-eslint/parser',
228
- extends: ['plugin:@html-eslint/recommended'],
229
- plugins: ['@html-eslint'],
230
- rules: {
231
- 'spaced-comment': 0,
232
- '@html-eslint/indent': 0,
233
- '@html-eslint/no-extra-spacing-attrs': 0,
234
- '@html-eslint/require-closing-tags': 0,
235
- 'disable-autofix/@html-eslint/require-closing-tags': [
236
- 2,
237
- { selfClosing: 'always' },
238
- ],
239
- 'prettier/prettier': [2, { parser: 'html' }],
240
- },
241
- },
242
- {
243
- files: ['*.vue'],
244
- parser: 'vue-eslint-parser',
245
- extends: ['plugin:vue/vue3-recommended', '@vue/airbnb'],
246
- parserOptions: {
247
- requireConfigFile: false,
248
- ecmaVersion: 'latest',
249
- sourceType: 'module',
250
- babelOptions: {
251
- presets: [
252
- [
253
- '@babel/preset-env',
254
- {
255
- targets: {
256
- node: 'current',
257
- },
258
- },
259
- ],
260
- ],
261
- plugins: [
262
- 'eslint-plugin-vue',
263
- [
264
- '@babel/plugin-transform-react-jsx',
265
- {
266
- pragma: 'h',
267
- pragmaFrag: 'Fragment',
268
- },
269
- ],
270
- ],
271
- },
272
- },
273
- rules: {
274
- 'vue/html-self-closing': [
275
- 2,
276
- {
277
- html: {
278
- void: 'always',
279
- normal: 'always',
280
- component: 'always',
281
- },
282
- svg: 'always',
283
- math: 'always',
284
- },
285
- ],
286
- 'vue/component-tags-order': [
287
- 2,
288
- {
289
- order: [['script', 'template'], 'style'],
290
- },
291
- ],
292
- 'prettier/prettier': 0,
293
- },
294
- },
295
- {
296
- files: ['*.svelte'],
297
- processor: 'svelte3/svelte3',
298
- plugins: ['svelte3'],
299
- rules: {
300
- 'import/first': 0,
301
- 'import/no-duplicates': 0,
302
- 'import/no-mutable-exports': 0,
303
- 'import/no-unresolved': 0,
304
- 'prettier/prettier': 0,
305
- },
306
- },
307
- {
308
- files: ['*.json', '*.jsonc', '*rc'],
309
- extends: ['plugin:jsonc/all'],
310
- parser: 'jsonc-eslint-parser',
311
- plugins: ['json-format'],
312
- rules: {
313
- 'prettier/prettier': [2, { parser: 'json' }],
314
- },
315
- },
316
- {
317
- files: ['*.json5'],
318
- extends: ['plugin:jsonc/all'],
319
- parser: 'jsonc-eslint-parser',
320
- rules: {
321
- 'prettier/prettier': [2, { parser: 'json5' }],
322
- },
323
- },
324
- ],
325
- env: {
326
- browser: true,
327
- node: true,
328
- es6: true,
329
- commonjs: true,
330
- es2021: true,
331
- },
332
- rules: {
333
- 'no-restricted-syntax': [
334
- 2,
335
- {
336
- selector: 'ForInStatement',
337
- message:
338
- '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.',
339
- },
340
- {
341
- selector: 'LabeledStatement',
342
- message:
343
- 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
344
- },
345
- {
346
- selector: 'WithStatement',
347
- message:
348
- '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
349
- },
350
- ],
351
- camelcase: 0,
352
- 'no-console': 0,
353
- 'func-names': 0,
354
- 'no-process-exit': 0,
355
- 'class-methods-use-this': 0,
356
- 'no-underscore-dangle': 0,
357
- 'import/no-unresolved': [
358
- 2,
359
- { commonjs: true, amd: true, ignore: ['^node:'] },
360
- ],
361
- 'import/order': [
362
- 2,
363
- {
364
- alphabetize: {
365
- order: 'asc',
366
- },
367
- 'newlines-between': 'always',
368
- },
369
- ],
370
- 'import/extensions': ['error', 'always', { ignorePackages: true }],
371
- 'eslint-comments/no-use': [
372
- 'error',
373
- { allow: ['eslint-disable', 'eslint-disable-next-line'] },
374
- ],
375
- 'keyword-spacing': 2,
376
- 'require-atomic-updates': 0,
377
- 'import/no-commonjs': 0,
378
- 'sort-imports': 0,
379
- 'constructor-super': 2,
380
- 'no-caller': 2,
381
- 'no-const-assign': 2,
382
- 'no-delete-var': 2,
383
- 'no-dupe-class-members': 2,
384
- 'no-dupe-keys': 2,
385
- 'no-duplicate-imports': 2,
386
- 'no-else-return': 1,
387
- 'no-empty-pattern': 0,
388
- 'no-empty': 0,
389
- 'no-extra-parens': 0,
390
- 'no-iterator': 2,
391
- 'no-lonely-if': 2,
392
- 'no-mixed-spaces-and-tabs': [1, 'smart-tabs'],
393
- 'no-multi-str': 1,
394
- 'no-new-wrappers': 2,
395
- 'no-proto': 2,
396
- 'no-redeclare': 2,
397
- 'no-shadow-restricted-names': 2,
398
- 'no-shadow': 0,
399
- 'no-spaced-func': 2,
400
- 'no-this-before-super': 2,
401
- 'no-undef-init': 2,
402
- 'no-unneeded-ternary': 2,
403
- 'no-unused-vars': [
404
- 2,
405
- {
406
- args: 'after-used',
407
- ignoreRestSiblings: true,
408
- },
409
- ],
410
- 'no-useless-call': 1,
411
- 'no-useless-computed-key': 1,
412
- 'no-useless-concat': 1,
413
- 'no-useless-constructor': 1,
414
- 'no-useless-escape': 1,
415
- 'no-useless-rename': 1,
416
- 'no-var': 1,
417
- 'no-with': 2,
418
- semi: 0,
419
- strict: [2, 'never'],
420
- 'object-curly-spacing': [0, 'always'],
421
- 'rest-spread-spacing': 0,
422
- 'space-before-function-paren': [0, 'always'],
423
- 'space-in-parens': [0, 'never'],
424
- 'object-shorthand': 1,
425
- 'prefer-arrow-callback': 1,
426
- 'prefer-rest-params': 1,
427
- 'prefer-spread': 1,
428
- 'prefer-template': 1,
429
- quotes: [
430
- 0,
431
- 'single',
432
- {
433
- avoidEscape: true,
434
- allowTemplateLiterals: true,
435
- },
436
- ],
437
- 'quote-props': [2, 'as-needed'],
438
- radix: 1,
439
- 'unicode-bom': 2,
440
- 'valid-jsdoc': 0,
441
- 'spaced-comment': [
442
- 2,
443
- 'always',
444
- {
445
- line: {
446
- markers: ['/'],
447
- exceptions: ['-', '+'],
448
- },
449
- block: {
450
- markers: ['!'],
451
- exceptions: ['*'],
452
- balanced: true,
453
- },
454
- },
455
- ],
456
- 'unicorn/import-index': [2, { ignoreImports: true }],
457
- 'filenames/match-regex': 0,
458
- 'unicorn/filename-case': [
459
- 2,
460
- {
461
- cases: {
462
- camelCase: true,
463
- pascalCase: true,
464
- },
465
- ignore: ['README.md'],
466
- },
467
- ],
468
- 'prettier/prettier': [2, { parser: 'babel' }],
469
- },
470
- plugins: [
471
- 'import',
472
- 'prettier',
473
- 'css-modules',
474
- 'disable-autofix',
475
- '@babel',
476
- 'unicorn',
477
- 'sonarjs',
478
- 'github',
479
- ],
480
- ignorePatterns: [
481
- '!.*',
482
- 'node_modules',
483
- 'vendor',
484
- 'dist',
485
- 'package-lock.json',
486
- 'LICENSE',
487
- '.vscode',
488
- '.github',
489
- 'tsconfig.json',
490
- ],
491
- root: true,
492
- settings: {
493
- 'json/sort-package-json': 'pro',
494
- polyfills: ['Promise'],
495
- react: {
496
- pragma: 'h',
497
- version: 'preact',
498
- },
499
- },
500
- parser: '@babel/eslint-parser',
501
- parserOptions: {
502
- requireConfigFile: false,
503
- ecmaVersion: 'latest',
504
- sourceType: 'module',
505
- babelOptions: {
506
- presets: [
507
- [
508
- '@babel/preset-env',
509
- {
510
- targets: {
511
- node: 'current',
512
- },
513
- },
514
- ],
515
- 'airbnb',
516
- ],
517
- },
518
- },
519
- };