@open-turo/eslint-config-react 12.0.1-pr-293.260.1.1 → 13.0.0-pr-295.263.1.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.
@@ -1,6 +1,6 @@
1
1
  repos:
2
2
  - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
3
- rev: v9.19.0
3
+ rev: v9.20.0
4
4
  hooks:
5
5
  - id: commitlint
6
6
  stages: [commit-msg]
@@ -0,0 +1,3 @@
1
+ # Breaking changes in v13
2
+
3
+ We are adding `eslint-plugin-react-compiler` to our React configuration. While there is much more work needed to support React Compiler in production, adding the ESLint rule in advance of the actual compiler (which is recommended by the React team: https://react.dev/learn/react-compiler#installing-eslint-plugin-react-compiler) will help us resolve (or suppress) violations as they come up. This addition requires a major version upgrade since it will raise errors in every repo.
package/index.js CHANGED
@@ -53,6 +53,20 @@ module.exports = {
53
53
  "react/state-in-constructor": "off",
54
54
  // This allows static properties to be placed within the class declaration
55
55
  "react/static-property-placement": "off",
56
+ /** ESLint plugin for the React Compiler, to enforce rules that make adopting it easier/more effective */
57
+ "react-compiler/react-compiler": [
58
+ "error",
59
+ {
60
+ environment: {
61
+ /**
62
+ * At the time of writing, `eslint-plugin-react-compiler` errors on ref usages in render paths. This rule is noisy,
63
+ * since it currently reports false positives. We can remove this in the future when the rule is more accurate.
64
+ * {@link https://github.com/facebook/react/pull/30843 PR that disables this rule in the default config}
65
+ */
66
+ validateRefAccessDuringRender: false,
67
+ },
68
+ },
69
+ ],
56
70
  /*
57
71
  * Rules that significantly impact performance time of eslint, and are not
58
72
  * necessarily relevant for react applications.
package/package.json CHANGED
@@ -5,6 +5,7 @@
5
5
  "@open-turo/eslint-config-typescript": "14.0.0",
6
6
  "eslint-plugin-jsx-a11y": "6.10.2",
7
7
  "eslint-plugin-react": "7.37.2",
8
+ "eslint-plugin-react-compiler": "19.0.0-beta-201e55d-20241215",
8
9
  "eslint-plugin-react-hooks": "5.1.0"
9
10
  },
10
11
  "devDependencies": {
@@ -31,6 +32,6 @@
31
32
  "access": "public"
32
33
  },
33
34
  "repository": "https://github.com/open-turo/eslint-config-react",
34
- "version": "12.0.1-pr-293.260.1.1",
35
+ "version": "13.0.0-pr-295.263.1.1",
35
36
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
36
37
  }