@scaleway/eslint-config-react 3.1.2 → 3.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/CHANGELOG.md CHANGED
@@ -3,6 +3,43 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.3.0](https://github.com/scaleway/scaleway-lib/compare/@scaleway/eslint-config-react@3.2.2...@scaleway/eslint-config-react@3.3.0) (2021-12-28)
7
+
8
+
9
+ ### Features
10
+
11
+ * **eslint-config:** enable prefer-object-has-own ([#564](https://github.com/scaleway/scaleway-lib/issues/564)) ([a0b11ca](https://github.com/scaleway/scaleway-lib/commit/a0b11ca9bd6ea10d6e08e0257b8209bdca2a60a0))
12
+
13
+
14
+
15
+ ### [3.2.2](https://github.com/scaleway/scaleway-lib/compare/@scaleway/eslint-config-react@3.2.1...@scaleway/eslint-config-react@3.2.2) (2021-12-28)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **deps:** update typescript-eslint monorepo to v5.8.1 ([#568](https://github.com/scaleway/scaleway-lib/issues/568)) ([620e748](https://github.com/scaleway/scaleway-lib/commit/620e74807c6cb4369458fbe473a994409e9a9973))
21
+
22
+
23
+
24
+ ### 3.2.1 (2021-12-24)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * **deps:** update dependency eslint-plugin-react to v7.28.0 ([#555](https://github.com/scaleway/scaleway-lib/issues/555)) ([ab077a4](https://github.com/scaleway/scaleway-lib/commit/ab077a44344d339bf7caebe633259cf6e8b542b6))
30
+ * **deps:** update typescript-eslint monorepo to v5.8.0 ([#552](https://github.com/scaleway/scaleway-lib/issues/552)) ([34cbce8](https://github.com/scaleway/scaleway-lib/commit/34cbce88093b260cc5d0e4d26ebd9d90efe75c7d))
31
+
32
+
33
+
34
+ ## 3.2.0 (2021-12-20)
35
+
36
+
37
+ ### Features
38
+
39
+ * **eslint-config-react:** disable react/require-default-props in ts projects ([#546](https://github.com/scaleway/scaleway-lib/issues/546)) ([7301d14](https://github.com/scaleway/scaleway-lib/commit/7301d1441a5993113f9b61925ea94f8326b24f35))
40
+
41
+
42
+
6
43
  ### 3.1.2 (2021-12-16)
7
44
 
8
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/eslint-config-react",
3
- "version": "3.1.2",
3
+ "version": "3.3.0",
4
4
  "description": "Scaleway React eslint shared config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -17,19 +17,19 @@
17
17
  },
18
18
  "license": "MIT",
19
19
  "dependencies": {
20
- "@typescript-eslint/eslint-plugin": "5.7.0",
21
- "@typescript-eslint/parser": "5.7.0",
22
- "eslint-config-airbnb": "19.0.2",
20
+ "@typescript-eslint/eslint-plugin": "5.8.1",
21
+ "@typescript-eslint/parser": "5.8.1",
22
+ "eslint-config-airbnb": "19.0.4",
23
23
  "eslint-config-airbnb-typescript": "16.1.0",
24
24
  "eslint-config-prettier": "8.3.0",
25
25
  "eslint-plugin-eslint-comments": "3.2.0",
26
26
  "eslint-plugin-import": "2.25.3",
27
27
  "eslint-plugin-jsx-a11y": "6.5.1",
28
- "eslint-plugin-react": "7.27.1",
28
+ "eslint-plugin-react": "7.28.0",
29
29
  "eslint-plugin-react-hooks": "4.3.0"
30
30
  },
31
31
  "peerDependencies": {
32
- "eslint": "7.x || 8.x"
32
+ "eslint": ">= 8.5"
33
33
  },
34
- "gitHead": "f667fda89b2adc14e860766407fc75e3785e15e1"
34
+ "gitHead": "29aaf59e294fb8d3372e8900d8ff9ad782d60150"
35
35
  }
package/shared.js CHANGED
@@ -1,3 +1,5 @@
1
+ /* eslint-disable sort-keys */
2
+
1
3
  module.exports = {
2
4
  extends: ['airbnb/hooks', 'prettier', 'plugin:eslint-comments/recommended'],
3
5
  rules: {
@@ -57,6 +59,7 @@ module.exports = {
57
59
  // These are rules soon to be enabled by airbnb react config
58
60
  // We're getting a head start
59
61
  'react/no-adjacent-inline-elements': 'error', // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md
62
+ 'prefer-object-has-own': 'error', // https://eslint.org/docs/rules/prefer-object-has-own
60
63
 
61
64
  // To have consistent ordering in proptypes
62
65
  'react/sort-prop-types': [
@@ -76,3 +79,5 @@ module.exports = {
76
79
  'sort-keys': ['error', 'asc', { caseSensitive: false, natural: true }],
77
80
  },
78
81
  }
82
+
83
+ /* eslint-enable sort-keys */
package/typescript.js CHANGED
@@ -9,5 +9,9 @@ module.exports = {
9
9
  plugins: ['@typescript-eslint'],
10
10
  rules: {
11
11
  '@typescript-eslint/no-unused-vars': ['error'],
12
+ // We favor object defaults instead of default props in TS
13
+ // https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/default_props/#you-may-not-need-defaultprops
14
+ // https://twitter.com/dan_abramov/status/1133878326358171650
15
+ 'react/require-default-props': 'off',
12
16
  },
13
17
  }