@mikey-pro/eslint-config 4.5.0 → 4.6.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 +50 -41
  2. package/package.json +8 -8
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
  },
@@ -239,6 +200,10 @@ module.exports = {
239
200
  parser: 'jsonc-eslint-parser',
240
201
  plugins: ['json-format'],
241
202
  rules: {
203
+ 'jsonc/sort-array-values': [
204
+ 1,
205
+ { pathPattern: '.*', order: { type: 'asc' } },
206
+ ],
242
207
  'prettier/prettier': [1, { parser: 'json' }],
243
208
  },
244
209
  },
@@ -247,6 +212,10 @@ module.exports = {
247
212
  extends: ['plugin:jsonc/all'],
248
213
  parser: 'jsonc-eslint-parser',
249
214
  rules: {
215
+ 'jsonc/sort-array-values': [
216
+ 1,
217
+ { pathPattern: '.*', order: { type: 'asc' } },
218
+ ],
250
219
  'prettier/prettier': [1, { parser: 'json5' }],
251
220
  },
252
221
  },
@@ -397,6 +366,46 @@ module.exports = {
397
366
  ignore: ['README.md'],
398
367
  },
399
368
  ],
369
+ 'react/state-in-constructor': 0,
370
+ 'react/no-deprecated': 1,
371
+ 'react/react-in-jsx-scope': 0,
372
+ 'react/display-name': [1, { ignoreTranspilerName: false }],
373
+ 'react/jsx-no-bind': [
374
+ 1,
375
+ {
376
+ ignoreRefs: true,
377
+ allowFunctions: true,
378
+ allowArrowFunctions: true,
379
+ },
380
+ ],
381
+ 'react/no-string-refs': 1,
382
+ 'react/no-find-dom-node': 1,
383
+ 'react/jsx-no-comment-textnodes': 1,
384
+ 'react/jsx-curly-spacing': 1,
385
+ 'react/jsx-no-undef': 1,
386
+ 'react/jsx-uses-react': 1,
387
+ 'react/jsx-uses-vars': 1,
388
+ 'react/function-component-definition': 0,
389
+ 'react/jsx-no-duplicate-props': 1,
390
+ 'react/jsx-no-target-blank': 1,
391
+ 'react/jsx-tag-spacing': [1, { beforeSelfClosing: 'always' }],
392
+ 'react/jsx-key': [1, { checkFragmentShorthand: true }],
393
+ 'react/prefer-es6-class': 1,
394
+ 'react/prefer-stateless-function': 1,
395
+ 'react/require-render-return': 1,
396
+ 'react/no-danger': 1,
397
+ 'react/no-did-mount-set-state': 1,
398
+ 'react/no-did-update-set-state': 1,
399
+ 'react/no-is-mounted': 1,
400
+ 'react-hooks/rules-of-hooks': 1,
401
+ 'react-hooks/exhaustive-deps': 1,
402
+ 'react/self-closing-comp': [
403
+ 'error',
404
+ {
405
+ component: true,
406
+ html: false,
407
+ },
408
+ ],
400
409
  'prettier/prettier': [1, { parser: 'babel' }],
401
410
  },
402
411
  plugins: [
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@mikey-pro/eslint-config",
3
- "version": "4.5.0",
3
+ "version": "4.6.2",
4
4
  "description": "Mikey Pro ESLint configuration",
5
5
  "main": "index.js",
6
6
  "dependencies": {
7
- "@babel/core": "^7.16.12",
8
- "@babel/eslint-parser": "^7.16",
7
+ "@babel/core": "^7.17.5",
8
+ "@babel/eslint-parser": "^7.17",
9
9
  "@babel/eslint-plugin": "^7.16",
10
- "@babel/plugin-transform-react-jsx": "^7.16.7",
10
+ "@babel/plugin-transform-react-jsx": "^7.17.3",
11
11
  "@babel/preset-env": "^7.16",
12
12
  "@html-eslint/eslint-plugin": "^0.13.1",
13
13
  "@html-eslint/parser": "^0.13.1",
14
- "@typescript-eslint/eslint-plugin": "^5.10.1",
15
- "@typescript-eslint/parser": "^5.10.1",
14
+ "@typescript-eslint/eslint-plugin": "^5.12.0",
15
+ "@typescript-eslint/parser": "^5.12.0",
16
16
  "@vue/babel-plugin-jsx": "^1.1.1",
17
17
  "eslint-config-prettier": "^8.3",
18
18
  "eslint-config-react-app": "^7.0.0",
@@ -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"