@mikey-pro/eslint-config 4.4.1 → 4.6.1

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 +43 -76
  2. package/package.json +10 -10
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',
@@ -38,8 +40,7 @@ module.exports = {
38
40
  },
39
41
  },
40
42
  {
41
- files: ['*.tsx'],
42
- extends: ['react-app', 'react-app/jest'],
43
+ files: ['*.tsx', '*.jsx'],
43
44
  parserOptions: {
44
45
  extraFileExtensions: ['.vue', '.svelte'],
45
46
  },
@@ -51,40 +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/self-closing-comp': 1,
79
- 'react/prefer-es6-class': 1,
80
- 'react/prefer-stateless-function': 1,
81
- 'react/require-render-return': 1,
82
- 'react/no-danger': 1,
83
- 'react/no-did-mount-set-state': 1,
84
- 'react/no-did-update-set-state': 1,
85
- 'react/no-is-mounted': 1,
86
- 'react-hooks/rules-of-hooks': 1,
87
- 'react-hooks/exhaustive-deps': 1,
88
55
  'prettier/prettier': [1, { parser: 'typescript' }],
89
56
  },
90
57
  },
@@ -122,46 +89,6 @@ module.exports = {
122
89
  'prettier/prettier': 0,
123
90
  },
124
91
  },
125
- {
126
- files: ['*.jsx'],
127
- extends: ['react-app', 'react-app/jest'],
128
- rules: {
129
- 'react/no-deprecated': 1,
130
- 'react/react-in-jsx-scope': 0,
131
- 'react/display-name': [1, { ignoreTranspilerName: false }],
132
- 'react/jsx-no-bind': [
133
- 1,
134
- {
135
- ignoreRefs: true,
136
- allowFunctions: true,
137
- allowArrowFunctions: true,
138
- },
139
- ],
140
- 'react/no-string-refs': 1,
141
- 'react/no-find-dom-node': 1,
142
- 'react/jsx-no-comment-textnodes': 1,
143
- 'react/jsx-curly-spacing': 1,
144
- 'react/jsx-no-undef': 1,
145
- 'react/jsx-uses-react': 1,
146
- 'react/jsx-uses-vars': 1,
147
- 'react/function-component-definition': 0,
148
- 'react/state-in-constructor': 0,
149
- 'react/jsx-no-duplicate-props': 1,
150
- 'react/jsx-no-target-blank': 1,
151
- 'react/jsx-tag-spacing': [1, { beforeSelfClosing: 'always' }],
152
- 'react/jsx-key': [1, { checkFragmentShorthand: true }],
153
- 'react/self-closing-comp': 1,
154
- 'react/prefer-es6-class': 1,
155
- 'react/prefer-stateless-function': 1,
156
- 'react/require-render-return': 1,
157
- 'react/no-danger': 1,
158
- 'react/no-did-mount-set-state': 1,
159
- 'react/no-did-update-set-state': 1,
160
- 'react/no-is-mounted': 1,
161
- 'react-hooks/rules-of-hooks': 1,
162
- 'react-hooks/exhaustive-deps': 1,
163
- },
164
- },
165
92
  {
166
93
  files: ['*.md'],
167
94
  parser: 'markdown-eslint-parser',
@@ -431,6 +358,46 @@ module.exports = {
431
358
  ignore: ['README.md'],
432
359
  },
433
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
+ ],
434
401
  'prettier/prettier': [1, { parser: 'babel' }],
435
402
  },
436
403
  plugins: [
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@mikey-pro/eslint-config",
3
- "version": "4.4.1",
3
+ "version": "4.6.1",
4
4
  "description": "Mikey Pro ESLint configuration",
5
5
  "main": "index.js",
6
6
  "dependencies": {
7
- "@babel/core": "^7.16.10",
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.0",
15
- "@typescript-eslint/parser": "^5.10.0",
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.0.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,10 +30,10 @@
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",
34
- "eslint-plugin-vue": "^8.3",
33
+ "eslint-plugin-unicorn": "^41.0.0",
34
+ "eslint-plugin-vue": "^8.4",
35
35
  "eslint-plugin-yaml": "^0.5.0",
36
- "vue-eslint-parser": "^8.0"
36
+ "vue-eslint-parser": "^8.2"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "eslint": ">=8.3.0"