From 256675426eb6bda2bc41e58e1d3f4be2e4df9790 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Mon, 17 Jun 2024 11:14:18 +0100 Subject: [PATCH 1/3] changes needed to support new jsx runtime + bump major version --- index.js | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 6b4af4d..9021ee1 100644 --- a/index.js +++ b/index.js @@ -17,6 +17,7 @@ module.exports = { extends: [ "plugin:react-hooks/recommended", "plugin:react/recommended", + "plugin:react/jsx-runtime", "prettier", ], parser: "@typescript-eslint/parser", diff --git a/package.json b/package.json index eccdf63..4da2ca5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Grafana Labs", "license": "Apache-2.0", "name": "@grafana/eslint-config", - "version": "7.0.0", + "version": "8.0.0", "description": "Grafana's ESLint config", "keywords": [ "grafana", From c1cfcde3b9bceb64aaa8f282631c901eea132097 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Wed, 19 Jun 2024 10:19:05 +0100 Subject: [PATCH 2/3] add CHANGELOG --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..944588c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +## 8.0.0 + +### Switch to using new JSX runtime + - Required for React 19 support + - This is a breaking change and will require coordinated updates to other related packages + - Requires updating to `@grafana/tsconfig@2.0.0` or specifying `"jsx": "react-jsx",` manually in your tsconfig + - Requires updating build tooling + - If using esbuild, steps are [here](https://esbuild.github.io/content-types/#auto-import-for-jsx) + - If using Babel, steps are [here](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#manual-babel-setup) + - Requires running the [React codemod](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports) + - this will remove unused React imports \ No newline at end of file From 603230421265a0c759cb7eac05a635e931e2f2a2 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Wed, 19 Jun 2024 10:20:29 +0100 Subject: [PATCH 3/3] tweak --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 944588c..da15750 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## 8.0.0 -### Switch to using new JSX runtime +### Changes to support using the new JSX runtime - Required for React 19 support - This is a breaking change and will require coordinated updates to other related packages - Requires updating to `@grafana/tsconfig@2.0.0` or specifying `"jsx": "react-jsx",` manually in your tsconfig