refactor: remove compiler in favour of linter

This commit is contained in:
Carlos Valente
2025-06-28 08:11:09 +02:00
committed by Carlos Valente
parent aefa4cbf44
commit 310dde4465
4 changed files with 142 additions and 37 deletions
+2
View File
@@ -15,10 +15,12 @@
],
"plugins": [
"react",
"react-compiler",
"simple-import-sort",
"@tanstack/query"
],
"rules": {
"react-compiler/react-compiler": "warn",
"react/jsx-no-bind": [
"error",
{
+1 -2
View File
@@ -72,19 +72,18 @@
"@typescript-eslint/eslint-plugin": "catalog:",
"@typescript-eslint/parser": "catalog:",
"@vitejs/plugin-react": "4.5.1",
"babel-plugin-react-compiler": "19.1.0-rc.2",
"eslint": "catalog:",
"eslint-config-prettier": "catalog:",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-prettier": "catalog:",
"eslint-plugin-react": "^7.32.0",
"eslint-plugin-react-compiler": "19.1.0-rc.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^8.0.0",
"happy-dom": "^16.7.2",
"ontime-types": "workspace:*",
"ontime-utils": "workspace:*",
"prettier": "catalog:",
"react-compiler-runtime": "19.1.0-rc.2",
"sass": "^1.57.1",
"typescript": "catalog:",
"vite": "6.3.1",
+1 -10
View File
@@ -10,19 +10,10 @@ import { ONTIME_VERSION } from './src/ONTIME_VERSION';
const sentryAuthToken = process.env.SENTRY_AUTH_TOKEN;
const isDev = process.env.NODE_ENV === 'local' || process.env.NODE_ENV === 'development';
const ReactCompilerConfig = {
runtimeModule: '@/mycache',
target: '18',
};
export default defineConfig({
base: './', // Ontime cloud: we use relative paths to allow them to reference a dynamic base set at runtime
plugins: [
react({
babel: {
plugins: [['babel-plugin-react-compiler', ReactCompilerConfig]],
},
}),
react(),
svgrPlugin(),
!isDev &&
sentryVitePlugin({
+138 -25
View File
@@ -204,9 +204,6 @@ importers:
'@vitejs/plugin-react':
specifier: 4.5.1
version: 4.5.1(vite@6.3.1(@types/node@22.15.26)(sass@1.57.1)(tsx@4.19.2))
babel-plugin-react-compiler:
specifier: 19.1.0-rc.2
version: 19.1.0-rc.2
eslint:
specifier: 'catalog:'
version: 8.56.0
@@ -222,6 +219,9 @@ importers:
eslint-plugin-react:
specifier: ^7.32.0
version: 7.32.0(eslint@8.56.0)
eslint-plugin-react-compiler:
specifier: 19.1.0-rc.2
version: 19.1.0-rc.2(eslint@8.56.0)
eslint-plugin-react-hooks:
specifier: ^4.6.0
version: 4.6.0(eslint@8.56.0)
@@ -240,9 +240,6 @@ importers:
prettier:
specifier: 'catalog:'
version: 3.3.1
react-compiler-runtime:
specifier: 19.1.0-rc.2
version: 19.1.0-rc.2(react@18.3.1)
sass:
specifier: ^1.57.1
version: 1.57.1
@@ -507,6 +504,10 @@ packages:
resolution: {integrity: sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==}
engines: {node: '>=6.9.0'}
'@babel/helper-annotate-as-pure@7.27.3':
resolution: {integrity: sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==}
engines: {node: '>=6.9.0'}
'@babel/helper-compilation-targets@7.23.6':
resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==}
engines: {node: '>=6.9.0'}
@@ -515,6 +516,12 @@ packages:
resolution: {integrity: sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==}
engines: {node: '>=6.9.0'}
'@babel/helper-create-class-features-plugin@7.27.1':
resolution: {integrity: sha512-QwGAmuvM17btKU5VqXfb+Giw4JcN0hjuufz3DYnpeVDvZLAObloM77bhMXiqry3Iio+Ai4phVRDwl6WU10+r5A==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
'@babel/helper-environment-visitor@7.22.20':
resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==}
engines: {node: '>=6.9.0'}
@@ -527,6 +534,10 @@ packages:
resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==}
engines: {node: '>=6.9.0'}
'@babel/helper-member-expression-to-functions@7.27.1':
resolution: {integrity: sha512-E5chM8eWjTp/aNoVpcbfM7mLxu9XGLWYise2eBKGQomAk/Mb4XoxyqXTZbuTohbsl8EKqdlMhnDI2CCLfcs9wA==}
engines: {node: '>=6.9.0'}
'@babel/helper-module-imports@7.22.15':
resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==}
engines: {node: '>=6.9.0'}
@@ -547,14 +558,28 @@ packages:
peerDependencies:
'@babel/core': ^7.0.0
'@babel/helper-optimise-call-expression@7.27.1':
resolution: {integrity: sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==}
engines: {node: '>=6.9.0'}
'@babel/helper-plugin-utils@7.27.1':
resolution: {integrity: sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==}
engines: {node: '>=6.9.0'}
'@babel/helper-replace-supers@7.27.1':
resolution: {integrity: sha512-7EHz6qDZc8RYS5ElPoShMheWvEgERonFCs7IAonWLLUTXW59DP14bCZt89/GKyreYn8g3S83m21FelHKbeDCKA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
'@babel/helper-simple-access@7.22.5':
resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==}
engines: {node: '>=6.9.0'}
'@babel/helper-skip-transparent-expression-wrappers@7.27.1':
resolution: {integrity: sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==}
engines: {node: '>=6.9.0'}
'@babel/helper-split-export-declaration@7.22.6':
resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==}
engines: {node: '>=6.9.0'}
@@ -605,6 +630,13 @@ packages:
engines: {node: '>=6.0.0'}
hasBin: true
'@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-transform-react-jsx-self@7.27.1':
resolution: {integrity: sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==}
engines: {node: '>=6.9.0'}
@@ -2662,9 +2694,6 @@ packages:
resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==}
engines: {node: '>=10', npm: '>=6'}
babel-plugin-react-compiler@19.1.0-rc.2:
resolution: {integrity: sha512-kSNA//p5fMO6ypG8EkEVPIqAjwIXm5tMjfD1XRPL/sRjYSbJ6UsvORfaeolNWnZ9n310aM0xJP7peW26BuCVzA==}
balanced-match@1.0.2:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
@@ -3330,6 +3359,12 @@ packages:
eslint-config-prettier:
optional: true
eslint-plugin-react-compiler@19.1.0-rc.2:
resolution: {integrity: sha512-oKalwDGcD+RX9mf3NEO4zOoUMeLvjSvcbbEOpquzmzqEEM2MQdp7/FY/Hx9NzmUwFzH1W9SKTz5fihfMldpEYw==}
engines: {node: ^14.17.0 || ^16.0.0 || >= 18.0.0}
peerDependencies:
eslint: '>=7'
eslint-plugin-react-hooks@4.6.0:
resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==}
engines: {node: '>=10'}
@@ -3774,6 +3809,12 @@ packages:
resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
engines: {node: '>= 0.4'}
hermes-estree@0.25.1:
resolution: {integrity: sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==}
hermes-parser@0.25.1:
resolution: {integrity: sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==}
hoist-non-react-statics@3.3.2:
resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==}
@@ -4671,11 +4712,6 @@ packages:
react: '>=16.8.0'
react-dom: '>=16.8.0'
react-compiler-runtime@19.1.0-rc.2:
resolution: {integrity: sha512-852AwyIsbWJ5o1LkQVAZsVK3iLjMxOfKZuxqeGd/RfD+j1GqHb6j3DSHLtpu4HhFbQHsP2DzxjJyKR6luv4D8w==}
peerDependencies:
react: ^17.0.0 || ^18.0.0 || ^19.0.0 || ^0.0.0-experimental
react-dom@18.3.1:
resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==}
peerDependencies:
@@ -5678,6 +5714,15 @@ packages:
resolution: {integrity: sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==}
engines: {node: '>= 10'}
zod-validation-error@3.5.2:
resolution: {integrity: sha512-mdi7YOLtram5dzJ5aDtm1AG9+mxRma1iaMrZdYIpFO7epdKBUwLHIxTF8CPDeCQ828zAXYtizrKlEJAtzgfgrw==}
engines: {node: '>=18.0.0'}
peerDependencies:
zod: ^3.25.0
zod@3.25.67:
resolution: {integrity: sha512-idA2YXwpCdqUSKRCACDE6ItZD9TZzy3OZMtpfLoh6oPR47lipysRrJfjzMqFxQ3uJuUPyUeWe1r9vLH33xO/Qw==}
zustand@5.0.3:
resolution: {integrity: sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg==}
engines: {node: '>=12.20.0'}
@@ -5777,6 +5822,10 @@ snapshots:
'@jridgewell/trace-mapping': 0.3.25
jsesc: 3.1.0
'@babel/helper-annotate-as-pure@7.27.3':
dependencies:
'@babel/types': 7.27.3
'@babel/helper-compilation-targets@7.23.6':
dependencies:
'@babel/compat-data': 7.23.5
@@ -5793,6 +5842,19 @@ snapshots:
lru-cache: 5.1.1
semver: 6.3.1
'@babel/helper-create-class-features-plugin@7.27.1(@babel/core@7.27.4)':
dependencies:
'@babel/core': 7.27.4
'@babel/helper-annotate-as-pure': 7.27.3
'@babel/helper-member-expression-to-functions': 7.27.1
'@babel/helper-optimise-call-expression': 7.27.1
'@babel/helper-replace-supers': 7.27.1(@babel/core@7.27.4)
'@babel/helper-skip-transparent-expression-wrappers': 7.27.1
'@babel/traverse': 7.27.4
semver: 6.3.1
transitivePeerDependencies:
- supports-color
'@babel/helper-environment-visitor@7.22.20': {}
'@babel/helper-function-name@7.23.0':
@@ -5804,6 +5866,13 @@ snapshots:
dependencies:
'@babel/types': 7.27.3
'@babel/helper-member-expression-to-functions@7.27.1':
dependencies:
'@babel/traverse': 7.27.4
'@babel/types': 7.27.3
transitivePeerDependencies:
- supports-color
'@babel/helper-module-imports@7.22.15':
dependencies:
'@babel/types': 7.27.3
@@ -5833,12 +5902,32 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@babel/helper-optimise-call-expression@7.27.1':
dependencies:
'@babel/types': 7.27.3
'@babel/helper-plugin-utils@7.27.1': {}
'@babel/helper-replace-supers@7.27.1(@babel/core@7.27.4)':
dependencies:
'@babel/core': 7.27.4
'@babel/helper-member-expression-to-functions': 7.27.1
'@babel/helper-optimise-call-expression': 7.27.1
'@babel/traverse': 7.27.4
transitivePeerDependencies:
- supports-color
'@babel/helper-simple-access@7.22.5':
dependencies:
'@babel/types': 7.27.3
'@babel/helper-skip-transparent-expression-wrappers@7.27.1':
dependencies:
'@babel/traverse': 7.27.4
'@babel/types': 7.27.3
transitivePeerDependencies:
- supports-color
'@babel/helper-split-export-declaration@7.22.6':
dependencies:
'@babel/types': 7.27.3
@@ -5883,6 +5972,14 @@ snapshots:
dependencies:
'@babel/types': 7.27.3
'@babel/plugin-proposal-private-methods@7.18.6(@babel/core@7.27.4)':
dependencies:
'@babel/core': 7.27.4
'@babel/helper-create-class-features-plugin': 7.27.1(@babel/core@7.27.4)
'@babel/helper-plugin-utils': 7.27.1
transitivePeerDependencies:
- supports-color
'@babel/plugin-transform-react-jsx-self@7.27.1(@babel/core@7.27.4)':
dependencies:
'@babel/core': 7.27.4
@@ -5902,7 +5999,7 @@ snapshots:
'@babel/template@7.22.15':
dependencies:
'@babel/code-frame': 7.24.2
'@babel/parser': 7.23.6
'@babel/parser': 7.27.5
'@babel/types': 7.27.3
'@babel/template@7.27.2':
@@ -5919,7 +6016,7 @@ snapshots:
'@babel/helper-function-name': 7.23.0
'@babel/helper-hoist-variables': 7.22.5
'@babel/helper-split-export-declaration': 7.22.6
'@babel/parser': 7.23.6
'@babel/parser': 7.27.5
'@babel/types': 7.27.3
debug: 4.4.1
globals: 11.12.0
@@ -7609,7 +7706,7 @@ snapshots:
'@types/babel__template@7.4.4':
dependencies:
'@babel/parser': 7.23.6
'@babel/parser': 7.27.5
'@babel/types': 7.27.3
'@types/babel__traverse@7.20.4':
@@ -8206,10 +8303,6 @@ snapshots:
cosmiconfig: 7.1.0
resolve: 1.22.1
babel-plugin-react-compiler@19.1.0-rc.2:
dependencies:
'@babel/types': 7.27.3
balanced-match@1.0.2: {}
base64-js@1.5.1: {}
@@ -9075,6 +9168,18 @@ snapshots:
optionalDependencies:
eslint-config-prettier: 9.1.0(eslint@8.56.0)
eslint-plugin-react-compiler@19.1.0-rc.2(eslint@8.56.0):
dependencies:
'@babel/core': 7.27.4
'@babel/parser': 7.27.5
'@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.27.4)
eslint: 8.56.0
hermes-parser: 0.25.1
zod: 3.25.67
zod-validation-error: 3.5.2(zod@3.25.67)
transitivePeerDependencies:
- supports-color
eslint-plugin-react-hooks@4.6.0(eslint@8.56.0):
dependencies:
eslint: 8.56.0
@@ -9662,6 +9767,12 @@ snapshots:
dependencies:
function-bind: 1.1.2
hermes-estree@0.25.1: {}
hermes-parser@0.25.1:
dependencies:
hermes-estree: 0.25.1
hoist-non-react-statics@3.3.2:
dependencies:
react-is: 16.13.1
@@ -10525,10 +10636,6 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
react-compiler-runtime@19.1.0-rc.2(react@18.3.1):
dependencies:
react: 18.3.1
react-dom@18.3.1(react@18.3.1):
dependencies:
loose-envify: 1.4.0
@@ -11590,6 +11697,12 @@ snapshots:
compress-commons: 4.1.2
readable-stream: 3.6.2
zod-validation-error@3.5.2(zod@3.25.67):
dependencies:
zod: 3.25.67
zod@3.25.67: {}
zustand@5.0.3(@types/react@18.0.26)(react@18.3.1)(use-sync-external-store@1.5.0(react@18.3.1)):
optionalDependencies:
'@types/react': 18.0.26