diff --git a/eslint.config.mjs b/eslint.config.mjs index 1749436..b333fb8 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,74 +1,90 @@ -import { fixupConfigRules, fixupPluginRules } from "@eslint/compat"; -import react from "eslint-plugin-react"; -import typescriptEslint from "@typescript-eslint/eslint-plugin"; -import tsParser from "@typescript-eslint/parser"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; -import js from "@eslint/js"; -import { FlatCompat } from "@eslint/eslintrc"; +// @ts-check -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all, -}); +import eslint from "@eslint/js"; +import eslintConfigPrettier from "eslint-config-prettier"; -export default [ - ...fixupConfigRules( - compat.extends( - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:react/recommended", - "plugin:react-hooks/recommended", - "plugin:prettier/recommended", - ), - ), +import reactPlugin from "eslint-plugin-react"; +import pluginReactCompiler from "eslint-plugin-react-compiler"; +import reactHooksPlugin from "eslint-plugin-react-hooks"; +import vitestPlugin from "eslint-plugin-vitest"; +import tseslint from "typescript-eslint"; + +export default tseslint.config( + eslint.configs.recommended, + ...tseslint.configs.recommended, + eslintConfigPrettier, + // @ts-expect-error Malformed types + reactPlugin.configs.flat.recommended, + // @ts-expect-error Malformed types + reactPlugin.configs.flat["jsx-runtime"], + { + // TODO replace with https://github.com/facebook/react/pull/30774 + name: "react-hooks/recommended", + // @ts-expect-error Malformed types + plugins: { "react-hooks": reactHooksPlugin }, + // @ts-expect-error Malformed types + rules: reactHooksPlugin.configs.recommended.rules, + }, { plugins: { - react: fixupPluginRules(react), - "@typescript-eslint": fixupPluginRules(typescriptEslint), + "react-compiler": pluginReactCompiler, }, - - languageOptions: { - parser: tsParser, - ecmaVersion: 2022, - sourceType: "module", - - parserOptions: { - ecmaFeatures: { - jsx: true, - }, - }, + rules: { + "react-compiler/react-compiler": "error", }, - + }, + { settings: { react: { version: "detect", }, }, - rules: { - "react/react-in-jsx-scope": "off", - - "react/no-unknown-property": [ - "error", + "no-empty-function": "warn", + "no-nested-ternary": "warn", + "no-unreachable": "warn", + "object-shorthand": "warn", + "linebreak-style": ["warn", "unix"], + eqeqeq: ["warn", "smart"], + "no-console": [ + "warn", { - ignore: ["css"], + allow: ["warn", "error", "info"], }, ], - "no-constant-condition": "off", - - "no-restricted-imports": [ + "@typescript-eslint/consistent-type-definitions": "error", + "@typescript-eslint/no-empty-object-type": "off", + "@typescript-eslint/no-unused-vars": [ "warn", { - paths: ["@emotion/styled/macro", "@emotion/react/macro", "lodash"], + destructuredArrayIgnorePattern: "^_", + caughtErrorsIgnorePattern: "^_", }, ], - "@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "none" }], + "react/prop-types": "off", + "react/jsx-fragments": ["warn", "syntax"], + "react/jsx-curly-brace-presence": ["warn", "never"], + "react/no-unknown-property": [ + "error", + { + ignore: ["css"], + }, + ], + "react/function-component-definition": [ + "error", + { namedComponents: "function-declaration", unnamedComponents: [] }, + ], + }, + }, + { + files: ["**/*.test.ts", "**/*.test.tsx"], + plugins: { + vitest: vitestPlugin, + }, + rules: { + ...vitestPlugin.configs.recommended.rules, }, }, -]; +); diff --git a/package.json b/package.json index bc0c83a..9f00289 100644 --- a/package.json +++ b/package.json @@ -23,11 +23,13 @@ "@vitejs/plugin-react": "^4.3.4", "axios": "^1.7.9", "axios-retry": "^4.5.0", + "babel-plugin-react-compiler": "19.0.0-beta-55955c9-20241229", "chroma-js": "^3.1.2", "date-fns": "^4.1.0", "date-fns-tz": "^3.2.0", "detect-browser": "^5.3.0", "emotion": "^11.0.0", + "eslint-plugin-react-compiler": "19.0.0-beta-55955c9-20241229", "fast-xml-parser": "^4.5.1", "geolib": "^3.3.4", "gsl-parser": "^3.0.1", @@ -92,8 +94,6 @@ }, "devDependencies": { "@emotion/babel-plugin": "^11.13.5", - "@eslint/compat": "^1.2.4", - "@eslint/eslintrc": "^3.2.0", "@eslint/js": "^9.17.0", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.1.0", @@ -108,19 +108,17 @@ "@types/react-transition-group": "^4.4.12", "@types/smoothscroll-polyfill": "^0.3.4", "@types/suncalc": "^1.9.2", - "@typescript-eslint/eslint-plugin": "^8.19.0", - "@typescript-eslint/parser": "^8.19.0", "eslint": "^9.17.0", - "eslint-plugin-prettier": "^5.2.1", + "eslint-config-prettier": "^9.1.0", "eslint-plugin-react": "^7.37.3", "eslint-plugin-react-hooks": "^5.1.0", - "eslint-plugin-testing-library": "^7.1.1", + "eslint-plugin-vitest": "^0.5.4", "happy-dom": "^16.3.0", "prettier": "^3.4.2", "pwa-asset-generator": "^6.4.0", "source-map-explorer": "^2.5.3", + "typescript-eslint": "^8.19.0", "vite": "^6.0.7", - "vite-plugin-eslint": "^1.8.1", "vite-plugin-pwa": "^0.21.1", "vite-plugin-svgr": "^4.3.0", "vitest": "^2.1.8" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4f1be6c..70a3037 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -59,6 +59,9 @@ importers: axios-retry: specifier: ^4.5.0 version: 4.5.0(axios@1.7.9) + babel-plugin-react-compiler: + specifier: 19.0.0-beta-55955c9-20241229 + version: 19.0.0-beta-55955c9-20241229 chroma-js: specifier: ^3.1.2 version: 3.1.2 @@ -74,6 +77,9 @@ importers: emotion: specifier: ^11.0.0 version: 11.0.0 + eslint-plugin-react-compiler: + specifier: 19.0.0-beta-55955c9-20241229 + version: 19.0.0-beta-55955c9-20241229(eslint@9.17.0) fast-xml-parser: specifier: ^4.5.1 version: 4.5.1 @@ -159,12 +165,6 @@ importers: '@emotion/babel-plugin': specifier: ^11.13.5 version: 11.13.5 - '@eslint/compat': - specifier: ^1.2.4 - version: 1.2.4(eslint@9.17.0) - '@eslint/eslintrc': - specifier: ^3.2.0 - version: 3.2.0 '@eslint/js': specifier: ^9.17.0 version: 9.17.0 @@ -207,27 +207,21 @@ importers: '@types/suncalc': specifier: ^1.9.2 version: 1.9.2 - '@typescript-eslint/eslint-plugin': - specifier: ^8.19.0 - version: 8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2) - '@typescript-eslint/parser': - specifier: ^8.19.0 - version: 8.19.0(eslint@9.17.0)(typescript@5.7.2) eslint: specifier: ^9.17.0 version: 9.17.0 - eslint-plugin-prettier: - specifier: ^5.2.1 - version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.17.0))(eslint@9.17.0)(prettier@3.4.2) + eslint-config-prettier: + specifier: ^9.1.0 + version: 9.1.0(eslint@9.17.0) eslint-plugin-react: specifier: ^7.37.3 version: 7.37.3(eslint@9.17.0) eslint-plugin-react-hooks: specifier: ^5.1.0 version: 5.1.0(eslint@9.17.0) - eslint-plugin-testing-library: - specifier: ^7.1.1 - version: 7.1.1(eslint@9.17.0)(typescript@5.7.2) + eslint-plugin-vitest: + specifier: ^0.5.4 + version: 0.5.4(eslint@9.17.0)(typescript@5.7.2)(vitest@2.1.8(@types/node@22.10.5)(happy-dom@16.3.0)(terser@5.37.0)) happy-dom: specifier: ^16.3.0 version: 16.3.0 @@ -240,12 +234,12 @@ importers: source-map-explorer: specifier: ^2.5.3 version: 2.5.3 + typescript-eslint: + specifier: ^8.19.0 + version: 8.19.0(eslint@9.17.0)(typescript@5.7.2) vite: specifier: ^6.0.7 version: 6.0.7(@types/node@22.10.5)(terser@5.37.0) - vite-plugin-eslint: - specifier: ^1.8.1 - version: 1.8.1(eslint@9.17.0)(vite@6.0.7(@types/node@22.10.5)(terser@5.37.0)) vite-plugin-pwa: specifier: ^0.21.1 version: 0.21.1(vite@6.0.7(@types/node@22.10.5)(terser@5.37.0))(workbox-build@7.1.1(@types/babel__core@7.20.5))(workbox-window@7.1.0) @@ -417,6 +411,13 @@ packages: peerDependencies: '@babel/core': ^7.0.0 + '@babel/plugin-proposal-private-methods@7.18.6': + resolution: {integrity: sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==} + engines: {node: '>=6.9.0'} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead. + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2': resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==} engines: {node: '>=6.9.0'} @@ -1138,15 +1139,6 @@ packages: resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/compat@1.2.4': - resolution: {integrity: sha512-S8ZdQj/N69YAtuqFt7653jwcvuUj131+6qGLUyDqfDg1OIoBQ66OCuXC473YQfO2AaxITTutiRQiDwoo7ZLYyg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^9.10.0 - peerDependenciesMeta: - eslint: - optional: true - '@eslint/config-array@0.19.1': resolution: {integrity: sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1297,10 +1289,6 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@pkgr/core@0.1.1': - resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - '@reach/portal@0.13.2': resolution: {integrity: sha512-g74BnCdtuTGthzzHn2cWW+bcyIYb0iIE/yRsm89i8oNzNgpopbkh9UY8TPbhNlys52h7U60s4kpRTmcq+JqsTA==} peerDependencies: @@ -1371,10 +1359,6 @@ packages: peerDependencies: rollup: ^1.20.0||^2.0.0 - '@rollup/pluginutils@4.2.1': - resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} - engines: {node: '>= 8.0.0'} - '@rollup/pluginutils@5.1.4': resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} engines: {node: '>=14.0.0'} @@ -1600,12 +1584,6 @@ packages: '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} - '@types/eslint@8.56.12': - resolution: {integrity: sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g==} - - '@types/eslint@9.6.1': - resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} - '@types/estree@0.0.39': resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==} @@ -1694,6 +1672,10 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' + '@typescript-eslint/scope-manager@7.18.0': + resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} + engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@8.19.0': resolution: {integrity: sha512-hkoJiKQS3GQ13TSMEiuNmSCvhz7ujyqD1x3ShbaETATHrck+9RaDdUbt+osXaUuns9OFwrDTTrjtwsU8gJyyRA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1705,16 +1687,35 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' + '@typescript-eslint/types@7.18.0': + resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} + engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/types@8.19.0': resolution: {integrity: sha512-8XQ4Ss7G9WX8oaYvD4OOLCjIQYgRQxO+qCiR2V2s2GxI9AUpo7riNwo6jDhKtTcaJjT8PY54j2Yb33kWtSJsmA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@7.18.0': + resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/typescript-estree@8.19.0': resolution: {integrity: sha512-WW9PpDaLIFW9LCbucMSdYUuGeFUz1OkWYS/5fwZwTA+l2RwlWFdJvReQqMUMBw4yJWJOfqd7An9uwut2Oj8sLw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.8.0' + '@typescript-eslint/utils@7.18.0': + resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + '@typescript-eslint/utils@8.19.0': resolution: {integrity: sha512-PTBG+0oEMPH9jCZlfg07LCB2nYI0I317yyvXGfxnvGvw4SHIOuRnQ3kadyyXY6tGdChusIHIbM5zfIbp4M6tCg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1722,6 +1723,10 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' + '@typescript-eslint/visitor-keys@7.18.0': + resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} + engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/visitor-keys@8.19.0': resolution: {integrity: sha512-mCFtBbFBJDCNCWUl5y6sZSCHXw1DEFEk3c/M3nRK2a4XUB8StGFtmcEMizdjKuBzB6e/smJAAWYug3VrdLMr1w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1904,6 +1909,10 @@ packages: resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} engines: {node: '>= 0.4'} + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + array-unique@0.3.2: resolution: {integrity: sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==} engines: {node: '>=0.10.0'} @@ -1986,6 +1995,9 @@ packages: peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 + babel-plugin-react-compiler@19.0.0-beta-55955c9-20241229: + resolution: {integrity: sha512-APpa9fRiG5UN5kxnB/vznaSBKbXwAWZs6QshN3MLntzWa4cUhOxzUSd7Ohmr5sLQaM0ZHjjOg07pw1ZoR7+Oog==} + babelify@10.0.0: resolution: {integrity: sha512-X40FaxyH7t3X+JFAKvb1H9wooWKLRCi8pg3m8poqtdZaIng+bjzp9RvKQCvRjF9isHiPkXspbbXT/zwXLtwgwg==} engines: {node: '>=6.9.0'} @@ -2532,6 +2544,10 @@ packages: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + doctrine-temporary-fork@2.1.0: resolution: {integrity: sha512-nliqOv5NkE4zMON4UA6AMJE6As35afs8aYXATpU4pTUdIKiARZwrJVEP1boA3Rx1ZXHVkwxkhcq4VkqvsuRLsA==} engines: {node: '>=0.10.0'} @@ -2697,19 +2713,11 @@ packages: peerDependencies: eslint: '>=7.0.0' - eslint-plugin-prettier@5.2.1: - resolution: {integrity: sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==} - engines: {node: ^14.18.0 || >=16.0.0} + eslint-plugin-react-compiler@19.0.0-beta-55955c9-20241229: + resolution: {integrity: sha512-KsE6bQrNvtPDbMb9EolZ2C+Z2/uv2Y5cAUgN+pzbriXjKlf1FkbgiyE153m2mIT6gEZq2OrtFvX7uJj5IrNQlg==} + engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0} peerDependencies: - '@types/eslint': '>=8.0.0' - eslint: '>=8.0.0' - eslint-config-prettier: '*' - prettier: '>=3.0.0' - peerDependenciesMeta: - '@types/eslint': - optional: true - eslint-config-prettier: - optional: true + eslint: '>=7' eslint-plugin-react-hooks@5.1.0: resolution: {integrity: sha512-mpJRtPgHN2tNAvZ35AMfqeB3Xqeo273QxrHJsbBEPWODRM4r0yB6jfoROqKEYrOn27UtRPpcpHc2UqyBSuUNTw==} @@ -2723,11 +2731,18 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - eslint-plugin-testing-library@7.1.1: - resolution: {integrity: sha512-nszC833aZPwB6tik1nMkbFqmtgIXTT0sfJEYs0zMBKMlkQ4to2079yUV96SvmLh00ovSBJI4pgcBC1TiIP8mXg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0, pnpm: ^9.14.0} + eslint-plugin-vitest@0.5.4: + resolution: {integrity: sha512-um+odCkccAHU53WdKAw39MY61+1x990uXjSPguUCq3VcEHdqJrOb8OTMrbYlY6f9jAKx7x98kLVlIe3RJeJqoQ==} + engines: {node: ^18.0.0 || >= 20.0.0} peerDependencies: + '@typescript-eslint/eslint-plugin': '*' eslint: ^8.57.0 || ^9.0.0 + vitest: '*' + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + vitest: + optional: true eslint-scope@8.2.0: resolution: {integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==} @@ -2816,9 +2831,6 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -3085,6 +3097,10 @@ packages: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + gopd@1.2.0: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} @@ -3178,6 +3194,12 @@ packages: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true + hermes-estree@0.25.1: + resolution: {integrity: sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==} + + hermes-parser@0.25.1: + resolution: {integrity: sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==} + highlight.js@10.7.3: resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} @@ -4237,10 +4259,6 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier-linter-helpers@1.0.0: - resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} - engines: {node: '>=6.0.0'} - prettier@3.4.2: resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==} engines: {node: '>=14'} @@ -4983,10 +5001,6 @@ packages: svg-parser@2.0.4: resolution: {integrity: sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==} - synckit@0.9.2: - resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==} - engines: {node: ^14.18.0 || >=16.0.0} - tabbable@5.3.3: resolution: {integrity: sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA==} @@ -5149,6 +5163,13 @@ packages: typedarray@0.0.7: resolution: {integrity: sha512-ueeb9YybpjhivjbHP2LdFDAjbS948fGEPj+ACAMs4xCMmh72OCOMQWBQKlaN4ZNQ04yfLSDLSx1tGRIoWimObQ==} + typescript-eslint@8.19.0: + resolution: {integrity: sha512-Ni8sUkVWYK4KAcTtPjQ/UTiRk6jcsuDhPpxULapUDi8A/l8TSBk+t1GtJA1RsCzIJg0q6+J7bf35AwQigENWRQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.8.0' + typescript@4.3.4: resolution: {integrity: sha512-uauPG7XZn9F/mo+7MrsRjyvbxFpzemRjKEZXS4AK83oP2KKOJPvb+9cO/gmnv8arWZvhnjVOXz7B49m1l0e9Ew==} engines: {node: '>=4.2.0'} @@ -5322,12 +5343,6 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite-plugin-eslint@1.8.1: - resolution: {integrity: sha512-PqdMf3Y2fLO9FsNPmMX+//2BF5SF8nEWspZdgl4kSt7UvHDRHVVfHvxsD7ULYzZrJDGRxR81Nq7TOFgwMnUang==} - peerDependencies: - eslint: '>=7' - vite: '>=2' - vite-plugin-pwa@0.21.1: resolution: {integrity: sha512-rkTbKFbd232WdiRJ9R3u+hZmf5SfQljX1b45NF6oLA6DSktEKpYllgTo1l2lkiZWMWV78pABJtFjNXfBef3/3Q==} engines: {node: '>=16.0.0'} @@ -5638,6 +5653,15 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + zod-validation-error@3.4.0: + resolution: {integrity: sha512-ZOPR9SVY6Pb2qqO5XHt+MkkTRxGXb4EVtnjc9JpXUOtUB1T9Ru7mZOT361AN3MsetVe7R0a1KZshJDZdgp9miQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + zod: ^3.18.0 + + zod@3.24.1: + resolution: {integrity: sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==} + zwitch@1.0.5: resolution: {integrity: sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==} @@ -5888,6 +5912,14 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-proposal-private-methods@7.18.6(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + transitivePeerDependencies: + - supports-color + '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 @@ -6594,10 +6626,6 @@ snapshots: '@eslint-community/regexpp@4.12.1': {} - '@eslint/compat@1.2.4(eslint@9.17.0)': - optionalDependencies: - eslint: 9.17.0 - '@eslint/config-array@0.19.1': dependencies: '@eslint/object-schema': 2.1.5 @@ -6752,8 +6780,6 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@pkgr/core@0.1.1': {} - '@reach/portal@0.13.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: '@reach/utils': 0.13.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -6827,11 +6853,6 @@ snapshots: picomatch: 2.3.1 rollup: 2.79.2 - '@rollup/pluginutils@4.2.1': - dependencies: - estree-walker: 2.0.2 - picomatch: 2.3.1 - '@rollup/pluginutils@5.1.4(rollup@2.79.2)': dependencies: '@types/estree': 1.0.6 @@ -7036,17 +7057,6 @@ snapshots: '@types/cookie@0.6.0': {} - '@types/eslint@8.56.12': - dependencies: - '@types/estree': 1.0.6 - '@types/json-schema': 7.0.15 - - '@types/eslint@9.6.1': - dependencies: - '@types/estree': 1.0.6 - '@types/json-schema': 7.0.15 - optional: true - '@types/estree@0.0.39': {} '@types/estree@1.0.6': {} @@ -7139,6 +7149,11 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/scope-manager@7.18.0': + dependencies: + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/visitor-keys': 7.18.0 + '@typescript-eslint/scope-manager@8.19.0': dependencies: '@typescript-eslint/types': 8.19.0 @@ -7155,8 +7170,25 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/types@7.18.0': {} + '@typescript-eslint/types@8.19.0': {} + '@typescript-eslint/typescript-estree@7.18.0(typescript@5.7.2)': + dependencies: + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/visitor-keys': 7.18.0 + debug: 4.4.0 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.4.3(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/typescript-estree@8.19.0(typescript@5.7.2)': dependencies: '@typescript-eslint/types': 8.19.0 @@ -7171,6 +7203,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/utils@7.18.0(eslint@9.17.0)(typescript@5.7.2)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0) + '@typescript-eslint/scope-manager': 7.18.0 + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.7.2) + eslint: 9.17.0 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/utils@8.19.0(eslint@9.17.0)(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0) @@ -7182,6 +7225,11 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/visitor-keys@7.18.0': + dependencies: + '@typescript-eslint/types': 7.18.0 + eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.19.0': dependencies: '@typescript-eslint/types': 8.19.0 @@ -7391,6 +7439,8 @@ snapshots: get-intrinsic: 1.2.7 is-string: 1.1.1 + array-union@2.1.0: {} + array-unique@0.3.2: {} array.prototype.findlast@1.2.5: @@ -7495,6 +7545,10 @@ snapshots: transitivePeerDependencies: - supports-color + babel-plugin-react-compiler@19.0.0-beta-55955c9-20241229: + dependencies: + '@babel/types': 7.26.3 + babelify@10.0.0(@babel/core@7.12.3): dependencies: '@babel/core': 7.12.3 @@ -8103,6 +8157,10 @@ snapshots: diff@4.0.2: {} + dir-glob@3.0.1: + dependencies: + path-type: 4.0.0 + doctrine-temporary-fork@2.1.0: dependencies: esutils: 2.0.3 @@ -8427,17 +8485,18 @@ snapshots: eslint-config-prettier@9.1.0(eslint@9.17.0): dependencies: eslint: 9.17.0 - optional: true - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.17.0))(eslint@9.17.0)(prettier@3.4.2): + eslint-plugin-react-compiler@19.0.0-beta-55955c9-20241229(eslint@9.17.0): dependencies: + '@babel/core': 7.26.0 + '@babel/parser': 7.26.3 + '@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.26.0) eslint: 9.17.0 - prettier: 3.4.2 - prettier-linter-helpers: 1.0.0 - synckit: 0.9.2 - optionalDependencies: - '@types/eslint': 9.6.1 - eslint-config-prettier: 9.1.0(eslint@9.17.0) + hermes-parser: 0.25.1 + zod: 3.24.1 + zod-validation-error: 3.4.0(zod@3.24.1) + transitivePeerDependencies: + - supports-color eslint-plugin-react-hooks@5.1.0(eslint@9.17.0): dependencies: @@ -8465,11 +8524,12 @@ snapshots: string.prototype.matchall: 4.0.12 string.prototype.repeat: 1.0.0 - eslint-plugin-testing-library@7.1.1(eslint@9.17.0)(typescript@5.7.2): + eslint-plugin-vitest@0.5.4(eslint@9.17.0)(typescript@5.7.2)(vitest@2.1.8(@types/node@22.10.5)(happy-dom@16.3.0)(terser@5.37.0)): dependencies: - '@typescript-eslint/scope-manager': 8.19.0 - '@typescript-eslint/utils': 8.19.0(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/utils': 7.18.0(eslint@9.17.0)(typescript@5.7.2) eslint: 9.17.0 + optionalDependencies: + vitest: 2.1.8(@types/node@22.10.5)(happy-dom@16.3.0)(terser@5.37.0) transitivePeerDependencies: - supports-color - typescript @@ -8600,8 +8660,6 @@ snapshots: fast-deep-equal@3.1.3: {} - fast-diff@1.3.0: {} - fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -8913,6 +8971,15 @@ snapshots: define-properties: 1.2.1 gopd: 1.2.0 + globby@11.1.0: + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.3.2 + merge2: 1.4.1 + slash: 3.0.0 + gopd@1.2.0: {} graceful-fs@4.2.11: {} @@ -9008,6 +9075,12 @@ snapshots: he@1.2.0: optional: true + hermes-estree@0.25.1: {} + + hermes-parser@0.25.1: + dependencies: + hermes-estree: 0.25.1 + highlight.js@10.7.3: {} hoist-non-react-statics@3.3.2: @@ -10128,10 +10201,6 @@ snapshots: prelude-ls@1.2.1: {} - prettier-linter-helpers@1.0.0: - dependencies: - fast-diff: 1.3.0 - prettier@3.4.2: {} pretty-bytes@5.6.0: {} @@ -11019,11 +11088,6 @@ snapshots: svg-parser@2.0.4: {} - synckit@0.9.2: - dependencies: - '@pkgr/core': 0.1.1 - tslib: 2.8.1 - tabbable@5.3.3: {} tabbable@6.2.0: {} @@ -11204,6 +11268,16 @@ snapshots: typedarray@0.0.7: {} + typescript-eslint@8.19.0(eslint@9.17.0)(typescript@5.7.2): + dependencies: + '@typescript-eslint/eslint-plugin': 8.19.0(@typescript-eslint/parser@8.19.0(eslint@9.17.0)(typescript@5.7.2))(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.19.0(eslint@9.17.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.19.0(eslint@9.17.0)(typescript@5.7.2) + eslint: 9.17.0 + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + typescript@4.3.4: {} typescript@5.7.2: {} @@ -11422,14 +11496,6 @@ snapshots: - supports-color - terser - vite-plugin-eslint@1.8.1(eslint@9.17.0)(vite@6.0.7(@types/node@22.10.5)(terser@5.37.0)): - dependencies: - '@rollup/pluginutils': 4.2.1 - '@types/eslint': 8.56.12 - eslint: 9.17.0 - rollup: 2.79.2 - vite: 6.0.7(@types/node@22.10.5)(terser@5.37.0) - vite-plugin-pwa@0.21.1(vite@6.0.7(@types/node@22.10.5)(terser@5.37.0))(workbox-build@7.1.1(@types/babel__core@7.20.5))(workbox-window@7.1.0): dependencies: debug: 4.4.0 @@ -11789,4 +11855,10 @@ snapshots: yocto-queue@0.1.0: {} + zod-validation-error@3.4.0(zod@3.24.1): + dependencies: + zod: 3.24.1 + + zod@3.24.1: {} + zwitch@1.0.5: {} diff --git a/src/Routes.tsx b/src/Routes.tsx index 54d660e..f1da419 100644 --- a/src/Routes.tsx +++ b/src/Routes.tsx @@ -1,4 +1,4 @@ -import React, { lazy, Suspense } from "react"; +import { lazy, Suspense } from "react"; import { Route, Routes } from "react-router"; import Home from "./routes/Home"; import NotFound from "./routes/NotFound"; diff --git a/src/features/rap/Hours.tsx b/src/features/rap/Hours.tsx index 0b6488d..6f6ac35 100644 --- a/src/features/rap/Hours.tsx +++ b/src/features/rap/Hours.tsx @@ -239,6 +239,7 @@ export default function Hours({ hours }: TableProps) { document.addEventListener("keydown", callback); return () => document.removeEventListener("keydown", callback); + // eslint-disable-next-line react-compiler/react-compiler -- Waiting for useEffectEvent // eslint-disable-next-line react-hooks/exhaustive-deps }, []); @@ -277,6 +278,7 @@ export default function Hours({ hours }: TableProps) { scrollView.offsetLeft, }); + // eslint-disable-next-line react-compiler/react-compiler -- Waiting for useEffectEvent // eslint-disable-next-line react-hooks/exhaustive-deps }, []); @@ -292,6 +294,7 @@ export default function Hours({ hours }: TableProps) { scrollView.removeEventListener("scroll", onScroll); window.removeEventListener("resize", onScroll); }; + // eslint-disable-next-line react-compiler/react-compiler -- Waiting for useEffectEvent // eslint-disable-next-line react-hooks/exhaustive-deps }, [scrollViewRef]); diff --git a/src/features/rap/extra/reportMetadata/ReportMetadata.tsx b/src/features/rap/extra/reportMetadata/ReportMetadata.tsx index 7f424a6..5d12ed1 100644 --- a/src/features/rap/extra/reportMetadata/ReportMetadata.tsx +++ b/src/features/rap/extra/reportMetadata/ReportMetadata.tsx @@ -116,7 +116,7 @@ const planeIcon = divIcon({ className: "plane-icon", }); -const MapController = () => { +function MapController() { const windsAloft = useAppSelector((state) => state.weather.windsAloft); const weather = useAppSelector((state) => state.weather.weather); const aviationWeather = useAppSelector( @@ -193,4 +193,4 @@ const MapController = () => { ); -}; +} diff --git a/src/features/rap/extra/settings/Radio.tsx b/src/features/rap/extra/settings/Radio.tsx index 9b9b10e..4c7998c 100644 --- a/src/features/rap/extra/settings/Radio.tsx +++ b/src/features/rap/extra/settings/Radio.tsx @@ -134,6 +134,7 @@ function InputWithScrollTo({ if (!checked) return; scrollIntoViewIfNeeded(labelRef.current, !initial); + // eslint-disable-next-line react-compiler/react-compiler // eslint-disable-next-line react-hooks/exhaustive-deps }, [checked, labelRef]); diff --git a/src/features/weather/aviation/Forecast.tsx b/src/features/weather/aviation/Forecast.tsx index cf91e98..822172d 100644 --- a/src/features/weather/aviation/Forecast.tsx +++ b/src/features/weather/aviation/Forecast.tsx @@ -138,6 +138,19 @@ export default function Forecast({ data }: ForecastProps) { } } + function renderCeiling() { + if (ceiling?.height != null) + return `${formatHeight(ceiling.height, heightUnit)} AGL`; + + if (data.verticalVisibility) + return `Vertical visibility ${formatHeight( + data.verticalVisibility, + heightUnit, + )} AGL`; + + return `At least ${formatHeight(12_000, heightUnit)} AGL`; + } + return (
@@ -228,16 +241,7 @@ export default function Forecast({ data }: ForecastProps) { (data.clouds.length || data.verticalVisibility != null) ? ( Ceiling - - {ceiling?.height != null - ? `${formatHeight(ceiling.height, heightUnit)} AGL` - : data.verticalVisibility - ? `Vertical visibility ${formatHeight( - data.verticalVisibility, - heightUnit, - )} AGL` - : `At least ${formatHeight(12_000, heightUnit)} AGL`} - + {renderCeiling()} ) : ( "" diff --git a/src/features/weather/header/Airport.tsx b/src/features/weather/header/Airport.tsx index 38c1137..4291a43 100644 --- a/src/features/weather/header/Airport.tsx +++ b/src/features/weather/header/Airport.tsx @@ -94,9 +94,11 @@ export default function Airport({ taf, date }: AirportProps) { const category = getFlightCategory(visibility, clouds); const lowestCloud: ICloud | undefined = clouds[0]; - const cloudLabel = lowestCloud - ? lowestCloud.height - ? `${lowestCloud.quantity}@${ + + const cloudLabel = (() => { + if (lowestCloud) { + if (lowestCloud.height) + return `${lowestCloud.quantity}@${ Math.round( (heightValueFormatter( convertHeightToMeters(lowestCloud.height), @@ -105,11 +107,15 @@ export default function Airport({ taf, date }: AirportProps) { 1_000) * 10, ) / 10 - }k` - : lowestCloud.quantity - : verticalVisbility - ? "OBSC" - : "SKC"; + }k`; + + return lowestCloud.quantity; + } + + if (verticalVisbility) return "OBSC"; + + return "SKC"; + })(); const badge = ( {taf.station} diff --git a/src/features/weather/weatherSlice.ts b/src/features/weather/weatherSlice.ts index 4a1f070..b00e83f 100644 --- a/src/features/weather/weatherSlice.ts +++ b/src/features/weather/weatherSlice.ts @@ -648,7 +648,7 @@ export const getWeather = if (isStale()) return; dispatch(windsAloftReceived(windsAloft)); - } catch (error) { + } catch (_error) { if (isStale()) return; return fallback(); diff --git a/src/services/aviationWeather.ts b/src/services/aviationWeather.ts index 9f4cc43..fc7c11e 100644 --- a/src/services/aviationWeather.ts +++ b/src/services/aviationWeather.ts @@ -44,11 +44,11 @@ export async function getTAF({ // Docs https://www.aviationweather.gov/help/webservice -type AbstractAviationAlertFeature = { +interface AbstractAviationAlertFeature { id: string; properties: Payload; geometry: GeometryObject | null; -}; +} export type SigmetFeature = AbstractAviationAlertFeature<{ data: "SIGMET"; diff --git a/src/services/geocode.ts b/src/services/geocode.ts index db14b52..2dc35c5 100644 --- a/src/services/geocode.ts +++ b/src/services/geocode.ts @@ -16,7 +16,7 @@ export async function reverse(lat: number, lon: number): Promise { }, }) ).data; - } catch (e) { + } catch (_e) { data = {}; } diff --git a/src/shared/DraggableScrollView.tsx b/src/shared/DraggableScrollView.tsx index a015527..bee9518 100644 --- a/src/shared/DraggableScrollView.tsx +++ b/src/shared/DraggableScrollView.tsx @@ -27,10 +27,7 @@ const Container = styled.div<{ hasOverflow: boolean }>` `} `; -const DraggableScrollView: React.FC = ({ - children, - ...rest -}) => { +function DraggableScrollView({ children, ...rest }: DraggableScrollViewProps) { const containerRef = useRef(null); const [dragStartX, setDragStartX] = useState(0); const [scrollLeftStart, setScrollLeftStart] = useState(0); @@ -94,6 +91,6 @@ const DraggableScrollView: React.FC = ({ {children} ); -}; +} export default DraggableScrollView; diff --git a/src/shared/Tooltip.tsx b/src/shared/Tooltip.tsx index 297c853..03be9d5 100644 --- a/src/shared/Tooltip.tsx +++ b/src/shared/Tooltip.tsx @@ -79,6 +79,7 @@ export default function Tooltip({ shift(), offset(customOffset ?? 8), flip(), + // eslint-disable-next-line react-compiler/react-compiler arrow({ element: arrowRef }), ].filter(notEmpty), }); diff --git a/vite.config.ts b/vite.config.ts index a28858d..33a3d62 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -16,7 +16,7 @@ export default defineConfig(() => { react({ jsxImportSource: "@emotion/react", babel: { - plugins: ["@emotion/babel-plugin"], + plugins: ["babel-plugin-react-compiler", "@emotion/babel-plugin"], }, }), svgr(),