@will-stone/eslint-config 6.0.0 → 6.3.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@will-stone/eslint-config",
3
- "version": "6.0.0",
3
+ "version": "6.3.0",
4
4
  "private": false,
5
5
  "description": "My ESLint config",
6
6
  "repository": {
@@ -13,26 +13,26 @@
13
13
  "eslint-print-rules": "eslint --no-eslintrc -c ./_for_rule_checking.js --print-config ./_for_rule_checking.js > rules.json"
14
14
  },
15
15
  "dependencies": {
16
- "confusing-browser-globals": "^1.0.10",
16
+ "confusing-browser-globals": "^1.0.11",
17
17
  "eslint-config-prettier": "^8.3.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "eslint-find-rules": "^4.0.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "@typescript-eslint/eslint-plugin": "^5.4.0",
24
- "@typescript-eslint/parser": "^5.4.0",
25
- "eslint": "^8.2.0",
23
+ "@typescript-eslint/eslint-plugin": "^5.8.0",
24
+ "@typescript-eslint/parser": "^5.8.0",
25
+ "eslint": "^8.5.0",
26
26
  "eslint-plugin-import": "^2.25.3",
27
- "eslint-plugin-jest": "^25.2.4",
27
+ "eslint-plugin-jest": "^25.3.0",
28
28
  "eslint-plugin-jsx-a11y": "^6.5.1",
29
29
  "eslint-plugin-node": "^11.1.0",
30
30
  "eslint-plugin-prettier": "^4.0.0",
31
- "eslint-plugin-react": "^7.27.1",
31
+ "eslint-plugin-react": "^7.28.0",
32
32
  "eslint-plugin-react-hooks": "^4.3.0",
33
33
  "eslint-plugin-simple-import-sort": "^7.0.0",
34
34
  "eslint-plugin-switch-case": "^1.1.2",
35
- "eslint-plugin-unicorn": "^38.0.1",
35
+ "eslint-plugin-unicorn": "^39.0.0",
36
36
  "typescript": "4.x"
37
37
  },
38
38
  "peerDependenciesMeta": {
package/rules/built-in.js CHANGED
@@ -685,6 +685,9 @@ module.exports = {
685
685
  // or 16 (hexadecimal).
686
686
  'prefer-numeric-literals': 'warn',
687
687
 
688
+ // Not supported by Typescript yet
689
+ 'prefer-object-has-own': 'off',
690
+
688
691
  // Prefer use of an object spread over Object.assign()
689
692
  'prefer-object-spread': 'warn',
690
693
 
package/rules/react.js CHANGED
@@ -49,12 +49,8 @@ module.exports = {
49
49
  'react/react-in-jsx-scope': 'off',
50
50
 
51
51
  // Enforce a defaultProps definition for every prop that is not a required prop
52
- 'react/require-default-props': [
53
- 'error',
54
- {
55
- ignoreFunctionalComponents: true,
56
- },
57
- ],
52
+ // TODO turn this back on and create a react-typescript rule set for disabling thing like this.
53
+ 'react/require-default-props': 'off',
58
54
 
59
55
  // Do not enforce React components to have a shouldComponentUpdate method.
60
56
  'react/require-optimization': 'off',
package/rules/unicorn.js CHANGED
@@ -67,6 +67,9 @@ module.exports = {
67
67
  // for..of is much easier to read
68
68
  'unicorn/no-array-reduce': 'error',
69
69
 
70
+ // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md
71
+ 'unicorn/no-await-expression-member': 'warn',
72
+
70
73
  // Do not use leading/trailing space between console.log parameters
71
74
  'unicorn/no-console-spaces': 'warn',
72
75
 
@@ -177,6 +180,10 @@ module.exports = {
177
180
  // Prefer .at() method for index access and String#charAt()
178
181
  'unicorn/prefer-at': 'warn',
179
182
 
183
+ // Prefer String#codePointAt(…) over String#charCodeAt(…)
184
+ // and String.fromCodePoint(…) over String.fromCharCode(…)
185
+ 'unicorn/prefer-code-point': 'error',
186
+
180
187
  // Prefer Date.now() to get the number of milliseconds since the Unix Epoch
181
188
  'unicorn/prefer-date-now': 'warn',
182
189
 
@@ -285,6 +292,8 @@ module.exports = {
285
292
  {
286
293
  replacements: {
287
294
  props: false,
295
+ ref: false,
296
+ refs: false,
288
297
  },
289
298
  allowList: {
290
299
  'next-env.d': true,