@mikey-pro/eslint-config 4.5.1 → 4.6.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 +44 -43
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  module.exports = {
2
2
  extends: [
3
3
  'eslint:recommended',
4
+ 'react-app',
5
+ 'react-app/jest',
4
6
  'plugin:unicorn/all',
5
7
  'plugin:sonarjs/recommended',
6
8
  'plugin:compat/recommended',
@@ -39,7 +41,6 @@ module.exports = {
39
41
  },
40
42
  {
41
43
  files: ['*.tsx', '*.jsx'],
42
- extends: ['react-app', 'react-app/jest'],
43
44
  parserOptions: {
44
45
  extraFileExtensions: ['.vue', '.svelte'],
45
46
  },
@@ -51,46 +52,6 @@ module.exports = {
51
52
  'import/no-unresolved': 0,
52
53
  '@typescript-eslint/naming-convention': 0,
53
54
  '@typescript-eslint/indent': 0,
54
- 'react/state-in-constructor': 0,
55
- 'react/no-deprecated': 1,
56
- 'react/react-in-jsx-scope': 0,
57
- 'react/display-name': [1, { ignoreTranspilerName: false }],
58
- 'react/jsx-no-bind': [
59
- 1,
60
- {
61
- ignoreRefs: true,
62
- allowFunctions: true,
63
- allowArrowFunctions: true,
64
- },
65
- ],
66
- 'react/no-string-refs': 1,
67
- 'react/no-find-dom-node': 1,
68
- 'react/jsx-no-comment-textnodes': 1,
69
- 'react/jsx-curly-spacing': 1,
70
- 'react/jsx-no-undef': 1,
71
- 'react/jsx-uses-react': 1,
72
- 'react/jsx-uses-vars': 1,
73
- 'react/function-component-definition': 0,
74
- 'react/jsx-no-duplicate-props': 1,
75
- 'react/jsx-no-target-blank': 1,
76
- 'react/jsx-tag-spacing': [1, { beforeSelfClosing: 'always' }],
77
- 'react/jsx-key': [1, { checkFragmentShorthand: true }],
78
- 'react/prefer-es6-class': 1,
79
- 'react/prefer-stateless-function': 1,
80
- 'react/require-render-return': 1,
81
- 'react/no-danger': 1,
82
- 'react/no-did-mount-set-state': 1,
83
- 'react/no-did-update-set-state': 1,
84
- 'react/no-is-mounted': 1,
85
- 'react-hooks/rules-of-hooks': 1,
86
- 'react-hooks/exhaustive-deps': 1,
87
- 'react/self-closing-comp': [
88
- 'error',
89
- {
90
- component: true,
91
- html: false,
92
- },
93
- ],
94
55
  'prettier/prettier': [1, { parser: 'typescript' }],
95
56
  },
96
57
  },
@@ -235,7 +196,7 @@ module.exports = {
235
196
  },
236
197
  {
237
198
  files: ['*.json', '*.jsonc', '*rc'],
238
- extends: ['plugin:jsonc/all'],
199
+ extends: ['plugin:jsonc/recommended-with-json'],
239
200
  parser: 'jsonc-eslint-parser',
240
201
  plugins: ['json-format'],
241
202
  rules: {
@@ -244,7 +205,7 @@ module.exports = {
244
205
  },
245
206
  {
246
207
  files: ['*.json5'],
247
- extends: ['plugin:jsonc/all'],
208
+ extends: ['plugin:jsonc/recommended-with-json5'],
248
209
  parser: 'jsonc-eslint-parser',
249
210
  rules: {
250
211
  'prettier/prettier': [1, { parser: 'json5' }],
@@ -397,6 +358,46 @@ module.exports = {
397
358
  ignore: ['README.md'],
398
359
  },
399
360
  ],
361
+ 'react/state-in-constructor': 0,
362
+ 'react/no-deprecated': 1,
363
+ 'react/react-in-jsx-scope': 0,
364
+ 'react/display-name': [1, { ignoreTranspilerName: false }],
365
+ 'react/jsx-no-bind': [
366
+ 1,
367
+ {
368
+ ignoreRefs: true,
369
+ allowFunctions: true,
370
+ allowArrowFunctions: true,
371
+ },
372
+ ],
373
+ 'react/no-string-refs': 1,
374
+ 'react/no-find-dom-node': 1,
375
+ 'react/jsx-no-comment-textnodes': 1,
376
+ 'react/jsx-curly-spacing': 1,
377
+ 'react/jsx-no-undef': 1,
378
+ 'react/jsx-uses-react': 1,
379
+ 'react/jsx-uses-vars': 1,
380
+ 'react/function-component-definition': 0,
381
+ 'react/jsx-no-duplicate-props': 1,
382
+ 'react/jsx-no-target-blank': 1,
383
+ 'react/jsx-tag-spacing': [1, { beforeSelfClosing: 'always' }],
384
+ 'react/jsx-key': [1, { checkFragmentShorthand: true }],
385
+ 'react/prefer-es6-class': 1,
386
+ 'react/prefer-stateless-function': 1,
387
+ 'react/require-render-return': 1,
388
+ 'react/no-danger': 1,
389
+ 'react/no-did-mount-set-state': 1,
390
+ 'react/no-did-update-set-state': 1,
391
+ 'react/no-is-mounted': 1,
392
+ 'react-hooks/rules-of-hooks': 1,
393
+ 'react-hooks/exhaustive-deps': 1,
394
+ 'react/self-closing-comp': [
395
+ 'error',
396
+ {
397
+ component: true,
398
+ html: false,
399
+ },
400
+ ],
400
401
  'prettier/prettier': [1, { parser: 'babel' }],
401
402
  },
402
403
  plugins: [
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@mikey-pro/eslint-config",
3
- "version": "4.5.1",
3
+ "version": "4.6.3",
4
4
  "description": "Mikey Pro ESLint configuration",
5
5
  "main": "index.js",
6
6
  "dependencies": {
7
- "@babel/core": "^7.17.4",
7
+ "@babel/core": "^7.17.5",
8
8
  "@babel/eslint-parser": "^7.17",
9
9
  "@babel/eslint-plugin": "^7.16",
10
10
  "@babel/plugin-transform-react-jsx": "^7.17.3",
@@ -21,7 +21,7 @@
21
21
  "eslint-plugin-css-modules": "^2.11",
22
22
  "eslint-plugin-disable-autofix": "^0.1.6",
23
23
  "eslint-plugin-json-format": "^2.0",
24
- "eslint-plugin-jsonc": "^2.1.0",
24
+ "eslint-plugin-jsonc": "^2.2.1",
25
25
  "eslint-plugin-md": "^1.0",
26
26
  "eslint-plugin-node": "^11.1.0",
27
27
  "eslint-plugin-only-warn": "^1.0.3",
@@ -30,7 +30,7 @@
30
30
  "eslint-plugin-sonarjs": "^0.11.0",
31
31
  "eslint-plugin-svelte3": "^3.4.0",
32
32
  "eslint-plugin-toml": "^0.3.0",
33
- "eslint-plugin-unicorn": "^40.1.0",
33
+ "eslint-plugin-unicorn": "^41.0.0",
34
34
  "eslint-plugin-vue": "^8.4",
35
35
  "eslint-plugin-yaml": "^0.5.0",
36
36
  "vue-eslint-parser": "^8.2"