From 860fe79d95d823fa6fde8726bf25c314e54de85e Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Sat, 21 Feb 2026 00:39:34 -0300 Subject: [PATCH 01/25] chore(deps,eslint): upgrade ESLint --- apps/meteor/package.json | 2 +- apps/uikit-playground/package.json | 2 +- ee/apps/account-service/package.json | 2 +- ee/apps/authorization-service/package.json | 2 +- ee/apps/ddp-streamer/package.json | 2 +- ee/apps/omnichannel-transcript/package.json | 2 +- ee/apps/presence-service/package.json | 2 +- ee/apps/queue-worker/package.json | 2 +- ee/packages/abac/package.json | 2 +- ee/packages/federation-matrix/package.json | 2 +- ee/packages/license/package.json | 2 +- ee/packages/media-calls/package.json | 2 +- ee/packages/network-broker/package.json | 2 +- ee/packages/omni-core-ee/package.json | 2 +- ee/packages/omnichannel-services/package.json | 2 +- ee/packages/pdf-worker/package.json | 2 +- ee/packages/presence/package.json | 2 +- ee/packages/ui-theming/package.json | 2 +- package.json | 2 +- packages/account-utils/package.json | 2 +- packages/agenda/package.json | 2 +- packages/api-client/package.json | 2 +- packages/apps-engine/package.json | 2 +- packages/apps/package.json | 2 +- packages/base64/package.json | 2 +- packages/cas-validate/package.json | 2 +- packages/core-services/package.json | 2 +- packages/core-typings/package.json | 2 +- packages/cron/package.json | 2 +- packages/ddp-client/package.json | 2 +- packages/desktop-api/package.json | 2 +- packages/eslint-config/package.json | 2 +- packages/favicon/package.json | 2 +- packages/fuselage-ui-kit/package.json | 2 +- packages/gazzodown/package.json | 2 +- packages/http-router/package.json | 2 +- packages/i18n/package.json | 2 +- packages/instance-status/package.json | 2 +- packages/jest-presets/package.json | 2 +- packages/jwt/package.json | 2 +- packages/livechat/package.json | 2 +- packages/log-format/package.json | 2 +- packages/logger/package.json | 2 +- packages/media-signaling/package.json | 2 +- packages/message-parser/package.json | 2 +- packages/message-types/package.json | 2 +- packages/mock-providers/package.json | 2 +- packages/model-typings/package.json | 2 +- packages/models/package.json | 2 +- packages/mongo-adapter/package.json | 2 +- packages/node-poplib/package.json | 2 +- packages/omni-core/package.json | 2 +- packages/password-policies/package.json | 2 +- packages/patch-injection/package.json | 2 +- packages/peggy-loader/package.json | 2 +- packages/random/package.json | 2 +- packages/release-action/package.json | 2 +- packages/release-changelog/package.json | 2 +- packages/rest-typings/package.json | 2 +- .../server-cloud-communication/package.json | 2 +- packages/server-fetch/package.json | 2 +- packages/sha256/package.json | 2 +- packages/storybook-config/package.json | 2 +- packages/tools/package.json | 2 +- packages/tracing/package.json | 2 +- packages/ui-avatar/package.json | 2 +- packages/ui-client/package.json | 2 +- packages/ui-composer/package.json | 2 +- packages/ui-contexts/package.json | 2 +- packages/ui-kit/package.json | 2 +- packages/ui-video-conf/package.json | 2 +- packages/ui-voip/package.json | 2 +- packages/web-ui-registration/package.json | 2 +- yarn.lock | 293 ++++++++++-------- 74 files changed, 229 insertions(+), 210 deletions(-) diff --git a/apps/meteor/package.json b/apps/meteor/package.json index c8cd3ef402cfc..7d709e5fc387c 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -414,7 +414,7 @@ "cross-env": "^7.0.3", "docker-compose": "^0.24.8", "emojione-assets": "^4.5.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "eslint-config-prettier": "~9.1.2", "eslint-plugin-anti-trojan-source": "~1.1.2", "eslint-plugin-import": "~2.31.0", diff --git a/apps/uikit-playground/package.json b/apps/uikit-playground/package.json index e3c696c69b3b2..07c4a7cb8aa17 100644 --- a/apps/uikit-playground/package.json +++ b/apps/uikit-playground/package.json @@ -51,7 +51,7 @@ "@typescript-eslint/eslint-plugin": "~5.60.1", "@typescript-eslint/parser": "~5.60.1", "@vitejs/plugin-react": "~4.5.2", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "eslint-plugin-react": "~7.37.5", "eslint-plugin-react-hooks": "^5.0.0", "eslint-plugin-react-refresh": "^0.4.26", diff --git a/ee/apps/account-service/package.json b/ee/apps/account-service/package.json index 018e7af331aa7..a85efb754781b 100644 --- a/ee/apps/account-service/package.json +++ b/ee/apps/account-service/package.json @@ -48,7 +48,7 @@ "@types/bcrypt": "^5.0.2", "@types/polka": "^0.5.8", "@types/prometheus-gc-stats": "^0.6.4", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "ts-node": "^10.9.2", "typescript": "~5.9.3" }, diff --git a/ee/apps/authorization-service/package.json b/ee/apps/authorization-service/package.json index 23eb464440346..ee6e9259e5b4c 100644 --- a/ee/apps/authorization-service/package.json +++ b/ee/apps/authorization-service/package.json @@ -46,7 +46,7 @@ "@rocket.chat/tsconfig": "workspace:*", "@types/polka": "^0.5.8", "@types/prometheus-gc-stats": "^0.6.4", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "ts-node": "^10.9.2", "typescript": "~5.9.3" }, diff --git a/ee/apps/ddp-streamer/package.json b/ee/apps/ddp-streamer/package.json index 12b0fa078a599..70198cff46d26 100644 --- a/ee/apps/ddp-streamer/package.json +++ b/ee/apps/ddp-streamer/package.json @@ -57,7 +57,7 @@ "@types/underscore": "^1.13.0", "@types/uuid": "^10.0.0", "@types/ws": "^8.5.13", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "pino-pretty": "^7.6.1", "ts-node": "^10.9.2", "typescript": "~5.9.3" diff --git a/ee/apps/omnichannel-transcript/package.json b/ee/apps/omnichannel-transcript/package.json index 4a11f7770e0a4..cfe4e84ea9ef7 100644 --- a/ee/apps/omnichannel-transcript/package.json +++ b/ee/apps/omnichannel-transcript/package.json @@ -55,7 +55,7 @@ "@types/polka": "^0.5.8", "@types/prometheus-gc-stats": "^0.6.4", "@types/react": "~18.3.27", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "react": "~18.3.1", "ts-node": "^10.9.2", "typescript": "~5.9.3" diff --git a/ee/apps/presence-service/package.json b/ee/apps/presence-service/package.json index d3df6feb340b1..77600000af298 100644 --- a/ee/apps/presence-service/package.json +++ b/ee/apps/presence-service/package.json @@ -45,7 +45,7 @@ "@rocket.chat/tsconfig": "workspace:*", "@types/polka": "^0.5.8", "@types/prometheus-gc-stats": "^0.6.4", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "ts-node": "^10.9.2", "typescript": "~5.9.3" }, diff --git a/ee/apps/queue-worker/package.json b/ee/apps/queue-worker/package.json index 2741289c23d97..bac125344819c 100644 --- a/ee/apps/queue-worker/package.json +++ b/ee/apps/queue-worker/package.json @@ -47,7 +47,7 @@ "@rocket.chat/tsconfig": "workspace:*", "@types/polka": "^0.5.8", "@types/prometheus-gc-stats": "^0.6.4", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "ts-node": "^10.9.2", "typescript": "~5.9.3" }, diff --git a/ee/packages/abac/package.json b/ee/packages/abac/package.json index a2dbbe932ef80..98950d9c67b1e 100644 --- a/ee/packages/abac/package.json +++ b/ee/packages/abac/package.json @@ -40,7 +40,7 @@ "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", "@types/node": "~22.16.5", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "mongodb-memory-server": "^10.1.4", "typescript": "~5.9.3" diff --git a/ee/packages/federation-matrix/package.json b/ee/packages/federation-matrix/package.json index 67c076ccae906..ffcd8d5a667a4 100644 --- a/ee/packages/federation-matrix/package.json +++ b/ee/packages/federation-matrix/package.json @@ -43,7 +43,7 @@ "@types/emojione": "^2.2.9", "@types/node": "~22.16.5", "@types/sanitize-html": "~2.16.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "jest-qase-reporter": "^2.1.4", "matrix-js-sdk": "^38.4.0", diff --git a/ee/packages/license/package.json b/ee/packages/license/package.json index 346381b76a27e..d3f86344c88d3 100644 --- a/ee/packages/license/package.json +++ b/ee/packages/license/package.json @@ -28,7 +28,7 @@ "@types/bcrypt": "^5.0.2", "@types/jest": "~30.0.0", "@types/ws": "^8.5.13", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "jest-websocket-mock": "~2.5.0", "typescript": "~5.9.3" diff --git a/ee/packages/media-calls/package.json b/ee/packages/media-calls/package.json index 4b20ff01664a7..a39cafe21fa29 100644 --- a/ee/packages/media-calls/package.json +++ b/ee/packages/media-calls/package.json @@ -26,7 +26,7 @@ "devDependencies": { "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "typescript": "~5.9.3" } } diff --git a/ee/packages/network-broker/package.json b/ee/packages/network-broker/package.json index ee15503db1566..83ad46e5b112f 100644 --- a/ee/packages/network-broker/package.json +++ b/ee/packages/network-broker/package.json @@ -29,7 +29,7 @@ "@types/node": "~22.16.5", "@types/sinon": "^10.0.20", "chai": "^4.5.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "sinon": "^19.0.5", "typescript": "~5.9.3" diff --git a/ee/packages/omni-core-ee/package.json b/ee/packages/omni-core-ee/package.json index 67c04aa497d48..e64e3c3a844d4 100644 --- a/ee/packages/omni-core-ee/package.json +++ b/ee/packages/omni-core-ee/package.json @@ -28,7 +28,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/ee/packages/omnichannel-services/package.json b/ee/packages/omnichannel-services/package.json index 5bdefc781e760..d566c9e899f0c 100644 --- a/ee/packages/omnichannel-services/package.json +++ b/ee/packages/omnichannel-services/package.json @@ -46,7 +46,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/ee/packages/pdf-worker/package.json b/ee/packages/pdf-worker/package.json index 1d81713b7364f..2a196b96eafba 100644 --- a/ee/packages/pdf-worker/package.json +++ b/ee/packages/pdf-worker/package.json @@ -42,7 +42,7 @@ "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", "buffer": "~6.0.3", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "eslint-plugin-storybook": "~0.11.6", "i18next": "~23.4.9", "jest": "~30.2.0", diff --git a/ee/packages/presence/package.json b/ee/packages/presence/package.json index b2479372d4382..ac3665e23d901 100644 --- a/ee/packages/presence/package.json +++ b/ee/packages/presence/package.json @@ -26,7 +26,7 @@ "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/rest-typings": "workspace:^", "@types/node": "~22.16.5", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/ee/packages/ui-theming/package.json b/ee/packages/ui-theming/package.json index c821cd71bcdbd..bb4d0d628dbbe 100644 --- a/ee/packages/ui-theming/package.json +++ b/ee/packages/ui-theming/package.json @@ -23,7 +23,7 @@ "@rocket.chat/ui-contexts": "workspace:~", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "eslint-plugin-anti-trojan-source": "~1.1.2", "eslint-plugin-react": "~7.37.5", "eslint-plugin-react-hooks": "~5.0.0", diff --git a/package.json b/package.json index 44dd80ff3d1a8..59b862f136899 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "@types/js-yaml": "^4.0.9", "@types/node": "~22.16.5", "ts-node": "^10.9.2", - "turbo": "~2.7.6", + "turbo": "~2.8.11", "typescript": "~5.9.3" }, "packageManager": "yarn@4.12.0", diff --git a/packages/account-utils/package.json b/packages/account-utils/package.json index 011601ccddef8..6d5e624346ea2 100644 --- a/packages/account-utils/package.json +++ b/packages/account-utils/package.json @@ -14,7 +14,7 @@ "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix" }, "devDependencies": { - "eslint": "~8.45.0", + "eslint": "~8.57.1", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/agenda/package.json b/packages/agenda/package.json index 07ba287eda6a4..93ab3adc53b8e 100644 --- a/packages/agenda/package.json +++ b/packages/agenda/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "@types/debug": "^4.1.12", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 1dfae4c06108e..655f9491e27d7 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -27,7 +27,7 @@ "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", "@types/strict-uri-encode": "^2.0.2", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "jest-fetch-mock": "~3.0.3", "typescript": "~5.9.3" diff --git a/packages/apps-engine/package.json b/packages/apps-engine/package.json index f2dd78c7308fd..b86545b2973d3 100644 --- a/packages/apps-engine/package.json +++ b/packages/apps-engine/package.json @@ -105,7 +105,7 @@ "@typescript-eslint/parser": "~5.60.1", "alsatian": "^2.4.0", "browserify": "^16.5.2", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "npm-run-all": "^4.1.5", "nyc": "^17.1.0", "rimraf": "^6.0.1", diff --git a/packages/apps/package.json b/packages/apps/package.json index 8be18c4cbdca1..2ae9a5f5c9a8a 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@rocket.chat/tsconfig": "workspace:*", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/base64/package.json b/packages/base64/package.json index 73f63dadafa9a..03bbcfbb3659c 100644 --- a/packages/base64/package.json +++ b/packages/base64/package.json @@ -17,7 +17,7 @@ "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/cas-validate/package.json b/packages/cas-validate/package.json index ee63960004b21..f666a5765059d 100644 --- a/packages/cas-validate/package.json +++ b/packages/cas-validate/package.json @@ -19,7 +19,7 @@ "cheerio": "1.0.0" }, "devDependencies": { - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/core-services/package.json b/packages/core-services/package.json index 023200f3393fa..9313c41670e98 100644 --- a/packages/core-services/package.json +++ b/packages/core-services/package.json @@ -34,7 +34,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "mongodb": "6.16.0", "prettier": "~3.3.3", diff --git a/packages/core-typings/package.json b/packages/core-typings/package.json index 818f309044683..f1c37eed9a649 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -29,7 +29,7 @@ "@rocket.chat/apps-engine": "workspace:^", "@rocket.chat/eslint-config": "workspace:^", "@types/express": "^4.17.25", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "mongodb": "6.16.0", "npm-run-all": "~4.1.5", "prettier": "~3.3.3", diff --git a/packages/cron/package.json b/packages/cron/package.json index 5ea04f5d211d7..8eb5ad646aa57 100644 --- a/packages/cron/package.json +++ b/packages/cron/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "@rocket.chat/tsconfig": "workspace:*", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/ddp-client/package.json b/packages/ddp-client/package.json index 48ffe80c98370..25adafa883526 100644 --- a/packages/ddp-client/package.json +++ b/packages/ddp-client/package.json @@ -26,7 +26,7 @@ "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", "@types/ws": "^8.5.13", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "jest-websocket-mock": "~2.5.0", "typescript": "~5.9.3", diff --git a/packages/desktop-api/package.json b/packages/desktop-api/package.json index 315bb3818f0b4..c98545f1e6439 100644 --- a/packages/desktop-api/package.json +++ b/packages/desktop-api/package.json @@ -17,7 +17,7 @@ }, "devDependencies": { "@rocket.chat/eslint-config": "workspace:~", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "rimraf": "~6.0.1", "typescript": "~5.9.3" }, diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index c248461897d53..afca3b42c635f 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -26,7 +26,7 @@ "@types/prettier": "^2.7.3", "@typescript-eslint/eslint-plugin": "~5.60.1", "@typescript-eslint/parser": "~5.60.1", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "eslint-config-prettier": "~9.1.2", "eslint-import-resolver-typescript": "~4.4.4", "eslint-plugin-anti-trojan-source": "~1.1.2", diff --git a/packages/favicon/package.json b/packages/favicon/package.json index a210db686a298..fafcf5f046842 100644 --- a/packages/favicon/package.json +++ b/packages/favicon/package.json @@ -14,7 +14,7 @@ "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix" }, "devDependencies": { - "eslint": "~8.45.0", + "eslint": "~8.57.1", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/fuselage-ui-kit/package.json b/packages/fuselage-ui-kit/package.json index 63f543d04baef..a89276566fb04 100644 --- a/packages/fuselage-ui-kit/package.json +++ b/packages/fuselage-ui-kit/package.json @@ -73,7 +73,7 @@ "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", "cross-env": "^7.0.3", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "eslint-plugin-storybook": "~0.11.6", "i18next": "~23.4.9", "jest": "~30.2.0", diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index 59f9b871c240f..19fa51f39cb1f 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -58,7 +58,7 @@ "@types/react-dom": "~18.3.7", "@typescript-eslint/eslint-plugin": "~5.60.1", "@typescript-eslint/parser": "~5.60.1", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "eslint-plugin-anti-trojan-source": "~1.1.2", "eslint-plugin-react": "~7.37.5", "eslint-plugin-react-hooks": "~5.0.0", diff --git a/packages/http-router/package.json b/packages/http-router/package.json index 9a83dfbcbcded..65b34405c5051 100644 --- a/packages/http-router/package.json +++ b/packages/http-router/package.json @@ -32,7 +32,7 @@ "@types/express": "^4.17.25", "@types/jest": "~30.0.0", "@types/supertest": "~6.0.3", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "supertest": "~7.1.4", "ts-jest": "~29.4.6", diff --git a/packages/i18n/package.json b/packages/i18n/package.json index db74e1a400a6d..b4e05d09ce835 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -36,7 +36,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tools": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "i18next": "~23.4.9", "jest": "~30.2.0", "typescript": "~5.9.3" diff --git a/packages/instance-status/package.json b/packages/instance-status/package.json index 515dd6de6f4b8..f32c610234229 100644 --- a/packages/instance-status/package.json +++ b/packages/instance-status/package.json @@ -21,7 +21,7 @@ "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/tsconfig": "workspace:*", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "mongodb": "6.16.0", "prettier": "~3.3.3", "typescript": "~5.9.3" diff --git a/packages/jest-presets/package.json b/packages/jest-presets/package.json index 55c6d3282cc1c..45144210dbfae 100644 --- a/packages/jest-presets/package.json +++ b/packages/jest-presets/package.json @@ -42,7 +42,7 @@ "@types/identity-obj-proxy": "^3.0.2", "@types/jest": "~30.0.0", "@types/uuid": "^10.0.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/jwt/package.json b/packages/jwt/package.json index 49bb98ce0ac7c..8d01788846c78 100644 --- a/packages/jwt/package.json +++ b/packages/jwt/package.json @@ -23,7 +23,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/livechat/package.json b/packages/livechat/package.json index 2fb4ad1c092fc..89ce61ceab531 100644 --- a/packages/livechat/package.json +++ b/packages/livechat/package.json @@ -83,7 +83,7 @@ "css-loader": "^4.3.0", "cssnano": "^7.0.7", "desvg-loader": "^0.1.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "eslint-plugin-import": "~2.31.0", "eslint-plugin-react": "~7.37.5", "eslint-plugin-react-hooks": "~5.0.0", diff --git a/packages/log-format/package.json b/packages/log-format/package.json index d54f35d51f85f..89a9e182751fb 100644 --- a/packages/log-format/package.json +++ b/packages/log-format/package.json @@ -20,7 +20,7 @@ "devDependencies": { "@types/chalk": "^2.2.4", "@types/ejson": "^2.2.2", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/logger/package.json b/packages/logger/package.json index f3badf5003616..16354b6ce85b6 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -18,7 +18,7 @@ "pino": "^8.21.0" }, "devDependencies": { - "eslint": "~8.45.0", + "eslint": "~8.57.1", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/media-signaling/package.json b/packages/media-signaling/package.json index a6f3b5ce88fa8..6b8f110b71bc9 100644 --- a/packages/media-signaling/package.json +++ b/packages/media-signaling/package.json @@ -23,7 +23,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" } diff --git a/packages/message-parser/package.json b/packages/message-parser/package.json index b146fb9b80698..54d2d5e6b2bbe 100644 --- a/packages/message-parser/package.json +++ b/packages/message-parser/package.json @@ -53,7 +53,7 @@ "@types/jest": "~30.0.0", "@types/node": "~22.16.5", "@typescript-eslint/parser": "~5.60.1", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "npm-run-all": "^4.1.5", "peggy": "4.1.1", diff --git a/packages/message-types/package.json b/packages/message-types/package.json index 7bb4f2e7e19a5..5cc2a77d6e0ee 100644 --- a/packages/message-types/package.json +++ b/packages/message-types/package.json @@ -17,7 +17,7 @@ "@rocket.chat/core-typings": "workspace:~", "@rocket.chat/eslint-config": "workspace:~", "date-fns": "~4.1.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "i18next": "~23.4.9", "jest": "~30.2.0", "moment": "^2.30.1", diff --git a/packages/mock-providers/package.json b/packages/mock-providers/package.json index 0ca1e77c1953f..928fed1518778 100644 --- a/packages/mock-providers/package.json +++ b/packages/mock-providers/package.json @@ -33,7 +33,7 @@ "@testing-library/react": "~16.3.2", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "react": "~18.3.1", "react-dom": "~18.3.1", diff --git a/packages/model-typings/package.json b/packages/model-typings/package.json index 030d73117c92c..13a4358885e49 100644 --- a/packages/model-typings/package.json +++ b/packages/model-typings/package.json @@ -17,7 +17,7 @@ }, "devDependencies": { "@types/node-rsa": "^1.1.4", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "mongodb": "6.16.0", "typescript": "~5.9.3" }, diff --git a/packages/models/package.json b/packages/models/package.json index 6ed2cc1e45c52..48510033ee26f 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -32,7 +32,7 @@ "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", "@types/node-rsa": "^1.1.4", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/mongo-adapter/package.json b/packages/mongo-adapter/package.json index e8ee09a9101ce..5f094a9b2cad7 100644 --- a/packages/mongo-adapter/package.json +++ b/packages/mongo-adapter/package.json @@ -17,7 +17,7 @@ }, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "mongodb": "6.16.0", "typescript": "~5.9.3" diff --git a/packages/node-poplib/package.json b/packages/node-poplib/package.json index 0229da7444d44..499dddb34ae29 100644 --- a/packages/node-poplib/package.json +++ b/packages/node-poplib/package.json @@ -4,7 +4,7 @@ "private": true, "main": "./src/index.js", "devDependencies": { - "eslint": "~8.45.0", + "eslint": "~8.57.1", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/omni-core/package.json b/packages/omni-core/package.json index 22f880c08e879..4ff20327b5e63 100644 --- a/packages/omni-core/package.json +++ b/packages/omni-core/package.json @@ -26,7 +26,7 @@ "@rocket.chat/tools": "workspace:*", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/password-policies/package.json b/packages/password-policies/package.json index 30fea3ced0373..473b7b4b8e05d 100644 --- a/packages/password-policies/package.json +++ b/packages/password-policies/package.json @@ -20,7 +20,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/patch-injection/package.json b/packages/patch-injection/package.json index 7b369b7b78072..e593d6d81b3fc 100644 --- a/packages/patch-injection/package.json +++ b/packages/patch-injection/package.json @@ -20,7 +20,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/peggy-loader/package.json b/packages/peggy-loader/package.json index 5ee3652f21746..89555558edf29 100644 --- a/packages/peggy-loader/package.json +++ b/packages/peggy-loader/package.json @@ -36,7 +36,7 @@ "@rocket.chat/eslint-config": "workspace:~", "@rocket.chat/prettier-config": "~0.31.25", "@types/node": "~22.16.5", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "npm-run-all": "^4.1.5", "peggy": "4.1.1", "prettier": "~3.3.3", diff --git a/packages/random/package.json b/packages/random/package.json index 4a53e488131fd..c01851537f507 100644 --- a/packages/random/package.json +++ b/packages/random/package.json @@ -19,7 +19,7 @@ "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/release-action/package.json b/packages/release-action/package.json index 18ec4e372fb04..b3a34ec568409 100644 --- a/packages/release-action/package.json +++ b/packages/release-action/package.json @@ -15,7 +15,7 @@ "@octokit/core": "^5.0.1", "@octokit/plugin-throttling": "^6.1.0", "@rocket.chat/eslint-config": "workspace:^", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "mdast-util-to-string": "2.0.0", "remark-parse": "9.0.0", "remark-stringify": "9.0.1", diff --git a/packages/release-changelog/package.json b/packages/release-changelog/package.json index 4e4566bf3a89d..a4619df4534ab 100644 --- a/packages/release-changelog/package.json +++ b/packages/release-changelog/package.json @@ -15,7 +15,7 @@ "@changesets/types": "^6.0.0", "@rocket.chat/eslint-config": "workspace:^", "@types/node": "~22.16.5", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index 2998d0dffbf16..20d785af4fdf6 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -24,7 +24,7 @@ "@rocket.chat/apps-engine": "workspace:^", "@rocket.chat/eslint-config": "workspace:~", "@types/jest": "~30.0.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "mongodb": "6.16.0", "typescript": "~5.9.3" }, diff --git a/packages/server-cloud-communication/package.json b/packages/server-cloud-communication/package.json index 75ed78f672525..fe659f69a49ec 100644 --- a/packages/server-cloud-communication/package.json +++ b/packages/server-cloud-communication/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "@rocket.chat/license": "workspace:^", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/server-fetch/package.json b/packages/server-fetch/package.json index 0ef1b947a0b43..9dad2a36bffbf 100644 --- a/packages/server-fetch/package.json +++ b/packages/server-fetch/package.json @@ -28,7 +28,7 @@ "devDependencies": { "@types/jest": "^29.5.5", "@types/node-fetch": "~2.6.13", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "^29.7.0", "typescript": "~5.9.3" }, diff --git a/packages/sha256/package.json b/packages/sha256/package.json index 3e780df716cb4..f92606225214d 100644 --- a/packages/sha256/package.json +++ b/packages/sha256/package.json @@ -18,7 +18,7 @@ "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/storybook-config/package.json b/packages/storybook-config/package.json index 7870763257554..85ebe6c5fee27 100644 --- a/packages/storybook-config/package.json +++ b/packages/storybook-config/package.json @@ -41,7 +41,7 @@ "@rocket.chat/icons": "~0.46.0", "@rocket.chat/tsconfig": "workspace:*", "@storybook/react": "^8.6.15", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "react": "~18.3.1", "react-dom": "~18.3.1", "typescript": "~5.9.3" diff --git a/packages/tools/package.json b/packages/tools/package.json index 9e6198af058ec..aa4bd4a7e25d0 100644 --- a/packages/tools/package.json +++ b/packages/tools/package.json @@ -24,7 +24,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/tracing/package.json b/packages/tracing/package.json index c0c3edc0487bd..962939c49fca2 100644 --- a/packages/tracing/package.json +++ b/packages/tracing/package.json @@ -21,7 +21,7 @@ }, "devDependencies": { "@types/jest": "~30.0.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "ts-jest": "~29.4.6", "typescript": "~5.9.3" diff --git a/packages/ui-avatar/package.json b/packages/ui-avatar/package.json index e766be6870aa1..0129b8f1e62e4 100644 --- a/packages/ui-avatar/package.json +++ b/packages/ui-avatar/package.json @@ -24,7 +24,7 @@ "@rocket.chat/ui-contexts": "workspace:^", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "eslint-plugin-react": "~7.37.5", "eslint-plugin-react-hooks": "~5.0.0", "eslint-plugin-storybook": "~0.11.6", diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json index e1e401b4d664a..cd5d47ee3d09d 100644 --- a/packages/ui-client/package.json +++ b/packages/ui-client/package.json @@ -44,7 +44,7 @@ "@types/jest": "~30.0.0", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "eslint-plugin-anti-trojan-source": "~1.1.2", "eslint-plugin-react": "~7.37.5", "eslint-plugin-react-hooks": "~5.0.0", diff --git a/packages/ui-composer/package.json b/packages/ui-composer/package.json index 187c4600eb2ec..baec29c4645f0 100644 --- a/packages/ui-composer/package.json +++ b/packages/ui-composer/package.json @@ -40,7 +40,7 @@ "@types/jest": "~30.0.0", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "eslint-plugin-react": "~7.37.5", "eslint-plugin-react-hooks": "~5.0.0", "eslint-plugin-storybook": "~0.11.6", diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index e976080070cd0..3132ad6afae43 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -33,7 +33,7 @@ "@types/jest": "~30.0.0", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "eslint-plugin-react-hooks": "^5.0.0", "i18next": "~23.4.9", "jest": "~30.2.0", diff --git a/packages/ui-kit/package.json b/packages/ui-kit/package.json index 48d99de76e1bc..aceafb667893e 100644 --- a/packages/ui-kit/package.json +++ b/packages/ui-kit/package.json @@ -39,7 +39,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "jest": "~30.2.0", "npm-run-all": "~4.1.5", "prettier": "~3.3.3", diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json index f30de41a07cd2..913f90d2a7b22 100644 --- a/packages/ui-video-conf/package.json +++ b/packages/ui-video-conf/package.json @@ -44,7 +44,7 @@ "@types/jest-axe": "~3.5.9", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "eslint-plugin-react": "~7.37.5", "eslint-plugin-react-hooks": "~5.0.0", "eslint-plugin-storybook": "~0.11.6", diff --git a/packages/ui-voip/package.json b/packages/ui-voip/package.json index 599d0973dfe72..c399eb6432fe3 100644 --- a/packages/ui-voip/package.json +++ b/packages/ui-voip/package.json @@ -62,7 +62,7 @@ "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", "date-fns": "~4.1.0", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "eslint-plugin-react": "~7.37.5", "eslint-plugin-react-hooks": "~5.0.0", "eslint-plugin-storybook": "~0.11.6", diff --git a/packages/web-ui-registration/package.json b/packages/web-ui-registration/package.json index 20218a762af42..d291b31c95b53 100644 --- a/packages/web-ui-registration/package.json +++ b/packages/web-ui-registration/package.json @@ -46,7 +46,7 @@ "@testing-library/react": "~16.3.2", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.45.0", + "eslint": "~8.57.1", "eslint-plugin-storybook": "~0.11.6", "i18next": "~23.4.9", "react": "~18.3.1", diff --git a/yarn.lock b/yarn.lock index 529b3a99ee19c..414cc5941a2dd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3247,9 +3247,16 @@ __metadata: languageName: node linkType: hard -"@eslint/eslintrc@npm:^2.1.0": - version: 2.1.0 - resolution: "@eslint/eslintrc@npm:2.1.0" +"@eslint-community/regexpp@npm:^4.6.1": + version: 4.12.2 + resolution: "@eslint-community/regexpp@npm:4.12.2" + checksum: 10/049b280fddf71dd325514e0a520024969431dc3a8b02fa77476e6820e9122f28ab4c9168c11821f91a27982d2453bcd7a66193356ea84e84fb7c8d793be1ba0c + languageName: node + linkType: hard + +"@eslint/eslintrc@npm:^2.1.4": + version: 2.1.4 + resolution: "@eslint/eslintrc@npm:2.1.4" dependencies: ajv: "npm:^6.12.4" debug: "npm:^4.3.2" @@ -3260,14 +3267,14 @@ __metadata: js-yaml: "npm:^4.1.0" minimatch: "npm:^3.1.2" strip-json-comments: "npm:^3.1.1" - checksum: 10/923adf0fbadbe1548b2cbf6d020cc135fcd3bafee073b937a4c2e15b971cff607d987cc82e076d19d86d660dc0b992f688e0f5cf5eabfb5045c8ecdc3e50bd63 + checksum: 10/7a3b14f4b40fc1a22624c3f84d9f467a3d9ea1ca6e9a372116cb92507e485260359465b58e25bcb6c9981b155416b98c9973ad9b796053fd7b3f776a6946bce8 languageName: node linkType: hard -"@eslint/js@npm:8.44.0": - version: 8.44.0 - resolution: "@eslint/js@npm:8.44.0" - checksum: 10/06adec291c023cf1415d5c8dc0b14608d770ffb42b29c65dcbf092051580e1f6080483979c87b2067580b4566e281c0f588efb571303a092b34bca911eca8fb9 +"@eslint/js@npm:8.57.1": + version: 8.57.1 + resolution: "@eslint/js@npm:8.57.1" + checksum: 10/7562b21be10c2adbfa4aa5bb2eccec2cb9ac649a3569560742202c8d1cb6c931ce634937a2f0f551e078403a1c1285d6c2c0aa345dafc986149665cd69fe8b59 languageName: node linkType: hard @@ -3459,14 +3466,14 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.10": - version: 0.11.10 - resolution: "@humanwhocodes/config-array@npm:0.11.10" +"@humanwhocodes/config-array@npm:^0.13.0": + version: 0.13.0 + resolution: "@humanwhocodes/config-array@npm:0.13.0" dependencies: - "@humanwhocodes/object-schema": "npm:^1.2.1" - debug: "npm:^4.1.1" + "@humanwhocodes/object-schema": "npm:^2.0.3" + debug: "npm:^4.3.1" minimatch: "npm:^3.0.5" - checksum: 10/f93086ae6a340e739a6bb23d4575b69f52acc4e4e3d62968eaaf77a77db4ba69d6d3e50c0028ba19b634ef6b241553a9d9a13d91b797b3ea33d5d711bb3362fb + checksum: 10/524df31e61a85392a2433bf5d03164e03da26c03d009f27852e7dcfdafbc4a23f17f021dacf88e0a7a9fe04ca032017945d19b57a16e2676d9114c22a53a9d11 languageName: node linkType: hard @@ -3477,10 +3484,10 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/object-schema@npm:^1.2.1": - version: 1.2.1 - resolution: "@humanwhocodes/object-schema@npm:1.2.1" - checksum: 10/b48a8f87fcd5fdc4ac60a31a8bf710d19cc64556050575e6a35a4a48a8543cf8cde1598a65640ff2cdfbfd165b38f9db4fa3782bea7848eb585cc3db824002e6 +"@humanwhocodes/object-schema@npm:^2.0.3": + version: 2.0.3 + resolution: "@humanwhocodes/object-schema@npm:2.0.3" + checksum: 10/05bb99ed06c16408a45a833f03a732f59bf6184795d4efadd33238ff8699190a8c871ad1121241bb6501589a9598dc83bf25b99dcbcf41e155cdf36e35e937a3 languageName: node linkType: hard @@ -7907,7 +7914,7 @@ __metadata: "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" "@types/node": "npm:~22.16.5" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" mem: "npm:^8.1.1" mongodb: "npm:6.10.0" @@ -7940,7 +7947,7 @@ __metadata: "@types/prometheus-gc-stats": "npm:^0.6.4" bcrypt: "npm:^5.1.1" ejson: "npm:^2.2.3" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eventemitter3: "npm:^5.0.4" mem: "npm:^8.1.1" moleculer: "npm:^0.14.35" @@ -7958,7 +7965,7 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/account-utils@workspace:packages/account-utils" dependencies: - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" typescript: "npm:~5.9.3" languageName: unknown linkType: soft @@ -7971,7 +7978,7 @@ __metadata: cron: "npm:~1.8.2" date.js: "npm:~0.3.3" debug: "npm:~4.3.7" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" human-interval: "npm:^2.0.1" moment-timezone: "npm:~0.5.48" mongodb: "npm:6.16.0" @@ -7989,7 +7996,7 @@ __metadata: "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" "@types/strict-uri-encode": "npm:^2.0.2" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" filter-obj: "npm:^3.0.0" jest: "npm:~30.2.0" jest-fetch-mock: "npm:~3.0.3" @@ -8022,7 +8029,7 @@ __metadata: browserify: "npm:^16.5.2" debug: "npm:^4.3.7" esbuild: "npm:~0.25.12" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jose: "npm:^4.15.9" jsonrpc-lite: "npm:^2.2.0" lodash.clonedeep: "npm:^4.5.0" @@ -8048,7 +8055,7 @@ __metadata: "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/model-typings": "workspace:^" "@rocket.chat/tsconfig": "workspace:*" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" typescript: "npm:~5.9.3" languageName: unknown linkType: soft @@ -8074,7 +8081,7 @@ __metadata: "@types/polka": "npm:^0.5.8" "@types/prometheus-gc-stats": "npm:^0.6.4" ejson: "npm:^2.2.3" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eventemitter3: "npm:^5.0.4" mem: "npm:^8.1.1" moleculer: "npm:^0.14.35" @@ -8095,7 +8102,7 @@ __metadata: "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" languageName: unknown @@ -8106,7 +8113,7 @@ __metadata: resolution: "@rocket.chat/cas-validate@workspace:packages/cas-validate" dependencies: cheerio: "npm:1.0.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" languageName: unknown @@ -8131,7 +8138,7 @@ __metadata: "@rocket.chat/tsconfig": "workspace:*" "@rocket.chat/ui-kit": "workspace:~" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" mongodb: "npm:6.16.0" prettier: "npm:~3.3.3" @@ -8149,7 +8156,7 @@ __metadata: "@rocket.chat/message-parser": "workspace:^" "@rocket.chat/ui-kit": "workspace:~" "@types/express": "npm:^4.17.25" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" mongodb: "npm:6.16.0" npm-run-all: "npm:~4.1.5" prettier: "npm:~3.3.3" @@ -8171,7 +8178,7 @@ __metadata: "@rocket.chat/models": "workspace:^" "@rocket.chat/random": "workspace:^" "@rocket.chat/tsconfig": "workspace:*" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" mongodb: "npm:6.16.0" typescript: "npm:~5.9.3" languageName: unknown @@ -8211,7 +8218,7 @@ __metadata: "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" "@types/ws": "npm:^8.5.13" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" jest-websocket-mock: "npm:~2.5.0" typescript: "npm:~5.9.3" @@ -8248,7 +8255,7 @@ __metadata: "@types/ws": "npm:^8.5.13" colorette: "npm:^1.4.0" ejson: "npm:^2.2.3" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eventemitter3: "npm:^5.0.4" jaeger-client: "npm:^3.19.0" mem: "npm:^8.1.1" @@ -8273,7 +8280,7 @@ __metadata: resolution: "@rocket.chat/desktop-api@workspace:packages/desktop-api" dependencies: "@rocket.chat/eslint-config": "workspace:~" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" rimraf: "npm:~6.0.1" typescript: "npm:~5.9.3" languageName: unknown @@ -8303,7 +8310,7 @@ __metadata: "@types/prettier": "npm:^2.7.3" "@typescript-eslint/eslint-plugin": "npm:~5.60.1" "@typescript-eslint/parser": "npm:~5.60.1" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eslint-config-prettier: "npm:~9.1.2" eslint-import-resolver-typescript: "npm:~4.4.4" eslint-plugin-anti-trojan-source: "npm:~1.1.2" @@ -8320,7 +8327,7 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/favicon@workspace:packages/favicon" dependencies: - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" typescript: "npm:~5.9.3" languageName: unknown linkType: soft @@ -8344,7 +8351,7 @@ __metadata: "@types/node": "npm:~22.16.5" "@types/sanitize-html": "npm:~2.16.0" emojione: "npm:^4.5.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" jest-qase-reporter: "npm:^2.1.4" marked: "npm:^16.1.2" @@ -8462,7 +8469,7 @@ __metadata: "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" cross-env: "npm:^7.0.3" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eslint-plugin-storybook: "npm:~0.11.6" i18next: "npm:~23.4.9" jest: "npm:~30.2.0" @@ -8556,7 +8563,7 @@ __metadata: "@typescript-eslint/parser": "npm:~5.60.1" date-fns: "npm:~4.1.0" dompurify: "npm:~3.3.1" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eslint-plugin-anti-trojan-source: "npm:~1.1.2" eslint-plugin-react: "npm:~7.37.5" eslint-plugin-react-hooks: "npm:~5.0.0" @@ -8605,7 +8612,7 @@ __metadata: "@types/jest": "npm:~30.0.0" "@types/supertest": "npm:~6.0.3" ajv: "npm:^8.17.1" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" express: "npm:^4.21.2" hono: "npm:^4.11.9" jest: "npm:~30.2.0" @@ -8623,7 +8630,7 @@ __metadata: "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tools": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" i18next: "npm:~23.4.9" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" @@ -8648,7 +8655,7 @@ __metadata: "@rocket.chat/models": "workspace:^" "@rocket.chat/tracing": "workspace:^" "@rocket.chat/tsconfig": "workspace:*" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" mongodb: "npm:6.16.0" prettier: "npm:~3.3.3" typescript: "npm:~5.9.3" @@ -8667,7 +8674,7 @@ __metadata: "@types/jest": "npm:~30.0.0" "@types/jest-axe": "npm:~3.5.9" "@types/uuid": "npm:^10.0.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" identity-obj-proxy: "npm:~3.0.0" jest: "npm:~30.2.0" jest-axe: "npm:~10.0.0" @@ -8685,7 +8692,7 @@ __metadata: "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" jose: "npm:^4.15.9" typescript: "npm:~5.9.3" @@ -8717,7 +8724,7 @@ __metadata: "@types/jest": "npm:~30.0.0" "@types/ws": "npm:^8.5.13" bcrypt: "npm:^5.1.1" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" jest-websocket-mock: "npm:~2.5.0" typescript: "npm:~5.9.3" @@ -8770,7 +8777,7 @@ __metadata: desvg-loader: "npm:^0.1.0" dompurify: "npm:~3.3.1" emoji-mart: "npm:^3.0.1" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eslint-plugin-import: "npm:~2.31.0" eslint-plugin-react: "npm:~7.37.5" eslint-plugin-react-hooks: "npm:~5.0.0" @@ -8831,7 +8838,7 @@ __metadata: "@types/ejson": "npm:^2.2.2" chalk: "npm:^4.1.2" ejson: "npm:^2.2.3" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" typescript: "npm:~5.9.3" languageName: unknown linkType: soft @@ -8841,7 +8848,7 @@ __metadata: resolution: "@rocket.chat/logger@workspace:packages/logger" dependencies: "@rocket.chat/emitter": "npm:^0.32.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" pino: "npm:^8.21.0" typescript: "npm:~5.9.3" languageName: unknown @@ -8872,7 +8879,7 @@ __metadata: "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" drachtio-srf: "patch:drachtio-srf@npm%3A5.0.12#~/.yarn/patches/drachtio-srf-npm-5.0.12-b0b1afaad6.patch" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" typescript: "npm:~5.9.3" languageName: unknown linkType: soft @@ -8886,7 +8893,7 @@ __metadata: "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" ajv: "npm:^8.17.1" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" languageName: unknown @@ -8910,7 +8917,7 @@ __metadata: "@types/jest": "npm:~30.0.0" "@types/node": "npm:~22.16.5" "@typescript-eslint/parser": "npm:~5.60.1" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" npm-run-all: "npm:^4.1.5" peggy: "npm:4.1.1" @@ -8933,7 +8940,7 @@ __metadata: "@rocket.chat/core-typings": "workspace:~" "@rocket.chat/eslint-config": "workspace:~" date-fns: "npm:~4.1.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" i18next: "npm:~23.4.9" jest: "npm:~30.2.0" moment: "npm:^2.30.1" @@ -9185,7 +9192,7 @@ __metadata: emojione: "npm:^4.5.0" emojione-assets: "npm:^4.5.0" esl: "npm:^11.2.1" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eslint-config-prettier: "npm:~9.1.2" eslint-plugin-anti-trojan-source: "npm:~1.1.2" eslint-plugin-import: "npm:~2.31.0" @@ -9365,7 +9372,7 @@ __metadata: "@testing-library/react": "npm:~16.3.2" "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" i18next: "npm:~23.4.9" jest: "npm:~30.2.0" react: "npm:~18.3.1" @@ -9385,7 +9392,7 @@ __metadata: dependencies: "@rocket.chat/core-typings": "workspace:^" "@types/node-rsa": "npm:^1.1.4" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" mongodb: "npm:6.16.0" typescript: "npm:~5.9.3" languageName: unknown @@ -9406,7 +9413,7 @@ __metadata: "@types/jest": "npm:~30.0.0" "@types/node-rsa": "npm:^1.1.4" date-fns: "npm:~4.1.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" node-rsa: "npm:^1.1.1" typescript: "npm:~5.9.3" @@ -9418,7 +9425,7 @@ __metadata: resolution: "@rocket.chat/mongo-adapter@workspace:packages/mongo-adapter" dependencies: "@rocket.chat/jest-presets": "workspace:~" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" mongodb: "npm:6.16.0" typescript: "npm:~5.9.3" @@ -9447,7 +9454,7 @@ __metadata: "@types/sinon": "npm:^10.0.20" chai: "npm:^4.5.0" ejson: "npm:^2.2.3" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" moleculer: "npm:^0.14.35" pino: "npm:^8.21.0" @@ -9468,7 +9475,7 @@ __metadata: "@rocket.chat/omni-core": "workspace:^" "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" mem: "npm:^8.1.1" mongodb: "npm:6.16.0" @@ -9487,7 +9494,7 @@ __metadata: "@rocket.chat/tools": "workspace:*" "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" mongodb: "npm:6.16.0" typescript: "npm:~5.9.3" @@ -9518,7 +9525,7 @@ __metadata: date-fns: "npm:~4.1.0" ejson: "npm:^2.2.3" emoji-toolkit: "npm:^7.0.1" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eventemitter3: "npm:^5.0.4" i18next: "npm:~23.4.9" jest: "npm:~30.2.0" @@ -9557,7 +9564,7 @@ __metadata: "@types/react": "npm:~18.3.27" ejson: "npm:^2.2.3" emoji-toolkit: "npm:^7.0.1" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eventemitter3: "npm:^5.0.4" i18next: "npm:~23.4.9" i18next-sprintf-postprocessor: "npm:^0.2.2" @@ -9603,7 +9610,7 @@ __metadata: "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" languageName: unknown @@ -9616,7 +9623,7 @@ __metadata: "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" languageName: unknown @@ -9644,7 +9651,7 @@ __metadata: "@types/react-dom": "npm:~18.3.7" buffer: "npm:~6.0.3" emoji-toolkit: "npm:^7.0.1" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eslint-plugin-storybook: "npm:~0.11.6" i18next: "npm:~23.4.9" jest: "npm:~30.2.0" @@ -9665,7 +9672,7 @@ __metadata: "@rocket.chat/eslint-config": "workspace:~" "@rocket.chat/prettier-config": "npm:~0.31.25" "@types/node": "npm:~22.16.5" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" npm-run-all: "npm:^4.1.5" peggy: "npm:4.1.1" prettier: "npm:~3.3.3" @@ -9682,7 +9689,7 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/poplib@workspace:packages/node-poplib" dependencies: - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" typescript: "npm:~5.9.3" languageName: unknown linkType: soft @@ -9707,7 +9714,7 @@ __metadata: "@types/polka": "npm:^0.5.8" "@types/prometheus-gc-stats": "npm:^0.6.4" ejson: "npm:^2.2.3" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eventemitter3: "npm:^5.0.4" mem: "npm:^8.1.1" moleculer: "npm:^0.14.35" @@ -9732,7 +9739,7 @@ __metadata: "@rocket.chat/models": "workspace:^" "@rocket.chat/rest-typings": "workspace:^" "@types/node": "npm:~22.16.5" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" mongodb: "npm:6.16.0" typescript: "npm:~5.9.3" @@ -9768,7 +9775,7 @@ __metadata: "@types/prometheus-gc-stats": "npm:^0.6.4" ejson: "npm:^2.2.3" emoji-toolkit: "npm:^7.0.1" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eventemitter3: "npm:^5.0.4" mem: "npm:^8.1.1" moleculer: "npm:^0.14.35" @@ -9791,7 +9798,7 @@ __metadata: "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" languageName: unknown @@ -9808,7 +9815,7 @@ __metadata: "@octokit/plugin-throttling": "npm:^6.1.0" "@rocket.chat/eslint-config": "workspace:^" "@types/node": "npm:~22.16.5" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" mdast-util-to-string: "npm:2.0.0" remark-parse: "npm:9.0.0" remark-stringify: "npm:9.0.1" @@ -9826,7 +9833,7 @@ __metadata: "@rocket.chat/eslint-config": "workspace:^" "@types/node": "npm:~22.16.5" dataloader: "npm:^2.2.3" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" node-fetch: "npm:^2.7.0" typescript: "npm:~5.9.3" languageName: unknown @@ -9844,7 +9851,7 @@ __metadata: "@types/jest": "npm:~30.0.0" ajv: "npm:^8.17.1" ajv-formats: "npm:^3.0.1" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" mongodb: "npm:6.16.0" typescript: "npm:~5.9.3" languageName: unknown @@ -9855,7 +9862,7 @@ __metadata: resolution: "@rocket.chat/server-cloud-communication@workspace:packages/server-cloud-communication" dependencies: "@rocket.chat/license": "workspace:^" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" typescript: "npm:~5.9.3" languageName: unknown linkType: soft @@ -9870,7 +9877,7 @@ __metadata: "@types/jest": "npm:^29.5.5" "@types/node-fetch": "npm:~2.6.13" "@types/proxy-from-env": "npm:^1.0.4" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" http-proxy-agent: "npm:^7.0.2" https-proxy-agent: "npm:^7.0.6" jest: "npm:^29.7.0" @@ -9887,7 +9894,7 @@ __metadata: "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" languageName: unknown @@ -9913,7 +9920,7 @@ __metadata: "@storybook/react": "npm:^8.6.15" "@storybook/react-webpack5": "npm:^8.6.15" "@storybook/theming": "npm:^8.6.15" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" react: "npm:~18.3.1" react-dom: "npm:~18.3.1" react-virtuoso: "npm:^4.12.0" @@ -9963,7 +9970,7 @@ __metadata: "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" moment-timezone: "npm:^0.5.48" typescript: "npm:~5.9.3" @@ -9978,7 +9985,7 @@ __metadata: "@opentelemetry/exporter-trace-otlp-grpc": "npm:^0.54.2" "@opentelemetry/sdk-node": "npm:^0.54.2" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" ts-jest: "npm:~29.4.6" typescript: "npm:~5.9.3" @@ -10004,7 +10011,7 @@ __metadata: "@rocket.chat/ui-contexts": "workspace:^" "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eslint-plugin-react: "npm:~7.37.5" eslint-plugin-react-hooks: "npm:~5.0.0" eslint-plugin-storybook: "npm:~0.11.6" @@ -10048,7 +10055,7 @@ __metadata: "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" dompurify: "npm:~3.3.1" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eslint-plugin-anti-trojan-source: "npm:~1.1.2" eslint-plugin-react: "npm:~7.37.5" eslint-plugin-react-hooks: "npm:~5.0.0" @@ -10104,7 +10111,7 @@ __metadata: "@types/jest": "npm:~30.0.0" "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eslint-plugin-react: "npm:~7.37.5" eslint-plugin-react-hooks: "npm:~5.0.0" eslint-plugin-storybook: "npm:~0.11.6" @@ -10143,7 +10150,7 @@ __metadata: "@types/jest": "npm:~30.0.0" "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eslint-plugin-react-hooks: "npm:^5.0.0" i18next: "npm:~23.4.9" jest: "npm:~30.2.0" @@ -10170,7 +10177,7 @@ __metadata: "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" jest: "npm:~30.2.0" npm-run-all: "npm:~4.1.5" prettier: "npm:~3.3.3" @@ -10197,7 +10204,7 @@ __metadata: "@rocket.chat/ui-contexts": "workspace:~" "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eslint-plugin-anti-trojan-source: "npm:~1.1.2" eslint-plugin-react: "npm:~7.37.5" eslint-plugin-react-hooks: "npm:~5.0.0" @@ -10245,7 +10252,7 @@ __metadata: "@types/jest-axe": "npm:~3.5.9" "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eslint-plugin-react: "npm:~7.37.5" eslint-plugin-react-hooks: "npm:~5.0.0" eslint-plugin-storybook: "npm:~0.11.6" @@ -10314,7 +10321,7 @@ __metadata: "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" date-fns: "npm:~4.1.0" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eslint-plugin-react: "npm:~7.37.5" eslint-plugin-react-hooks: "npm:~5.0.0" eslint-plugin-storybook: "npm:~0.11.6" @@ -10374,7 +10381,7 @@ __metadata: "@typescript-eslint/parser": "npm:~5.60.1" "@vitejs/plugin-react": "npm:~4.5.2" codemirror: "npm:^6.0.2" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eslint-plugin-react: "npm:~7.37.5" eslint-plugin-react-hooks: "npm:^5.0.0" eslint-plugin-react-refresh: "npm:^0.4.26" @@ -10425,7 +10432,7 @@ __metadata: "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" dompurify: "npm:~3.3.1" - eslint: "npm:~8.45.0" + eslint: "npm:~8.57.1" eslint-plugin-storybook: "npm:~0.11.6" i18next: "npm:~23.4.9" react: "npm:~18.3.1" @@ -14153,7 +14160,7 @@ __metadata: languageName: node linkType: hard -"@ungap/structured-clone@npm:^1.3.0": +"@ungap/structured-clone@npm:^1.2.0, @ungap/structured-clone@npm:^1.3.0": version: 1.3.0 resolution: "@ungap/structured-clone@npm:1.3.0" checksum: 10/80d6910946f2b1552a2406650051c91bbd1f24a6bf854354203d84fe2714b3e8ce4618f49cc3410494173a1c1e8e9777372fe68dce74bd45faf0a7a1a6ccf448 @@ -14867,7 +14874,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.10.0, ajv@npm:^6.12.3, ajv@npm:^6.12.4, ajv@npm:^6.12.5": +"ajv@npm:^6.12.3, ajv@npm:^6.12.4, ajv@npm:^6.12.5": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -20662,13 +20669,13 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:^7.2.0": - version: 7.2.0 - resolution: "eslint-scope@npm:7.2.0" +"eslint-scope@npm:^7.2.2": + version: 7.2.2 + resolution: "eslint-scope@npm:7.2.2" dependencies: esrecurse: "npm:^4.3.0" estraverse: "npm:^5.2.0" - checksum: 10/94d8942840b35bf5e6559bd0f0a8b10610d65b1e44e41295e66ed1fe82f83bc51756e7af607d611b75f435adf821122bd901aa565701596ca1a628db41c0cd87 + checksum: 10/5c660fb905d5883ad018a6fea2b49f3cb5b1cbf2cd4bd08e98646e9864f9bc2c74c0839bed2d292e90a4a328833accc197c8f0baed89cbe8d605d6f918465491 languageName: node linkType: hard @@ -20693,26 +20700,27 @@ __metadata: languageName: node linkType: hard -"eslint@npm:~8.45.0": - version: 8.45.0 - resolution: "eslint@npm:8.45.0" +"eslint@npm:~8.57.1": + version: 8.57.1 + resolution: "eslint@npm:8.57.1" dependencies: "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.4.0" - "@eslint/eslintrc": "npm:^2.1.0" - "@eslint/js": "npm:8.44.0" - "@humanwhocodes/config-array": "npm:^0.11.10" + "@eslint-community/regexpp": "npm:^4.6.1" + "@eslint/eslintrc": "npm:^2.1.4" + "@eslint/js": "npm:8.57.1" + "@humanwhocodes/config-array": "npm:^0.13.0" "@humanwhocodes/module-importer": "npm:^1.0.1" "@nodelib/fs.walk": "npm:^1.2.8" - ajv: "npm:^6.10.0" + "@ungap/structured-clone": "npm:^1.2.0" + ajv: "npm:^6.12.4" chalk: "npm:^4.0.0" cross-spawn: "npm:^7.0.2" debug: "npm:^4.3.2" doctrine: "npm:^3.0.0" escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^7.2.0" - eslint-visitor-keys: "npm:^3.4.1" - espree: "npm:^9.6.0" + eslint-scope: "npm:^7.2.2" + eslint-visitor-keys: "npm:^3.4.3" + espree: "npm:^9.6.1" esquery: "npm:^1.4.2" esutils: "npm:^2.0.2" fast-deep-equal: "npm:^3.1.3" @@ -20736,7 +20744,7 @@ __metadata: text-table: "npm:^0.2.0" bin: eslint: bin/eslint.js - checksum: 10/54820753ae1fb85affe48d001ea0cdf87e48b863bc423f717f4ca6a12ea0db65f171de58732ef51e94eacff33ac4e2c4f4717ec93014e759ed8adfcd6dc9402a + checksum: 10/5504fa24879afdd9f9929b2fbfc2ee9b9441a3d464efd9790fbda5f05738858530182029f13323add68d19fec749d3ab4a70320ded091ca4432b1e9cc4ed104c languageName: node linkType: hard @@ -20751,6 +20759,17 @@ __metadata: languageName: node linkType: hard +"espree@npm:^9.6.1": + version: 9.6.1 + resolution: "espree@npm:9.6.1" + dependencies: + acorn: "npm:^8.9.0" + acorn-jsx: "npm:^5.3.2" + eslint-visitor-keys: "npm:^3.4.1" + checksum: 10/255ab260f0d711a54096bdeda93adff0eadf02a6f9b92f02b323e83a2b7fc258797919437ad331efec3930475feb0142c5ecaaf3cdab4befebd336d47d3f3134 + languageName: node + linkType: hard + "esprima@npm:^4.0.0, esprima@npm:^4.0.1, esprima@npm:~4.0.0": version: 4.0.1 resolution: "esprima@npm:4.0.1" @@ -32262,7 +32281,7 @@ __metadata: "@types/stream-buffers": "npm:^3.0.8" node-gyp: "npm:^10.2.0" ts-node: "npm:^10.9.2" - turbo: "npm:~2.7.6" + turbo: "npm:~2.8.11" typescript: "npm:~5.9.3" languageName: unknown linkType: soft @@ -35355,58 +35374,58 @@ __metadata: languageName: node linkType: hard -"turbo-darwin-64@npm:2.7.6": - version: 2.7.6 - resolution: "turbo-darwin-64@npm:2.7.6" +"turbo-darwin-64@npm:2.8.11": + version: 2.8.11 + resolution: "turbo-darwin-64@npm:2.8.11" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"turbo-darwin-arm64@npm:2.7.6": - version: 2.7.6 - resolution: "turbo-darwin-arm64@npm:2.7.6" +"turbo-darwin-arm64@npm:2.8.11": + version: 2.8.11 + resolution: "turbo-darwin-arm64@npm:2.8.11" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"turbo-linux-64@npm:2.7.6": - version: 2.7.6 - resolution: "turbo-linux-64@npm:2.7.6" +"turbo-linux-64@npm:2.8.11": + version: 2.8.11 + resolution: "turbo-linux-64@npm:2.8.11" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"turbo-linux-arm64@npm:2.7.6": - version: 2.7.6 - resolution: "turbo-linux-arm64@npm:2.7.6" +"turbo-linux-arm64@npm:2.8.11": + version: 2.8.11 + resolution: "turbo-linux-arm64@npm:2.8.11" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"turbo-windows-64@npm:2.7.6": - version: 2.7.6 - resolution: "turbo-windows-64@npm:2.7.6" +"turbo-windows-64@npm:2.8.11": + version: 2.8.11 + resolution: "turbo-windows-64@npm:2.8.11" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"turbo-windows-arm64@npm:2.7.6": - version: 2.7.6 - resolution: "turbo-windows-arm64@npm:2.7.6" +"turbo-windows-arm64@npm:2.8.11": + version: 2.8.11 + resolution: "turbo-windows-arm64@npm:2.8.11" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"turbo@npm:~2.7.6": - version: 2.7.6 - resolution: "turbo@npm:2.7.6" +"turbo@npm:~2.8.11": + version: 2.8.11 + resolution: "turbo@npm:2.8.11" dependencies: - turbo-darwin-64: "npm:2.7.6" - turbo-darwin-arm64: "npm:2.7.6" - turbo-linux-64: "npm:2.7.6" - turbo-linux-arm64: "npm:2.7.6" - turbo-windows-64: "npm:2.7.6" - turbo-windows-arm64: "npm:2.7.6" + turbo-darwin-64: "npm:2.8.11" + turbo-darwin-arm64: "npm:2.8.11" + turbo-linux-64: "npm:2.8.11" + turbo-linux-arm64: "npm:2.8.11" + turbo-windows-64: "npm:2.8.11" + turbo-windows-arm64: "npm:2.8.11" dependenciesMeta: turbo-darwin-64: optional: true @@ -35422,7 +35441,7 @@ __metadata: optional: true bin: turbo: bin/turbo - checksum: 10/88dd2f3bedf238f8f2d55416cd77179d9708a283528a4d3d9752c950e08c8bbfd81e8fe05837426891f02eb8574da07385d84ef75769f2a71ba41b2e26f5f3a6 + checksum: 10/5ac765e3f35b69ad9daf398a35c44b5db237640f17a234bbbd344594e4b1da014ed592dbc0e87d908548a8c6ad72037c2526baba57091e99765160b14ed4cd2a languageName: node linkType: hard From 9f0cb37dbd0dbb3f2bda1f3efdeed1b1706a8c31 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Sat, 21 Feb 2026 00:40:01 -0300 Subject: [PATCH 02/25] chore(eslint): add more ignored files --- apps/meteor/.eslintrc.json | 4 +++- packages/models/.eslintrc.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/meteor/.eslintrc.json b/apps/meteor/.eslintrc.json index 47376a4e7fddf..53813ce451432 100644 --- a/apps/meteor/.eslintrc.json +++ b/apps/meteor/.eslintrc.json @@ -40,7 +40,9 @@ "!client/.eslintrc.js", "!ee/client/.eslintrc.js", "storybook-static", - "packages" + "packages", + "coverage", + "dist" ], "overrides": [ { diff --git a/packages/models/.eslintrc.json b/packages/models/.eslintrc.json index 9ec331f09b5e3..f4c3ce2587c9e 100644 --- a/packages/models/.eslintrc.json +++ b/packages/models/.eslintrc.json @@ -1,4 +1,4 @@ { "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] + "ignorePatterns": ["dist", "coverage"] } From d124466f840014b646a4c697a297d44cfa7cee30 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Sat, 21 Feb 2026 22:27:54 -0300 Subject: [PATCH 03/25] chore(eslint): remove direct references to the react config --- apps/meteor/.eslintrc.json | 1 - apps/meteor/tests/e2e/.eslintrc.json | 2 +- ee/packages/pdf-worker/.eslintrc.json | 2 +- ee/packages/ui-theming/.eslintrc.json | 2 +- packages/eslint-config/standard/index.js | 3 ++- packages/fuselage-ui-kit/.eslintrc.json | 2 +- packages/gazzodown/.eslintrc.json | 2 +- packages/livechat/.eslintrc.json | 7 +++++++ packages/message-types/.eslintrc.json | 2 +- packages/mock-providers/.eslintrc.json | 2 +- packages/ui-avatar/.eslintrc.json | 2 +- packages/ui-client/.eslintrc.json | 2 +- packages/ui-composer/.eslintrc.json | 2 +- packages/ui-contexts/.eslintrc.json | 2 +- packages/ui-video-conf/.eslintrc.json | 2 +- packages/ui-voip/.eslintrc.json | 2 +- packages/web-ui-registration/.eslintrc.json | 2 +- 17 files changed, 23 insertions(+), 16 deletions(-) diff --git a/apps/meteor/.eslintrc.json b/apps/meteor/.eslintrc.json index 53813ce451432..58efc1f0c0c80 100644 --- a/apps/meteor/.eslintrc.json +++ b/apps/meteor/.eslintrc.json @@ -1,7 +1,6 @@ { "extends": [ "@rocket.chat/eslint-config", - "@rocket.chat/eslint-config/react", "plugin:you-dont-need-lodash-underscore/compatible", "plugin:storybook/recommended" ], diff --git a/apps/meteor/tests/e2e/.eslintrc.json b/apps/meteor/tests/e2e/.eslintrc.json index aa970258b4c7e..90748661e5d70 100644 --- a/apps/meteor/tests/e2e/.eslintrc.json +++ b/apps/meteor/tests/e2e/.eslintrc.json @@ -1,6 +1,6 @@ { "root": true, - "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react", "prettier", "plugin:@typescript-eslint/recommended"], + "extends": ["@rocket.chat/eslint-config", "prettier", "plugin:@typescript-eslint/recommended"], "parser": "@typescript-eslint/parser", "plugins": ["prettier", "testing-library", "anti-trojan-source", "no-floating-promise"], "rules": { diff --git a/ee/packages/pdf-worker/.eslintrc.json b/ee/packages/pdf-worker/.eslintrc.json index 7c5ecdf982fe6..16fe3c9e2f483 100644 --- a/ee/packages/pdf-worker/.eslintrc.json +++ b/ee/packages/pdf-worker/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react", "plugin:storybook/recommended"], + "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], "parser": "@typescript-eslint/parser", "ignorePatterns": ["dist", "!.storybook"] } diff --git a/ee/packages/ui-theming/.eslintrc.json b/ee/packages/ui-theming/.eslintrc.json index 9a131836901c4..9ec331f09b5e3 100644 --- a/ee/packages/ui-theming/.eslintrc.json +++ b/ee/packages/ui-theming/.eslintrc.json @@ -1,4 +1,4 @@ { - "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react"], + "extends": ["@rocket.chat/eslint-config"], "ignorePatterns": ["dist"] } diff --git a/packages/eslint-config/standard/index.js b/packages/eslint-config/standard/index.js index 9fd44f875cb20..a10b3e149acb7 100644 --- a/packages/eslint-config/standard/index.js +++ b/packages/eslint-config/standard/index.js @@ -1,5 +1,5 @@ module.exports = { - extends: ['../original/index.js', 'plugin:prettier/recommended', 'plugin:import/typescript'], + extends: ['../original/index.js', '../react.js', 'plugin:prettier/recommended', 'plugin:import/typescript'], parser: '@babel/eslint-parser', parserOptions: { requireConfigFile: false, @@ -21,6 +21,7 @@ module.exports = { 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/eslint-recommended', '../original/index.js', + '../react.js', 'plugin:prettier/recommended', ], parser: '@typescript-eslint/parser', diff --git a/packages/fuselage-ui-kit/.eslintrc.json b/packages/fuselage-ui-kit/.eslintrc.json index 96574c6de8d41..cedd3043b0bd0 100644 --- a/packages/fuselage-ui-kit/.eslintrc.json +++ b/packages/fuselage-ui-kit/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react", "plugin:storybook/recommended"], + "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], "ignorePatterns": ["dist", "storybook-static", "!.storybook"], "overrides": [ { diff --git a/packages/gazzodown/.eslintrc.json b/packages/gazzodown/.eslintrc.json index 6e0406abd46a7..da7aa206856ef 100644 --- a/packages/gazzodown/.eslintrc.json +++ b/packages/gazzodown/.eslintrc.json @@ -1,4 +1,4 @@ { - "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react", "plugin:storybook/recommended"], + "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], "ignorePatterns": ["dist", "storybook-static", "!.storybook"] } diff --git a/packages/livechat/.eslintrc.json b/packages/livechat/.eslintrc.json index 3dd68c20eec6c..5bb0e762329aa 100644 --- a/packages/livechat/.eslintrc.json +++ b/packages/livechat/.eslintrc.json @@ -15,7 +15,12 @@ } } ], + "jsx-a11y/alt-text": "off", + "jsx-a11y/click-events-have-key-events": "off", + "jsx-a11y/media-has-caption": "off", + "jsx-a11y/no-static-element-interactions": "off", "jsx-quotes": ["error", "prefer-single"], + "react/jsx-curly-brace-presence": "off", "react/display-name": [ "warn", { @@ -23,6 +28,7 @@ } ], "react/jsx-fragments": ["error", "syntax"], + "react/jsx-key": "off", "react/jsx-no-bind": [ "warn", { @@ -50,6 +56,7 @@ "react/no-did-update-set-state": "error", "react/no-find-dom-node": "error", "react/no-is-mounted": "error", + "react/no-multi-comp": "off", "react/no-string-refs": "error", "react/prefer-es6-class": "error", "react/prefer-stateless-function": "warn", diff --git a/packages/message-types/.eslintrc.json b/packages/message-types/.eslintrc.json index 9a131836901c4..9ec331f09b5e3 100644 --- a/packages/message-types/.eslintrc.json +++ b/packages/message-types/.eslintrc.json @@ -1,4 +1,4 @@ { - "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react"], + "extends": ["@rocket.chat/eslint-config"], "ignorePatterns": ["dist"] } diff --git a/packages/mock-providers/.eslintrc.json b/packages/mock-providers/.eslintrc.json index 9a131836901c4..9ec331f09b5e3 100644 --- a/packages/mock-providers/.eslintrc.json +++ b/packages/mock-providers/.eslintrc.json @@ -1,4 +1,4 @@ { - "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react"], + "extends": ["@rocket.chat/eslint-config"], "ignorePatterns": ["dist"] } diff --git a/packages/ui-avatar/.eslintrc.json b/packages/ui-avatar/.eslintrc.json index 341a302833736..7aa666a468deb 100644 --- a/packages/ui-avatar/.eslintrc.json +++ b/packages/ui-avatar/.eslintrc.json @@ -1,4 +1,4 @@ { - "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react"], + "extends": ["@rocket.chat/eslint-config"], "ignorePatterns": ["dist", "storybook-static", "!.storybook"] } diff --git a/packages/ui-client/.eslintrc.json b/packages/ui-client/.eslintrc.json index 96574c6de8d41..cedd3043b0bd0 100644 --- a/packages/ui-client/.eslintrc.json +++ b/packages/ui-client/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react", "plugin:storybook/recommended"], + "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], "ignorePatterns": ["dist", "storybook-static", "!.storybook"], "overrides": [ { diff --git a/packages/ui-composer/.eslintrc.json b/packages/ui-composer/.eslintrc.json index 6e0406abd46a7..da7aa206856ef 100644 --- a/packages/ui-composer/.eslintrc.json +++ b/packages/ui-composer/.eslintrc.json @@ -1,4 +1,4 @@ { - "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react", "plugin:storybook/recommended"], + "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], "ignorePatterns": ["dist", "storybook-static", "!.storybook"] } diff --git a/packages/ui-contexts/.eslintrc.json b/packages/ui-contexts/.eslintrc.json index db2a901f7069b..77020c41c8556 100644 --- a/packages/ui-contexts/.eslintrc.json +++ b/packages/ui-contexts/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react"], + "extends": ["@rocket.chat/eslint-config"], "ignorePatterns": ["dist"], "overrides": [ { diff --git a/packages/ui-video-conf/.eslintrc.json b/packages/ui-video-conf/.eslintrc.json index 6e0406abd46a7..da7aa206856ef 100644 --- a/packages/ui-video-conf/.eslintrc.json +++ b/packages/ui-video-conf/.eslintrc.json @@ -1,4 +1,4 @@ { - "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react", "plugin:storybook/recommended"], + "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], "ignorePatterns": ["dist", "storybook-static", "!.storybook"] } diff --git a/packages/ui-voip/.eslintrc.json b/packages/ui-voip/.eslintrc.json index 96574c6de8d41..cedd3043b0bd0 100644 --- a/packages/ui-voip/.eslintrc.json +++ b/packages/ui-voip/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react", "plugin:storybook/recommended"], + "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], "ignorePatterns": ["dist", "storybook-static", "!.storybook"], "overrides": [ { diff --git a/packages/web-ui-registration/.eslintrc.json b/packages/web-ui-registration/.eslintrc.json index 96574c6de8d41..cedd3043b0bd0 100644 --- a/packages/web-ui-registration/.eslintrc.json +++ b/packages/web-ui-registration/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["@rocket.chat/eslint-config", "@rocket.chat/eslint-config/react", "plugin:storybook/recommended"], + "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], "ignorePatterns": ["dist", "storybook-static", "!.storybook"], "overrides": [ { From 7c090fde747a0a91c4bc0f560f2e1a38ab2b70d9 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Sat, 21 Feb 2026 22:39:45 -0300 Subject: [PATCH 04/25] chore(eslint): remove obsolete `--ext` CLI flag --- apps/meteor/package.json | 2 +- apps/uikit-playground/package.json | 2 +- ee/packages/abac/package.json | 4 ++-- ee/packages/license/package.json | 4 ++-- ee/packages/media-calls/package.json | 4 ++-- ee/packages/omni-core-ee/package.json | 4 ++-- ee/packages/omnichannel-services/package.json | 4 ++-- ee/packages/pdf-worker/package.json | 4 ++-- ee/packages/ui-theming/package.json | 4 ++-- packages/account-utils/package.json | 4 ++-- packages/agenda/package.json | 4 ++-- packages/api-client/package.json | 4 ++-- packages/apps/package.json | 4 ++-- packages/cas-validate/package.json | 4 ++-- packages/core-typings/package.json | 4 ++-- packages/cron/package.json | 4 ++-- packages/ddp-client/package.json | 4 ++-- packages/eslint-config/package.json | 4 ++-- packages/favicon/package.json | 4 ++-- packages/fuselage-ui-kit/package.json | 2 +- packages/gazzodown/package.json | 4 ++-- packages/http-router/package.json | 4 ++-- packages/instance-status/package.json | 4 ++-- packages/jwt/package.json | 4 ++-- packages/livechat/package.json | 2 +- packages/log-format/package.json | 4 ++-- packages/logger/package.json | 4 ++-- packages/media-signaling/package.json | 4 ++-- packages/mock-providers/package.json | 4 ++-- packages/model-typings/package.json | 4 ++-- packages/models/package.json | 4 ++-- packages/mongo-adapter/package.json | 4 ++-- packages/omni-core/package.json | 4 ++-- packages/password-policies/package.json | 4 ++-- packages/patch-injection/package.json | 4 ++-- packages/rest-typings/package.json | 4 ++-- packages/server-cloud-communication/package.json | 4 ++-- packages/server-fetch/package.json | 4 ++-- packages/storybook-config/package.json | 4 ++-- packages/tools/package.json | 4 ++-- packages/tracing/package.json | 4 ++-- packages/ui-avatar/package.json | 4 ++-- packages/ui-client/package.json | 4 ++-- packages/ui-composer/package.json | 4 ++-- packages/ui-contexts/package.json | 4 ++-- packages/ui-kit/package.json | 2 +- packages/ui-video-conf/package.json | 4 ++-- packages/ui-voip/package.json | 4 ++-- packages/web-ui-registration/package.json | 4 ++-- 49 files changed, 93 insertions(+), 93 deletions(-) diff --git a/apps/meteor/package.json b/apps/meteor/package.json index 7d709e5fc387c..9d1c4c7380ae5 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -34,7 +34,7 @@ "dev": "NODE_OPTIONS=\"--trace-warnings\" meteor --exclude-archs \"web.browser.legacy, web.cordova\"", "docker:start": "docker-compose up", "dsv": "meteor npm run dev", - "eslint": "NODE_OPTIONS=\"--max-old-space-size=8192\" eslint --ext .js,.jsx,.ts,.tsx . --cache", + "eslint": "NODE_OPTIONS=\"--max-old-space-size=8192\" eslint . --cache", "eslint:fix": "yarn eslint --fix", "ha": "meteor npm run ha:start", "ha:add": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' ts-node .scripts/run-ha.ts instance", diff --git a/apps/uikit-playground/package.json b/apps/uikit-playground/package.json index 07c4a7cb8aa17..022765c88b38c 100644 --- a/apps/uikit-playground/package.json +++ b/apps/uikit-playground/package.json @@ -7,7 +7,7 @@ ".:build-preview-move": "mkdir -p ../../.preview/ && cp -r ./dist ../../.preview/uikit-playground", "build-preview": "tsc && vite build", "dev": "vite", - "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "lint": "eslint src --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", "typecheck": "tsc --noEmit" }, diff --git a/ee/packages/abac/package.json b/ee/packages/abac/package.json index 98950d9c67b1e..52ee09cc0547e 100644 --- a/ee/packages/abac/package.json +++ b/ee/packages/abac/package.json @@ -11,8 +11,8 @@ "scripts": { "build": "tsc -p tsconfig.build.json", "dev": "tsc --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx src", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx src --fix", + "lint": "eslint src", + "lint:fix": "eslint src --fix", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit --skipLibCheck" diff --git a/ee/packages/license/package.json b/ee/packages/license/package.json index d3f86344c88d3..a9b5f6eccfb9f 100644 --- a/ee/packages/license/package.json +++ b/ee/packages/license/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "tsc", "dev": "tsc --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit" diff --git a/ee/packages/media-calls/package.json b/ee/packages/media-calls/package.json index a39cafe21fa29..83381982c289f 100644 --- a/ee/packages/media-calls/package.json +++ b/ee/packages/media-calls/package.json @@ -11,8 +11,8 @@ "build": "rm -rf dist && tsc -p tsconfig.json", "build-preview": "mkdir -p ../../.preview && cp -r ./dist ../../.preview/media-calls", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "typecheck": "tsc --noEmit" }, "dependencies": { diff --git a/ee/packages/omni-core-ee/package.json b/ee/packages/omni-core-ee/package.json index e64e3c3a844d4..668c6f9fb1a19 100644 --- a/ee/packages/omni-core-ee/package.json +++ b/ee/packages/omni-core-ee/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "jest", "testunit": "jest" }, diff --git a/ee/packages/omnichannel-services/package.json b/ee/packages/omnichannel-services/package.json index d566c9e899f0c..7195682103417 100644 --- a/ee/packages/omnichannel-services/package.json +++ b/ee/packages/omnichannel-services/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit --skipLibCheck" diff --git a/ee/packages/pdf-worker/package.json b/ee/packages/pdf-worker/package.json index 2a196b96eafba..e23bd7d5a6ec0 100644 --- a/ee/packages/pdf-worker/package.json +++ b/ee/packages/pdf-worker/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "tsc -p tsconfig.build.json && cp -r src/public dist/public", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "storybook": "storybook dev -p 6006", "test": "jest", "testunit": "jest", diff --git a/ee/packages/ui-theming/package.json b/ee/packages/ui-theming/package.json index bb4d0d628dbbe..ec75be8e8d590 100644 --- a/ee/packages/ui-theming/package.json +++ b/ee/packages/ui-theming/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig-build.json", "dev": "tsc -p tsconfig-build.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix" + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "devDependencies": { "@rocket.chat/css-in-js": "~0.31.25", diff --git a/packages/account-utils/package.json b/packages/account-utils/package.json index 6d5e624346ea2..389422e12341e 100644 --- a/packages/account-utils/package.json +++ b/packages/account-utils/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix" + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "devDependencies": { "eslint": "~8.57.1", diff --git a/packages/agenda/package.json b/packages/agenda/package.json index 93ab3adc53b8e..fdbc8294a8bc6 100644 --- a/packages/agenda/package.json +++ b/packages/agenda/package.json @@ -10,8 +10,8 @@ ], "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix" + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "dependencies": { "cron": "~1.8.2", diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 655f9491e27d7..b30d0dc61fc12 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -9,8 +9,8 @@ "scripts": { "build": "tsc", "dev": "tsc --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "jest", "testunit": "jest" }, diff --git a/packages/apps/package.json b/packages/apps/package.json index 2ae9a5f5c9a8a..5581982a11b01 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix" + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "dependencies": { "@rocket.chat/apps-engine": "workspace:^", diff --git a/packages/cas-validate/package.json b/packages/cas-validate/package.json index f666a5765059d..b3aa20f45546b 100644 --- a/packages/cas-validate/package.json +++ b/packages/cas-validate/package.json @@ -11,8 +11,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "testunit": "jest" }, "dependencies": { diff --git a/packages/core-typings/package.json b/packages/core-typings/package.json index f1c37eed9a649..fc878603301fb 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -14,8 +14,8 @@ ".:build:prepare": "ts-patch install && typia patch", "build": "run-s .:build:prepare .:build:clean .:build:build", "dev": "tsc --watch --preserveWatchOutput -p tsconfig.json", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "echo \"no tests\" && exit 1" }, "dependencies": { diff --git a/packages/cron/package.json b/packages/cron/package.json index 8eb5ad646aa57..90935d7563c49 100644 --- a/packages/cron/package.json +++ b/packages/cron/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix" + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "dependencies": { "@rocket.chat/agenda": "workspace:^", diff --git a/packages/ddp-client/package.json b/packages/ddp-client/package.json index 25adafa883526..6b620c92432c3 100644 --- a/packages/ddp-client/package.json +++ b/packages/ddp-client/package.json @@ -9,8 +9,8 @@ "scripts": { "build": "tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit" diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index afca3b42c635f..45cd57cee2ed3 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -16,8 +16,8 @@ "react.js" ], "scripts": { - "lint": "eslint --ext .js .", - "lint:fix": "eslint --ext .js . --fix" + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "dependencies": { "@babel/core": "~7.28.6", diff --git a/packages/favicon/package.json b/packages/favicon/package.json index fafcf5f046842..b18bda85b6bd9 100644 --- a/packages/favicon/package.json +++ b/packages/favicon/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix" + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "devDependencies": { "eslint": "~8.57.1", diff --git a/packages/fuselage-ui-kit/package.json b/packages/fuselage-ui-kit/package.json index a89276566fb04..5864aef4744c2 100644 --- a/packages/fuselage-ui-kit/package.json +++ b/packages/fuselage-ui-kit/package.json @@ -31,7 +31,7 @@ "build-storybook": "NODE_ENV=production storybook build", "dev": "tsc --watch --preserveWatchOutput -p tsconfig.build.json", "docs": "cross-env NODE_ENV=production storybook build -o ../../static/fuselage-ui-kit", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", + "lint": "eslint .", "storybook": "storybook dev -p 6006 --no-version-updates", "test": "jest", "testunit": "jest", diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index 19fa51f39cb1f..4d8579ce75887 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -13,8 +13,8 @@ "build-preview": "storybook build --quiet", "build-storybook": "storybook build", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "storybook": "storybook dev -p 6006", "test": "jest", "testunit": "jest", diff --git a/packages/http-router/package.json b/packages/http-router/package.json index 65b34405c5051..5311c61553ad4 100644 --- a/packages/http-router/package.json +++ b/packages/http-router/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc", "dev": "tsc --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit" diff --git a/packages/instance-status/package.json b/packages/instance-status/package.json index f32c610234229..640b364e801ae 100644 --- a/packages/instance-status/package.json +++ b/packages/instance-status/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc --watch --preserveWatchOutput -p tsconfig.json", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { diff --git a/packages/jwt/package.json b/packages/jwt/package.json index 8d01788846c78..cacf51e715285 100644 --- a/packages/jwt/package.json +++ b/packages/jwt/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc", "dev": "tsc --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit" diff --git a/packages/livechat/package.json b/packages/livechat/package.json index 89ce61ceab531..57c909330f674 100644 --- a/packages/livechat/package.json +++ b/packages/livechat/package.json @@ -16,7 +16,7 @@ "build-storybook": "storybook build", "clean": "rimraf dist", "dev": "yarn build", - "eslint": "eslint --ext .js,.jsx,.ts,.tsx .", + "eslint": "eslint .", "lint": "yarn run eslint && yarn run stylelint", "start": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack-dev-server --mode development", "storybook": "storybook dev -p 9001 -c .storybook", diff --git a/packages/log-format/package.json b/packages/log-format/package.json index 89a9e182751fb..011dc44ccaf8b 100644 --- a/packages/log-format/package.json +++ b/packages/log-format/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix" + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "dependencies": { "chalk": "^4.1.2", diff --git a/packages/logger/package.json b/packages/logger/package.json index 16354b6ce85b6..a3013cc18168d 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix" + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "dependencies": { "@rocket.chat/emitter": "^0.32.0", diff --git a/packages/media-signaling/package.json b/packages/media-signaling/package.json index 6b8f110b71bc9..7aef813fc58a0 100644 --- a/packages/media-signaling/package.json +++ b/packages/media-signaling/package.json @@ -11,8 +11,8 @@ "build": "rm -rf dist && tsc -p tsconfig.json", "build-preview": "mkdir -p ../../.preview && cp -r ./dist ../../.preview/media-signaling", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "jest" }, "dependencies": { diff --git a/packages/mock-providers/package.json b/packages/mock-providers/package.json index 928fed1518778..94e4a4b4b36c9 100644 --- a/packages/mock-providers/package.json +++ b/packages/mock-providers/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix" + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "dependencies": { "@rocket.chat/emitter": "^0.32.0", diff --git a/packages/model-typings/package.json b/packages/model-typings/package.json index 13a4358885e49..9b804f16dfd01 100644 --- a/packages/model-typings/package.json +++ b/packages/model-typings/package.json @@ -9,8 +9,8 @@ ], "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix" + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "dependencies": { "@rocket.chat/core-typings": "workspace:^" diff --git a/packages/models/package.json b/packages/models/package.json index 48510033ee26f..e327364b391c0 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc", "dev": "tsc --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit", diff --git a/packages/mongo-adapter/package.json b/packages/mongo-adapter/package.json index 5f094a9b2cad7..61ef237223547 100644 --- a/packages/mongo-adapter/package.json +++ b/packages/mongo-adapter/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "jest", "testunit": "jest" }, diff --git a/packages/omni-core/package.json b/packages/omni-core/package.json index 4ff20327b5e63..b4dd7a5b863fb 100644 --- a/packages/omni-core/package.json +++ b/packages/omni-core/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "jest", "testunit": "jest" }, diff --git a/packages/password-policies/package.json b/packages/password-policies/package.json index 473b7b4b8e05d..77890ad61dafd 100644 --- a/packages/password-policies/package.json +++ b/packages/password-policies/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc", "dev": "tsc --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit" diff --git a/packages/patch-injection/package.json b/packages/patch-injection/package.json index e593d6d81b3fc..e33a6bd8ff6c0 100644 --- a/packages/patch-injection/package.json +++ b/packages/patch-injection/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc", "dev": "tsc --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit" diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index 20d785af4fdf6..b42564ded2715 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -9,8 +9,8 @@ "scripts": { "build": "rm -rf dist && tsc", "dev": "tsc --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "typecheck": "tsc --noEmit" }, "dependencies": { diff --git a/packages/server-cloud-communication/package.json b/packages/server-cloud-communication/package.json index fe659f69a49ec..3a46c2c5e8987 100644 --- a/packages/server-cloud-communication/package.json +++ b/packages/server-cloud-communication/package.json @@ -9,8 +9,8 @@ ], "scripts": { "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix" + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "devDependencies": { "@rocket.chat/license": "workspace:^", diff --git a/packages/server-fetch/package.json b/packages/server-fetch/package.json index 9dad2a36bffbf..d19a894a51100 100644 --- a/packages/server-fetch/package.json +++ b/packages/server-fetch/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "typecheck": "tsc --noEmit", "testunit": "jest" }, diff --git a/packages/storybook-config/package.json b/packages/storybook-config/package.json index 85ebe6c5fee27..d36c600de0a34 100644 --- a/packages/storybook-config/package.json +++ b/packages/storybook-config/package.json @@ -15,8 +15,8 @@ "build": "rm -rf dist && tsc && yarn run copy-svg", "copy-svg": "cp -r ./src/logo.svg ./dist/logo.svg", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix" + "lint": "eslint .", + "lint:fix": "eslint . --fix" }, "dependencies": { "@rocket.chat/emitter": "^0.32.0", diff --git a/packages/tools/package.json b/packages/tools/package.json index aa4bd4a7e25d0..93bb20419bc98 100644 --- a/packages/tools/package.json +++ b/packages/tools/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "jest", "test:cov": "jest --coverage", "testunit": "jest", diff --git a/packages/tracing/package.json b/packages/tracing/package.json index 962939c49fca2..23fac12eae076 100644 --- a/packages/tracing/package.json +++ b/packages/tracing/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc", "dev": "tsc --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "testunit": "jest --passWithNoTests" }, "dependencies": { diff --git a/packages/ui-avatar/package.json b/packages/ui-avatar/package.json index 0129b8f1e62e4..e2a2818f92718 100644 --- a/packages/ui-avatar/package.json +++ b/packages/ui-avatar/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "typecheck": "tsc -p tsconfig.json --noEmit" }, "devDependencies": { diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json index cd5d47ee3d09d..c03fd51ec7c80 100644 --- a/packages/ui-client/package.json +++ b/packages/ui-client/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "storybook": "storybook dev -p 6006", "test": "jest", "testunit": "jest", diff --git a/packages/ui-composer/package.json b/packages/ui-composer/package.json index baec29c4645f0..263bcad808cea 100644 --- a/packages/ui-composer/package.json +++ b/packages/ui-composer/package.json @@ -12,8 +12,8 @@ "build": "rm -rf dist && tsc -p tsconfig.build.json", "build-preview": "storybook build", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "storybook": "storybook dev -p 6006", "test": "jest", "testunit": "jest", diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index 3132ad6afae43..6a343d2cca36a 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc --watch --preserveWatchOutput -p tsconfig.build.json", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test": "jest", "testunit": "jest" }, diff --git a/packages/ui-kit/package.json b/packages/ui-kit/package.json index aceafb667893e..4550b1e17bc2a 100644 --- a/packages/ui-kit/package.json +++ b/packages/ui-kit/package.json @@ -25,7 +25,7 @@ ".:build:prepare": "ts-patch install && typia patch", ".:build:tsc": "tsc -p tsconfig.build.json", "build": "run-s .:build:prepare .:build:clean .:build:tsc", - "lint": "eslint . --ext .ts,.tsx", + "lint": "eslint .", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit" diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json index 913f90d2a7b22..db16e0c9e308d 100644 --- a/packages/ui-video-conf/package.json +++ b/packages/ui-video-conf/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "storybook": "storybook dev -p 6006", "test": "jest", "testunit": "jest", diff --git a/packages/ui-voip/package.json b/packages/ui-voip/package.json index c399eb6432fe3..b2c75512fc147 100644 --- a/packages/ui-voip/package.json +++ b/packages/ui-voip/package.json @@ -10,8 +10,8 @@ "scripts": { "build": "tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "storybook": "storybook dev -p 6006", "test": "yarn testunit", "test-storybook": "npx concurrently -k -s first -n \"SB,TEST\" \"yarn storybook --ci\" \"npx wait-on tcp:127.0.0.1:6006 && yarn exec test-storybook\"", diff --git a/packages/web-ui-registration/package.json b/packages/web-ui-registration/package.json index d291b31c95b53..95f489fe10216 100644 --- a/packages/web-ui-registration/package.json +++ b/packages/web-ui-registration/package.json @@ -11,8 +11,8 @@ "scripts": { "build": "tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "storybook": "storybook dev -p 6006 --no-version-updates", "typecheck": "tsc --noEmit" }, From eca1ada84e81f54c1389ea06da4ae481b5a732bc Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Sat, 21 Feb 2026 23:18:27 -0300 Subject: [PATCH 05/25] chore(eslint): normalize CLI's path argument --- apps/meteor/package.json | 4 ++-- apps/uikit-playground/package.json | 2 +- ee/apps/account-service/package.json | 2 +- ee/apps/authorization-service/package.json | 2 +- ee/apps/ddp-streamer/package.json | 2 +- ee/apps/omnichannel-transcript/package.json | 2 +- ee/apps/presence-service/package.json | 2 +- ee/apps/queue-worker/package.json | 2 +- ee/packages/abac/package.json | 4 ++-- ee/packages/license/package.json | 2 +- ee/packages/media-calls/package.json | 2 +- ee/packages/network-broker/package.json | 4 ++-- ee/packages/omni-core-ee/package.json | 2 +- ee/packages/omnichannel-services/package.json | 2 +- ee/packages/pdf-worker/package.json | 2 +- ee/packages/ui-theming/package.json | 2 +- packages/account-utils/package.json | 2 +- packages/agenda/package.json | 2 +- packages/api-client/package.json | 2 +- packages/apps-engine/package.json | 2 +- packages/apps/package.json | 2 +- packages/base64/package.json | 2 +- packages/cas-validate/package.json | 2 +- packages/core-typings/package.json | 2 +- packages/cron/package.json | 2 +- packages/ddp-client/package.json | 2 +- packages/desktop-api/package.json | 2 +- packages/eslint-config/package.json | 2 +- packages/favicon/package.json | 2 +- packages/gazzodown/package.json | 2 +- packages/http-router/package.json | 2 +- packages/i18n/package.json | 4 ++-- packages/instance-status/package.json | 2 +- packages/jwt/package.json | 2 +- packages/log-format/package.json | 2 +- packages/logger/package.json | 2 +- packages/media-signaling/package.json | 2 +- packages/mock-providers/package.json | 2 +- packages/model-typings/package.json | 2 +- packages/models/package.json | 2 +- packages/mongo-adapter/package.json | 2 +- packages/omni-core/package.json | 2 +- packages/password-policies/package.json | 2 +- packages/patch-injection/package.json | 2 +- packages/peggy-loader/package.json | 2 +- packages/random/package.json | 2 +- packages/release-action/package.json | 2 +- packages/release-changelog/package.json | 2 +- packages/rest-typings/package.json | 2 +- packages/server-cloud-communication/package.json | 2 +- packages/server-fetch/package.json | 2 +- packages/sha256/package.json | 2 +- packages/storybook-config/package.json | 2 +- packages/tools/package.json | 2 +- packages/tracing/package.json | 2 +- packages/ui-avatar/package.json | 2 +- packages/ui-client/package.json | 2 +- packages/ui-composer/package.json | 2 +- packages/ui-contexts/package.json | 2 +- packages/ui-video-conf/package.json | 2 +- packages/ui-voip/package.json | 2 +- packages/web-ui-registration/package.json | 2 +- 62 files changed, 66 insertions(+), 66 deletions(-) diff --git a/apps/meteor/package.json b/apps/meteor/package.json index 9d1c4c7380ae5..e4a049a729eff 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -34,12 +34,12 @@ "dev": "NODE_OPTIONS=\"--trace-warnings\" meteor --exclude-archs \"web.browser.legacy, web.cordova\"", "docker:start": "docker-compose up", "dsv": "meteor npm run dev", - "eslint": "NODE_OPTIONS=\"--max-old-space-size=8192\" eslint . --cache", + "eslint": "NODE_OPTIONS=\"--max-old-space-size=8192\" eslint --cache", "eslint:fix": "yarn eslint --fix", "ha": "meteor npm run ha:start", "ha:add": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' ts-node .scripts/run-ha.ts instance", "ha:start": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' ts-node .scripts/run-ha.ts main", - "lint": "yarn stylelint && yarn eslint", + "lint": "yarn stylelint && yarn eslint .", "migration:add": "ts-node-transpile-only --skip-project .scripts/make-migration.ts", "ms": "TRANSPORTER=${TRANSPORTER:-TCP} meteor npm run dev", "obj:dev": "TEST_MODE=true yarn dev", diff --git a/apps/uikit-playground/package.json b/apps/uikit-playground/package.json index 022765c88b38c..92ba25feb901c 100644 --- a/apps/uikit-playground/package.json +++ b/apps/uikit-playground/package.json @@ -7,7 +7,7 @@ ".:build-preview-move": "mkdir -p ../../.preview/ && cp -r ./dist ../../.preview/uikit-playground", "build-preview": "tsc && vite build", "dev": "vite", - "lint": "eslint src --report-unused-disable-directives --max-warnings 0", + "lint": "eslint .", "preview": "vite preview", "typecheck": "tsc --noEmit" }, diff --git a/ee/apps/account-service/package.json b/ee/apps/account-service/package.json index a85efb754781b..2876fd49ae137 100644 --- a/ee/apps/account-service/package.json +++ b/ee/apps/account-service/package.json @@ -13,7 +13,7 @@ ], "scripts": { "build": "tsc -p tsconfig.json", - "lint": "eslint src", + "lint": "eslint .", "ms": "TRANSPORTER=${TRANSPORTER:-TCP} MONGO_URL=${MONGO_URL:-mongodb://localhost:3001/meteor} ts-node --files src/service.ts", "test": "echo \"Error: no test specified\" && exit 1", "typecheck": "tsc --noEmit --skipLibCheck -p tsconfig.json" diff --git a/ee/apps/authorization-service/package.json b/ee/apps/authorization-service/package.json index ee6e9259e5b4c..af07c94f947a1 100644 --- a/ee/apps/authorization-service/package.json +++ b/ee/apps/authorization-service/package.json @@ -13,7 +13,7 @@ ], "scripts": { "build": "tsc -p tsconfig.json", - "lint": "eslint src", + "lint": "eslint .", "ms": "TRANSPORTER=${TRANSPORTER:-TCP} MONGO_URL=${MONGO_URL:-mongodb://localhost:3001/meteor} ts-node --files src/service.ts", "test": "echo \"Error: no test specified\" && exit 1", "typecheck": "tsc --noEmit --skipLibCheck -p tsconfig.json" diff --git a/ee/apps/ddp-streamer/package.json b/ee/apps/ddp-streamer/package.json index 70198cff46d26..816551c6f3f71 100644 --- a/ee/apps/ddp-streamer/package.json +++ b/ee/apps/ddp-streamer/package.json @@ -13,7 +13,7 @@ ], "scripts": { "build": "tsc -p tsconfig.json", - "lint": "eslint src", + "lint": "eslint .", "ms": "TRANSPORTER=${TRANSPORTER:-TCP} MONGO_URL=${MONGO_URL:-mongodb://localhost:3001/meteor} ts-node --files src/service.ts", "test": "echo \"Error: no test specified\" && exit 1", "typecheck": "tsc --noEmit --skipLibCheck -p tsconfig.json" diff --git a/ee/apps/omnichannel-transcript/package.json b/ee/apps/omnichannel-transcript/package.json index cfe4e84ea9ef7..c6e58f4f255f8 100644 --- a/ee/apps/omnichannel-transcript/package.json +++ b/ee/apps/omnichannel-transcript/package.json @@ -13,7 +13,7 @@ ], "scripts": { "build": "tsc -p tsconfig.json", - "lint": "eslint src", + "lint": "eslint .", "ms": "TRANSPORTER=${TRANSPORTER:-TCP} MONGO_URL=${MONGO_URL:-mongodb://localhost:3001/meteor} ts-node --files src/service.ts", "test": "echo \"Error: no test specified\" && exit 1", "typecheck": "tsc --noEmit --skipLibCheck -p tsconfig.json" diff --git a/ee/apps/presence-service/package.json b/ee/apps/presence-service/package.json index 77600000af298..99645bd2c08d6 100644 --- a/ee/apps/presence-service/package.json +++ b/ee/apps/presence-service/package.json @@ -13,7 +13,7 @@ ], "scripts": { "build": "tsc -p tsconfig.json", - "lint": "eslint src", + "lint": "eslint .", "ms": "TRANSPORTER=${TRANSPORTER:-TCP} MONGO_URL=${MONGO_URL:-mongodb://localhost:3001/meteor} ts-node --files src/service.ts", "test": "echo \"Error: no test specified\" && exit 1", "typecheck": "tsc --noEmit --skipLibCheck -p tsconfig.json" diff --git a/ee/apps/queue-worker/package.json b/ee/apps/queue-worker/package.json index bac125344819c..116be8c2cd0e5 100644 --- a/ee/apps/queue-worker/package.json +++ b/ee/apps/queue-worker/package.json @@ -13,7 +13,7 @@ ], "scripts": { "build": "tsc -p tsconfig.json", - "lint": "eslint src", + "lint": "eslint .", "ms": "TRANSPORTER=${TRANSPORTER:-TCP} MONGO_URL=${MONGO_URL:-mongodb://localhost:3001/meteor} ts-node --files src/service.ts", "test": "echo \"Error: no test specified\" && exit 1", "typecheck": "tsc --noEmit --skipLibCheck -p tsconfig.json" diff --git a/ee/packages/abac/package.json b/ee/packages/abac/package.json index 52ee09cc0547e..42149f43b38eb 100644 --- a/ee/packages/abac/package.json +++ b/ee/packages/abac/package.json @@ -11,8 +11,8 @@ "scripts": { "build": "tsc -p tsconfig.build.json", "dev": "tsc --watch --preserveWatchOutput", - "lint": "eslint src", - "lint:fix": "eslint src --fix", + "lint": "eslint .", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit --skipLibCheck" diff --git a/ee/packages/license/package.json b/ee/packages/license/package.json index a9b5f6eccfb9f..e9997bfe153ac 100644 --- a/ee/packages/license/package.json +++ b/ee/packages/license/package.json @@ -11,7 +11,7 @@ "build": "tsc", "dev": "tsc --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit" diff --git a/ee/packages/media-calls/package.json b/ee/packages/media-calls/package.json index 83381982c289f..8619008248486 100644 --- a/ee/packages/media-calls/package.json +++ b/ee/packages/media-calls/package.json @@ -12,7 +12,7 @@ "build-preview": "mkdir -p ../../.preview && cp -r ./dist ../../.preview/media-calls", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "typecheck": "tsc --noEmit" }, "dependencies": { diff --git a/ee/packages/network-broker/package.json b/ee/packages/network-broker/package.json index 83ad46e5b112f..8a19867fc6a76 100644 --- a/ee/packages/network-broker/package.json +++ b/ee/packages/network-broker/package.json @@ -9,8 +9,8 @@ ], "scripts": { "build": "tsc", - "lint": "eslint src", - "lint:fix": "eslint src --fix", + "lint": "eslint .", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit --skipLibCheck" diff --git a/ee/packages/omni-core-ee/package.json b/ee/packages/omni-core-ee/package.json index 668c6f9fb1a19..8b0f5e26830dc 100644 --- a/ee/packages/omni-core-ee/package.json +++ b/ee/packages/omni-core-ee/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest" }, diff --git a/ee/packages/omnichannel-services/package.json b/ee/packages/omnichannel-services/package.json index 7195682103417..e26bd896b0ccb 100644 --- a/ee/packages/omnichannel-services/package.json +++ b/ee/packages/omnichannel-services/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit --skipLibCheck" diff --git a/ee/packages/pdf-worker/package.json b/ee/packages/pdf-worker/package.json index e23bd7d5a6ec0..38055d6f596bf 100644 --- a/ee/packages/pdf-worker/package.json +++ b/ee/packages/pdf-worker/package.json @@ -11,7 +11,7 @@ "build": "tsc -p tsconfig.build.json && cp -r src/public dist/public", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "storybook": "storybook dev -p 6006", "test": "jest", "testunit": "jest", diff --git a/ee/packages/ui-theming/package.json b/ee/packages/ui-theming/package.json index ec75be8e8d590..7627fdcd46c2f 100644 --- a/ee/packages/ui-theming/package.json +++ b/ee/packages/ui-theming/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig-build.json", "dev": "tsc -p tsconfig-build.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix" + "lint:fix": "eslint --fix ." }, "devDependencies": { "@rocket.chat/css-in-js": "~0.31.25", diff --git a/packages/account-utils/package.json b/packages/account-utils/package.json index 389422e12341e..5b7f1de006f15 100644 --- a/packages/account-utils/package.json +++ b/packages/account-utils/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix" + "lint:fix": "eslint --fix ." }, "devDependencies": { "eslint": "~8.57.1", diff --git a/packages/agenda/package.json b/packages/agenda/package.json index fdbc8294a8bc6..60a2d72ef1ebd 100644 --- a/packages/agenda/package.json +++ b/packages/agenda/package.json @@ -11,7 +11,7 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", "lint": "eslint .", - "lint:fix": "eslint . --fix" + "lint:fix": "eslint --fix ." }, "dependencies": { "cron": "~1.8.2", diff --git a/packages/api-client/package.json b/packages/api-client/package.json index b30d0dc61fc12..6cde3c80ac537 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -10,7 +10,7 @@ "build": "tsc", "dev": "tsc --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest" }, diff --git a/packages/apps-engine/package.json b/packages/apps-engine/package.json index b86545b2973d3..1a93c02fabd97 100644 --- a/packages/apps-engine/package.json +++ b/packages/apps-engine/package.json @@ -47,7 +47,7 @@ ".:build:default": "tsc -p tsconfig.json", ".:build:deno-cache": "node scripts/deno-cache.js", ".:deno-fmt:fix": "cd deno-runtime && deno fmt", - ".:eslint:fix": "eslint . --fix", + ".:eslint:fix": "eslint --fix .", ".:lint:deno": "deno lint --ignore=deno-runtime/.deno deno-runtime/", ".:lint:eslint": "eslint .", ".:test:deno": "cd deno-runtime && deno task test", diff --git a/packages/apps/package.json b/packages/apps/package.json index 5581982a11b01..91bccb907220f 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix" + "lint:fix": "eslint --fix ." }, "dependencies": { "@rocket.chat/apps-engine": "workspace:^", diff --git a/packages/base64/package.json b/packages/base64/package.json index 03bbcfbb3659c..156d2f993c523 100644 --- a/packages/base64/package.json +++ b/packages/base64/package.json @@ -9,7 +9,7 @@ "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest" }, diff --git a/packages/cas-validate/package.json b/packages/cas-validate/package.json index b3aa20f45546b..67395915aab00 100644 --- a/packages/cas-validate/package.json +++ b/packages/cas-validate/package.json @@ -12,7 +12,7 @@ "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "testunit": "jest" }, "dependencies": { diff --git a/packages/core-typings/package.json b/packages/core-typings/package.json index fc878603301fb..3af5657a00054 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -15,7 +15,7 @@ "build": "run-s .:build:prepare .:build:clean .:build:build", "dev": "tsc --watch --preserveWatchOutput -p tsconfig.json", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "echo \"no tests\" && exit 1" }, "dependencies": { diff --git a/packages/cron/package.json b/packages/cron/package.json index 90935d7563c49..1f5dcc2549cf0 100644 --- a/packages/cron/package.json +++ b/packages/cron/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix" + "lint:fix": "eslint --fix ." }, "dependencies": { "@rocket.chat/agenda": "workspace:^", diff --git a/packages/ddp-client/package.json b/packages/ddp-client/package.json index 6b620c92432c3..1a7ca014d36e9 100644 --- a/packages/ddp-client/package.json +++ b/packages/ddp-client/package.json @@ -10,7 +10,7 @@ "build": "tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit" diff --git a/packages/desktop-api/package.json b/packages/desktop-api/package.json index c98545f1e6439..9a60525d72d62 100644 --- a/packages/desktop-api/package.json +++ b/packages/desktop-api/package.json @@ -12,7 +12,7 @@ "types": "./dist/index.d.ts", "scripts": { "build": "rimraf dist && tsc -p tsconfig.json", - "lint": "eslint", + "lint": "eslint .", "typecheck": "tsc -p tsconfig.json --noEmit" }, "devDependencies": { diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 45cd57cee2ed3..c681f44e4a88b 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -17,7 +17,7 @@ ], "scripts": { "lint": "eslint .", - "lint:fix": "eslint . --fix" + "lint:fix": "eslint --fix ." }, "dependencies": { "@babel/core": "~7.28.6", diff --git a/packages/favicon/package.json b/packages/favicon/package.json index b18bda85b6bd9..bf1862f648df2 100644 --- a/packages/favicon/package.json +++ b/packages/favicon/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix" + "lint:fix": "eslint --fix ." }, "devDependencies": { "eslint": "~8.57.1", diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index 4d8579ce75887..1edd8cdc59ff1 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -14,7 +14,7 @@ "build-storybook": "storybook build", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "storybook": "storybook dev -p 6006", "test": "jest", "testunit": "jest", diff --git a/packages/http-router/package.json b/packages/http-router/package.json index 5311c61553ad4..93fade4dd92a5 100644 --- a/packages/http-router/package.json +++ b/packages/http-router/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc", "dev": "tsc --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit" diff --git a/packages/i18n/package.json b/packages/i18n/package.json index b4e05d09ce835..18282e8832f50 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -26,8 +26,8 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.build.json && node --experimental-transform-types ./src/scripts/build.mts", "check": "node --experimental-transform-types ./src/scripts/check.mts", - "lint": "eslint . && node --experimental-transform-types ./src/scripts/check.mts", - "lint:fix": "eslint . --fix && node --experimental-transform-types ./src/scripts/check.mts --fix", + "lint": "eslint && node --experimental-transform-types ./src/scripts/check.mts", + "lint:fix": "eslint --fix && node --experimental-transform-types ./src/scripts/check.mts --fix", "replace-sprintf": "node --experimental-transform-types ./src/scripts/replace-sprintf.mts", "test": "jest", "testunit": "jest" diff --git a/packages/instance-status/package.json b/packages/instance-status/package.json index 640b364e801ae..33157939008d7 100644 --- a/packages/instance-status/package.json +++ b/packages/instance-status/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc --watch --preserveWatchOutput -p tsconfig.json", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { diff --git a/packages/jwt/package.json b/packages/jwt/package.json index cacf51e715285..5931bebf1d786 100644 --- a/packages/jwt/package.json +++ b/packages/jwt/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc", "dev": "tsc --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit" diff --git a/packages/log-format/package.json b/packages/log-format/package.json index 011dc44ccaf8b..6c9884060e793 100644 --- a/packages/log-format/package.json +++ b/packages/log-format/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix" + "lint:fix": "eslint --fix ." }, "dependencies": { "chalk": "^4.1.2", diff --git a/packages/logger/package.json b/packages/logger/package.json index a3013cc18168d..3cda92fb1c3ac 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix" + "lint:fix": "eslint --fix ." }, "dependencies": { "@rocket.chat/emitter": "^0.32.0", diff --git a/packages/media-signaling/package.json b/packages/media-signaling/package.json index 7aef813fc58a0..56fa430e29e26 100644 --- a/packages/media-signaling/package.json +++ b/packages/media-signaling/package.json @@ -12,7 +12,7 @@ "build-preview": "mkdir -p ../../.preview && cp -r ./dist ../../.preview/media-signaling", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest" }, "dependencies": { diff --git a/packages/mock-providers/package.json b/packages/mock-providers/package.json index 94e4a4b4b36c9..29adffabaf527 100644 --- a/packages/mock-providers/package.json +++ b/packages/mock-providers/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix" + "lint:fix": "eslint --fix ." }, "dependencies": { "@rocket.chat/emitter": "^0.32.0", diff --git a/packages/model-typings/package.json b/packages/model-typings/package.json index 9b804f16dfd01..0221cccc5ab39 100644 --- a/packages/model-typings/package.json +++ b/packages/model-typings/package.json @@ -10,7 +10,7 @@ "scripts": { "build": "rm -rf dist && tsc -p tsconfig.json", "lint": "eslint .", - "lint:fix": "eslint . --fix" + "lint:fix": "eslint --fix ." }, "dependencies": { "@rocket.chat/core-typings": "workspace:^" diff --git a/packages/models/package.json b/packages/models/package.json index e327364b391c0..5a715fe7b1890 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc", "dev": "tsc --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit", diff --git a/packages/mongo-adapter/package.json b/packages/mongo-adapter/package.json index 61ef237223547..d07ae5c6a1670 100644 --- a/packages/mongo-adapter/package.json +++ b/packages/mongo-adapter/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest" }, diff --git a/packages/omni-core/package.json b/packages/omni-core/package.json index b4dd7a5b863fb..a3ae411ffeb85 100644 --- a/packages/omni-core/package.json +++ b/packages/omni-core/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.json", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest" }, diff --git a/packages/password-policies/package.json b/packages/password-policies/package.json index 77890ad61dafd..79326930a4b7f 100644 --- a/packages/password-policies/package.json +++ b/packages/password-policies/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc", "dev": "tsc --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit" diff --git a/packages/patch-injection/package.json b/packages/patch-injection/package.json index e33a6bd8ff6c0..f87df24f89984 100644 --- a/packages/patch-injection/package.json +++ b/packages/patch-injection/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc", "dev": "tsc --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit" diff --git a/packages/peggy-loader/package.json b/packages/peggy-loader/package.json index 89555558edf29..c55584d88f137 100644 --- a/packages/peggy-loader/package.json +++ b/packages/peggy-loader/package.json @@ -30,7 +30,7 @@ ".:build:clean": "rimraf dist", ".:build:tsc": "tsc -p tsconfig.build.json", "build": "run-s .:build:clean .:build:tsc", - "lint": "eslint src" + "lint": "eslint ." }, "devDependencies": { "@rocket.chat/eslint-config": "workspace:~", diff --git a/packages/random/package.json b/packages/random/package.json index c01851537f507..7d83629bc5655 100644 --- a/packages/random/package.json +++ b/packages/random/package.json @@ -10,7 +10,7 @@ "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit" diff --git a/packages/release-action/package.json b/packages/release-action/package.json index b3a34ec568409..4ef4952b30860 100644 --- a/packages/release-action/package.json +++ b/packages/release-action/package.json @@ -5,7 +5,7 @@ "main": "dist/index.js", "scripts": { "build": "tsc", - "lint": "eslint src", + "lint": "eslint .", "lint:fix": "eslint --fix src" }, "dependencies": { diff --git a/packages/release-changelog/package.json b/packages/release-changelog/package.json index a4619df4534ab..7f9bb730e7443 100644 --- a/packages/release-changelog/package.json +++ b/packages/release-changelog/package.json @@ -5,7 +5,7 @@ "main": "dist/index.js", "scripts": { "build": "tsc", - "lint": "eslint src" + "lint": "eslint ." }, "dependencies": { "dataloader": "^2.2.3", diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index b42564ded2715..2f545f0beb3e0 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -10,7 +10,7 @@ "build": "rm -rf dist && tsc", "dev": "tsc --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "typecheck": "tsc --noEmit" }, "dependencies": { diff --git a/packages/server-cloud-communication/package.json b/packages/server-cloud-communication/package.json index 3a46c2c5e8987..a7b56daff4dfe 100644 --- a/packages/server-cloud-communication/package.json +++ b/packages/server-cloud-communication/package.json @@ -10,7 +10,7 @@ "scripts": { "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix" + "lint:fix": "eslint --fix ." }, "devDependencies": { "@rocket.chat/license": "workspace:^", diff --git a/packages/server-fetch/package.json b/packages/server-fetch/package.json index d19a894a51100..e48e2b4bb593c 100644 --- a/packages/server-fetch/package.json +++ b/packages/server-fetch/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "typecheck": "tsc --noEmit", "testunit": "jest" }, diff --git a/packages/sha256/package.json b/packages/sha256/package.json index f92606225214d..4cb704c4e204d 100644 --- a/packages/sha256/package.json +++ b/packages/sha256/package.json @@ -9,7 +9,7 @@ "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest", "typecheck": "tsc --noEmit" diff --git a/packages/storybook-config/package.json b/packages/storybook-config/package.json index d36c600de0a34..1269b406a4e08 100644 --- a/packages/storybook-config/package.json +++ b/packages/storybook-config/package.json @@ -16,7 +16,7 @@ "copy-svg": "cp -r ./src/logo.svg ./dist/logo.svg", "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix" + "lint:fix": "eslint --fix ." }, "dependencies": { "@rocket.chat/emitter": "^0.32.0", diff --git a/packages/tools/package.json b/packages/tools/package.json index 93bb20419bc98..af2bab50ef6a2 100644 --- a/packages/tools/package.json +++ b/packages/tools/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "test:cov": "jest --coverage", "testunit": "jest", diff --git a/packages/tracing/package.json b/packages/tracing/package.json index 23fac12eae076..ba67b2140f54d 100644 --- a/packages/tracing/package.json +++ b/packages/tracing/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc", "dev": "tsc --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "testunit": "jest --passWithNoTests" }, "dependencies": { diff --git a/packages/ui-avatar/package.json b/packages/ui-avatar/package.json index e2a2818f92718..f4ab3cd92e4b5 100644 --- a/packages/ui-avatar/package.json +++ b/packages/ui-avatar/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "typecheck": "tsc -p tsconfig.json --noEmit" }, "devDependencies": { diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json index c03fd51ec7c80..a4df6aa314a4a 100644 --- a/packages/ui-client/package.json +++ b/packages/ui-client/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "storybook": "storybook dev -p 6006", "test": "jest", "testunit": "jest", diff --git a/packages/ui-composer/package.json b/packages/ui-composer/package.json index 263bcad808cea..43d53e6098493 100644 --- a/packages/ui-composer/package.json +++ b/packages/ui-composer/package.json @@ -13,7 +13,7 @@ "build-preview": "storybook build", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "storybook": "storybook dev -p 6006", "test": "jest", "testunit": "jest", diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index 6a343d2cca36a..6b4b8842b8d3c 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc --watch --preserveWatchOutput -p tsconfig.build.json", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "test": "jest", "testunit": "jest" }, diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json index db16e0c9e308d..31e36e408da69 100644 --- a/packages/ui-video-conf/package.json +++ b/packages/ui-video-conf/package.json @@ -11,7 +11,7 @@ "build": "rm -rf dist && tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "storybook": "storybook dev -p 6006", "test": "jest", "testunit": "jest", diff --git a/packages/ui-voip/package.json b/packages/ui-voip/package.json index b2c75512fc147..f1c9cc8e4adec 100644 --- a/packages/ui-voip/package.json +++ b/packages/ui-voip/package.json @@ -11,7 +11,7 @@ "build": "tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "storybook": "storybook dev -p 6006", "test": "yarn testunit", "test-storybook": "npx concurrently -k -s first -n \"SB,TEST\" \"yarn storybook --ci\" \"npx wait-on tcp:127.0.0.1:6006 && yarn exec test-storybook\"", diff --git a/packages/web-ui-registration/package.json b/packages/web-ui-registration/package.json index 95f489fe10216..98fd41600f675 100644 --- a/packages/web-ui-registration/package.json +++ b/packages/web-ui-registration/package.json @@ -12,7 +12,7 @@ "build": "tsc -p tsconfig.build.json", "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput", "lint": "eslint .", - "lint:fix": "eslint . --fix", + "lint:fix": "eslint --fix .", "storybook": "storybook dev -p 6006 --no-version-updates", "typecheck": "tsc --noEmit" }, From 1ab9da2f4bcc34430c7e13eb2aee838aa465093d Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Sun, 22 Feb 2026 22:56:47 -0300 Subject: [PATCH 06/25] chore(eslint): brute-force a unified ESLint config --- .vscode/settings.json | 18 - apps/meteor/.eslintrc.json | 157 --- apps/meteor/packages/.eslintrc.json | 6 - .../packages/rocketchat-i18n/.eslintrc.json | 5 - apps/meteor/tests/e2e/.eslintrc.json | 37 - apps/uikit-playground/.eslintrc.json | 32 - ee/apps/account-service/.eslintrc.json | 16 - ee/apps/authorization-service/.eslintrc.json | 16 - ee/apps/ddp-streamer/.eslintrc.json | 16 - ee/apps/omnichannel-transcript/.eslintrc.json | 4 - ee/apps/presence-service/.eslintrc.json | 16 - ee/apps/queue-worker/.eslintrc.json | 4 - ee/packages/abac/.eslintrc.json | 4 - ee/packages/federation-matrix/.eslintrc.json | 4 - ee/packages/license/.eslintrc.json | 4 - ee/packages/media-calls/.eslintrc.json | 4 - ee/packages/network-broker/.eslintrc.json | 4 - ee/packages/omni-core-ee/.eslintrc.json | 4 - .../omnichannel-services/.eslintrc.json | 4 - ee/packages/pdf-worker/.eslintrc.json | 5 - ee/packages/presence/.eslintrc.json | 4 - ee/packages/ui-theming/.eslintrc.json | 4 - eslint.config.mjs | 899 ++++++++++++++++++ package.json | 2 + packages/account-utils/.eslintrc.json | 4 - packages/agenda/.eslintrc.json | 4 - packages/api-client/.eslintrc.json | 4 - packages/apps-engine/.eslintrc.json | 59 -- packages/apps/.eslintrc.json | 4 - packages/base64/.eslintrc.json | 4 - packages/cas-validate/.eslintrc.json | 4 - packages/core-services/.eslintrc.json | 4 - packages/core-typings/.eslintrc.json | 15 - packages/cron/.eslintrc.json | 4 - packages/ddp-client/.eslintrc.json | 26 - packages/desktop-api/.eslintrc.json | 4 - packages/eslint-config/.eslintrc.json | 3 - packages/eslint-config/best-practices.mjs | 304 ++++++ packages/eslint-config/errors.mjs | 149 +++ packages/eslint-config/es6.mjs | 188 ++++ packages/eslint-config/flat.mjs | 263 +++++ packages/eslint-config/imports.mjs | 261 +++++ packages/eslint-config/node.mjs | 10 + packages/eslint-config/package.json | 11 +- packages/eslint-config/style.mjs | 474 +++++++++ packages/eslint-config/variables.mjs | 50 + packages/favicon/.eslintrc.json | 7 - packages/fuselage-ui-kit/.eslintrc.json | 12 - packages/gazzodown/.eslintrc.json | 4 - packages/http-router/.eslintrc.json | 4 - packages/i18n/.eslintrc.json | 8 - packages/instance-status/.eslintrc.json | 12 - packages/jest-presets/.eslintrc.json | 5 - packages/jwt/.eslintrc.json | 4 - packages/livechat/.eslintrc.json | 111 --- packages/log-format/.eslintrc.json | 4 - packages/logger/.eslintrc.json | 4 - packages/media-signaling/.eslintrc.json | 4 - packages/message-parser/.eslintrc.json | 4 - packages/message-types/.eslintrc.json | 4 - packages/mock-providers/.eslintrc.json | 4 - packages/model-typings/.eslintrc.json | 4 - packages/models/.eslintrc.json | 4 - packages/mongo-adapter/.eslintrc.json | 4 - packages/omni-core/.eslintrc.json | 4 - packages/password-policies/.eslintrc.json | 8 - packages/patch-injection/.eslintrc.json | 4 - packages/peggy-loader/.eslintrc.json | 4 - packages/random/.eslintrc.json | 4 - packages/release-action/.eslintrc.json | 4 - packages/release-changelog/.eslintrc.json | 8 - packages/rest-typings/.eslintrc.json | 4 - .../server-cloud-communication/.eslintrc.json | 4 - packages/server-fetch/.eslintrc.json | 4 - packages/sha256/.eslintrc.json | 4 - packages/storybook-config/.eslintrc.json | 4 - packages/tools/.eslintrc.json | 4 - packages/tracing/.eslintrc.json | 4 - packages/ui-avatar/.eslintrc.json | 4 - packages/ui-client/.eslintrc.json | 12 - packages/ui-composer/.eslintrc.json | 4 - packages/ui-contexts/.eslintrc.json | 12 - packages/ui-kit/.eslintrc.json | 4 - packages/ui-video-conf/.eslintrc.json | 4 - packages/ui-voip/.eslintrc.json | 12 - packages/web-ui-registration/.eslintrc.json | 12 - yarn.lock | 10 + 87 files changed, 2620 insertions(+), 839 deletions(-) delete mode 100644 apps/meteor/.eslintrc.json delete mode 100644 apps/meteor/packages/.eslintrc.json delete mode 100644 apps/meteor/packages/rocketchat-i18n/.eslintrc.json delete mode 100644 apps/meteor/tests/e2e/.eslintrc.json delete mode 100644 apps/uikit-playground/.eslintrc.json delete mode 100644 ee/apps/account-service/.eslintrc.json delete mode 100644 ee/apps/authorization-service/.eslintrc.json delete mode 100644 ee/apps/ddp-streamer/.eslintrc.json delete mode 100644 ee/apps/omnichannel-transcript/.eslintrc.json delete mode 100644 ee/apps/presence-service/.eslintrc.json delete mode 100644 ee/apps/queue-worker/.eslintrc.json delete mode 100644 ee/packages/abac/.eslintrc.json delete mode 100644 ee/packages/federation-matrix/.eslintrc.json delete mode 100644 ee/packages/license/.eslintrc.json delete mode 100644 ee/packages/media-calls/.eslintrc.json delete mode 100644 ee/packages/network-broker/.eslintrc.json delete mode 100644 ee/packages/omni-core-ee/.eslintrc.json delete mode 100644 ee/packages/omnichannel-services/.eslintrc.json delete mode 100644 ee/packages/pdf-worker/.eslintrc.json delete mode 100644 ee/packages/presence/.eslintrc.json delete mode 100644 ee/packages/ui-theming/.eslintrc.json create mode 100644 eslint.config.mjs delete mode 100644 packages/account-utils/.eslintrc.json delete mode 100644 packages/agenda/.eslintrc.json delete mode 100644 packages/api-client/.eslintrc.json delete mode 100644 packages/apps-engine/.eslintrc.json delete mode 100644 packages/apps/.eslintrc.json delete mode 100644 packages/base64/.eslintrc.json delete mode 100644 packages/cas-validate/.eslintrc.json delete mode 100644 packages/core-services/.eslintrc.json delete mode 100644 packages/core-typings/.eslintrc.json delete mode 100644 packages/cron/.eslintrc.json delete mode 100644 packages/ddp-client/.eslintrc.json delete mode 100644 packages/desktop-api/.eslintrc.json delete mode 100644 packages/eslint-config/.eslintrc.json create mode 100644 packages/eslint-config/best-practices.mjs create mode 100644 packages/eslint-config/errors.mjs create mode 100644 packages/eslint-config/es6.mjs create mode 100644 packages/eslint-config/flat.mjs create mode 100644 packages/eslint-config/imports.mjs create mode 100644 packages/eslint-config/node.mjs create mode 100644 packages/eslint-config/style.mjs create mode 100644 packages/eslint-config/variables.mjs delete mode 100644 packages/favicon/.eslintrc.json delete mode 100644 packages/fuselage-ui-kit/.eslintrc.json delete mode 100644 packages/gazzodown/.eslintrc.json delete mode 100644 packages/http-router/.eslintrc.json delete mode 100644 packages/i18n/.eslintrc.json delete mode 100644 packages/instance-status/.eslintrc.json delete mode 100644 packages/jest-presets/.eslintrc.json delete mode 100644 packages/jwt/.eslintrc.json delete mode 100644 packages/livechat/.eslintrc.json delete mode 100644 packages/log-format/.eslintrc.json delete mode 100644 packages/logger/.eslintrc.json delete mode 100644 packages/media-signaling/.eslintrc.json delete mode 100644 packages/message-parser/.eslintrc.json delete mode 100644 packages/message-types/.eslintrc.json delete mode 100644 packages/mock-providers/.eslintrc.json delete mode 100644 packages/model-typings/.eslintrc.json delete mode 100644 packages/models/.eslintrc.json delete mode 100644 packages/mongo-adapter/.eslintrc.json delete mode 100644 packages/omni-core/.eslintrc.json delete mode 100644 packages/password-policies/.eslintrc.json delete mode 100644 packages/patch-injection/.eslintrc.json delete mode 100644 packages/peggy-loader/.eslintrc.json delete mode 100644 packages/random/.eslintrc.json delete mode 100644 packages/release-action/.eslintrc.json delete mode 100644 packages/release-changelog/.eslintrc.json delete mode 100644 packages/rest-typings/.eslintrc.json delete mode 100644 packages/server-cloud-communication/.eslintrc.json delete mode 100644 packages/server-fetch/.eslintrc.json delete mode 100644 packages/sha256/.eslintrc.json delete mode 100644 packages/storybook-config/.eslintrc.json delete mode 100644 packages/tools/.eslintrc.json delete mode 100644 packages/tracing/.eslintrc.json delete mode 100644 packages/ui-avatar/.eslintrc.json delete mode 100644 packages/ui-client/.eslintrc.json delete mode 100644 packages/ui-composer/.eslintrc.json delete mode 100644 packages/ui-contexts/.eslintrc.json delete mode 100644 packages/ui-kit/.eslintrc.json delete mode 100644 packages/ui-video-conf/.eslintrc.json delete mode 100644 packages/ui-voip/.eslintrc.json delete mode 100644 packages/web-ui-registration/.eslintrc.json diff --git a/.vscode/settings.json b/.vscode/settings.json index 2dcd055310d14..9bc41d08b8468 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,22 +1,4 @@ { - "eslint.workingDirectories": [ - { - "pattern": "packages/*", - "changeProcessCWD": true - }, - { - "pattern": "apps/*", - "changeProcessCWD": true - }, - { - "pattern": "ee/apps/*", - "changeProcessCWD": true - }, - { - "pattern": "ee/packages/*", - "changeProcessCWD": true - } - ], "typescript.tsdk": "./node_modules/typescript/lib", "cSpell.words": [ "autotranslate", diff --git a/apps/meteor/.eslintrc.json b/apps/meteor/.eslintrc.json deleted file mode 100644 index 58efc1f0c0c80..0000000000000 --- a/apps/meteor/.eslintrc.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "extends": [ - "@rocket.chat/eslint-config", - "plugin:you-dont-need-lodash-underscore/compatible", - "plugin:storybook/recommended" - ], - "globals": { - "__meteor_bootstrap__": false, - "__meteor_runtime_config__": false, - "Assets": false, - "chrome": false, - "jscolor": false - }, - "rules": { - "import/named": "error", - "react-hooks/exhaustive-deps": [ - "warn", - { - "additionalHooks": "(useComponentDidUpdate)" - } - ], - "prefer-arrow-callback": [ - "error", - { - "allowNamedFunctions": true - } - ] - }, - "ignorePatterns": [ - "app/emoji-emojione/generateEmojiIndex.js", - "public", - "private/moment-locales", - "imports", - "ee/server/services/dist", - "!.mocharc.js", - "!.mocharc.*.js", - "!.scripts", - "!.storybook", - "!client/.eslintrc.js", - "!ee/client/.eslintrc.js", - "storybook-static", - "packages", - "coverage", - "dist" - ], - "overrides": [ - { - "files": ["**/*.ts", "**/*.tsx"], - "rules": { - "@typescript-eslint/naming-convention": [ - "error", - { - "selector": ["function", "parameter", "variable"], - "modifiers": ["destructured"], - "format": null - }, - { - "selector": ["variable"], - "format": ["camelCase", "UPPER_CASE", "PascalCase"], - "leadingUnderscore": "allowSingleOrDouble" - }, - { - "selector": ["function"], - "format": ["camelCase", "PascalCase"], - "leadingUnderscore": "allowSingleOrDouble" - }, - { - "selector": ["parameter"], - "format": ["PascalCase"], - "filter": { - "regex": "Component$", - "match": true - } - }, - { - "selector": ["parameter"], - "format": ["camelCase"], - "leadingUnderscore": "allow" - }, - { - "selector": ["parameter"], - "format": ["camelCase"], - "modifiers": ["unused"], - "leadingUnderscore": "require" - }, - { - "selector": "parameter", - "format": null, - "filter": { - "regex": "^Story$", - "match": true - } - }, - { - "selector": ["interface"], - "format": ["PascalCase"], - "custom": { - "regex": "^I[A-Z]", - "match": true - } - } - ], - "no-unreachable-loop": "error" - }, - "parserOptions": { - "project": ["./tsconfig.json"] - }, - "excludedFiles": [".scripts/*.ts"] - }, - { - "files": ["**/*.tests.js", "**/*.tests.ts", "**/*.spec.ts"], - "env": { - "mocha": true - } - }, - { - "files": ["**/*.spec.ts", "**/*.spec.tsx"], - "extends": ["plugin:testing-library/react"], - "rules": { - "testing-library/no-await-sync-events": "warn", - "testing-library/no-manual-cleanup": "warn", - "testing-library/prefer-explicit-assert": "warn", - "testing-library/prefer-user-event": "warn" - }, - "env": { - "mocha": true - } - }, - { - "files": ["**/*.stories.js", "**/*.stories.jsx", "**/*.stories.ts", "**/*.stories.tsx", "**/*.spec.tsx"], - "rules": { - "react/display-name": "off", - "react/no-multi-comp": "off" - } - }, - { - "files": ["**/*.stories.ts", "**/*.stories.tsx"], - "rules": { - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/explicit-module-boundary-types": "off" - } - }, - { - "files": ["client/**/*.ts", "client/**/*.tsx", "ee/client/**/*.ts", "ee/client/**/*.tsx"], - "rules": { - "@typescript-eslint/no-misused-promises": "off", - "@typescript-eslint/no-floating-promises": "off" - } - }, - { - "files": ["**/*.d.ts"], - "rules": { - "@typescript-eslint/naming-convention": "off" - } - } - ] -} diff --git a/apps/meteor/packages/.eslintrc.json b/apps/meteor/packages/.eslintrc.json deleted file mode 100644 index 0e3406639dc1c..0000000000000 --- a/apps/meteor/packages/.eslintrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "globals": { - "Package": false, - "Npm": false - } -} diff --git a/apps/meteor/packages/rocketchat-i18n/.eslintrc.json b/apps/meteor/packages/rocketchat-i18n/.eslintrc.json deleted file mode 100644 index e891ae3e268d1..0000000000000 --- a/apps/meteor/packages/rocketchat-i18n/.eslintrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "globals": { - "Npm" : false - } -} diff --git a/apps/meteor/tests/e2e/.eslintrc.json b/apps/meteor/tests/e2e/.eslintrc.json deleted file mode 100644 index 90748661e5d70..0000000000000 --- a/apps/meteor/tests/e2e/.eslintrc.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "root": true, - "extends": ["@rocket.chat/eslint-config", "prettier", "plugin:@typescript-eslint/recommended"], - "parser": "@typescript-eslint/parser", - "plugins": ["prettier", "testing-library", "anti-trojan-source", "no-floating-promise"], - "rules": { - "@typescript-eslint/no-unused-vars": [ - "error", - { - "argsIgnorePattern": "^_", - "ignoreRestSiblings": true - } - ], - "@typescript-eslint/no-floating-promises": "error", - "import/named": "error", - "import/order": [ - "error", - { - "newlines-between": "always", - "groups": ["builtin", "external", "internal", ["parent", "sibling", "index"]], - "alphabetize": { - "order": "asc" - } - } - ] - }, - "settings": { - "import/resolver": { - "node": { - "extensions": [".js", ".ts", ".tsx"] - } - } - }, - "parserOptions": { - "project": ["./tsconfig.json"] - } -} diff --git a/apps/uikit-playground/.eslintrc.json b/apps/uikit-playground/.eslintrc.json deleted file mode 100644 index bf9b095684aee..0000000000000 --- a/apps/uikit-playground/.eslintrc.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "env": { "browser": true, "es2020": true }, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:react/recommended", - "plugin:react/jsx-runtime", - "plugin:react-hooks/recommended" - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { "ecmaVersion": "latest", "sourceType": "module" }, - "plugins": ["react-refresh"], - "rules": { - "react-refresh/only-export-components": "warn" - }, - "ignorePatterns": [ - "dist", - "build", - "storybook-static", - "!.jest", - "!.storybook", - ".storybook/jest-results.json", - ".DS_Store", - ".env.local", - ".env.development.local", - ".env.test.local", - ".env.production.local", - "npm-debug.log*", - "yarn-debug.log*", - "yarn-error.log*" - ] -} diff --git a/ee/apps/account-service/.eslintrc.json b/ee/apps/account-service/.eslintrc.json deleted file mode 100644 index 7d1aa549ad6e3..0000000000000 --- a/ee/apps/account-service/.eslintrc.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "overrides": [ - { - "files": ["**/*.spec.js", "**/*.spec.jsx"], - "env": { - "jest": true - } - } - ], - "ignorePatterns": ["dist"], - "plugins": ["jest"], - "env": { - "jest/globals": true - } -} diff --git a/ee/apps/authorization-service/.eslintrc.json b/ee/apps/authorization-service/.eslintrc.json deleted file mode 100644 index 7d1aa549ad6e3..0000000000000 --- a/ee/apps/authorization-service/.eslintrc.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "overrides": [ - { - "files": ["**/*.spec.js", "**/*.spec.jsx"], - "env": { - "jest": true - } - } - ], - "ignorePatterns": ["dist"], - "plugins": ["jest"], - "env": { - "jest/globals": true - } -} diff --git a/ee/apps/ddp-streamer/.eslintrc.json b/ee/apps/ddp-streamer/.eslintrc.json deleted file mode 100644 index 7d1aa549ad6e3..0000000000000 --- a/ee/apps/ddp-streamer/.eslintrc.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "overrides": [ - { - "files": ["**/*.spec.js", "**/*.spec.jsx"], - "env": { - "jest": true - } - } - ], - "ignorePatterns": ["dist"], - "plugins": ["jest"], - "env": { - "jest/globals": true - } -} diff --git a/ee/apps/omnichannel-transcript/.eslintrc.json b/ee/apps/omnichannel-transcript/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/ee/apps/omnichannel-transcript/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/ee/apps/presence-service/.eslintrc.json b/ee/apps/presence-service/.eslintrc.json deleted file mode 100644 index 7d1aa549ad6e3..0000000000000 --- a/ee/apps/presence-service/.eslintrc.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "overrides": [ - { - "files": ["**/*.spec.js", "**/*.spec.jsx"], - "env": { - "jest": true - } - } - ], - "ignorePatterns": ["dist"], - "plugins": ["jest"], - "env": { - "jest/globals": true - } -} diff --git a/ee/apps/queue-worker/.eslintrc.json b/ee/apps/queue-worker/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/ee/apps/queue-worker/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/ee/packages/abac/.eslintrc.json b/ee/packages/abac/.eslintrc.json deleted file mode 100644 index 6744bc0544383..0000000000000 --- a/ee/packages/abac/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["**/dist"] -} diff --git a/ee/packages/federation-matrix/.eslintrc.json b/ee/packages/federation-matrix/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/ee/packages/federation-matrix/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/ee/packages/license/.eslintrc.json b/ee/packages/license/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/ee/packages/license/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/ee/packages/media-calls/.eslintrc.json b/ee/packages/media-calls/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/ee/packages/media-calls/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/ee/packages/network-broker/.eslintrc.json b/ee/packages/network-broker/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/ee/packages/network-broker/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/ee/packages/omni-core-ee/.eslintrc.json b/ee/packages/omni-core-ee/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/ee/packages/omni-core-ee/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/ee/packages/omnichannel-services/.eslintrc.json b/ee/packages/omnichannel-services/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/ee/packages/omnichannel-services/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/ee/packages/pdf-worker/.eslintrc.json b/ee/packages/pdf-worker/.eslintrc.json deleted file mode 100644 index 16fe3c9e2f483..0000000000000 --- a/ee/packages/pdf-worker/.eslintrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], - "parser": "@typescript-eslint/parser", - "ignorePatterns": ["dist", "!.storybook"] -} diff --git a/ee/packages/presence/.eslintrc.json b/ee/packages/presence/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/ee/packages/presence/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/ee/packages/ui-theming/.eslintrc.json b/ee/packages/ui-theming/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/ee/packages/ui-theming/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000000000..e9226ac945100 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,899 @@ +import rocketChatConfig from '@rocket.chat/eslint-config/flat.mjs'; +import typescriptPlugin from '@typescript-eslint/eslint-plugin'; +import typescriptParser from '@typescript-eslint/parser'; +import antiTrojanSourcePlugin from 'eslint-plugin-anti-trojan-source'; +import jestPlugin from 'eslint-plugin-jest'; +import noFloatingPromisePlugin from 'eslint-plugin-no-floating-promise'; +import prettierPlugin from 'eslint-plugin-prettier'; +import reactRefreshPlugin from 'eslint-plugin-react-refresh'; +import storybookPlugin from 'eslint-plugin-storybook'; +import testingLibraryPlugin from 'eslint-plugin-testing-library'; +import youDontNeedLodashUnderscorePlugin from 'eslint-plugin-you-dont-need-lodash-underscore'; +import globals from 'globals'; + +function getAbsolutePath(path) { + return new URL(path, import.meta.url).pathname; +} + +/** @type {import('eslint').Linter.FlatConfig[]} */ +export default [ + ...rocketChatConfig, + ...storybookPlugin.configs['flat/recommended'], + { + ignores: [ + 'apps/meteor/app/emoji-emojione/generateEmojiIndex.js', + 'apps/meteor/**/public', + 'apps/meteor/**/private/moment-locales', + 'apps/meteor/**/imports', + 'apps/meteor/**/ee/server/services/dist', + '!apps/meteor/**/.mocharc.js', + '!apps/meteor/**/.mocharc.*.js', + '!apps/meteor/**/.scripts', + '!apps/meteor/**/.storybook', + 'apps/meteor/**/storybook-static', + 'apps/meteor/**/packages', + 'apps/meteor/**/coverage', + 'apps/meteor/**/dist', + ], + }, + { + files: ['apps/meteor/**/*'], + languageOptions: { + globals: { + __meteor_bootstrap__: 'readonly', + __meteor_runtime_config__: 'readonly', + Assets: 'readonly', + chrome: 'readonly', + jscolor: 'readonly', + }, + }, + plugins: { + 'you-dont-need-lodash-underscore': youDontNeedLodashUnderscorePlugin, + }, + rules: { + 'you-dont-need-lodash-underscore/concat': 'error', + 'you-dont-need-lodash-underscore/drop': 'error', + 'you-dont-need-lodash-underscore/drop-right': 'error', + 'you-dont-need-lodash-underscore/index-of': 'error', + 'you-dont-need-lodash-underscore/join': 'error', + 'you-dont-need-lodash-underscore/last': 'error', + 'you-dont-need-lodash-underscore/last-index-of': 'error', + 'you-dont-need-lodash-underscore/reverse': 'error', + 'you-dont-need-lodash-underscore/fill': 'error', + 'you-dont-need-lodash-underscore/detect': 'error', + 'you-dont-need-lodash-underscore/first': 'error', + 'you-dont-need-lodash-underscore/is-array': 'error', + 'you-dont-need-lodash-underscore/slice': 'error', + 'you-dont-need-lodash-underscore/bind': 'error', + 'you-dont-need-lodash-underscore/is-finite': 'error', + 'you-dont-need-lodash-underscore/is-integer': 'error', + 'you-dont-need-lodash-underscore/is-nan': 'error', + 'you-dont-need-lodash-underscore/is-nil': 'error', + 'you-dont-need-lodash-underscore/is-null': 'error', + 'you-dont-need-lodash-underscore/is-undefined': 'error', + 'you-dont-need-lodash-underscore/keys': 'error', + 'you-dont-need-lodash-underscore/extend-own': 'error', + 'you-dont-need-lodash-underscore/assign': 'error', + 'you-dont-need-lodash-underscore/values': 'error', + 'you-dont-need-lodash-underscore/entries': 'error', + 'you-dont-need-lodash-underscore/to-pairs': 'error', + 'you-dont-need-lodash-underscore/pairs': 'error', + 'you-dont-need-lodash-underscore/split': 'error', + 'you-dont-need-lodash-underscore/starts-with': 'error', + 'you-dont-need-lodash-underscore/ends-with': 'error', + 'you-dont-need-lodash-underscore/to-lower': 'error', + 'you-dont-need-lodash-underscore/to-upper': 'error', + 'you-dont-need-lodash-underscore/trim': 'error', + 'you-dont-need-lodash-underscore/pad-start': 'error', + 'you-dont-need-lodash-underscore/pad-end': 'error', + 'you-dont-need-lodash-underscore/repeat': 'error', + 'you-dont-need-lodash-underscore/uniq': 'error', + 'you-dont-need-lodash-underscore/replace': 'error', + 'you-dont-need-lodash-underscore/omit': 'error', + 'you-dont-need-lodash-underscore/flatten': 'error', + 'you-dont-need-lodash-underscore/throttle': 'error', + 'you-dont-need-lodash-underscore/is-string': 'error', + 'you-dont-need-lodash-underscore/cast-array': 'error', + 'you-dont-need-lodash-underscore/clone-deep': 'error', + 'you-dont-need-lodash-underscore/is-function': 'error', + 'you-dont-need-lodash-underscore/capitalize': 'error', + 'you-dont-need-lodash-underscore/is-date': 'error', + 'you-dont-need-lodash-underscore/defaults': 'error', + 'you-dont-need-lodash-underscore/head': 'error', + 'you-dont-need-lodash-underscore/find': 'warn', + 'you-dont-need-lodash-underscore/find-index': 'warn', + 'you-dont-need-lodash-underscore/each': 'warn', + 'you-dont-need-lodash-underscore/for-each': 'warn', + 'you-dont-need-lodash-underscore/every': 'warn', + 'you-dont-need-lodash-underscore/all': 'warn', + 'you-dont-need-lodash-underscore/filter': 'warn', + 'you-dont-need-lodash-underscore/select': 'warn', + 'you-dont-need-lodash-underscore/map': 'warn', + 'you-dont-need-lodash-underscore/collect': 'warn', + 'you-dont-need-lodash-underscore/reduce': 'warn', + 'you-dont-need-lodash-underscore/inject': 'warn', + 'you-dont-need-lodash-underscore/foldl': 'warn', + 'you-dont-need-lodash-underscore/reduce-right': 'warn', + 'you-dont-need-lodash-underscore/foldr': 'warn', + 'you-dont-need-lodash-underscore/size': 'warn', + 'you-dont-need-lodash-underscore/some': 'warn', + 'you-dont-need-lodash-underscore/any': 'warn', + 'you-dont-need-lodash-underscore/includes': 'warn', + 'you-dont-need-lodash-underscore/contains': 'warn', + 'you-dont-need-lodash-underscore/take-right': 'warn', + 'you-dont-need-lodash-underscore/get': 'warn', + 'you-dont-need-lodash-underscore/union-by': 'warn', + 'you-dont-need-lodash-underscore/is-array-buffer': 'warn', + 'import/named': 'error', + 'react-hooks/exhaustive-deps': [ + 'warn', + { + additionalHooks: '(useComponentDidUpdate)', + }, + ], + 'prefer-arrow-callback': [ + 'error', + { + allowNamedFunctions: true, + }, + ], + }, + }, + { + files: ['apps/meteor/**/*.ts', 'apps/meteor/**/*.tsx'], + ignores: ['apps/meteor/.scripts/*.ts'], + rules: { + '@typescript-eslint/naming-convention': [ + 'error', + { + selector: ['function', 'parameter', 'variable'], + modifiers: ['destructured'], + format: null, + }, + { + selector: ['variable'], + format: ['camelCase', 'UPPER_CASE', 'PascalCase'], + leadingUnderscore: 'allowSingleOrDouble', + }, + { + selector: ['function'], + format: ['camelCase', 'PascalCase'], + leadingUnderscore: 'allowSingleOrDouble', + }, + { + selector: ['parameter'], + format: ['PascalCase'], + filter: { + regex: 'Component$', + match: true, + }, + }, + { + selector: ['parameter'], + format: ['camelCase'], + leadingUnderscore: 'allow', + }, + { + selector: ['parameter'], + format: ['camelCase'], + modifiers: ['unused'], + leadingUnderscore: 'require', + }, + { + selector: 'parameter', + format: null, + filter: { + regex: '^Story$', + match: true, + }, + }, + { + selector: ['interface'], + format: ['PascalCase'], + custom: { + regex: '^I[A-Z]', + match: true, + }, + }, + ], + 'no-unreachable-loop': 'error', + }, + languageOptions: { + parserOptions: { + project: getAbsolutePath('./apps/meteor/tsconfig.json'), + }, + }, + }, + { + files: ['apps/meteor/**/*.tests.js', 'apps/meteor/**/*.tests.ts', 'apps/meteor/**/*.spec.ts'], + languageOptions: { + globals: { + ...globals.mocha, + }, + }, + }, + { + files: ['apps/meteor/**/*.spec.ts', 'apps/meteor/**/*.spec.tsx'], + ...testingLibraryPlugin.configs['flat/react'], + rules: { + 'testing-library/no-await-sync-events': 'warn', + 'testing-library/no-manual-cleanup': 'warn', + 'testing-library/prefer-explicit-assert': 'warn', + 'testing-library/prefer-user-event': 'warn', + }, + languageOptions: { + globals: { + ...globals.mocha, + }, + }, + }, + { + files: [ + 'apps/meteor/**/*.stories.js', + 'apps/meteor/**/*.stories.jsx', + 'apps/meteor/**/*.stories.ts', + 'apps/meteor/**/*.stories.tsx', + 'apps/meteor/**/*.spec.tsx', + ], + rules: { + 'react/display-name': 'off', + 'react/no-multi-comp': 'off', + }, + }, + { + files: ['apps/meteor/**/*.stories.ts', 'apps/meteor/**/*.stories.tsx'], + rules: { + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + }, + }, + { + files: ['apps/meteor/client/**/*.ts', 'apps/meteor/client/**/*.tsx', 'apps/meteor/ee/client/**/*.ts', 'apps/meteor/ee/client/**/*.tsx'], + rules: { + '@typescript-eslint/no-misused-promises': 'off', + '@typescript-eslint/no-floating-promises': 'off', + }, + }, + { + files: ['apps/meteor/**/*.d.ts'], + rules: { + '@typescript-eslint/naming-convention': 'off', + }, + }, + { + files: ['apps/meteor/tests/e2e/**/*'], + languageOptions: { + parser: typescriptParser, + parserOptions: { + project: getAbsolutePath('./apps/meteor/tsconfig.json'), + }, + }, + plugins: { + 'prettier': prettierPlugin, + 'testing-library': testingLibraryPlugin, + 'anti-trojan-source': antiTrojanSourcePlugin, + 'no-floating-promise': noFloatingPromisePlugin, + }, + rules: { + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + ignoreRestSiblings: true, + }, + ], + '@typescript-eslint/no-floating-promises': 'error', + 'import/named': 'error', + 'import/order': [ + 'error', + { + 'newlines-between': 'always', + 'groups': ['builtin', 'external', 'internal', ['parent', 'sibling', 'index']], + 'alphabetize': { + order: 'asc', + }, + }, + ], + }, + settings: { + 'import/resolver': { + node: { + extensions: ['.js', '.ts', '.tsx'], + }, + }, + }, + }, + { + files: ['apps/meteor/packages/**/*'], + languageOptions: { + globals: { + Package: 'readonly', + Npm: 'readonly', + }, + }, + }, + { + files: ['apps/uikit-playground/**/*'], + languageOptions: { + parser: typescriptParser, + parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, + globals: { + ...globals.browser, + ...globals.es2020, + }, + }, + plugins: { + 'react-refresh': reactRefreshPlugin, + }, + rules: { + '@typescript-eslint/consistent-type-imports': 'off', + 'import/order': 'off', + 'prettier/prettier': 'off', + 'react-refresh/only-export-components': 'warn', + 'spaced-comment': 'off', + 'array-callback-return': 'off', + '@typescript-eslint/no-floating-promises': 'off', + 'import/export': 'off', + 'jsx-quotes': 'off', + 'import/newline-after-import': 'off', + 'react/jsx-curly-brace-presence': 'off', + 'prefer-destructuring': 'off', + 'object-shorthand': 'off', + 'import/no-duplicates': 'off', + '@typescript-eslint/naming-convention': 'off', + 'react/jsx-key': 'off', + 'jsx-a11y/click-events-have-key-events': 'off', + 'jsx-a11y/no-static-element-interactions': 'off', + 'no-nested-ternary': 'off', + 'new-cap': 'off', + }, + }, + { + ignores: [ + 'apps/uikit-playground/dist', + 'apps/uikit-playground/build', + 'apps/uikit-playground/storybook-static', + '!apps/uikit-playground/.jest', + '!apps/uikit-playground/.storybook', + 'apps/uikit-playground/.storybook/jest-results.json', + 'apps/uikit-playground/.DS_Store', + 'apps/uikit-playground/.env.local', + 'apps/uikit-playground/.env.development.local', + 'apps/uikit-playground/.env.test.local', + 'apps/uikit-playground/.env.production.local', + 'apps/uikit-playground/npm-debug.log*', + 'apps/uikit-playground/yarn-debug.log*', + 'apps/uikit-playground/yarn-error.log*', + ], + }, + { + ignores: ['ee/apps/account-service/dist'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + }, + { + files: ['ee/apps/account-service/**/*.spec.js', 'ee/apps/account-service/**/*.spec.jsx'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + }, + { + ignores: ['ee/apps/authorization-service/dist'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + }, + { + files: ['ee/apps/authorization-service/**/*.spec.js', 'ee/apps/authorization-service/**/*.spec.jsx'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + }, + { + ignores: ['ee/apps/ddp-streamer/dist'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + }, + { + files: ['ee/apps/ddp-streamer/**/*.spec.js', 'ee/apps/ddp-streamer/**/*.spec.jsx'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + }, + { + ignores: ['ee/apps/omnichannel-transcript/dist'], + }, + { + ignores: ['ee/apps/presence-service/dist'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + }, + { + files: ['ee/apps/presence-service/**/*.spec.js', 'ee/apps/presence-service/**/*.spec.jsx'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + }, + { + ignores: ['ee/apps/queue-worker/dist'], + }, + { + ignores: ['ee/packages/abac/dist'], + }, + { + ignores: ['ee/packages/federation-matrix/dist', 'ee/packages/federation-matrix/src/api/.well-known/server.ts'], + }, + { + ignores: ['ee/packages/license/dist'], + }, + { + ignores: ['ee/packages/media-calls/dist'], + }, + { + ignores: ['ee/packages/network-broker/dist'], + }, + { + ignores: ['ee/packages/omni-core-ee/dist'], + }, + { + ignores: ['ee/packages/omnichannel-services/dist'], + }, + { + ignores: ['ee/packages/pdf-worker/dist', '!ee/packages/pdf-worker/.storybook'], + }, + { + ignores: ['ee/packages/presence/dist'], + }, + { + ignores: ['ee/packages/ui-theming/dist'], + }, + { + ignores: ['packages/account-utils/dist'], + }, + { + ignores: ['packages/agenda/dist'], + }, + { + ignores: ['packages/api-client/dist'], + }, + { + ignores: ['packages/apps/dist'], + }, + { + files: ['packages/apps-engine/**/*'], + plugins: { + '@typescript-eslint': typescriptPlugin, + }, + languageOptions: { + parser: typescriptParser, + parserOptions: { + project: getAbsolutePath('./packages/apps-engine/tsconfig-lint.json'), + }, + }, + rules: { + '@typescript-eslint/ban-types': [ + 'error', + { + types: { + '{}': false, + }, + }, + ], + '@typescript-eslint/naming-convention': [ + 'error', + { + selector: ['function', 'parameter', 'variable'], + modifiers: ['destructured'], + format: null, + }, + { + selector: ['variable'], + format: ['camelCase', 'UPPER_CASE', 'PascalCase'], + leadingUnderscore: 'allowSingleOrDouble', + }, + { + selector: ['function'], + format: ['camelCase', 'PascalCase'], + leadingUnderscore: 'allowSingleOrDouble', + }, + { + selector: ['parameter'], + format: ['camelCase'], + leadingUnderscore: 'allow', + }, + { + selector: ['parameter'], + format: ['camelCase'], + modifiers: ['unused'], + leadingUnderscore: 'allow', + }, + { + selector: ['interface'], + format: ['PascalCase'], + custom: { + regex: '^I[A-Z]', + match: true, + }, + }, + ], + '@typescript-eslint/no-empty-function': 'off', + '@typescript-eslint/no-unused-vars': ['error', { args: 'none' }], + 'new-cap': 'off', + 'no-await-in-loop': 'off', + }, + }, + { + ignores: [ + 'packages/apps-engine/**/client/**/*', + 'packages/apps-engine/**/definition/**/*', + 'packages/apps-engine/**/docs/**/*', + 'packages/apps-engine/**/server/**/*', + 'packages/apps-engine/**/lib/**/*', + 'packages/apps-engine/**/deno-runtime/**/*', + 'packages/apps-engine/**/.deno/**/*', + 'packages/apps-engine/**/.deno-cache/**/*', + ], + }, + { + ignores: ['packages/base64/dist'], + }, + { + ignores: ['packages/cas-validate/dist'], + }, + { + ignores: ['packages/core-services/dist'], + }, + { + files: ['packages/core-typings/**/*'], + ignores: ['packages/core-typings/dist'], + rules: { + '@typescript-eslint/no-empty-interface': 'off', + }, + }, + { + files: ['packages/core-typings/**/*.spec.js', 'packages/core-typings/**/*.spec.jsx'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + }, + { + ignores: ['packages/cron/dist'], + }, + { + files: ['packages/ddp-client/**/*'], + ignores: ['packages/ddp-client/**/dist', 'packages/ddp-client/**/coverage'], + rules: { + '@typescript-eslint/naming-convention': [ + 'error', + { selector: 'variableLike', format: ['camelCase'], leadingUnderscore: 'allow' }, + { + selector: ['variable'], + format: ['camelCase', 'UPPER_CASE', 'PascalCase'], + leadingUnderscore: 'allowSingleOrDouble', + }, + { + selector: ['function'], + format: ['camelCase', 'PascalCase'], + leadingUnderscore: 'allowSingleOrDouble', + }, + { + selector: 'parameter', + format: ['camelCase'], + modifiers: ['unused'], + leadingUnderscore: 'require', + }, + ], + }, + }, + { + ignores: ['packages/desktop-api/dist'], + }, + { + files: ['packages/favicon/**/*'], + ignores: ['packages/favicon/dist'], + rules: { + '@typescript-eslint/explicit-function-return-type': 'off', + }, + }, + { + ignores: ['packages/fuselage-ui-kit/dist', 'packages/fuselage-ui-kit/storybook-static', '!packages/fuselage-ui-kit/.storybook'], + }, + { + files: ['packages/fuselage-ui-kit/**/*.ts', 'packages/fuselage-ui-kit/**/*.tsx'], + rules: { + '@typescript-eslint/no-misused-promises': 'off', + }, + }, + { + ignores: ['packages/gazzodown/dist', 'packages/gazzodown/storybook-static', '!packages/gazzodown/.storybook'], + }, + { + ignores: ['packages/http-router/dist'], + }, + { + ignores: ['packages/i18n/dist'], + }, + { + ignores: ['packages/instance-status/dist'], + }, + { + files: ['packages/instance-status/**/*.spec.js', 'packages/instance-status/**/*.spec.jsx'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + }, + { + ignores: ['packages/jest-presets/dist/**', 'packages/jest-presets/client/**', 'packages/jest-presets/server/**'], + }, + { + ignores: ['packages/jwt/dist'], + }, + { + files: ['packages/livechat/**/*'], + ignores: ['packages/livechat/dist', 'packages/livechat/storybook-static', '!packages/livechat/.storybook'], + settings: { + 'import/resolver': { + node: { + extensions: ['.js', '.ts', '.tsx'], + }, + }, + 'react': { + pragma: 'h', + pragmaFrag: 'Fragment', + version: 'detect', + }, + }, + rules: { + 'import/order': [ + 'error', + { + 'newlines-between': 'always', + 'groups': ['builtin', 'external', 'internal', ['parent', 'sibling', 'index']], + 'alphabetize': { + order: 'asc', + }, + }, + ], + 'jsx-a11y/alt-text': 'off', + 'jsx-a11y/click-events-have-key-events': 'off', + 'jsx-a11y/media-has-caption': 'off', + 'jsx-a11y/no-static-element-interactions': 'off', + 'jsx-quotes': ['error', 'prefer-single'], + 'react/jsx-curly-brace-presence': 'off', + 'react/display-name': [ + 'warn', + { + ignoreTranspilerName: false, + }, + ], + 'react/jsx-fragments': ['error', 'syntax'], + 'react/jsx-key': 'off', + 'react/jsx-no-bind': [ + 'warn', + { + ignoreRefs: true, + allowFunctions: true, + allowArrowFunctions: true, + }, + ], + 'react/jsx-no-comment-textnodes': 'error', + 'react/jsx-no-duplicate-props': 'error', + 'react/jsx-no-target-blank': 'error', + 'react/jsx-no-undef': 'error', + 'react/jsx-tag-spacing': [ + 'error', + { + beforeSelfClosing: 'always', + }, + ], + 'react/jsx-uses-react': 'error', + 'react/jsx-uses-vars': 'error', + 'react/no-children-prop': 'error', + 'react/no-danger': 'warn', + 'react/no-deprecated': 'error', + 'react/no-did-mount-set-state': 'error', + 'react/no-did-update-set-state': 'error', + 'react/no-find-dom-node': 'error', + 'react/no-is-mounted': 'error', + 'react/no-multi-comp': 'off', + 'react/no-string-refs': 'error', + 'react/prefer-es6-class': 'error', + 'react/prefer-stateless-function': 'warn', + 'react/require-render-return': 'error', + 'react/self-closing-comp': 'error', + 'react-hooks/rules-of-hooks': 'error', + 'react-hooks/exhaustive-deps': 'warn', + 'no-sequences': 'off', + 'no-extra-parens': 'off', + }, + }, + { + files: ['packages/livechat/**/*.ts', 'packages/livechat/**/*.tsx'], + rules: { + '@typescript-eslint/naming-convention': [ + 'error', + { selector: 'variableLike', format: ['camelCase'], leadingUnderscore: 'allow' }, + { + selector: ['variable'], + format: ['camelCase', 'UPPER_CASE', 'PascalCase'], + leadingUnderscore: 'allowSingleOrDouble', + }, + { + selector: ['function'], + format: ['camelCase', 'PascalCase'], + leadingUnderscore: 'allowSingleOrDouble', + }, + { + selector: 'parameter', + format: ['camelCase'], + modifiers: ['unused'], + leadingUnderscore: 'require', + }, + ], + '@typescript-eslint/no-misused-promises': 'off', + }, + }, + { + ignores: ['packages/log-format/dist'], + }, + { + ignores: ['packages/logger/dist'], + }, + { + ignores: ['packages/media-signaling/dist'], + }, + { + ignores: ['packages/message-parser/dist'], + }, + { + ignores: ['packages/message-types/dist'], + }, + { + ignores: ['packages/mock-providers/dist'], + }, + { + ignores: ['packages/model-typings/dist'], + }, + { + ignores: ['packages/models/dist', 'packages/models/coverage'], + }, + { + ignores: ['packages/mongo-adapter/dist'], + }, + { + ignores: ['packages/omni-core/dist'], + }, + { + files: ['packages/password-policies/**/*'], + plugins: { + jest: jestPlugin, + }, + ignores: ['packages/password-policies/dist'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + }, + { + ignores: ['packages/patch-injection/dist'], + }, + { + ignores: ['packages/peggy-loader/dist'], + }, + { + ignores: ['packages/random/dist'], + }, + { + ignores: ['packages/release-action/dist'], + }, + { + files: ['packages/release-changelog/**/*'], + plugins: { + jest: jestPlugin, + }, + ignores: ['packages/release-changelog/dist'], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + }, + { + ignores: ['packages/rest-typings/dist'], + }, + { + ignores: ['packages/server-cloud-communication/dist'], + }, + { + ignores: ['packages/server-fetch/dist'], + }, + { + ignores: ['packages/sha256/dist'], + }, + { + ignores: ['packages/storybook-config/**/dist', 'packages/storybook-config/*.d.ts', 'packages/storybook-config/*.js'], + }, + { + ignores: ['packages/tools/dist'], + }, + { + ignores: ['packages/tracing/dist'], + }, + { + ignores: ['packages/ui-avatar/dist', 'packages/ui-avatar/storybook-static', '!packages/ui-avatar/.storybook'], + }, + { + ignores: ['packages/ui-client/dist', 'packages/ui-client/storybook-static', '!packages/ui-client/.storybook'], + }, + { + files: ['packages/ui-client/**/*.ts', 'packages/ui-client/**/*.tsx'], + rules: { + '@typescript-eslint/no-misused-promises': 'off', + }, + }, + { + ignores: ['packages/ui-composer/dist', 'packages/ui-composer/storybook-static', '!packages/ui-composer/.storybook'], + }, + { + ignores: ['packages/ui-contexts/dist'], + }, + { + files: ['packages/ui-contexts/**/*.ts', 'packages/ui-contexts/**/*.tsx'], + rules: { + '@typescript-eslint/no-misused-promises': 'off', + }, + }, + { + ignores: ['packages/ui-kit/dist'], + }, + { + ignores: ['packages/ui-video-conf/dist', 'packages/ui-video-conf/storybook-static', '!packages/ui-video-conf/.storybook'], + }, + { + ignores: ['packages/ui-voip/dist', 'packages/ui-voip/storybook-static', '!packages/ui-voip/.storybook'], + }, + { + files: ['packages/ui-voip/**/*.ts', 'packages/ui-voip/**/*.tsx'], + rules: { + '@typescript-eslint/no-misused-promises': 'off', + }, + }, + { + files: ['packages/web-ui-registration/**/*'], + ignores: [ + 'packages/web-ui-registration/dist', + 'packages/web-ui-registration/storybook-static', + '!packages/web-ui-registration/.storybook', + ], + }, + { + files: ['packages/web-ui-registration/**/*.ts', 'packages/web-ui-registration/**/*.tsx'], + rules: { + '@typescript-eslint/no-misused-promises': 'off', + }, + }, +]; diff --git a/package.json b/package.json index 59b862f136899..c94d0ded92f60 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,8 @@ "@types/chart.js": "^2.9.41", "@types/js-yaml": "^4.0.9", "@types/node": "~22.16.5", + "eslint-plugin-no-floating-promise": "~2.0.0", + "eslint-plugin-you-dont-need-lodash-underscore": "~6.14.0", "ts-node": "^10.9.2", "turbo": "~2.8.11", "typescript": "~5.9.3" diff --git a/packages/account-utils/.eslintrc.json b/packages/account-utils/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/account-utils/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/agenda/.eslintrc.json b/packages/agenda/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/agenda/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/api-client/.eslintrc.json b/packages/api-client/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/api-client/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/apps-engine/.eslintrc.json b/packages/apps-engine/.eslintrc.json deleted file mode 100644 index 0e15f5fe9fb02..0000000000000 --- a/packages/apps-engine/.eslintrc.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "extends": "@rocket.chat/eslint-config", - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": "./tsconfig-lint.json" - }, - "rules": { - "@typescript-eslint/ban-types": [ - "error", - { - "types": { - "{}": false - } - } - ], - "@typescript-eslint/naming-convention": [ - "error", - { - "selector": ["function", "parameter", "variable"], - "modifiers": ["destructured"], - "format": null - }, - { - "selector": ["variable"], - "format": ["camelCase", "UPPER_CASE", "PascalCase"], - "leadingUnderscore": "allowSingleOrDouble" - }, - { - "selector": ["function"], - "format": ["camelCase", "PascalCase"], - "leadingUnderscore": "allowSingleOrDouble" - }, - { - "selector": ["parameter"], - "format": ["camelCase"], - "leadingUnderscore": "allow" - }, - { - "selector": ["parameter"], - "format": ["camelCase"], - "modifiers": ["unused"], - "leadingUnderscore": "allow" - }, - { - "selector": ["interface"], - "format": ["PascalCase"], - "custom": { - "regex": "^I[A-Z]", - "match": true - } - } - ], - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/no-unused-vars": ["error", { "args": "none" }], - "new-cap": "off", - "no-await-in-loop": "off" - }, - "ignorePatterns": ["client", "definition", "docs", "server", "lib", "deno-runtime", ".deno"] -} diff --git a/packages/apps/.eslintrc.json b/packages/apps/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/apps/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/base64/.eslintrc.json b/packages/base64/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/base64/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/cas-validate/.eslintrc.json b/packages/cas-validate/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/cas-validate/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/core-services/.eslintrc.json b/packages/core-services/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/core-services/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/core-typings/.eslintrc.json b/packages/core-typings/.eslintrc.json deleted file mode 100644 index 373fe99379a44..0000000000000 --- a/packages/core-typings/.eslintrc.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "overrides": [ - { - "files": ["**/*.spec.js", "**/*.spec.jsx"], - "env": { - "jest": true - } - } - ], - "ignorePatterns": ["dist"], - "rules": { - "@typescript-eslint/no-empty-interface": "off" - } -} diff --git a/packages/cron/.eslintrc.json b/packages/cron/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/cron/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/ddp-client/.eslintrc.json b/packages/ddp-client/.eslintrc.json deleted file mode 100644 index 8404218fed0a7..0000000000000 --- a/packages/ddp-client/.eslintrc.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["**/dist", "**/coverage"], - "rules": { - "@typescript-eslint/naming-convention": [ - "error", - { "selector": "variableLike", "format": ["camelCase"], "leadingUnderscore": "allow" }, - { - "selector": ["variable"], - "format": ["camelCase", "UPPER_CASE", "PascalCase"], - "leadingUnderscore": "allowSingleOrDouble" - }, - { - "selector": ["function"], - "format": ["camelCase", "PascalCase"], - "leadingUnderscore": "allowSingleOrDouble" - }, - { - "selector": "parameter", - "format": ["camelCase"], - "modifiers": ["unused"], - "leadingUnderscore": "require" - } - ] - } -} diff --git a/packages/desktop-api/.eslintrc.json b/packages/desktop-api/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/desktop-api/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/eslint-config/.eslintrc.json b/packages/eslint-config/.eslintrc.json deleted file mode 100644 index 7e5c5710d9304..0000000000000 --- a/packages/eslint-config/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./standard/index.js" -} diff --git a/packages/eslint-config/best-practices.mjs b/packages/eslint-config/best-practices.mjs new file mode 100644 index 0000000000000..97f9dd445e161 --- /dev/null +++ b/packages/eslint-config/best-practices.mjs @@ -0,0 +1,304 @@ +/** @type {import('eslint').Linter.FlatConfig} */ +export default { + rules: { + // // enforces getter/setter pairs in objects + // 'accessor-pairs': 'off', + + // enforces return statements in callbacks of array's methods + // https://eslint.org/docs/rules/array-callback-return + 'array-callback-return': ['error', { allowImplicit: true }], + + // treat var statements as if they were block scoped + 'block-scoped-var': 'error', + + // specify the maximum cyclomatic complexity allowed in a program + 'complexity': ['warn', 31], + + // enforce that class methods use "this" + // https://eslint.org/docs/rules/class-methods-use-this + // 'class-methods-use-this': ['error', { + // exceptMethods: [], + // }], + + // require return statements to either always or never specify values + // 'consistent-return': 'error', + + // specify curly brace conventions for all control statements + 'curly': ['error', 'all'], + + // // require default case in switch statements + // 'default-case': ['error', { commentPattern: '^no default$' }], + + // encourages use of dot notation whenever possible + 'dot-notation': ['error', { allowKeywords: true }], + + // enforces consistent newlines before or after dots + // https://eslint.org/docs/rules/dot-location + 'dot-location': ['error', 'property'], + + // require the use of === and !== + // https://eslint.org/docs/rules/eqeqeq + 'eqeqeq': ['error', 'allow-null'], + + // make sure for-in loops have an if statement + 'guard-for-in': 'error', + + // // enforce a maximum number of classes per file + // // https://eslint.org/docs/rules/max-classes-per-file + // // TODO: semver-major (eslint 5): enable + // 'max-classes-per-file': ['off', 1], + + // // disallow the use of alert, confirm, and prompt + // 'no-alert': 'warn', + + // disallow use of arguments.caller or arguments.callee + 'no-caller': 'error', + + // disallow lexical declarations in case/default clauses + // https://eslint.org/docs/rules/no-case-declarations.html + // 'no-case-declarations': 'error', + + // disallow division operators explicitly at beginning of regular expression + // https://eslint.org/docs/rules/no-div-regex + 'no-div-regex': 'off', + + // disallow else after a return in an if + // https://eslint.org/docs/rules/no-else-return + 'no-else-return': ['error', { allowElseIf: false }], + + // disallow empty functions, except for standalone funcs/arrows + // https://eslint.org/docs/rules/no-empty-function + 'no-empty-function': [ + 'error', + { + allow: ['arrowFunctions', 'functions', 'methods'], + }, + ], + + // disallow empty destructuring patterns + // https://eslint.org/docs/rules/no-empty-pattern + 'no-empty-pattern': 'error', + + // // disallow comparisons to null without a type-checking operator + // 'no-eq-null': 'off', + + // disallow use of eval() + 'no-eval': 'error', + + // disallow adding to native types + 'no-extend-native': 'error', + + // disallow unnecessary function binding + 'no-extra-bind': 'error', + + // disallow Unnecessary Labels + // https://eslint.org/docs/rules/no-extra-label + 'no-extra-label': 'error', + + // disallow fallthrough of case statements + 'no-fallthrough': 'error', + + // disallow the use of leading or trailing decimal points in numeric literals + 'no-floating-decimal': 'error', + + // // disallow reassignments of native objects or read-only globals + // // https://eslint.org/docs/rules/no-global-assign + // 'no-global-assign': ['error', { exceptions: [] }], + // // deprecated in favor of no-global-assign + // 'no-native-reassign': 'off', + + // // disallow implicit type conversions + // // https://eslint.org/docs/rules/no-implicit-coercion + // 'no-implicit-coercion': ['off', { + // boolean: false, + // number: true, + // string: true, + // allow: [], + // }], + + // // disallow var and named functions in global scope + // // https://eslint.org/docs/rules/no-implicit-globals + // 'no-implicit-globals': 'off', + + // disallow use of eval()-like methods + 'no-implied-eval': 'error', + + // disallow this keywords outside of classes or class-like objects + 'no-invalid-this': 'off', + + // disallow usage of __iterator__ property + 'no-iterator': 'error', + + // // disallow use of labels for anything other then loops and switches + // 'no-labels': ['error', { allowLoop: false, allowSwitch: false }], + + // disallow unnecessary nested blocks + 'no-lone-blocks': 'error', + + // disallow creation of functions within loops + 'no-loop-func': 'error', + + // // disallow magic numbers + // // https://eslint.org/docs/rules/no-magic-numbers + // 'no-magic-numbers': ['off', { + // ignore: [], + // ignoreArrayIndexes: true, + // enforceConst: true, + // detectObjects: false, + // }], + + // disallow use of multiple spaces + 'no-multi-spaces': 'error', + + // disallow use of multiline strings + 'no-multi-str': 'error', + + // disallow use of new operator when not part of the assignment or comparison + // 'no-new': 'error', + + // disallow use of new operator for Function object + // 'no-new-func': 'error', + + // disallows creating new instances of String, Number, and Boolean + 'no-new-wrappers': 'error', + + // disallow use of (old style) octal literals + 'no-octal': 'error', + + // // disallow use of octal escape sequences in string literals, such as + // // var foo = 'Copyright \251'; + // 'no-octal-escape': 'error', + + // // disallow reassignment of function parameters + // // disallow parameter object manipulation except for specific exclusions + // // rule: https://eslint.org/docs/rules/no-param-reassign.html + // 'no-param-reassign': ['error', { + // props: true, + // ignorePropertyModificationsFor: [ + // 'acc', // for reduce accumulators + // 'accumulator', // for reduce accumulators + // 'e', // for e.returnvalue + // 'ctx', // for Koa routing + // 'req', // for Express requests + // 'request', // for Express requests + // 'res', // for Express responses + // 'response', // for Express responses + // '$scope', // for Angular 1 scopes + // ] + // }], + + // disallow usage of __proto__ property + 'no-proto': 'error', + + // disallow declaring the same variable more then once + 'no-redeclare': 'error', + + // disallow certain object properties + // https://eslint.org/docs/rules/no-restricted-properties + 'no-restricted-properties': [ + 'error', + { + object: 'describe', + property: 'only', + }, + { + object: 'it', + property: 'only', + }, + { + object: 'context', + property: 'only', + }, + ], + + // disallow use of assignment in return statement + 'no-return-assign': ['error', 'always'], + + // disallow redundant `return await` + 'no-return-await': 'error', + + // // disallow use of `javascript:` urls. + // 'no-script-url': 'error', + + // // disallow self assignment + // // https://eslint.org/docs/rules/no-self-assign + // // TODO: semver-major: props -> true + // 'no-self-assign': ['error', { + // props: false, + // }], + + // disallow comparisons where both sides are exactly the same + 'no-self-compare': 'error', + + // disallow use of comma operator + 'no-sequences': 'error', + + // restrict what can be thrown as an exception + 'no-throw-literal': 'error', + + // // disallow unmodified conditions of loops + // // https://eslint.org/docs/rules/no-unmodified-loop-condition + // 'no-unmodified-loop-condition': 'off', + + // // disallow usage of expressions in statement position + // 'no-unused-expressions': ['error', { + // allowShortCircuit: false, + // allowTernary: false, + // allowTaggedTemplates: false, + // }], + + // disallow unused labels + // https://eslint.org/docs/rules/no-unused-labels + 'no-unused-labels': 'error', + + // disallow unnecessary .call() and .apply() + 'no-useless-call': 'off', + + // disallow useless string concatenation + // https://eslint.org/docs/rules/no-useless-concat + 'no-useless-concat': 'error', + + // // disallow unnecessary string escaping + // // https://eslint.org/docs/rules/no-useless-escape + // 'no-useless-escape': 'error', + + // disallow redundant return; keywords + // https://eslint.org/docs/rules/no-useless-return + 'no-useless-return': 'error', + + // disallow use of void operator + // https://eslint.org/docs/rules/no-void + 'no-void': 'off', + + // // disallow usage of configurable warning terms in comments: e.g. todo + // 'no-warning-comments': ['off', { terms: ['todo', 'fixme', 'xxx'], location: 'start' }], + + // // disallow use of the with statement + // 'no-with': 'error', + + // // require using Error objects as Promise rejection reasons + // // https://eslint.org/docs/rules/prefer-promise-reject-errors + // 'prefer-promise-reject-errors': ['error', { allowEmptyReject: true }], + + // // require use of the second argument for parseInt() + // radix: 'error', + + // // require `await` in `async function` (note: this is a horrible rule that should never be used) + // // https://eslint.org/docs/rules/require-await + // 'require-await': 'off', + + // // Enforce the use of u flag on RegExp + // // https://eslint.org/docs/rules/require-unicode-regexp + // 'require-unicode-regexp': 'off', + + // // requires to declare all vars on top of their containing scope + // 'vars-on-top': 'error', + + // require immediate function invocation to be wrapped in parentheses + // https://eslint.org/docs/rules/wrap-iife.html + 'wrap-iife': ['error', 'outside', { functionPrototypeMethods: false }], + + // require or disallow Yoda conditions + 'yoda': 'error', + }, +}; diff --git a/packages/eslint-config/errors.mjs b/packages/eslint-config/errors.mjs new file mode 100644 index 0000000000000..1793b8acb5802 --- /dev/null +++ b/packages/eslint-config/errors.mjs @@ -0,0 +1,149 @@ +/** @type {import('eslint').Linter.FlatConfig} */ +export default { + rules: { + // Enforce “for” loop update clause moving the counter in the right direction + // https://eslint.org/docs/rules/for-direction + 'for-direction': 'error', + + // Enforces that a return statement is present in property getters + // https://eslint.org/docs/rules/getter-return + 'getter-return': ['error', { allowImplicit: true }], + + // disallow using an async function as a Promise executor + // https://eslint.org/docs/rules/no-async-promise-executor + // TODO: enable, semver-major + 'no-async-promise-executor': 'off', + + // Disallow await inside of loops + // https://eslint.org/docs/rules/no-await-in-loop + 'no-await-in-loop': 'error', + + // Disallow comparisons to negative zero + // https://eslint.org/docs/rules/no-compare-neg-zero + 'no-compare-neg-zero': 'error', + + // disallow assignment in conditional expressions + 'no-cond-assign': 'error', + + // disallow use of console + // 'no-console': 'warn', + + // disallow use of constant expressions in conditions + 'no-constant-condition': 'error', + + // disallow control characters in regular expressions + 'no-control-regex': 'error', + + // disallow use of debugger + 'no-debugger': 'error', + + // disallow duplicate arguments in functions + 'no-dupe-args': 'error', + + // disallow duplicate keys when creating object literals + 'no-dupe-keys': 'error', + + // disallow a duplicate case label. + 'no-duplicate-case': 'error', + + // disallow empty statements + 'no-empty': 'error', + + // disallow the use of empty character classes in regular expressions + 'no-empty-character-class': 'error', + + // disallow assigning to the exception in a catch block + 'no-ex-assign': 'error', + + // disallow double-negation boolean casts in a boolean context + // https://eslint.org/docs/rules/no-extra-boolean-cast + 'no-extra-boolean-cast': 'error', + + // disallow unnecessary parentheses + // https://eslint.org/docs/rules/no-extra-parens + 'no-extra-parens': [ + 'error', + 'all', + { + conditionalAssign: true, + nestedBinaryExpressions: false, + returnAssign: true, + ignoreJSX: 'all', // delegate to eslint-plugin-react + enforceForArrowConditionals: false, + }, + ], + + // disallow unnecessary semicolons + 'no-extra-semi': 'error', + + // disallow overwriting functions written as function declarations + 'no-func-assign': 'error', + + // disallow function declarations in nested blocks + 'no-inner-declarations': ['error', 'functions'], + + // disallow invalid regular expression strings in the RegExp constructor + 'no-invalid-regexp': 'error', + + // disallow irregular whitespace outside of strings and comments + 'no-irregular-whitespace': 'error', + + // // Disallow characters which are made with multiple code points in character class syntax + // // https://eslint.org/docs/rules/no-misleading-character-class + // // TODO: enable, semver-major + // 'no-misleading-character-class': 'off', + + // disallow the use of object properties of the global object (Math and JSON) as functions + 'no-obj-calls': 'error', + + // // disallow use of Object.prototypes builtins directly + // // https://eslint.org/docs/rules/no-prototype-builtins + // 'no-prototype-builtins': 'error', + + // disallow multiple spaces in a regular expression literal + 'no-regex-spaces': 'error', + + // disallow sparse arrays + 'no-sparse-arrays': 'error', + + // // Disallow template literal placeholder syntax in regular strings + // // https://eslint.org/docs/rules/no-template-curly-in-string + // 'no-template-curly-in-string': 'error', + + // Avoid code that looks like two expressions but is actually one + // https://eslint.org/docs/rules/no-unexpected-multiline + 'no-unexpected-multiline': 'error', + + // disallow unreachable statements after a return, throw, continue, or break statement + 'no-unreachable': 'error', + + // disallow return/throw/break/continue inside finally blocks + // https://eslint.org/docs/rules/no-unsafe-finally + 'no-unsafe-finally': 'error', + + // disallow negating the left operand of relational operators + // https://eslint.org/docs/rules/no-unsafe-negation + 'no-unsafe-negation': 'error', + + // disallow negation of the left operand of an in expression + // deprecated in favor of no-unsafe-negation + // TODO: turn off + 'no-negated-in-lhs': 'error', + + // Disallow assignments that can lead to race conditions due to usage of await or yield + // https://eslint.org/docs/rules/require-atomic-updates + // TODO: enable, semver-major + 'require-atomic-updates': 'off', + + // disallow comparisons with the value NaN + 'use-isnan': 'error', + + // // ensure JSDoc comments are valid + // // https://eslint.org/docs/rules/valid-jsdoc + // 'valid-jsdoc': 'off', + + // ensure that the results of typeof are compared against a valid string + // https://eslint.org/docs/rules/valid-typeof + 'valid-typeof': ['error', { requireStringLiterals: true }], + }, +}; diff --git a/packages/eslint-config/es6.mjs b/packages/eslint-config/es6.mjs new file mode 100644 index 0000000000000..54cdfa7b9c63c --- /dev/null +++ b/packages/eslint-config/es6.mjs @@ -0,0 +1,188 @@ +import globals from 'globals'; + +/** @type {import('eslint').Linter.FlatConfig} */ +export default { + languageOptions: { + ecmaVersion: 6, + sourceType: 'module', + globals: { + ...globals.es2015, + }, + }, + + rules: { + // enforces no braces where they can be omitted + // https://eslint.org/docs/rules/arrow-body-style + // TODO: enable requireReturnForObjectLiteral? + 'arrow-body-style': [ + 'error', + 'as-needed', + { + requireReturnForObjectLiteral: false, + }, + ], + + // require parens in arrow function arguments + // https://eslint.org/docs/rules/arrow-parens + 'arrow-parens': ['error', 'always'], + + // require space before/after arrow function's arrow + // https://eslint.org/docs/rules/arrow-spacing + 'arrow-spacing': ['error', { before: true, after: true }], + + // // verify super() callings in constructors + // 'constructor-super': 'error', + + // // enforce the spacing around the * in generator functions + // // https://eslint.org/docs/rules/generator-star-spacing + // 'generator-star-spacing': ['error', { before: false, after: true }], + + // // disallow modifying variables of class declarations + // // https://eslint.org/docs/rules/no-class-assign + // 'no-class-assign': 'error', + + // disallow arrow functions where they could be confused with comparisons + // https://eslint.org/docs/rules/no-confusing-arrow + 'no-confusing-arrow': [ + 'error', + { + allowParens: true, + }, + ], + + // disallow modifying variables that are declared using const + 'no-const-assign': 'error', + + // disallow duplicate class members + // https://eslint.org/docs/rules/no-dupe-class-members + 'no-dupe-class-members': 'error', + + // disallow importing from the same path more than once + // https://eslint.org/docs/rules/no-duplicate-imports + // replaced by https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md + 'no-duplicate-imports': 'off', + + // // disallow symbol constructor + // // https://eslint.org/docs/rules/no-new-symbol + // 'no-new-symbol': 'error', + + // // disallow specific imports + // // https://eslint.org/docs/rules/no-restricted-imports + // 'no-restricted-imports': ['off', { + // paths: [], + // patterns: [] + // }], + + // disallow to use this/super before super() calling in constructors. + // https://eslint.org/docs/rules/no-this-before-super + 'no-this-before-super': 'error', + + // disallow useless computed property keys + // https://eslint.org/docs/rules/no-useless-computed-key + 'no-useless-computed-key': 'error', + + // disallow unnecessary constructor + // https://eslint.org/docs/rules/no-useless-constructor + 'no-useless-constructor': 'error', + + // disallow renaming import, export, and destructured assignments to the same name + // https://eslint.org/docs/rules/no-useless-rename + 'no-useless-rename': [ + 'error', + { + ignoreDestructuring: false, + ignoreImport: false, + ignoreExport: false, + }, + ], + + // require let or const instead of var + 'no-var': 'error', + + // require method and property shorthand syntax for object literals + // https://eslint.org/docs/rules/object-shorthand + 'object-shorthand': 'error', + + // // suggest using arrow functions as callbacks + // 'prefer-arrow-callback': ['error', { + // allowNamedFunctions: false, + // allowUnboundThis: true, + // }], + + // suggest using of const declaration for variables that are never modified after declared + 'prefer-const': [ + 'error', + { + destructuring: 'any', + ignoreReadBeforeAssign: true, + }, + ], + + // Prefer destructuring from arrays and objects + // https://eslint.org/docs/rules/prefer-destructuring + 'prefer-destructuring': [ + 'error', + { + VariableDeclarator: { + array: false, + object: true, + }, + AssignmentExpression: { + array: false, + object: false, + }, + }, + { + enforceForRenamedProperties: false, + }, + ], + + // // disallow parseInt() in favor of binary, octal, and hexadecimal literals + // // https://eslint.org/docs/rules/prefer-numeric-literals + // 'prefer-numeric-literals': 'error', + + // // suggest using Reflect methods where applicable + // // https://eslint.org/docs/rules/prefer-reflect + // 'prefer-reflect': 'off', + + // use rest parameters instead of arguments + // https://eslint.org/docs/rules/prefer-rest-params + 'prefer-rest-params': 'error', + + // // suggest using the spread operator instead of .apply() + // // https://eslint.org/docs/rules/prefer-spread + // 'prefer-spread': 'error', + + // suggest using template literals instead of string concatenation + // https://eslint.org/docs/rules/prefer-template + 'prefer-template': 'error', + + // // disallow generator functions that do not have yield + // // https://eslint.org/docs/rules/require-yield + // 'require-yield': 'error', + + // enforce spacing between object rest-spread + // https://eslint.org/docs/rules/rest-spread-spacing + 'rest-spread-spacing': ['error', 'never'], + + // // import sorting + // // https://eslint.org/docs/rules/sort-imports + // 'sort-imports': ['off', { + // ignoreCase: false, + // ignoreMemberSort: false, + // memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], + // }], + + // // require a Symbol description + // // https://eslint.org/docs/rules/symbol-description + // 'symbol-description': 'error', + + // enforce usage of spacing in template strings + // https://eslint.org/docs/rules/template-curly-spacing + 'template-curly-spacing': ['error', 'always'], + + // // enforce spacing around the * in yield* expressions + // // https://eslint.org/docs/rules/yield-star-spacing + // 'yield-star-spacing': ['error', 'after'] + }, +}; diff --git a/packages/eslint-config/flat.mjs b/packages/eslint-config/flat.mjs new file mode 100644 index 0000000000000..c78e04be7275b --- /dev/null +++ b/packages/eslint-config/flat.mjs @@ -0,0 +1,263 @@ +import babelParser from '@babel/eslint-parser'; +import typescriptPlugin from '@typescript-eslint/eslint-plugin'; +import typescriptParser from '@typescript-eslint/parser'; +import antiTrojanSourcePlugin from 'eslint-plugin-anti-trojan-source'; +import importPlugin from 'eslint-plugin-import'; +import jsxA11yPlugin from 'eslint-plugin-jsx-a11y'; +import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; +import reactPlugin from 'eslint-plugin-react'; +import reactHooksPlugin from 'eslint-plugin-react-hooks'; +import globals from 'globals'; +// eslint-disable-next-line import/no-unresolved +// import tseslint from 'typescript-eslint'; + +import bestPractices from './best-practices.mjs'; +import errors from './errors.mjs'; +import es6 from './es6.mjs'; +import imports from './imports.mjs'; +import node from './node.mjs'; +import style from './style.mjs'; +import variables from './variables.mjs'; + +/** @type {import('eslint').Linter.FlatConfig[]} */ +export default [ + { + ignores: ['**/dist'], + }, + bestPractices, + errors, + node, + style, + variables, + es6, + imports, + { + languageOptions: { + ecmaVersion: 2018, + sourceType: 'module', + globals: { + ...globals.browser, + ...globals.commonjs, + ...globals.es6, + ...globals.node, + }, + }, + }, + jsxA11yPlugin.flatConfigs.recommended, + { + plugins: { + 'react': reactPlugin, + 'react-hooks': reactHooksPlugin, + }, + settings: { + react: { + version: 'detect', + }, + }, + rules: { + 'react-hooks/exhaustive-deps': 'error', + 'react-hooks/rules-of-hooks': 'error', + 'react/display-name': 'error', + 'react/jsx-curly-brace-presence': 'error', + 'react/jsx-fragments': ['error', 'syntax'], + 'react/jsx-key': ['error', { checkFragmentShorthand: true, checkKeyMustBeforeSpread: true, warnOnDuplicates: true }], + 'react/jsx-no-undef': 'error', + 'react/jsx-uses-react': 'error', + 'react/jsx-uses-vars': 'error', + 'react/no-children-prop': 'error', + 'react/no-multi-comp': 'error', + 'jsx-a11y/no-autofocus': [2, { ignoreNonDOM: true }], + }, + }, + { + files: ['**/*.stories.js', '**/*.stories.jsx', '**/*.stories.ts', '**/*.stories.tsx', '**/*.spec.tsx'], + rules: { + 'react/display-name': 'off', + 'react/no-multi-comp': 'off', + }, + }, + eslintPluginPrettierRecommended, + importPlugin.flatConfigs.typescript, + { + languageOptions: { + parser: babelParser, + parserOptions: { + requireConfigFile: false, + }, + }, + settings: { + 'import/resolver': { + node: { + extensions: ['.js', '.ts', '.tsx', '.cts', '.mts'], + }, + }, + }, + rules: { + 'jsx-quotes': ['error', 'prefer-single'], + }, + }, + // ...tseslint.configs.recommended, + // tseslint.configs.eslintRecommended, + { + files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'], + languageOptions: { + parser: typescriptParser, + parserOptions: { + sourceType: 'module', + ecmaVersion: 2018, + warnOnUnsupportedTypeScriptVersion: false, + ecmaFeatures: { + experimentalObjectRestSpread: true, + legacyDecorators: true, + }, + }, + globals: { + ...globals.browser, + ...globals.commonjs, + ...globals.es6, + ...globals.node, + }, + }, + plugins: { + 'anti-trojan-source': antiTrojanSourcePlugin, + '@typescript-eslint': typescriptPlugin, + }, + rules: { + // '@typescript-eslint/no-empty-object-type': 'warn', + // '@typescript-eslint/no-restricted-types': [ + '@typescript-eslint/ban-types': [ + 'warn', + { + types: { + 'FC': 'Useless and has some drawbacks, see https://adr.rocket.chat/0094', + 'React.FC': 'Useless and has some drawbacks, see https://adr.rocket.chat/0094', + 'VFC': 'Useless and has some drawbacks, see https://adr.rocket.chat/0094', + 'React.VFC': 'Useless and has some drawbacks, see https://adr.rocket.chat/0094', + 'FunctionComponent': 'Useless and has some drawbacks, see https://adr.rocket.chat/0094', + 'React.FunctionComponent': 'Useless and has some drawbacks, see https://adr.rocket.chat/0094', + }, + }, + ], + '@typescript-eslint/ban-ts-comment': 'warn', + '@typescript-eslint/consistent-type-imports': 'error', + '@typescript-eslint/naming-convention': [ + 'error', + { selector: 'variableLike', format: ['camelCase'], leadingUnderscore: 'allow' }, + { + selector: ['variable'], + format: ['camelCase', 'UPPER_CASE', 'PascalCase'], + leadingUnderscore: 'allowSingleOrDouble', + }, + { + selector: ['function'], + format: ['camelCase', 'PascalCase'], + leadingUnderscore: 'allowSingleOrDouble', + }, + { + selector: 'parameter', + format: null, + filter: { + regex: '^Story$', + match: true, + }, + }, + { + selector: 'parameter', + format: ['camelCase'], + modifiers: ['unused'], + leadingUnderscore: 'require', + }, + { + selector: 'interface', + format: ['PascalCase'], + custom: { + regex: '^I[A-Z]', + match: true, + }, + }, + ], + '@typescript-eslint/no-dupe-class-members': 'error', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-redeclare': 'error', + '@typescript-eslint/no-redundant-type-constituents': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + ignoreRestSiblings: true, + }, + ], + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/prefer-optional-chain': 'warn', + '@typescript-eslint/require-await': 'off', + 'anti-trojan-source/no-bidi': 'error', + 'func-call-spacing': 'off', + 'indent': 'off', + 'jsx-quotes': ['error', 'prefer-single'], + 'no-dupe-class-members': 'off', + 'no-empty-function': 'off', + 'no-extra-parens': 'off', + 'no-redeclare': 'off', + 'no-spaced-func': 'off', + 'no-undef': 'off', + 'no-unused-vars': 'off', + 'no-use-before-define': 'off', + 'no-useless-constructor': 'off', + }, + settings: { + 'import/resolver': { + node: { + extensions: ['.js', '.ts', '.tsx', '.cts', '.mts'], + }, + typescript: {}, + }, + }, + }, + { + files: ['**/*.ts', '**/*.tsx'], + ignores: [ + '**/*.d.ts', + '**/__tests__/**', + '**/*.spec.ts', + '**/*.spec.tsx', + '**/*.test.ts', + '**/*.test.tsx', + '**/tests/**', + '**/.storybook/**', + '**/jest.config.ts', + '**/jest.config.js', + '**/jest.config.*.ts', + '**/jest.config.*.js', + '**/webpack.config.ts', + '**/webpack.config.js', + '**/vite.config.ts', + '**/vite.config.js', + '**/rollup.config.ts', + '**/rollup.config.js', + ], + languageOptions: { + parserOptions: { + project: true, + }, + }, + rules: { + '@typescript-eslint/no-misused-promises': [ + 'error', + { + checksVoidReturn: { + arguments: false, + }, + }, + ], + '@typescript-eslint/no-floating-promises': 'error', + }, + }, + { + files: ['**/*.d.ts'], + rules: { + '@typescript-eslint/naming-convention': 'off', + }, + }, +]; diff --git a/packages/eslint-config/imports.mjs b/packages/eslint-config/imports.mjs new file mode 100644 index 0000000000000..8fd63d40ed299 --- /dev/null +++ b/packages/eslint-config/imports.mjs @@ -0,0 +1,261 @@ +import importPlugin from 'eslint-plugin-import'; +import globals from 'globals'; + +/** @type {import('eslint').Linter.FlatConfig} */ +export default { + languageOptions: { + ecmaVersion: 6, + sourceType: 'module', + globals: { + ...globals.es2015, + }, + }, + plugins: { import: importPlugin }, + + settings: { + 'import/resolver': { + node: { + extensions: ['.mjs', '.js', '.json'], + }, + }, + 'import/extensions': ['.js', '.mjs', '.jsx'], + 'import/core-modules': [], + 'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'], + }, + + rules: { + // Static analysis: + + // ensure imports point to files/modules that can be resolved + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md + 'import/no-unresolved': [ + 'error', + { + commonjs: true, + caseSensitive: true, + amd: true, + ignore: ['^meteor/.+$'], + }, + ], + + // ensure named imports coupled with named exports + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it + 'import/named': 'off', + + // ensure default import coupled with default export + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it + 'import/default': 'off', + + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md + 'import/namespace': 'off', + + // Helpful warnings: + + // disallow invalid exports, e.g. multiple defaults + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md + 'import/export': 'error', + + // do not allow a default import name to match a named export + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md + // 'import/no-named-as-default': 'error', + 'import/no-named-as-default': 'off', + + // warn on accessing default export property names that are also named exports + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md + // 'import/no-named-as-default-member': 'error', + 'import/no-named-as-default-member': 'off', + + // // disallow use of jsdoc-marked-deprecated imports + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md + // 'import/no-deprecated': 'off', + + // // Forbid the use of extraneous packages + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md + // // paths are treated both as absolute paths, and relative to process.cwd() + // 'import/no-extraneous-dependencies': ['error', { + // devDependencies: [ + // 'test/**', // tape, common npm pattern + // 'tests/**', // also common npm pattern + // 'spec/**', // mocha, rspec-like pattern + // '**/__tests__/**', // jest pattern + // '**/__mocks__/**', // jest pattern + // 'test.{js,jsx}', // repos with a single test file + // 'test-*.{js,jsx}', // repos with multiple top-level test files + // '**/*{.,_}{test,spec}.{js,jsx}', // tests where the extension or filename suffix denotes that it is a test + // '**/jest.config.js', // jest config + // '**/vue.config.js', // vue-cli config + // '**/webpack.config.js', // webpack config + // '**/webpack.config.*.js', // webpack config + // '**/rollup.config.js', // rollup config + // '**/rollup.config.*.js', // rollup config + // '**/gulpfile.js', // gulp config + // '**/gulpfile.*.js', // gulp config + // '**/Gruntfile{,.js}', // grunt config + // '**/protractor.conf.js', // protractor config + // '**/protractor.conf.*.js', // protractor config + // ], + // optionalDependencies: false, + // }], + + // // Forbid mutable exports + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md + // 'import/no-mutable-exports': 'error', + + // Module systems: + + // // disallow require() + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md + // 'import/no-commonjs': 'off', + + // // disallow AMD require/define + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md + // 'import/no-amd': 'error', + + // // No Node.js builtin modules + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md + // // TODO: enable? + // 'import/no-nodejs-modules': 'off', + + // Style guide: + + // disallow non-import statements appearing before import statements + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md + 'import/first': 'error', + + // // disallow non-import statements appearing before import statements + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/imports-first.md + // // deprecated: use `import/first` + // 'import/imports-first': 'off', + + // disallow duplicate imports + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md + 'import/no-duplicates': 'error', + + // // disallow namespace imports + // // TODO: enable? + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md + // 'import/no-namespace': 'off', + + // // Ensure consistent use of file extension within the import path + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md + // 'import/extensions': ['error', 'ignorePackages', { + // js: 'never', + // mjs: 'never', + // jsx: 'never', + // }], + + // ensure absolute imports are above relative imports and that unassigned imports are ignored + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md + // TODO: enforce a stricter convention in module import order? + 'import/order': [ + 'error', + { + 'newlines-between': 'always', + 'groups': ['builtin', ['external', 'internal'], ['parent', 'sibling', 'index']], + 'alphabetize': { + order: 'asc', + }, + }, + ], + + // Require a newline after the last import/require in a group + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md + 'import/newline-after-import': 'error', + + // // Require modules with a single export to use a default export + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md + // 'import/prefer-default-export': 'error', + + // // Restrict which files can be imported in a given folder + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md + // 'import/no-restricted-paths': 'off', + + // // Forbid modules to have too many dependencies + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md + // 'import/max-dependencies': ['off', { max: 10 }], + + // Forbid import of modules using absolute paths + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md + 'import/no-absolute-path': 'error', + + // Forbid require() calls with expressions + // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md + 'import/no-dynamic-require': 'error', + + // // prevent importing the submodules of other modules + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md + // 'import/no-internal-modules': ['off', { + // allow: [], + // }], + + // // Warn if a module could be mistakenly parsed as a script by a consumer + // // leveraging Unambiguous JavaScript Grammar + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/unambiguous.md + // // this should not be enabled until this proposal has at least been *presented* to TC39. + // // At the moment, it's not a thing. + // 'import/unambiguous': 'off', + + // // Forbid Webpack loader syntax in imports + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md + // 'import/no-webpack-loader-syntax': 'error', + + // // Prevent unassigned imports + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md + // // importing for side effects is perfectly acceptable, if you need side effects. + // 'import/no-unassigned-import': 'off', + + // // Prevent importing the default as if it were named + // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md + // 'import/no-named-default': 'error', + + // // Reports if a module's default export is unnamed + // // https://github.com/benmosher/eslint-plugin-import/blob/d9b712ac7fd1fddc391f7b234827925c160d956f/docs/rules/no-anonymous-default-export.md + // 'import/no-anonymous-default-export': ['off', { + // allowArray: false, + // allowArrowFunction: false, + // allowAnonymousClass: false, + // allowAnonymousFunction: false, + // allowLiteral: false, + // allowObject: false, + // }], + + // // This rule enforces that all exports are declared at the bottom of the file. + // // https://github.com/benmosher/eslint-plugin-import/blob/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md + // // TODO: enable? + // 'import/exports-last': 'off', + + // // Reports when named exports are not grouped together in a single export declaration + // // or when multiple assignments to CommonJS module.exports or exports object are present + // // in a single file. + // // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md + // 'import/group-exports': 'off', + + // // forbid default exports. this is a terrible rule, do not use it. + // // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-default-export.md + // 'import/no-default-export': 'off', + + // Forbid a module from importing itself + // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-self-import.md + 'import/no-self-import': 'error', + + // Forbid cyclical dependencies between modules + // https://github.com/benmosher/eslint-plugin-import/blob/d81f48a2506182738409805f5272eff4d77c9348/docs/rules/no-cycle.md + // 'import/no-cycle': ['error', { maxDepth: Infinity }], + 'import/no-cycle': 'off', + + // Ensures that there are no useless path segments + // https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/no-useless-path-segments.md + 'import/no-useless-path-segments': 'error', + + // // dynamic imports require a leading comment with a webpackChunkName + // // https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/dynamic-import-chunkname.md + // 'import/dynamic-import-chunkname': ['off', { + // importFunctions: [], + // webpackChunknameFormat: '[0-9a-zA-Z-_/.]+', + // }], + + // // Use this rule to prevent imports to folders in relative parent paths. + // // https://github.com/benmosher/eslint-plugin-import/blob/c34f14f67f077acd5a61b3da9c0b0de298d20059/docs/rules/no-relative-parent-imports.md + // 'import/no-relative-parent-imports': 'off', + }, +}; diff --git a/packages/eslint-config/node.mjs b/packages/eslint-config/node.mjs new file mode 100644 index 0000000000000..17f4f6bcd51e0 --- /dev/null +++ b/packages/eslint-config/node.mjs @@ -0,0 +1,10 @@ +import globals from 'globals'; + +/** @type {import('eslint').Linter.FlatConfig} */ +export default { + languageOptions: { + globals: { + ...globals.node, + }, + }, +}; diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index c681f44e4a88b..b390d42d65884 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -13,7 +13,15 @@ "/node", "/style", "/variables", - "react.js" + "react.js", + "best-practices.mjs", + "errors.mjs", + "es6.mjs", + "flat.mjs", + "imports.mjs", + "node.mjs", + "style.mjs", + "variables.mjs" ], "scripts": { "lint": "eslint .", @@ -34,6 +42,7 @@ "eslint-plugin-jest": "~28.8.3", "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-prettier": "~5.2.6", + "globals": "~17.3.0", "prettier": "~3.3.3" }, "devDependencies": { diff --git a/packages/eslint-config/style.mjs b/packages/eslint-config/style.mjs new file mode 100644 index 0000000000000..03796f22ee846 --- /dev/null +++ b/packages/eslint-config/style.mjs @@ -0,0 +1,474 @@ +/** @type {import('eslint').Linter.FlatConfig} */ +export default { + rules: { + // enforce line breaks after opening and before closing array brackets + // https://eslint.org/docs/rules/array-bracket-newline + // TODO: enable? semver-major + // 'array-bracket-newline': ['off', 'consistent'], // object option alternative: { multiline: true, minItems: 3 } + + // // enforce line breaks between array elements + // // https://eslint.org/docs/rules/array-element-newline + // // TODO: enable? semver-major + // 'array-element-newline': ['off', { multiline: true, minItems: 3 }], + + // enforce spacing inside array brackets + 'array-bracket-spacing': ['error', 'never'], + + // enforce spacing inside single-line blocks + // https://eslint.org/docs/rules/block-spacing + 'block-spacing': 'error', + + // enforce one true brace style + 'brace-style': ['error', '1tbs', { allowSingleLine: true }], + + // // require camel case names + // // TODO: semver-major (eslint 5): add ignoreDestructuring: false option + // camelcase: ['error', { properties: 'never' }], + + // // enforce or disallow capitalization of the first letter of a comment + // // https://eslint.org/docs/rules/capitalized-comments + // 'capitalized-comments': ['off', 'never', { + // line: { + // ignorePattern: '.*', + // ignoreInlineComments: true, + // ignoreConsecutiveComments: true, + // }, + // block: { + // ignorePattern: '.*', + // ignoreInlineComments: true, + // ignoreConsecutiveComments: true, + // }, + // }], + + // require trailing commas in multiline object literals + 'comma-dangle': ['error', 'always-multiline'], + + // enforce spacing before and after comma + 'comma-spacing': 'error', + + // enforce one true comma style + 'comma-style': 'error', + + // disallow padding inside computed properties + 'computed-property-spacing': ['error', 'never'], + + // // enforces consistent naming when capturing the current execution context + // 'consistent-this': 'off', + + // enforce newline at the end of file, with no multiple empty lines + 'eol-last': ['error', 'always'], + + // enforce spacing between functions and their invocations + // https://eslint.org/docs/rules/func-call-spacing + 'func-call-spacing': ['error', 'never'], + + // // requires function names to match the name of the variable or property to which they are + // // assigned + // // https://eslint.org/docs/rules/func-name-matching + // // TODO: semver-major (eslint 5): add considerPropertyDescriptor: true + // 'func-name-matching': ['off', 'always', { + // includeCommonJSModuleExports: false + // }], + + // // require function expressions to have a name + // // https://eslint.org/docs/rules/func-names + // 'func-names': 'warn', + + // // enforces use of function declarations or expressions + // // https://eslint.org/docs/rules/func-style + // // TODO: enable + // 'func-style': ['off', 'expression'], + + // // enforce consistent line breaks inside function parentheses + // // https://eslint.org/docs/rules/function-paren-newline + // 'function-paren-newline': ['error', 'consistent'], + + // // Blacklist certain identifiers to prevent them being used + // // https://eslint.org/docs/rules/id-blacklist + // 'id-blacklist': 'off', + + // // this option enforces minimum and maximum identifier lengths + // // (variable names, property names etc.) + // 'id-length': 'off', + + // // require identifiers to match the provided regular expression + // 'id-match': 'off', + + // Enforce the location of arrow function bodies with implicit returns + // https://eslint.org/docs/rules/implicit-arrow-linebreak + // 'implicit-arrow-linebreak': ['error', 'beside'], + + // this option sets a specific tab width for your code + // https://eslint.org/docs/rules/indent + 'indent': ['error', 'tab', { SwitchCase: 1 }], + + // // specify whether double or single quotes should be used in JSX attributes + // // https://eslint.org/docs/rules/jsx-quotes + // 'jsx-quotes': ['off', 'prefer-double'], + + // enforces spacing between keys and values in object literal properties + 'key-spacing': ['error', { beforeColon: false, afterColon: true }], + + // require a space before & after certain keywords + 'keyword-spacing': 'error', + + // // enforce position of line comments + // // https://eslint.org/docs/rules/line-comment-position + // // TODO: enable? + // 'line-comment-position': ['off', { + // position: 'above', + // ignorePattern: '', + // applyDefaultPatterns: true, + // }], + + // disallow mixed 'LF' and 'CRLF' as linebreaks + // https://eslint.org/docs/rules/linebreak-style + 'linebreak-style': ['error', 'unix'], + + // require or disallow an empty line between class members + // https://eslint.org/docs/rules/lines-between-class-members + 'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: false }], + + // // enforces empty lines around comments + // 'lines-around-comment': 'off', + + // require or disallow newlines around directives + // https://eslint.org/docs/rules/lines-around-directive + 'lines-around-directive': [ + 'error', + { + before: 'always', + after: 'always', + }, + ], + + // specify the maximum depth that blocks can be nested + 'max-depth': ['off', 4], + + // // specify the maximum length of a line in your program + // // https://eslint.org/docs/rules/max-len + // 'max-len': ['error', 100, 2, { + // ignoreUrls: true, + // ignoreComments: false, + // ignoreRegExpLiterals: true, + // ignoreStrings: true, + // ignoreTemplateLiterals: true, + // }], + + // // specify the max number of lines in a file + // // https://eslint.org/docs/rules/max-lines + // 'max-lines': ['off', { + // max: 300, + // skipBlankLines: true, + // skipComments: true + // }], + + // // enforce a maximum function length + // // https://eslint.org/docs/rules/max-lines-per-function + // 'max-lines-per-function': ['off', { + // max: 50, + // skipBlankLines: true, + // skipComments: true, + // IIFEs: true, + // }], + + // // specify the maximum depth callbacks can be nested + // 'max-nested-callbacks': 'off', + + // // limits the number of parameters that can be used in the function declaration. + // 'max-params': ['off', 3], + + // // specify the maximum number of statement allowed in a function + // 'max-statements': ['off', 10], + + // // restrict the number of statements per line + // // https://eslint.org/docs/rules/max-statements-per-line + // 'max-statements-per-line': ['off', { max: 1 }], + + // // enforce a particular style for multiline comments + // // https://eslint.org/docs/rules/multiline-comment-style + // 'multiline-comment-style': ['off', 'starred-block'], + + // // require multiline ternary + // // https://eslint.org/docs/rules/multiline-ternary + // // TODO: enable? + // 'multiline-ternary': ['off', 'never'], + + // require a capital letter for constructors + 'new-cap': [ + 'error', + { + capIsNewExceptions: [ + 'Match.Optional', + 'Match.Maybe', + 'Match.OneOf', + 'Match.Where', + 'Match.ObjectIncluding', + 'Push.Configure', + 'SHA256', + ], + }, + ], + + // disallow the omission of parentheses when invoking a constructor with no arguments + // https://eslint.org/docs/rules/new-parens + 'new-parens': 'error', + + // // allow/disallow an empty newline after var statement + // 'newline-after-var': 'off', + + // // https://eslint.org/docs/rules/newline-before-return + // 'newline-before-return': 'off', + + // // enforces new line after each method call in the chain to make it + // // more readable and easy to maintain + // // https://eslint.org/docs/rules/newline-per-chained-call + // 'newline-per-chained-call': ['error', { ignoreChainWithDepth: 4 }], + + // disallow use of the Array constructor + 'no-array-constructor': 'error', + + // // disallow use of bitwise operators + // // https://eslint.org/docs/rules/no-bitwise + // 'no-bitwise': 'error', + + // // disallow use of the continue statement + // // https://eslint.org/docs/rules/no-continue + // 'no-continue': 'error', + + // // disallow comments inline after code + // 'no-inline-comments': 'off', + + // disallow if as the only statement in an else block + // https://eslint.org/docs/rules/no-lonely-if + 'no-lonely-if': 'error', + + // disallow un-paren'd mixes of different operators + // https://eslint.org/docs/rules/no-mixed-operators + 'no-mixed-operators': [ + 'error', + { + // the list of arthmetic groups disallows mixing `%` and `**` + // with other arithmetic operators. + groups: [ + ['%', '**'], + ['%', '+'], + ['%', '-'], + ['%', '*'], + ['%', '/'], + ['**', '+'], + ['**', '-'], + ['**', '*'], + ['**', '/'], + ['&', '|', '^', '~', '<<', '>>', '>>>'], + ['==', '!=', '===', '!==', '>', '>=', '<', '<='], + ['&&', '||'], + ['in', 'instanceof'], + ], + allowSamePrecedence: false, + }, + ], + + // disallow mixed spaces and tabs for indentation + 'no-mixed-spaces-and-tabs': 'error', + + // disallow use of chained assignment expressions + // https://eslint.org/docs/rules/no-multi-assign + 'no-multi-assign': ['error'], + + // disallow multiple empty lines and only one newline at the end + 'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0 }], + + // // disallow negated conditions + // // https://eslint.org/docs/rules/no-negated-condition + // 'no-negated-condition': 'off', + + // disallow nested ternary expressions + 'no-nested-ternary': 'error', + + // // disallow use of the Object constructor + // 'no-new-object': 'error', + + // // disallow use of unary operators, ++ and -- + // // https://eslint.org/docs/rules/no-plusplus + // 'no-plusplus': 'error', + + // // disallow certain syntax forms + // // https://eslint.org/docs/rules/no-restricted-syntax + // 'no-restricted-syntax': [ + // 'error', + // { + // selector: 'ForInStatement', + // message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.', + // }, + // { + // selector: 'ForOfStatement', + // message: 'iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.', + // }, + // { + // selector: 'LabeledStatement', + // message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.', + // }, + // { + // selector: 'WithStatement', + // message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.', + // }, + // ], + + // disallow space between function identifier and application + 'no-spaced-func': 'error', + + // // disallow tab characters entirely + // 'no-tabs': 'error', + + // // disallow the use of ternary operators + // 'no-ternary': 'off', + + // disallow trailing whitespace at the end of lines + 'no-trailing-spaces': [ + 'error', + { + skipBlankLines: false, + ignoreComments: false, + }, + ], + + // // disallow dangling underscores in identifiers + // // https://eslint.org/docs/rules/no-underscore-dangle + // 'no-underscore-dangle': ['error', { + // allow: [], + // allowAfterThis: false, + // allowAfterSuper: false, + // enforceInMethodNames: true, + // }], + + // disallow the use of Boolean literals in conditional expressions + // also, prefer `a || b` over `a ? a : b` + // https://eslint.org/docs/rules/no-unneeded-ternary + 'no-unneeded-ternary': ['error', { defaultAssignment: false }], + + // disallow whitespace before properties + // https://eslint.org/docs/rules/no-whitespace-before-property + 'no-whitespace-before-property': 'error', + + // // enforce the location of single-line statements + // // https://eslint.org/docs/rules/nonblock-statement-body-position + // 'nonblock-statement-body-position': ['error', 'beside', { overrides: {} }], + + // require padding inside curly braces + 'object-curly-spacing': ['error', 'always'], + + // // enforce line breaks between braces + // // https://eslint.org/docs/rules/object-curly-newline + // 'object-curly-newline': ['error', { + // ObjectExpression: { minProperties: 4, multiline: true, consistent: true }, + // ObjectPattern: { minProperties: 4, multiline: true, consistent: true }, + // ImportDeclaration: { minProperties: 4, multiline: true, consistent: true }, + // ExportDeclaration: { minProperties: 4, multiline: true, consistent: true }, + // }], + + // enforce "same line" or "multiple line" on object properties. + // https://eslint.org/docs/rules/object-property-newline + 'object-property-newline': [ + 'error', + { + allowAllPropertiesOnSameLine: true, + }, + ], + + // allow just one var statement per function + 'one-var': ['error', 'never'], + + // // require a newline around variable declaration + // // https://eslint.org/docs/rules/one-var-declaration-per-line + // 'one-var-declaration-per-line': ['error', 'always'], + + // require assignment operator shorthand where possible or prohibit it entirely + // https://eslint.org/docs/rules/operator-assignment + 'operator-assignment': ['error', 'always'], + + // Requires operator at the beginning of the line in multiline statements + // https://eslint.org/docs/rules/operator-linebreak + 'operator-linebreak': ['error', 'before', { overrides: { '=': 'none' } }], + + // disallow padding within blocks + 'padded-blocks': ['error', { blocks: 'never', classes: 'never', switches: 'never' }], + + // // Require or disallow padding lines between statements + // // https://eslint.org/docs/rules/padding-line-between-statements + // 'padding-line-between-statements': 'off', + + // Prefer use of an object spread over Object.assign + // https://eslint.org/docs/rules/prefer-object-spread + // TODO: semver-major (eslint 5): enable + 'prefer-object-spread': 'off', + + // require quotes around object literal property names + // https://eslint.org/docs/rules/quote-props.html + 'quote-props': ['error', 'as-needed', { keywords: false, unnecessary: true, numbers: false }], + + // specify whether double or single quotes should be used + 'quotes': ['error', 'single', { avoidEscape: true }], + + // // do not require jsdoc + // // https://eslint.org/docs/rules/require-jsdoc + // 'require-jsdoc': 'off', + + // require or disallow use of semicolons instead of ASI + 'semi': ['error', 'always'], + + // enforce spacing before and after semicolons + 'semi-spacing': ['error', { before: false, after: true }], + + // Enforce location of semicolons + // https://eslint.org/docs/rules/semi-style + 'semi-style': ['error', 'last'], + + // // requires object keys to be sorted + // 'sort-keys': ['off', 'asc', { caseSensitive: false, natural: true }], + + // // sort variables within the same declaration block + // 'sort-vars': 'off', + + // require or disallow space before blocks + 'space-before-blocks': ['error', 'always'], + + // require or disallow space before function opening parenthesis + // https://eslint.org/docs/rules/space-before-function-paren + 'space-before-function-paren': ['error', { anonymous: 'never', named: 'never', asyncArrow: 'always' }], + + // require or disallow spaces inside parentheses + 'space-in-parens': ['error', 'never'], + + // require spaces around operators + 'space-infix-ops': 'error', + + // // Require or disallow spaces before/after unary operators + // // https://eslint.org/docs/rules/space-unary-ops + // 'space-unary-ops': ['error', { + // words: true, + // nonwords: false, + // overrides: { + // }, + // }], + + // require or disallow a space immediately following the // or /* in a comment + // https://eslint.org/docs/rules/spaced-comment + 'spaced-comment': 'error', + + // Enforce spacing around colons of switch statements + // https://eslint.org/docs/rules/switch-colon-spacing + 'switch-colon-spacing': ['error', { after: true, before: false }], + + // // Require or disallow spacing between template tags and their literals + // // https://eslint.org/docs/rules/template-tag-spacing + // 'template-tag-spacing': ['error', 'never'], + + // // require or disallow the Unicode Byte Order Mark + // // https://eslint.org/docs/rules/unicode-bom + // 'unicode-bom': ['error', 'never'], + + // // require regex literals to be wrapped in parentheses + // 'wrap-regex': 'off' + }, +}; diff --git a/packages/eslint-config/variables.mjs b/packages/eslint-config/variables.mjs new file mode 100644 index 0000000000000..5c4fa119ea20b --- /dev/null +++ b/packages/eslint-config/variables.mjs @@ -0,0 +1,50 @@ +/** @type {import('eslint').Linter.FlatConfig} */ +export default { + rules: { + // enforce or disallow variable initializations at definition + // 'init-declarations': 'off', + + // // disallow the catch clause parameter name being the same as a variable in the outer scope + // 'no-catch-shadow': 'off', + + // disallow deletion of variables + 'no-delete-var': 'error', + + // // disallow labels that share a name with a variable + // // https://eslint.org/docs/rules/no-label-var + // 'no-label-var': 'error', + + // // disallow specific globals + // 'no-restricted-globals': ['error', 'isFinite', 'isNaN'].concat(restrictedGlobals), + + // // disallow declaration of variables already declared in the outer scope + // 'no-shadow': 'error', + + // // disallow shadowing of names such as arguments + // 'no-shadow-restricted-names': 'error', + + // disallow use of undeclared variables unless mentioned in a /*global */ block + 'no-undef': 'error', + + // // disallow use of undefined when initializing variables + // 'no-undef-init': 'error', + + // // disallow use of undefined variable + // // https://eslint.org/docs/rules/no-undefined + // // TODO: enable? + // 'no-undefined': 'off', + + // disallow declaration of variables that are not used in the code + 'no-unused-vars': [ + 'error', + { + vars: 'all', + args: 'after-used', + ignoreRestSiblings: true, + }, + ], + + // disallow use of variables before they are defined + 'no-use-before-define': ['error', { functions: true, classes: true, variables: true }], + }, +}; diff --git a/packages/favicon/.eslintrc.json b/packages/favicon/.eslintrc.json deleted file mode 100644 index c5735e3561386..0000000000000 --- a/packages/favicon/.eslintrc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"], - "rules": { - "@typescript-eslint/explicit-function-return-type": "off" - } -} diff --git a/packages/fuselage-ui-kit/.eslintrc.json b/packages/fuselage-ui-kit/.eslintrc.json deleted file mode 100644 index cedd3043b0bd0..0000000000000 --- a/packages/fuselage-ui-kit/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], - "ignorePatterns": ["dist", "storybook-static", "!.storybook"], - "overrides": [ - { - "files": ["**/*.ts", "**/*.tsx"], - "rules": { - "@typescript-eslint/no-misused-promises": "off" - } - } - ] -} diff --git a/packages/gazzodown/.eslintrc.json b/packages/gazzodown/.eslintrc.json deleted file mode 100644 index da7aa206856ef..0000000000000 --- a/packages/gazzodown/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], - "ignorePatterns": ["dist", "storybook-static", "!.storybook"] -} diff --git a/packages/http-router/.eslintrc.json b/packages/http-router/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/http-router/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/i18n/.eslintrc.json b/packages/i18n/.eslintrc.json deleted file mode 100644 index f27fe59dc9222..0000000000000 --- a/packages/i18n/.eslintrc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "plugins": ["jest"], - "env": { - "jest/globals": true - }, - "ignorePatterns": ["dist"] -} diff --git a/packages/instance-status/.eslintrc.json b/packages/instance-status/.eslintrc.json deleted file mode 100644 index c36ef5941c077..0000000000000 --- a/packages/instance-status/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "overrides": [ - { - "files": ["**/*.spec.js", "**/*.spec.jsx"], - "env": { - "jest": true - } - } - ], - "ignorePatterns": ["dist"] -} diff --git a/packages/jest-presets/.eslintrc.json b/packages/jest-presets/.eslintrc.json deleted file mode 100644 index 7250665ca644a..0000000000000 --- a/packages/jest-presets/.eslintrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/eslintrc", - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["/dist/**", "/client/**", "/server/**"] -} diff --git a/packages/jwt/.eslintrc.json b/packages/jwt/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/jwt/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/livechat/.eslintrc.json b/packages/livechat/.eslintrc.json deleted file mode 100644 index 5bb0e762329aa..0000000000000 --- a/packages/livechat/.eslintrc.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config", "prettier", "plugin:storybook/recommended"], - "plugins": ["react", "react-hooks", "prettier"], - "env": { - "jest": true - }, - "rules": { - "import/order": [ - "error", - { - "newlines-between": "always", - "groups": ["builtin", "external", "internal", ["parent", "sibling", "index"]], - "alphabetize": { - "order": "asc" - } - } - ], - "jsx-a11y/alt-text": "off", - "jsx-a11y/click-events-have-key-events": "off", - "jsx-a11y/media-has-caption": "off", - "jsx-a11y/no-static-element-interactions": "off", - "jsx-quotes": ["error", "prefer-single"], - "react/jsx-curly-brace-presence": "off", - "react/display-name": [ - "warn", - { - "ignoreTranspilerName": false - } - ], - "react/jsx-fragments": ["error", "syntax"], - "react/jsx-key": "off", - "react/jsx-no-bind": [ - "warn", - { - "ignoreRefs": true, - "allowFunctions": true, - "allowArrowFunctions": true - } - ], - "react/jsx-no-comment-textnodes": "error", - "react/jsx-no-duplicate-props": "error", - "react/jsx-no-target-blank": "error", - "react/jsx-no-undef": "error", - "react/jsx-tag-spacing": [ - "error", - { - "beforeSelfClosing": "always" - } - ], - "react/jsx-uses-react": "error", - "react/jsx-uses-vars": "error", - "react/no-children-prop": "error", - "react/no-danger": "warn", - "react/no-deprecated": "error", - "react/no-did-mount-set-state": "error", - "react/no-did-update-set-state": "error", - "react/no-find-dom-node": "error", - "react/no-is-mounted": "error", - "react/no-multi-comp": "off", - "react/no-string-refs": "error", - "react/prefer-es6-class": "error", - "react/prefer-stateless-function": "warn", - "react/require-render-return": "error", - "react/self-closing-comp": "error", - "react-hooks/rules-of-hooks": "error", - "react-hooks/exhaustive-deps": "warn", - "no-sequences": "off", - "no-extra-parens": "off" - }, - "settings": { - "import/resolver": { - "node": { - "extensions": [".js", ".ts", ".tsx"] - } - }, - "react": { - "pragma": "h", - "pragmaFrag": "Fragment", - "version": "detect" - } - }, - "ignorePatterns": ["dist", "build", "!.storybook"], - "overrides": [ - { - "files": ["*.ts", "*.tsx"], - "rules": { - "@typescript-eslint/naming-convention": [ - "error", - { "selector": "variableLike", "format": ["camelCase"], "leadingUnderscore": "allow" }, - { - "selector": ["variable"], - "format": ["camelCase", "UPPER_CASE", "PascalCase"], - "leadingUnderscore": "allowSingleOrDouble" - }, - { - "selector": ["function"], - "format": ["camelCase", "PascalCase"], - "leadingUnderscore": "allowSingleOrDouble" - }, - { - "selector": "parameter", - "format": ["camelCase"], - "modifiers": ["unused"], - "leadingUnderscore": "require" - } - ], - "@typescript-eslint/no-misused-promises": "off" - } - } - ] -} diff --git a/packages/log-format/.eslintrc.json b/packages/log-format/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/log-format/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/logger/.eslintrc.json b/packages/logger/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/logger/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/media-signaling/.eslintrc.json b/packages/media-signaling/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/media-signaling/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/message-parser/.eslintrc.json b/packages/message-parser/.eslintrc.json deleted file mode 100644 index 0ae720da7f0f4..0000000000000 --- a/packages/message-parser/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "@rocket.chat/eslint-config", - "ignorePatterns": ["dist"] -} diff --git a/packages/message-types/.eslintrc.json b/packages/message-types/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/message-types/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/mock-providers/.eslintrc.json b/packages/mock-providers/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/mock-providers/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/model-typings/.eslintrc.json b/packages/model-typings/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/model-typings/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/models/.eslintrc.json b/packages/models/.eslintrc.json deleted file mode 100644 index f4c3ce2587c9e..0000000000000 --- a/packages/models/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist", "coverage"] -} diff --git a/packages/mongo-adapter/.eslintrc.json b/packages/mongo-adapter/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/mongo-adapter/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/omni-core/.eslintrc.json b/packages/omni-core/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/omni-core/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/password-policies/.eslintrc.json b/packages/password-policies/.eslintrc.json deleted file mode 100644 index f27fe59dc9222..0000000000000 --- a/packages/password-policies/.eslintrc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "plugins": ["jest"], - "env": { - "jest/globals": true - }, - "ignorePatterns": ["dist"] -} diff --git a/packages/patch-injection/.eslintrc.json b/packages/patch-injection/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/patch-injection/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/peggy-loader/.eslintrc.json b/packages/peggy-loader/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/peggy-loader/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/random/.eslintrc.json b/packages/random/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/random/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/release-action/.eslintrc.json b/packages/release-action/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/release-action/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/release-changelog/.eslintrc.json b/packages/release-changelog/.eslintrc.json deleted file mode 100644 index f27fe59dc9222..0000000000000 --- a/packages/release-changelog/.eslintrc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "plugins": ["jest"], - "env": { - "jest/globals": true - }, - "ignorePatterns": ["dist"] -} diff --git a/packages/rest-typings/.eslintrc.json b/packages/rest-typings/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/rest-typings/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/server-cloud-communication/.eslintrc.json b/packages/server-cloud-communication/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/server-cloud-communication/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/server-fetch/.eslintrc.json b/packages/server-fetch/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/server-fetch/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/sha256/.eslintrc.json b/packages/sha256/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/sha256/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/storybook-config/.eslintrc.json b/packages/storybook-config/.eslintrc.json deleted file mode 100644 index cc6ff6d22bd83..0000000000000 --- a/packages/storybook-config/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["**/dist", "*.d.ts", "*.js"] -} diff --git a/packages/tools/.eslintrc.json b/packages/tools/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/tools/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/tracing/.eslintrc.json b/packages/tracing/.eslintrc.json deleted file mode 100644 index 9ec331f09b5e3..0000000000000 --- a/packages/tracing/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"] -} diff --git a/packages/ui-avatar/.eslintrc.json b/packages/ui-avatar/.eslintrc.json deleted file mode 100644 index 7aa666a468deb..0000000000000 --- a/packages/ui-avatar/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist", "storybook-static", "!.storybook"] -} diff --git a/packages/ui-client/.eslintrc.json b/packages/ui-client/.eslintrc.json deleted file mode 100644 index cedd3043b0bd0..0000000000000 --- a/packages/ui-client/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], - "ignorePatterns": ["dist", "storybook-static", "!.storybook"], - "overrides": [ - { - "files": ["**/*.ts", "**/*.tsx"], - "rules": { - "@typescript-eslint/no-misused-promises": "off" - } - } - ] -} diff --git a/packages/ui-composer/.eslintrc.json b/packages/ui-composer/.eslintrc.json deleted file mode 100644 index da7aa206856ef..0000000000000 --- a/packages/ui-composer/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], - "ignorePatterns": ["dist", "storybook-static", "!.storybook"] -} diff --git a/packages/ui-contexts/.eslintrc.json b/packages/ui-contexts/.eslintrc.json deleted file mode 100644 index 77020c41c8556..0000000000000 --- a/packages/ui-contexts/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config"], - "ignorePatterns": ["dist"], - "overrides": [ - { - "files": ["**/*.ts", "**/*.tsx"], - "rules": { - "@typescript-eslint/no-misused-promises": "off" - } - } - ] -} diff --git a/packages/ui-kit/.eslintrc.json b/packages/ui-kit/.eslintrc.json deleted file mode 100644 index 0ae720da7f0f4..0000000000000 --- a/packages/ui-kit/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "@rocket.chat/eslint-config", - "ignorePatterns": ["dist"] -} diff --git a/packages/ui-video-conf/.eslintrc.json b/packages/ui-video-conf/.eslintrc.json deleted file mode 100644 index da7aa206856ef..0000000000000 --- a/packages/ui-video-conf/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], - "ignorePatterns": ["dist", "storybook-static", "!.storybook"] -} diff --git a/packages/ui-voip/.eslintrc.json b/packages/ui-voip/.eslintrc.json deleted file mode 100644 index cedd3043b0bd0..0000000000000 --- a/packages/ui-voip/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], - "ignorePatterns": ["dist", "storybook-static", "!.storybook"], - "overrides": [ - { - "files": ["**/*.ts", "**/*.tsx"], - "rules": { - "@typescript-eslint/no-misused-promises": "off" - } - } - ] -} diff --git a/packages/web-ui-registration/.eslintrc.json b/packages/web-ui-registration/.eslintrc.json deleted file mode 100644 index cedd3043b0bd0..0000000000000 --- a/packages/web-ui-registration/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["@rocket.chat/eslint-config", "plugin:storybook/recommended"], - "ignorePatterns": ["dist", "storybook-static", "!.storybook"], - "overrides": [ - { - "files": ["**/*.ts", "**/*.tsx"], - "rules": { - "@typescript-eslint/no-misused-promises": "off" - } - } - ] -} diff --git a/yarn.lock b/yarn.lock index 414cc5941a2dd..d401dab6f1e38 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8318,6 +8318,7 @@ __metadata: eslint-plugin-jest: "npm:~28.8.3" eslint-plugin-jsx-a11y: "npm:^6.10.2" eslint-plugin-prettier: "npm:~5.2.6" + globals: "npm:~17.3.0" prettier: "npm:~3.3.3" typescript: "npm:~5.9.3" languageName: unknown @@ -22304,6 +22305,13 @@ __metadata: languageName: node linkType: hard +"globals@npm:~17.3.0": + version: 17.3.0 + resolution: "globals@npm:17.3.0" + checksum: 10/44ba2b7db93eb6a2531dfba09219845e21f2e724a4f400eb59518b180b7d5bcf7f65580530e3d3023d7dc2bdbacf5d265fd87c393f567deb9a2b0472b51c9d5e + languageName: node + linkType: hard + "globalthis@npm:^1.0.4": version: 1.0.4 resolution: "globalthis@npm:1.0.4" @@ -32279,6 +32287,8 @@ __metadata: "@types/js-yaml": "npm:^4.0.9" "@types/node": "npm:~22.16.5" "@types/stream-buffers": "npm:^3.0.8" + eslint-plugin-no-floating-promise: "npm:~2.0.0" + eslint-plugin-you-dont-need-lodash-underscore: "npm:~6.14.0" node-gyp: "npm:^10.2.0" ts-node: "npm:^10.9.2" turbo: "npm:~2.8.11" From 95801cd6b00593d5be591f06137e805fd6fe9cd3 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Tue, 24 Feb 2026 01:39:50 -0300 Subject: [PATCH 07/25] chore(eslint): compact configs a little bit --- eslint.config.mjs | 212 +++----------------------------- packages/eslint-config/flat.mjs | 20 ++- 2 files changed, 26 insertions(+), 206 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index e9226ac945100..dbb21735e6bd5 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -25,15 +25,12 @@ export default [ 'apps/meteor/**/public', 'apps/meteor/**/private/moment-locales', 'apps/meteor/**/imports', - 'apps/meteor/**/ee/server/services/dist', '!apps/meteor/**/.mocharc.js', '!apps/meteor/**/.mocharc.*.js', '!apps/meteor/**/.scripts', '!apps/meteor/**/.storybook', 'apps/meteor/**/storybook-static', 'apps/meteor/**/packages', - 'apps/meteor/**/coverage', - 'apps/meteor/**/dist', ], }, { @@ -45,6 +42,7 @@ export default [ Assets: 'readonly', chrome: 'readonly', jscolor: 'readonly', + ...globals.browser, }, }, plugins: { @@ -350,7 +348,6 @@ export default [ }, { ignores: [ - 'apps/uikit-playground/dist', 'apps/uikit-playground/build', 'apps/uikit-playground/storybook-static', '!apps/uikit-playground/.jest', @@ -366,14 +363,6 @@ export default [ 'apps/uikit-playground/yarn-error.log*', ], }, - { - ignores: ['ee/apps/account-service/dist'], - languageOptions: { - globals: { - ...globals.jest, - }, - }, - }, { files: ['ee/apps/account-service/**/*.spec.js', 'ee/apps/account-service/**/*.spec.jsx'], languageOptions: { @@ -382,14 +371,6 @@ export default [ }, }, }, - { - ignores: ['ee/apps/authorization-service/dist'], - languageOptions: { - globals: { - ...globals.jest, - }, - }, - }, { files: ['ee/apps/authorization-service/**/*.spec.js', 'ee/apps/authorization-service/**/*.spec.jsx'], languageOptions: { @@ -398,14 +379,6 @@ export default [ }, }, }, - { - ignores: ['ee/apps/ddp-streamer/dist'], - languageOptions: { - globals: { - ...globals.jest, - }, - }, - }, { files: ['ee/apps/ddp-streamer/**/*.spec.js', 'ee/apps/ddp-streamer/**/*.spec.jsx'], languageOptions: { @@ -414,17 +387,6 @@ export default [ }, }, }, - { - ignores: ['ee/apps/omnichannel-transcript/dist'], - }, - { - ignores: ['ee/apps/presence-service/dist'], - languageOptions: { - globals: { - ...globals.jest, - }, - }, - }, { files: ['ee/apps/presence-service/**/*.spec.js', 'ee/apps/presence-service/**/*.spec.jsx'], languageOptions: { @@ -434,49 +396,10 @@ export default [ }, }, { - ignores: ['ee/apps/queue-worker/dist'], + ignores: ['ee/packages/federation-matrix/src/api/.well-known/server.ts'], }, { - ignores: ['ee/packages/abac/dist'], - }, - { - ignores: ['ee/packages/federation-matrix/dist', 'ee/packages/federation-matrix/src/api/.well-known/server.ts'], - }, - { - ignores: ['ee/packages/license/dist'], - }, - { - ignores: ['ee/packages/media-calls/dist'], - }, - { - ignores: ['ee/packages/network-broker/dist'], - }, - { - ignores: ['ee/packages/omni-core-ee/dist'], - }, - { - ignores: ['ee/packages/omnichannel-services/dist'], - }, - { - ignores: ['ee/packages/pdf-worker/dist', '!ee/packages/pdf-worker/.storybook'], - }, - { - ignores: ['ee/packages/presence/dist'], - }, - { - ignores: ['ee/packages/ui-theming/dist'], - }, - { - ignores: ['packages/account-utils/dist'], - }, - { - ignores: ['packages/agenda/dist'], - }, - { - ignores: ['packages/api-client/dist'], - }, - { - ignores: ['packages/apps/dist'], + ignores: ['!ee/packages/pdf-worker/.storybook'], }, { files: ['packages/apps-engine/**/*'], @@ -553,18 +476,8 @@ export default [ 'packages/apps-engine/**/.deno-cache/**/*', ], }, - { - ignores: ['packages/base64/dist'], - }, - { - ignores: ['packages/cas-validate/dist'], - }, - { - ignores: ['packages/core-services/dist'], - }, { files: ['packages/core-typings/**/*'], - ignores: ['packages/core-typings/dist'], rules: { '@typescript-eslint/no-empty-interface': 'off', }, @@ -577,12 +490,8 @@ export default [ }, }, }, - { - ignores: ['packages/cron/dist'], - }, { files: ['packages/ddp-client/**/*'], - ignores: ['packages/ddp-client/**/dist', 'packages/ddp-client/**/coverage'], rules: { '@typescript-eslint/naming-convention': [ 'error', @@ -606,18 +515,14 @@ export default [ ], }, }, - { - ignores: ['packages/desktop-api/dist'], - }, { files: ['packages/favicon/**/*'], - ignores: ['packages/favicon/dist'], rules: { '@typescript-eslint/explicit-function-return-type': 'off', }, }, { - ignores: ['packages/fuselage-ui-kit/dist', 'packages/fuselage-ui-kit/storybook-static', '!packages/fuselage-ui-kit/.storybook'], + ignores: ['packages/fuselage-ui-kit/storybook-static', '!packages/fuselage-ui-kit/.storybook'], }, { files: ['packages/fuselage-ui-kit/**/*.ts', 'packages/fuselage-ui-kit/**/*.tsx'], @@ -626,16 +531,7 @@ export default [ }, }, { - ignores: ['packages/gazzodown/dist', 'packages/gazzodown/storybook-static', '!packages/gazzodown/.storybook'], - }, - { - ignores: ['packages/http-router/dist'], - }, - { - ignores: ['packages/i18n/dist'], - }, - { - ignores: ['packages/instance-status/dist'], + ignores: ['packages/gazzodown/storybook-static', '!packages/gazzodown/.storybook'], }, { files: ['packages/instance-status/**/*.spec.js', 'packages/instance-status/**/*.spec.jsx'], @@ -646,14 +542,16 @@ export default [ }, }, { - ignores: ['packages/jest-presets/dist/**', 'packages/jest-presets/client/**', 'packages/jest-presets/server/**'], - }, - { - ignores: ['packages/jwt/dist'], + ignores: ['packages/jest-presets/client/**', 'packages/jest-presets/server/**'], }, { files: ['packages/livechat/**/*'], - ignores: ['packages/livechat/dist', 'packages/livechat/storybook-static', '!packages/livechat/.storybook'], + ignores: ['packages/livechat/storybook-static', '!packages/livechat/.storybook'], + languageOptions: { + globals: { + ...globals.browser, + }, + }, settings: { 'import/resolver': { node: { @@ -756,66 +654,22 @@ export default [ '@typescript-eslint/no-misused-promises': 'off', }, }, - { - ignores: ['packages/log-format/dist'], - }, - { - ignores: ['packages/logger/dist'], - }, - { - ignores: ['packages/media-signaling/dist'], - }, - { - ignores: ['packages/message-parser/dist'], - }, - { - ignores: ['packages/message-types/dist'], - }, - { - ignores: ['packages/mock-providers/dist'], - }, - { - ignores: ['packages/model-typings/dist'], - }, - { - ignores: ['packages/models/dist', 'packages/models/coverage'], - }, - { - ignores: ['packages/mongo-adapter/dist'], - }, - { - ignores: ['packages/omni-core/dist'], - }, { files: ['packages/password-policies/**/*'], plugins: { jest: jestPlugin, }, - ignores: ['packages/password-policies/dist'], languageOptions: { globals: { ...globals.jest, }, }, }, - { - ignores: ['packages/patch-injection/dist'], - }, - { - ignores: ['packages/peggy-loader/dist'], - }, - { - ignores: ['packages/random/dist'], - }, - { - ignores: ['packages/release-action/dist'], - }, { files: ['packages/release-changelog/**/*'], plugins: { jest: jestPlugin, }, - ignores: ['packages/release-changelog/dist'], languageOptions: { globals: { ...globals.jest, @@ -823,31 +677,13 @@ export default [ }, }, { - ignores: ['packages/rest-typings/dist'], - }, - { - ignores: ['packages/server-cloud-communication/dist'], + ignores: ['packages/storybook-config/*.d.ts', 'packages/storybook-config/*.js'], }, { - ignores: ['packages/server-fetch/dist'], + ignores: ['packages/ui-avatar/storybook-static', '!packages/ui-avatar/.storybook'], }, { - ignores: ['packages/sha256/dist'], - }, - { - ignores: ['packages/storybook-config/**/dist', 'packages/storybook-config/*.d.ts', 'packages/storybook-config/*.js'], - }, - { - ignores: ['packages/tools/dist'], - }, - { - ignores: ['packages/tracing/dist'], - }, - { - ignores: ['packages/ui-avatar/dist', 'packages/ui-avatar/storybook-static', '!packages/ui-avatar/.storybook'], - }, - { - ignores: ['packages/ui-client/dist', 'packages/ui-client/storybook-static', '!packages/ui-client/.storybook'], + ignores: ['packages/ui-client/storybook-static', '!packages/ui-client/.storybook'], }, { files: ['packages/ui-client/**/*.ts', 'packages/ui-client/**/*.tsx'], @@ -856,10 +692,7 @@ export default [ }, }, { - ignores: ['packages/ui-composer/dist', 'packages/ui-composer/storybook-static', '!packages/ui-composer/.storybook'], - }, - { - ignores: ['packages/ui-contexts/dist'], + ignores: ['packages/ui-composer/storybook-static', '!packages/ui-composer/.storybook'], }, { files: ['packages/ui-contexts/**/*.ts', 'packages/ui-contexts/**/*.tsx'], @@ -868,13 +701,10 @@ export default [ }, }, { - ignores: ['packages/ui-kit/dist'], + ignores: ['packages/ui-video-conf/storybook-static', '!packages/ui-video-conf/.storybook'], }, { - ignores: ['packages/ui-video-conf/dist', 'packages/ui-video-conf/storybook-static', '!packages/ui-video-conf/.storybook'], - }, - { - ignores: ['packages/ui-voip/dist', 'packages/ui-voip/storybook-static', '!packages/ui-voip/.storybook'], + ignores: ['packages/ui-voip/storybook-static', '!packages/ui-voip/.storybook'], }, { files: ['packages/ui-voip/**/*.ts', 'packages/ui-voip/**/*.tsx'], @@ -884,11 +714,7 @@ export default [ }, { files: ['packages/web-ui-registration/**/*'], - ignores: [ - 'packages/web-ui-registration/dist', - 'packages/web-ui-registration/storybook-static', - '!packages/web-ui-registration/.storybook', - ], + ignores: ['packages/web-ui-registration/storybook-static', '!packages/web-ui-registration/.storybook'], }, { files: ['packages/web-ui-registration/**/*.ts', 'packages/web-ui-registration/**/*.tsx'], diff --git a/packages/eslint-config/flat.mjs b/packages/eslint-config/flat.mjs index c78e04be7275b..798b2eef7ab93 100644 --- a/packages/eslint-config/flat.mjs +++ b/packages/eslint-config/flat.mjs @@ -22,7 +22,13 @@ import variables from './variables.mjs'; /** @type {import('eslint').Linter.FlatConfig[]} */ export default [ { - ignores: ['**/dist'], + languageOptions: { + ecmaVersion: 2024, + sourceType: 'module', + }, + }, + { + ignores: ['**/dist', '**/coverage'], }, bestPractices, errors, @@ -31,18 +37,6 @@ export default [ variables, es6, imports, - { - languageOptions: { - ecmaVersion: 2018, - sourceType: 'module', - globals: { - ...globals.browser, - ...globals.commonjs, - ...globals.es6, - ...globals.node, - }, - }, - }, jsxA11yPlugin.flatConfigs.recommended, { plugins: { From 6e5859046c1fa4180dfd8099b1ec52c6f186dba0 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Tue, 24 Feb 2026 01:45:45 -0300 Subject: [PATCH 08/25] chore(eslint): warn unused disable directives --- packages/eslint-config/flat.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/eslint-config/flat.mjs b/packages/eslint-config/flat.mjs index 798b2eef7ab93..3021678281c42 100644 --- a/packages/eslint-config/flat.mjs +++ b/packages/eslint-config/flat.mjs @@ -8,7 +8,6 @@ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' import reactPlugin from 'eslint-plugin-react'; import reactHooksPlugin from 'eslint-plugin-react-hooks'; import globals from 'globals'; -// eslint-disable-next-line import/no-unresolved // import tseslint from 'typescript-eslint'; import bestPractices from './best-practices.mjs'; @@ -22,6 +21,9 @@ import variables from './variables.mjs'; /** @type {import('eslint').Linter.FlatConfig[]} */ export default [ { + linterOptions: { + reportUnusedDisableDirectives: true, + }, languageOptions: { ecmaVersion: 2024, sourceType: 'module', From 1bc0f2a7d25a3bfa741995a21f63d33bbec97633 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Tue, 24 Feb 2026 10:42:44 -0300 Subject: [PATCH 09/25] chore(eslint): install config package at monorepo root --- apps/meteor/package.json | 1 - ee/apps/account-service/package.json | 1 - ee/apps/authorization-service/package.json | 1 - ee/apps/ddp-streamer/package.json | 1 - ee/apps/omnichannel-transcript/package.json | 1 - ee/apps/presence-service/package.json | 1 - ee/apps/queue-worker/package.json | 1 - ee/packages/abac/package.json | 1 - ee/packages/federation-matrix/package.json | 1 - ee/packages/network-broker/package.json | 1 - ee/packages/omni-core-ee/package.json | 1 - ee/packages/omnichannel-services/package.json | 1 - ee/packages/presence/package.json | 1 - package.json | 1 + packages/apps-engine/package.json | 1 - packages/base64/package.json | 1 - packages/core-services/package.json | 1 - packages/core-typings/package.json | 1 - packages/desktop-api/package.json | 1 - packages/fuselage-ui-kit/package.json | 2 - packages/http-router/package.json | 1 - packages/instance-status/package.json | 1 - packages/jest-presets/package.json | 1 - packages/livechat/package.json | 1 - packages/message-parser/package.json | 1 - packages/message-types/package.json | 1 - packages/omni-core/package.json | 1 - packages/peggy-loader/package.json | 1 - packages/random/package.json | 1 - packages/release-action/package.json | 1 - packages/release-changelog/package.json | 1 - packages/rest-typings/package.json | 1 - packages/sha256/package.json | 1 - packages/storybook-config/package.json | 1 - packages/ui-composer/package.json | 1 - packages/ui-kit/package.json | 1 - packages/ui-video-conf/package.json | 1 - packages/ui-voip/package.json | 1 - yarn.lock | 41 +------------------ 39 files changed, 3 insertions(+), 77 deletions(-) diff --git a/apps/meteor/package.json b/apps/meteor/package.json index e4a049a729eff..45d818dda716b 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -316,7 +316,6 @@ "@faker-js/faker": "~8.0.2", "@playwright/test": "^1.52.0", "@rocket.chat/desktop-api": "workspace:~", - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/livechat": "workspace:^", "@rocket.chat/mock-providers": "workspace:^", diff --git a/ee/apps/account-service/package.json b/ee/apps/account-service/package.json index 2876fd49ae137..31a183e06dd08 100644 --- a/ee/apps/account-service/package.json +++ b/ee/apps/account-service/package.json @@ -43,7 +43,6 @@ "prometheus-gc-stats": "^1.1.0" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/tsconfig": "workspace:*", "@types/bcrypt": "^5.0.2", "@types/polka": "^0.5.8", diff --git a/ee/apps/authorization-service/package.json b/ee/apps/authorization-service/package.json index af07c94f947a1..89cb4a85ef8dc 100644 --- a/ee/apps/authorization-service/package.json +++ b/ee/apps/authorization-service/package.json @@ -42,7 +42,6 @@ "prometheus-gc-stats": "^1.1.0" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/tsconfig": "workspace:*", "@types/polka": "^0.5.8", "@types/prometheus-gc-stats": "^0.6.4", diff --git a/ee/apps/ddp-streamer/package.json b/ee/apps/ddp-streamer/package.json index 816551c6f3f71..5f87762d39395 100644 --- a/ee/apps/ddp-streamer/package.json +++ b/ee/apps/ddp-streamer/package.json @@ -49,7 +49,6 @@ "devDependencies": { "@rocket.chat/apps-engine": "workspace:^", "@rocket.chat/ddp-client": "workspace:~", - "@rocket.chat/eslint-config": "workspace:^", "@types/ejson": "^2.2.2", "@types/node": "~22.16.5", "@types/polka": "^0.5.8", diff --git a/ee/apps/omnichannel-transcript/package.json b/ee/apps/omnichannel-transcript/package.json index c6e58f4f255f8..a429f874ef396 100644 --- a/ee/apps/omnichannel-transcript/package.json +++ b/ee/apps/omnichannel-transcript/package.json @@ -49,7 +49,6 @@ "prometheus-gc-stats": "^1.1.0" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/tsconfig": "workspace:*", "@types/i18next-sprintf-postprocessor": "^0.2.3", "@types/polka": "^0.5.8", diff --git a/ee/apps/presence-service/package.json b/ee/apps/presence-service/package.json index 99645bd2c08d6..4f2454b35f82b 100644 --- a/ee/apps/presence-service/package.json +++ b/ee/apps/presence-service/package.json @@ -41,7 +41,6 @@ "prometheus-gc-stats": "^1.1.0" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/tsconfig": "workspace:*", "@types/polka": "^0.5.8", "@types/prometheus-gc-stats": "^0.6.4", diff --git a/ee/apps/queue-worker/package.json b/ee/apps/queue-worker/package.json index 116be8c2cd0e5..865c70e984482 100644 --- a/ee/apps/queue-worker/package.json +++ b/ee/apps/queue-worker/package.json @@ -43,7 +43,6 @@ "prometheus-gc-stats": "^1.1.0" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/tsconfig": "workspace:*", "@types/polka": "^0.5.8", "@types/prometheus-gc-stats": "^0.6.4", diff --git a/ee/packages/abac/package.json b/ee/packages/abac/package.json index 42149f43b38eb..7fbcaaf6c9425 100644 --- a/ee/packages/abac/package.json +++ b/ee/packages/abac/package.json @@ -36,7 +36,6 @@ "p-limit": "3.1.0" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", "@types/node": "~22.16.5", diff --git a/ee/packages/federation-matrix/package.json b/ee/packages/federation-matrix/package.json index ffcd8d5a667a4..e977bc559abe9 100644 --- a/ee/packages/federation-matrix/package.json +++ b/ee/packages/federation-matrix/package.json @@ -39,7 +39,6 @@ }, "devDependencies": { "@rocket.chat/ddp-client": "workspace:^", - "@rocket.chat/eslint-config": "workspace:^", "@types/emojione": "^2.2.9", "@types/node": "~22.16.5", "@types/sanitize-html": "~2.16.0", diff --git a/ee/packages/network-broker/package.json b/ee/packages/network-broker/package.json index 8a19867fc6a76..1141160b03ab3 100644 --- a/ee/packages/network-broker/package.json +++ b/ee/packages/network-broker/package.json @@ -22,7 +22,6 @@ "pino": "^8.21.0" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/tsconfig": "workspace:*", "@types/chai": "~4.3.20", "@types/ejson": "^2.2.2", diff --git a/ee/packages/omni-core-ee/package.json b/ee/packages/omni-core-ee/package.json index 8b0f5e26830dc..897f5c644e2d0 100644 --- a/ee/packages/omni-core-ee/package.json +++ b/ee/packages/omni-core-ee/package.json @@ -24,7 +24,6 @@ "mongodb": "6.16.0" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", diff --git a/ee/packages/omnichannel-services/package.json b/ee/packages/omnichannel-services/package.json index e26bd896b0ccb..b115b3c1090b5 100644 --- a/ee/packages/omnichannel-services/package.json +++ b/ee/packages/omnichannel-services/package.json @@ -42,7 +42,6 @@ "pino": "^8.21.0" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", diff --git a/ee/packages/presence/package.json b/ee/packages/presence/package.json index ac3665e23d901..af51a3eeda273 100644 --- a/ee/packages/presence/package.json +++ b/ee/packages/presence/package.json @@ -23,7 +23,6 @@ }, "devDependencies": { "@rocket.chat/apps-engine": "workspace:^", - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/rest-typings": "workspace:^", "@types/node": "~22.16.5", "eslint": "~8.57.1", diff --git a/package.json b/package.json index c94d0ded92f60..a16d21e2edfe5 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ }, "devDependencies": { "@changesets/cli": "^2.27.11", + "@rocket.chat/eslint-config": "workspace:~", "@types/chart.js": "^2.9.41", "@types/js-yaml": "^4.0.9", "@types/node": "~22.16.5", diff --git a/packages/apps-engine/package.json b/packages/apps-engine/package.json index 1a93c02fabd97..aa5ce91190ff3 100644 --- a/packages/apps-engine/package.json +++ b/packages/apps-engine/package.json @@ -91,7 +91,6 @@ "uuid": "~11.0.5" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:~", "@rocket.chat/ui-kit": "workspace:~", "@seald-io/nedb": "^4.1.2", "@types/adm-zip": "^0.5.7", diff --git a/packages/base64/package.json b/packages/base64/package.json index 156d2f993c523..a4de9d802ddc4 100644 --- a/packages/base64/package.json +++ b/packages/base64/package.json @@ -14,7 +14,6 @@ "testunit": "jest" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "eslint": "~8.57.1", diff --git a/packages/core-services/package.json b/packages/core-services/package.json index 9313c41670e98..ce94be48da16d 100644 --- a/packages/core-services/package.json +++ b/packages/core-services/package.json @@ -30,7 +30,6 @@ }, "devDependencies": { "@rocket.chat/apps-engine": "workspace:^", - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", diff --git a/packages/core-typings/package.json b/packages/core-typings/package.json index 3af5657a00054..1d4c5af3bc3e9 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -27,7 +27,6 @@ }, "devDependencies": { "@rocket.chat/apps-engine": "workspace:^", - "@rocket.chat/eslint-config": "workspace:^", "@types/express": "^4.17.25", "eslint": "~8.57.1", "mongodb": "6.16.0", diff --git a/packages/desktop-api/package.json b/packages/desktop-api/package.json index 9a60525d72d62..f00a494f17385 100644 --- a/packages/desktop-api/package.json +++ b/packages/desktop-api/package.json @@ -16,7 +16,6 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:~", "eslint": "~8.57.1", "rimraf": "~6.0.1", "typescript": "~5.9.3" diff --git a/packages/fuselage-ui-kit/package.json b/packages/fuselage-ui-kit/package.json index 5864aef4744c2..2d2bf6a05f9b9 100644 --- a/packages/fuselage-ui-kit/package.json +++ b/packages/fuselage-ui-kit/package.json @@ -46,7 +46,6 @@ "@rocket.chat/apps-engine": "workspace:^", "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/emitter": "^0.32.0", - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/fuselage": "^0.71.0", "@rocket.chat/fuselage-hooks": "^0.39.0", "@rocket.chat/fuselage-tokens": "~0.33.2", @@ -92,7 +91,6 @@ }, "peerDependencies": { "@rocket.chat/apps-engine": "workspace:^", - "@rocket.chat/eslint-config": "0.7.0", "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", diff --git a/packages/http-router/package.json b/packages/http-router/package.json index 93fade4dd92a5..e9b2075fb465c 100644 --- a/packages/http-router/package.json +++ b/packages/http-router/package.json @@ -26,7 +26,6 @@ "qs": "^6.14.1" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:~", "@rocket.chat/jest-presets": "workspace:^", "@rocket.chat/tsconfig": "workspace:*", "@types/express": "^4.17.25", diff --git a/packages/instance-status/package.json b/packages/instance-status/package.json index 33157939008d7..740594cd6fb65 100644 --- a/packages/instance-status/package.json +++ b/packages/instance-status/package.json @@ -19,7 +19,6 @@ "@rocket.chat/tracing": "workspace:^" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/tsconfig": "workspace:*", "eslint": "~8.57.1", "mongodb": "6.16.0", diff --git a/packages/jest-presets/package.json b/packages/jest-presets/package.json index 45144210dbfae..156143292e38a 100644 --- a/packages/jest-presets/package.json +++ b/packages/jest-presets/package.json @@ -38,7 +38,6 @@ "uuid": "~11.0.5" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:~", "@types/identity-obj-proxy": "^3.0.2", "@types/jest": "~30.0.0", "@types/uuid": "^10.0.0", diff --git a/packages/livechat/package.json b/packages/livechat/package.json index 57c909330f674..629923816c538 100644 --- a/packages/livechat/package.json +++ b/packages/livechat/package.json @@ -59,7 +59,6 @@ "@babel/preset-typescript": "~7.27.1", "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/ddp-client": "workspace:^", - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/fuselage-hooks": "^0.39.0", "@rocket.chat/fuselage-tokens": "~0.33.2", "@rocket.chat/logo": "^0.32.4", diff --git a/packages/message-parser/package.json b/packages/message-parser/package.json index 54d2d5e6b2bbe..c27dcd4689643 100644 --- a/packages/message-parser/package.json +++ b/packages/message-parser/package.json @@ -46,7 +46,6 @@ "tldts": "~6.1.86" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/peggy-loader": "workspace:~", "@rocket.chat/prettier-config": "~0.31.25", diff --git a/packages/message-types/package.json b/packages/message-types/package.json index 5cc2a77d6e0ee..91ca287d2f93f 100644 --- a/packages/message-types/package.json +++ b/packages/message-types/package.json @@ -15,7 +15,6 @@ }, "devDependencies": { "@rocket.chat/core-typings": "workspace:~", - "@rocket.chat/eslint-config": "workspace:~", "date-fns": "~4.1.0", "eslint": "~8.57.1", "i18next": "~23.4.9", diff --git a/packages/omni-core/package.json b/packages/omni-core/package.json index a3ae411ffeb85..7f1cae0ce1825 100644 --- a/packages/omni-core/package.json +++ b/packages/omni-core/package.json @@ -21,7 +21,6 @@ "mongodb": "6.16.0" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tools": "workspace:*", "@rocket.chat/tsconfig": "workspace:*", diff --git a/packages/peggy-loader/package.json b/packages/peggy-loader/package.json index c55584d88f137..b4bcc41fed406 100644 --- a/packages/peggy-loader/package.json +++ b/packages/peggy-loader/package.json @@ -33,7 +33,6 @@ "lint": "eslint ." }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:~", "@rocket.chat/prettier-config": "~0.31.25", "@types/node": "~22.16.5", "eslint": "~8.57.1", diff --git a/packages/random/package.json b/packages/random/package.json index 7d83629bc5655..19237a9de4115 100644 --- a/packages/random/package.json +++ b/packages/random/package.json @@ -16,7 +16,6 @@ "typecheck": "tsc --noEmit" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "eslint": "~8.57.1", diff --git a/packages/release-action/package.json b/packages/release-action/package.json index 4ef4952b30860..706500d9fb6bf 100644 --- a/packages/release-action/package.json +++ b/packages/release-action/package.json @@ -14,7 +14,6 @@ "@actions/github": "^6.0.1", "@octokit/core": "^5.0.1", "@octokit/plugin-throttling": "^6.1.0", - "@rocket.chat/eslint-config": "workspace:^", "eslint": "~8.57.1", "mdast-util-to-string": "2.0.0", "remark-parse": "9.0.0", diff --git a/packages/release-changelog/package.json b/packages/release-changelog/package.json index 7f9bb730e7443..def80f754f921 100644 --- a/packages/release-changelog/package.json +++ b/packages/release-changelog/package.json @@ -13,7 +13,6 @@ }, "devDependencies": { "@changesets/types": "^6.0.0", - "@rocket.chat/eslint-config": "workspace:^", "@types/node": "~22.16.5", "eslint": "~8.57.1", "typescript": "~5.9.3" diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index 2f545f0beb3e0..9c09515c4646a 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -22,7 +22,6 @@ }, "devDependencies": { "@rocket.chat/apps-engine": "workspace:^", - "@rocket.chat/eslint-config": "workspace:~", "@types/jest": "~30.0.0", "eslint": "~8.57.1", "mongodb": "6.16.0", diff --git a/packages/sha256/package.json b/packages/sha256/package.json index 4cb704c4e204d..a25de3e52115d 100644 --- a/packages/sha256/package.json +++ b/packages/sha256/package.json @@ -15,7 +15,6 @@ "typecheck": "tsc --noEmit" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "eslint": "~8.57.1", diff --git a/packages/storybook-config/package.json b/packages/storybook-config/package.json index 1269b406a4e08..01a011a8b19d7 100644 --- a/packages/storybook-config/package.json +++ b/packages/storybook-config/package.json @@ -36,7 +36,6 @@ "webpack": "~5.99.9" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:~", "@rocket.chat/fuselage": "^0.71.0", "@rocket.chat/icons": "~0.46.0", "@rocket.chat/tsconfig": "workspace:*", diff --git a/packages/ui-composer/package.json b/packages/ui-composer/package.json index 43d53e6098493..5070291c56434 100644 --- a/packages/ui-composer/package.json +++ b/packages/ui-composer/package.json @@ -22,7 +22,6 @@ "devDependencies": { "@react-aria/toolbar": "^3.0.0-nightly.5042", "@rocket.chat/emitter": "^0.32.0", - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/fuselage": "^0.71.0", "@rocket.chat/fuselage-hooks": "^0.39.0", "@rocket.chat/fuselage-tokens": "~0.33.2", diff --git a/packages/ui-kit/package.json b/packages/ui-kit/package.json index 4550b1e17bc2a..e2a1af11b68b3 100644 --- a/packages/ui-kit/package.json +++ b/packages/ui-kit/package.json @@ -34,7 +34,6 @@ "typia": "~9.7.2" }, "devDependencies": { - "@rocket.chat/eslint-config": "workspace:~", "@rocket.chat/icons": "~0.46.0", "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json index 31e36e408da69..3e6ec9778d83f 100644 --- a/packages/ui-video-conf/package.json +++ b/packages/ui-video-conf/package.json @@ -22,7 +22,6 @@ }, "devDependencies": { "@rocket.chat/css-in-js": "~0.31.25", - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/fuselage": "^0.71.0", "@rocket.chat/fuselage-hooks": "^0.39.0", "@rocket.chat/fuselage-tokens": "~0.33.2", diff --git a/packages/ui-voip/package.json b/packages/ui-voip/package.json index f1c9cc8e4adec..500c992c48a5c 100644 --- a/packages/ui-voip/package.json +++ b/packages/ui-voip/package.json @@ -30,7 +30,6 @@ "@react-spectrum/test-utils": "~1.0.0-alpha.8", "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/css-in-js": "~0.31.25", - "@rocket.chat/eslint-config": "workspace:^", "@rocket.chat/fuselage": "^0.71.0", "@rocket.chat/fuselage-hooks": "^0.39.0", "@rocket.chat/fuselage-tokens": "~0.33.2", diff --git a/yarn.lock b/yarn.lock index d401dab6f1e38..768c22fff1914 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7908,7 +7908,6 @@ __metadata: dependencies: "@rocket.chat/core-services": "workspace:^" "@rocket.chat/core-typings": "workspace:^" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/logger": "workspace:^" "@rocket.chat/models": "workspace:^" "@rocket.chat/tsconfig": "workspace:*" @@ -7931,7 +7930,6 @@ __metadata: "@rocket.chat/core-services": "workspace:^" "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/emitter": "npm:^0.32.0" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/logger": "workspace:^" "@rocket.chat/model-typings": "workspace:^" "@rocket.chat/models": "workspace:^" @@ -8012,7 +8010,6 @@ __metadata: resolution: "@rocket.chat/apps-engine@workspace:packages/apps-engine" dependencies: "@msgpack/msgpack": "npm:3.0.0-beta2" - "@rocket.chat/eslint-config": "workspace:~" "@rocket.chat/ui-kit": "workspace:~" "@seald-io/nedb": "npm:^4.1.2" "@types/adm-zip": "npm:^0.5.7" @@ -8068,7 +8065,6 @@ __metadata: "@rocket.chat/core-services": "workspace:^" "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/emitter": "npm:^0.32.0" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/logger": "workspace:^" "@rocket.chat/model-typings": "workspace:^" "@rocket.chat/models": "workspace:^" @@ -8099,7 +8095,6 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/base64@workspace:packages/base64" dependencies: - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" eslint: "npm:~8.57.1" @@ -8125,7 +8120,6 @@ __metadata: dependencies: "@rocket.chat/apps-engine": "workspace:^" "@rocket.chat/core-typings": "workspace:^" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/federation-sdk": "npm:0.3.9" "@rocket.chat/http-router": "workspace:^" "@rocket.chat/icons": "npm:~0.46.0" @@ -8151,7 +8145,6 @@ __metadata: resolution: "@rocket.chat/core-typings@workspace:packages/core-typings" dependencies: "@rocket.chat/apps-engine": "workspace:^" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/icons": "npm:~0.46.0" "@rocket.chat/message-parser": "workspace:^" "@rocket.chat/ui-kit": "workspace:~" @@ -8237,7 +8230,6 @@ __metadata: "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/ddp-client": "workspace:~" "@rocket.chat/emitter": "npm:^0.32.0" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/instance-status": "workspace:^" "@rocket.chat/logger": "workspace:^" "@rocket.chat/model-typings": "workspace:^" @@ -8279,7 +8271,6 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/desktop-api@workspace:packages/desktop-api" dependencies: - "@rocket.chat/eslint-config": "workspace:~" eslint: "npm:~8.57.1" rimraf: "npm:~6.0.1" typescript: "npm:~5.9.3" @@ -8300,7 +8291,7 @@ __metadata: languageName: node linkType: hard -"@rocket.chat/eslint-config@workspace:^, @rocket.chat/eslint-config@workspace:packages/eslint-config, @rocket.chat/eslint-config@workspace:~": +"@rocket.chat/eslint-config@workspace:packages/eslint-config, @rocket.chat/eslint-config@workspace:~": version: 0.0.0-use.local resolution: "@rocket.chat/eslint-config@workspace:packages/eslint-config" dependencies: @@ -8341,7 +8332,6 @@ __metadata: "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/ddp-client": "workspace:^" "@rocket.chat/emitter": "npm:^0.32.0" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/federation-sdk": "npm:0.3.9" "@rocket.chat/http-router": "workspace:^" "@rocket.chat/license": "workspace:^" @@ -8442,7 +8432,6 @@ __metadata: "@rocket.chat/apps-engine": "workspace:^" "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/emitter": "npm:^0.32.0" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/fuselage": "npm:^0.71.0" "@rocket.chat/fuselage-hooks": "npm:^0.39.0" "@rocket.chat/fuselage-tokens": "npm:~0.33.2" @@ -8488,7 +8477,6 @@ __metadata: webpack: "npm:~5.99.9" peerDependencies: "@rocket.chat/apps-engine": "workspace:^" - "@rocket.chat/eslint-config": 0.7.0 "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" @@ -8604,7 +8592,6 @@ __metadata: resolution: "@rocket.chat/http-router@workspace:packages/http-router" dependencies: "@rocket.chat/core-typings": "workspace:^" - "@rocket.chat/eslint-config": "workspace:~" "@rocket.chat/jest-presets": "workspace:^" "@rocket.chat/logger": "workspace:^" "@rocket.chat/rest-typings": "workspace:^" @@ -8652,7 +8639,6 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/instance-status@workspace:packages/instance-status" dependencies: - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/models": "workspace:^" "@rocket.chat/tracing": "workspace:^" "@rocket.chat/tsconfig": "workspace:*" @@ -8667,7 +8653,6 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/jest-presets@workspace:packages/jest-presets" dependencies: - "@rocket.chat/eslint-config": "workspace:~" "@swc/core": "npm:1.15.11" "@swc/jest": "npm:~0.2.39" "@testing-library/jest-dom": "npm:~6.8.0" @@ -8744,7 +8729,6 @@ __metadata: "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/ddp-client": "workspace:^" "@rocket.chat/emitter": "npm:^0.32.0" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/fuselage-hooks": "npm:^0.39.0" "@rocket.chat/fuselage-tokens": "npm:~0.33.2" "@rocket.chat/gazzodown": "workspace:^" @@ -8911,7 +8895,6 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/message-parser@workspace:packages/message-parser" dependencies: - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/peggy-loader": "workspace:~" "@rocket.chat/prettier-config": "npm:~0.31.25" @@ -8939,7 +8922,6 @@ __metadata: resolution: "@rocket.chat/message-types@workspace:packages/message-types" dependencies: "@rocket.chat/core-typings": "workspace:~" - "@rocket.chat/eslint-config": "workspace:~" date-fns: "npm:~4.1.0" eslint: "npm:~8.57.1" i18next: "npm:~23.4.9" @@ -8997,7 +8979,6 @@ __metadata: "@rocket.chat/css-in-js": "npm:~0.31.25" "@rocket.chat/desktop-api": "workspace:~" "@rocket.chat/emitter": "npm:^0.32.0" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/favicon": "workspace:^" "@rocket.chat/federation-matrix": "workspace:^" "@rocket.chat/federation-sdk": "npm:0.3.9" @@ -9447,7 +9428,6 @@ __metadata: resolution: "@rocket.chat/network-broker@workspace:ee/packages/network-broker" dependencies: "@rocket.chat/core-services": "workspace:^" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/tsconfig": "workspace:*" "@types/chai": "npm:~4.3.20" "@types/ejson": "npm:^2.2.2" @@ -9469,7 +9449,6 @@ __metadata: resolution: "@rocket.chat/omni-core-ee@workspace:ee/packages/omni-core-ee" dependencies: "@rocket.chat/core-services": "workspace:^" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/logger": "workspace:^" "@rocket.chat/models": "workspace:^" @@ -9488,7 +9467,6 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/omni-core@workspace:packages/omni-core" dependencies: - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/models": "workspace:^" "@rocket.chat/patch-injection": "workspace:^" @@ -9509,7 +9487,6 @@ __metadata: "@rocket.chat/core-services": "workspace:^" "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/emitter": "npm:^0.32.0" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/i18n": "workspace:^" "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/logger": "workspace:^" @@ -9547,7 +9524,6 @@ __metadata: "@rocket.chat/core-services": "workspace:^" "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/emitter": "npm:^0.32.0" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/i18n": "workspace:^" "@rocket.chat/logger": "workspace:^" "@rocket.chat/model-typings": "workspace:^" @@ -9670,7 +9646,6 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/peggy-loader@workspace:packages/peggy-loader" dependencies: - "@rocket.chat/eslint-config": "workspace:~" "@rocket.chat/prettier-config": "npm:~0.31.25" "@types/node": "npm:~22.16.5" eslint: "npm:~8.57.1" @@ -9702,7 +9677,6 @@ __metadata: "@rocket.chat/core-services": "workspace:^" "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/emitter": "npm:^0.32.0" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/logger": "workspace:^" "@rocket.chat/model-typings": "workspace:^" "@rocket.chat/models": "workspace:^" @@ -9736,7 +9710,6 @@ __metadata: "@rocket.chat/apps-engine": "workspace:^" "@rocket.chat/core-services": "workspace:^" "@rocket.chat/core-typings": "workspace:^" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/models": "workspace:^" "@rocket.chat/rest-typings": "workspace:^" "@types/node": "npm:~22.16.5" @@ -9763,7 +9736,6 @@ __metadata: "@rocket.chat/core-services": "workspace:^" "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/emitter": "npm:^0.32.0" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/logger": "workspace:^" "@rocket.chat/model-typings": "workspace:^" "@rocket.chat/models": "workspace:^" @@ -9796,7 +9768,6 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/random@workspace:packages/random" dependencies: - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" eslint: "npm:~8.57.1" @@ -9814,7 +9785,6 @@ __metadata: "@actions/github": "npm:^6.0.1" "@octokit/core": "npm:^5.0.1" "@octokit/plugin-throttling": "npm:^6.1.0" - "@rocket.chat/eslint-config": "workspace:^" "@types/node": "npm:~22.16.5" eslint: "npm:~8.57.1" mdast-util-to-string: "npm:2.0.0" @@ -9831,7 +9801,6 @@ __metadata: resolution: "@rocket.chat/release-changelog@workspace:packages/release-changelog" dependencies: "@changesets/types": "npm:^6.0.0" - "@rocket.chat/eslint-config": "workspace:^" "@types/node": "npm:~22.16.5" dataloader: "npm:^2.2.3" eslint: "npm:~8.57.1" @@ -9846,7 +9815,6 @@ __metadata: dependencies: "@rocket.chat/apps-engine": "workspace:^" "@rocket.chat/core-typings": "workspace:^" - "@rocket.chat/eslint-config": "workspace:~" "@rocket.chat/message-parser": "workspace:^" "@rocket.chat/ui-kit": "workspace:~" "@types/jest": "npm:~30.0.0" @@ -9892,7 +9860,6 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/sha256@workspace:packages/sha256" dependencies: - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" eslint: "npm:~8.57.1" @@ -9906,7 +9873,6 @@ __metadata: resolution: "@rocket.chat/storybook-config@workspace:packages/storybook-config" dependencies: "@rocket.chat/emitter": "npm:^0.32.0" - "@rocket.chat/eslint-config": "workspace:~" "@rocket.chat/fuselage": "npm:^0.71.0" "@rocket.chat/fuselage-hooks": "npm:^0.39.0" "@rocket.chat/fuselage-tokens": "npm:~0.33.2" @@ -10094,7 +10060,6 @@ __metadata: dependencies: "@react-aria/toolbar": "npm:^3.0.0-nightly.5042" "@rocket.chat/emitter": "npm:^0.32.0" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/fuselage": "npm:^0.71.0" "@rocket.chat/fuselage-hooks": "npm:^0.39.0" "@rocket.chat/fuselage-tokens": "npm:~0.33.2" @@ -10173,7 +10138,6 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/ui-kit@workspace:packages/ui-kit" dependencies: - "@rocket.chat/eslint-config": "workspace:~" "@rocket.chat/icons": "npm:~0.46.0" "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" @@ -10231,7 +10195,6 @@ __metadata: dependencies: "@rocket.chat/css-in-js": "npm:~0.31.25" "@rocket.chat/emitter": "npm:^0.32.0" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/fuselage": "npm:^0.71.0" "@rocket.chat/fuselage-hooks": "npm:^0.39.0" "@rocket.chat/fuselage-tokens": "npm:~0.33.2" @@ -10288,7 +10251,6 @@ __metadata: "@rocket.chat/css-in-js": "npm:~0.31.25" "@rocket.chat/desktop-api": "workspace:^" "@rocket.chat/emitter": "npm:^0.32.0" - "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/fuselage": "npm:^0.71.0" "@rocket.chat/fuselage-hooks": "npm:^0.39.0" "@rocket.chat/fuselage-tokens": "npm:~0.33.2" @@ -32283,6 +32245,7 @@ __metadata: resolution: "rocket.chat@workspace:." dependencies: "@changesets/cli": "npm:^2.27.11" + "@rocket.chat/eslint-config": "workspace:~" "@types/chart.js": "npm:^2.9.41" "@types/js-yaml": "npm:^4.0.9" "@types/node": "npm:~22.16.5" From 4bdae16845b70381da1413cdd8fd756a806ba844 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Tue, 24 Feb 2026 16:25:45 -0300 Subject: [PATCH 10/25] chore(eslint): undeclare rules overwritten by Prettier --- eslint.config.mjs | 34 +- packages/eslint-config/best-practices.mjs | 304 -------------- packages/eslint-config/errors.mjs | 149 ------- packages/eslint-config/es6.mjs | 188 --------- packages/eslint-config/flat.mjs | 266 +++++++++++- packages/eslint-config/imports.mjs | 261 ------------ packages/eslint-config/node.mjs | 10 - packages/eslint-config/package.json | 9 +- packages/eslint-config/style.mjs | 474 ---------------------- packages/eslint-config/variables.mjs | 50 --- 10 files changed, 275 insertions(+), 1470 deletions(-) delete mode 100644 packages/eslint-config/best-practices.mjs delete mode 100644 packages/eslint-config/errors.mjs delete mode 100644 packages/eslint-config/es6.mjs delete mode 100644 packages/eslint-config/imports.mjs delete mode 100644 packages/eslint-config/node.mjs delete mode 100644 packages/eslint-config/style.mjs delete mode 100644 packages/eslint-config/variables.mjs diff --git a/eslint.config.mjs b/eslint.config.mjs index dbb21735e6bd5..bb755bd0b4296 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -129,6 +129,20 @@ export default [ additionalHooks: '(useComponentDidUpdate)', }, ], + 'new-cap': [ + 'error', + { + capIsNewExceptions: [ + 'Match.Optional', + 'Match.Maybe', + 'Match.OneOf', + 'Match.Where', + 'Match.ObjectIncluding', + 'Push.Configure', + 'SHA256', + ], + }, + ], 'prefer-arrow-callback': [ 'error', { @@ -139,7 +153,7 @@ export default [ }, { files: ['apps/meteor/**/*.ts', 'apps/meteor/**/*.tsx'], - ignores: ['apps/meteor/.scripts/*.ts'], + ignores: ['apps/meteor/.scripts/*.ts', 'apps/meteor/**/*.d.ts'], rules: { '@typescript-eslint/naming-convention': [ 'error', @@ -252,12 +266,6 @@ export default [ '@typescript-eslint/no-floating-promises': 'off', }, }, - { - files: ['apps/meteor/**/*.d.ts'], - rules: { - '@typescript-eslint/naming-convention': 'off', - }, - }, { files: ['apps/meteor/tests/e2e/**/*'], languageOptions: { @@ -625,7 +633,6 @@ export default [ 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', 'no-sequences': 'off', - 'no-extra-parens': 'off', }, }, { @@ -722,4 +729,15 @@ export default [ '@typescript-eslint/no-misused-promises': 'off', }, }, + { + files: ['packages/sha256/**/*', 'packages/models/**/*'], + rules: { + 'new-cap': [ + 'error', + { + capIsNewExceptions: ['SHA256'], + }, + ], + }, + }, ]; diff --git a/packages/eslint-config/best-practices.mjs b/packages/eslint-config/best-practices.mjs deleted file mode 100644 index 97f9dd445e161..0000000000000 --- a/packages/eslint-config/best-practices.mjs +++ /dev/null @@ -1,304 +0,0 @@ -/** @type {import('eslint').Linter.FlatConfig} */ -export default { - rules: { - // // enforces getter/setter pairs in objects - // 'accessor-pairs': 'off', - - // enforces return statements in callbacks of array's methods - // https://eslint.org/docs/rules/array-callback-return - 'array-callback-return': ['error', { allowImplicit: true }], - - // treat var statements as if they were block scoped - 'block-scoped-var': 'error', - - // specify the maximum cyclomatic complexity allowed in a program - 'complexity': ['warn', 31], - - // enforce that class methods use "this" - // https://eslint.org/docs/rules/class-methods-use-this - // 'class-methods-use-this': ['error', { - // exceptMethods: [], - // }], - - // require return statements to either always or never specify values - // 'consistent-return': 'error', - - // specify curly brace conventions for all control statements - 'curly': ['error', 'all'], - - // // require default case in switch statements - // 'default-case': ['error', { commentPattern: '^no default$' }], - - // encourages use of dot notation whenever possible - 'dot-notation': ['error', { allowKeywords: true }], - - // enforces consistent newlines before or after dots - // https://eslint.org/docs/rules/dot-location - 'dot-location': ['error', 'property'], - - // require the use of === and !== - // https://eslint.org/docs/rules/eqeqeq - 'eqeqeq': ['error', 'allow-null'], - - // make sure for-in loops have an if statement - 'guard-for-in': 'error', - - // // enforce a maximum number of classes per file - // // https://eslint.org/docs/rules/max-classes-per-file - // // TODO: semver-major (eslint 5): enable - // 'max-classes-per-file': ['off', 1], - - // // disallow the use of alert, confirm, and prompt - // 'no-alert': 'warn', - - // disallow use of arguments.caller or arguments.callee - 'no-caller': 'error', - - // disallow lexical declarations in case/default clauses - // https://eslint.org/docs/rules/no-case-declarations.html - // 'no-case-declarations': 'error', - - // disallow division operators explicitly at beginning of regular expression - // https://eslint.org/docs/rules/no-div-regex - 'no-div-regex': 'off', - - // disallow else after a return in an if - // https://eslint.org/docs/rules/no-else-return - 'no-else-return': ['error', { allowElseIf: false }], - - // disallow empty functions, except for standalone funcs/arrows - // https://eslint.org/docs/rules/no-empty-function - 'no-empty-function': [ - 'error', - { - allow: ['arrowFunctions', 'functions', 'methods'], - }, - ], - - // disallow empty destructuring patterns - // https://eslint.org/docs/rules/no-empty-pattern - 'no-empty-pattern': 'error', - - // // disallow comparisons to null without a type-checking operator - // 'no-eq-null': 'off', - - // disallow use of eval() - 'no-eval': 'error', - - // disallow adding to native types - 'no-extend-native': 'error', - - // disallow unnecessary function binding - 'no-extra-bind': 'error', - - // disallow Unnecessary Labels - // https://eslint.org/docs/rules/no-extra-label - 'no-extra-label': 'error', - - // disallow fallthrough of case statements - 'no-fallthrough': 'error', - - // disallow the use of leading or trailing decimal points in numeric literals - 'no-floating-decimal': 'error', - - // // disallow reassignments of native objects or read-only globals - // // https://eslint.org/docs/rules/no-global-assign - // 'no-global-assign': ['error', { exceptions: [] }], - // // deprecated in favor of no-global-assign - // 'no-native-reassign': 'off', - - // // disallow implicit type conversions - // // https://eslint.org/docs/rules/no-implicit-coercion - // 'no-implicit-coercion': ['off', { - // boolean: false, - // number: true, - // string: true, - // allow: [], - // }], - - // // disallow var and named functions in global scope - // // https://eslint.org/docs/rules/no-implicit-globals - // 'no-implicit-globals': 'off', - - // disallow use of eval()-like methods - 'no-implied-eval': 'error', - - // disallow this keywords outside of classes or class-like objects - 'no-invalid-this': 'off', - - // disallow usage of __iterator__ property - 'no-iterator': 'error', - - // // disallow use of labels for anything other then loops and switches - // 'no-labels': ['error', { allowLoop: false, allowSwitch: false }], - - // disallow unnecessary nested blocks - 'no-lone-blocks': 'error', - - // disallow creation of functions within loops - 'no-loop-func': 'error', - - // // disallow magic numbers - // // https://eslint.org/docs/rules/no-magic-numbers - // 'no-magic-numbers': ['off', { - // ignore: [], - // ignoreArrayIndexes: true, - // enforceConst: true, - // detectObjects: false, - // }], - - // disallow use of multiple spaces - 'no-multi-spaces': 'error', - - // disallow use of multiline strings - 'no-multi-str': 'error', - - // disallow use of new operator when not part of the assignment or comparison - // 'no-new': 'error', - - // disallow use of new operator for Function object - // 'no-new-func': 'error', - - // disallows creating new instances of String, Number, and Boolean - 'no-new-wrappers': 'error', - - // disallow use of (old style) octal literals - 'no-octal': 'error', - - // // disallow use of octal escape sequences in string literals, such as - // // var foo = 'Copyright \251'; - // 'no-octal-escape': 'error', - - // // disallow reassignment of function parameters - // // disallow parameter object manipulation except for specific exclusions - // // rule: https://eslint.org/docs/rules/no-param-reassign.html - // 'no-param-reassign': ['error', { - // props: true, - // ignorePropertyModificationsFor: [ - // 'acc', // for reduce accumulators - // 'accumulator', // for reduce accumulators - // 'e', // for e.returnvalue - // 'ctx', // for Koa routing - // 'req', // for Express requests - // 'request', // for Express requests - // 'res', // for Express responses - // 'response', // for Express responses - // '$scope', // for Angular 1 scopes - // ] - // }], - - // disallow usage of __proto__ property - 'no-proto': 'error', - - // disallow declaring the same variable more then once - 'no-redeclare': 'error', - - // disallow certain object properties - // https://eslint.org/docs/rules/no-restricted-properties - 'no-restricted-properties': [ - 'error', - { - object: 'describe', - property: 'only', - }, - { - object: 'it', - property: 'only', - }, - { - object: 'context', - property: 'only', - }, - ], - - // disallow use of assignment in return statement - 'no-return-assign': ['error', 'always'], - - // disallow redundant `return await` - 'no-return-await': 'error', - - // // disallow use of `javascript:` urls. - // 'no-script-url': 'error', - - // // disallow self assignment - // // https://eslint.org/docs/rules/no-self-assign - // // TODO: semver-major: props -> true - // 'no-self-assign': ['error', { - // props: false, - // }], - - // disallow comparisons where both sides are exactly the same - 'no-self-compare': 'error', - - // disallow use of comma operator - 'no-sequences': 'error', - - // restrict what can be thrown as an exception - 'no-throw-literal': 'error', - - // // disallow unmodified conditions of loops - // // https://eslint.org/docs/rules/no-unmodified-loop-condition - // 'no-unmodified-loop-condition': 'off', - - // // disallow usage of expressions in statement position - // 'no-unused-expressions': ['error', { - // allowShortCircuit: false, - // allowTernary: false, - // allowTaggedTemplates: false, - // }], - - // disallow unused labels - // https://eslint.org/docs/rules/no-unused-labels - 'no-unused-labels': 'error', - - // disallow unnecessary .call() and .apply() - 'no-useless-call': 'off', - - // disallow useless string concatenation - // https://eslint.org/docs/rules/no-useless-concat - 'no-useless-concat': 'error', - - // // disallow unnecessary string escaping - // // https://eslint.org/docs/rules/no-useless-escape - // 'no-useless-escape': 'error', - - // disallow redundant return; keywords - // https://eslint.org/docs/rules/no-useless-return - 'no-useless-return': 'error', - - // disallow use of void operator - // https://eslint.org/docs/rules/no-void - 'no-void': 'off', - - // // disallow usage of configurable warning terms in comments: e.g. todo - // 'no-warning-comments': ['off', { terms: ['todo', 'fixme', 'xxx'], location: 'start' }], - - // // disallow use of the with statement - // 'no-with': 'error', - - // // require using Error objects as Promise rejection reasons - // // https://eslint.org/docs/rules/prefer-promise-reject-errors - // 'prefer-promise-reject-errors': ['error', { allowEmptyReject: true }], - - // // require use of the second argument for parseInt() - // radix: 'error', - - // // require `await` in `async function` (note: this is a horrible rule that should never be used) - // // https://eslint.org/docs/rules/require-await - // 'require-await': 'off', - - // // Enforce the use of u flag on RegExp - // // https://eslint.org/docs/rules/require-unicode-regexp - // 'require-unicode-regexp': 'off', - - // // requires to declare all vars on top of their containing scope - // 'vars-on-top': 'error', - - // require immediate function invocation to be wrapped in parentheses - // https://eslint.org/docs/rules/wrap-iife.html - 'wrap-iife': ['error', 'outside', { functionPrototypeMethods: false }], - - // require or disallow Yoda conditions - 'yoda': 'error', - }, -}; diff --git a/packages/eslint-config/errors.mjs b/packages/eslint-config/errors.mjs deleted file mode 100644 index 1793b8acb5802..0000000000000 --- a/packages/eslint-config/errors.mjs +++ /dev/null @@ -1,149 +0,0 @@ -/** @type {import('eslint').Linter.FlatConfig} */ -export default { - rules: { - // Enforce “for” loop update clause moving the counter in the right direction - // https://eslint.org/docs/rules/for-direction - 'for-direction': 'error', - - // Enforces that a return statement is present in property getters - // https://eslint.org/docs/rules/getter-return - 'getter-return': ['error', { allowImplicit: true }], - - // disallow using an async function as a Promise executor - // https://eslint.org/docs/rules/no-async-promise-executor - // TODO: enable, semver-major - 'no-async-promise-executor': 'off', - - // Disallow await inside of loops - // https://eslint.org/docs/rules/no-await-in-loop - 'no-await-in-loop': 'error', - - // Disallow comparisons to negative zero - // https://eslint.org/docs/rules/no-compare-neg-zero - 'no-compare-neg-zero': 'error', - - // disallow assignment in conditional expressions - 'no-cond-assign': 'error', - - // disallow use of console - // 'no-console': 'warn', - - // disallow use of constant expressions in conditions - 'no-constant-condition': 'error', - - // disallow control characters in regular expressions - 'no-control-regex': 'error', - - // disallow use of debugger - 'no-debugger': 'error', - - // disallow duplicate arguments in functions - 'no-dupe-args': 'error', - - // disallow duplicate keys when creating object literals - 'no-dupe-keys': 'error', - - // disallow a duplicate case label. - 'no-duplicate-case': 'error', - - // disallow empty statements - 'no-empty': 'error', - - // disallow the use of empty character classes in regular expressions - 'no-empty-character-class': 'error', - - // disallow assigning to the exception in a catch block - 'no-ex-assign': 'error', - - // disallow double-negation boolean casts in a boolean context - // https://eslint.org/docs/rules/no-extra-boolean-cast - 'no-extra-boolean-cast': 'error', - - // disallow unnecessary parentheses - // https://eslint.org/docs/rules/no-extra-parens - 'no-extra-parens': [ - 'error', - 'all', - { - conditionalAssign: true, - nestedBinaryExpressions: false, - returnAssign: true, - ignoreJSX: 'all', // delegate to eslint-plugin-react - enforceForArrowConditionals: false, - }, - ], - - // disallow unnecessary semicolons - 'no-extra-semi': 'error', - - // disallow overwriting functions written as function declarations - 'no-func-assign': 'error', - - // disallow function declarations in nested blocks - 'no-inner-declarations': ['error', 'functions'], - - // disallow invalid regular expression strings in the RegExp constructor - 'no-invalid-regexp': 'error', - - // disallow irregular whitespace outside of strings and comments - 'no-irregular-whitespace': 'error', - - // // Disallow characters which are made with multiple code points in character class syntax - // // https://eslint.org/docs/rules/no-misleading-character-class - // // TODO: enable, semver-major - // 'no-misleading-character-class': 'off', - - // disallow the use of object properties of the global object (Math and JSON) as functions - 'no-obj-calls': 'error', - - // // disallow use of Object.prototypes builtins directly - // // https://eslint.org/docs/rules/no-prototype-builtins - // 'no-prototype-builtins': 'error', - - // disallow multiple spaces in a regular expression literal - 'no-regex-spaces': 'error', - - // disallow sparse arrays - 'no-sparse-arrays': 'error', - - // // Disallow template literal placeholder syntax in regular strings - // // https://eslint.org/docs/rules/no-template-curly-in-string - // 'no-template-curly-in-string': 'error', - - // Avoid code that looks like two expressions but is actually one - // https://eslint.org/docs/rules/no-unexpected-multiline - 'no-unexpected-multiline': 'error', - - // disallow unreachable statements after a return, throw, continue, or break statement - 'no-unreachable': 'error', - - // disallow return/throw/break/continue inside finally blocks - // https://eslint.org/docs/rules/no-unsafe-finally - 'no-unsafe-finally': 'error', - - // disallow negating the left operand of relational operators - // https://eslint.org/docs/rules/no-unsafe-negation - 'no-unsafe-negation': 'error', - - // disallow negation of the left operand of an in expression - // deprecated in favor of no-unsafe-negation - // TODO: turn off - 'no-negated-in-lhs': 'error', - - // Disallow assignments that can lead to race conditions due to usage of await or yield - // https://eslint.org/docs/rules/require-atomic-updates - // TODO: enable, semver-major - 'require-atomic-updates': 'off', - - // disallow comparisons with the value NaN - 'use-isnan': 'error', - - // // ensure JSDoc comments are valid - // // https://eslint.org/docs/rules/valid-jsdoc - // 'valid-jsdoc': 'off', - - // ensure that the results of typeof are compared against a valid string - // https://eslint.org/docs/rules/valid-typeof - 'valid-typeof': ['error', { requireStringLiterals: true }], - }, -}; diff --git a/packages/eslint-config/es6.mjs b/packages/eslint-config/es6.mjs deleted file mode 100644 index 54cdfa7b9c63c..0000000000000 --- a/packages/eslint-config/es6.mjs +++ /dev/null @@ -1,188 +0,0 @@ -import globals from 'globals'; - -/** @type {import('eslint').Linter.FlatConfig} */ -export default { - languageOptions: { - ecmaVersion: 6, - sourceType: 'module', - globals: { - ...globals.es2015, - }, - }, - - rules: { - // enforces no braces where they can be omitted - // https://eslint.org/docs/rules/arrow-body-style - // TODO: enable requireReturnForObjectLiteral? - 'arrow-body-style': [ - 'error', - 'as-needed', - { - requireReturnForObjectLiteral: false, - }, - ], - - // require parens in arrow function arguments - // https://eslint.org/docs/rules/arrow-parens - 'arrow-parens': ['error', 'always'], - - // require space before/after arrow function's arrow - // https://eslint.org/docs/rules/arrow-spacing - 'arrow-spacing': ['error', { before: true, after: true }], - - // // verify super() callings in constructors - // 'constructor-super': 'error', - - // // enforce the spacing around the * in generator functions - // // https://eslint.org/docs/rules/generator-star-spacing - // 'generator-star-spacing': ['error', { before: false, after: true }], - - // // disallow modifying variables of class declarations - // // https://eslint.org/docs/rules/no-class-assign - // 'no-class-assign': 'error', - - // disallow arrow functions where they could be confused with comparisons - // https://eslint.org/docs/rules/no-confusing-arrow - 'no-confusing-arrow': [ - 'error', - { - allowParens: true, - }, - ], - - // disallow modifying variables that are declared using const - 'no-const-assign': 'error', - - // disallow duplicate class members - // https://eslint.org/docs/rules/no-dupe-class-members - 'no-dupe-class-members': 'error', - - // disallow importing from the same path more than once - // https://eslint.org/docs/rules/no-duplicate-imports - // replaced by https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md - 'no-duplicate-imports': 'off', - - // // disallow symbol constructor - // // https://eslint.org/docs/rules/no-new-symbol - // 'no-new-symbol': 'error', - - // // disallow specific imports - // // https://eslint.org/docs/rules/no-restricted-imports - // 'no-restricted-imports': ['off', { - // paths: [], - // patterns: [] - // }], - - // disallow to use this/super before super() calling in constructors. - // https://eslint.org/docs/rules/no-this-before-super - 'no-this-before-super': 'error', - - // disallow useless computed property keys - // https://eslint.org/docs/rules/no-useless-computed-key - 'no-useless-computed-key': 'error', - - // disallow unnecessary constructor - // https://eslint.org/docs/rules/no-useless-constructor - 'no-useless-constructor': 'error', - - // disallow renaming import, export, and destructured assignments to the same name - // https://eslint.org/docs/rules/no-useless-rename - 'no-useless-rename': [ - 'error', - { - ignoreDestructuring: false, - ignoreImport: false, - ignoreExport: false, - }, - ], - - // require let or const instead of var - 'no-var': 'error', - - // require method and property shorthand syntax for object literals - // https://eslint.org/docs/rules/object-shorthand - 'object-shorthand': 'error', - - // // suggest using arrow functions as callbacks - // 'prefer-arrow-callback': ['error', { - // allowNamedFunctions: false, - // allowUnboundThis: true, - // }], - - // suggest using of const declaration for variables that are never modified after declared - 'prefer-const': [ - 'error', - { - destructuring: 'any', - ignoreReadBeforeAssign: true, - }, - ], - - // Prefer destructuring from arrays and objects - // https://eslint.org/docs/rules/prefer-destructuring - 'prefer-destructuring': [ - 'error', - { - VariableDeclarator: { - array: false, - object: true, - }, - AssignmentExpression: { - array: false, - object: false, - }, - }, - { - enforceForRenamedProperties: false, - }, - ], - - // // disallow parseInt() in favor of binary, octal, and hexadecimal literals - // // https://eslint.org/docs/rules/prefer-numeric-literals - // 'prefer-numeric-literals': 'error', - - // // suggest using Reflect methods where applicable - // // https://eslint.org/docs/rules/prefer-reflect - // 'prefer-reflect': 'off', - - // use rest parameters instead of arguments - // https://eslint.org/docs/rules/prefer-rest-params - 'prefer-rest-params': 'error', - - // // suggest using the spread operator instead of .apply() - // // https://eslint.org/docs/rules/prefer-spread - // 'prefer-spread': 'error', - - // suggest using template literals instead of string concatenation - // https://eslint.org/docs/rules/prefer-template - 'prefer-template': 'error', - - // // disallow generator functions that do not have yield - // // https://eslint.org/docs/rules/require-yield - // 'require-yield': 'error', - - // enforce spacing between object rest-spread - // https://eslint.org/docs/rules/rest-spread-spacing - 'rest-spread-spacing': ['error', 'never'], - - // // import sorting - // // https://eslint.org/docs/rules/sort-imports - // 'sort-imports': ['off', { - // ignoreCase: false, - // ignoreMemberSort: false, - // memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], - // }], - - // // require a Symbol description - // // https://eslint.org/docs/rules/symbol-description - // 'symbol-description': 'error', - - // enforce usage of spacing in template strings - // https://eslint.org/docs/rules/template-curly-spacing - 'template-curly-spacing': ['error', 'always'], - - // // enforce spacing around the * in yield* expressions - // // https://eslint.org/docs/rules/yield-star-spacing - // 'yield-star-spacing': ['error', 'after'] - }, -}; diff --git a/packages/eslint-config/flat.mjs b/packages/eslint-config/flat.mjs index 3021678281c42..9e9d68cd579c7 100644 --- a/packages/eslint-config/flat.mjs +++ b/packages/eslint-config/flat.mjs @@ -10,35 +10,268 @@ import reactHooksPlugin from 'eslint-plugin-react-hooks'; import globals from 'globals'; // import tseslint from 'typescript-eslint'; -import bestPractices from './best-practices.mjs'; -import errors from './errors.mjs'; -import es6 from './es6.mjs'; -import imports from './imports.mjs'; -import node from './node.mjs'; -import style from './style.mjs'; -import variables from './variables.mjs'; - /** @type {import('eslint').Linter.FlatConfig[]} */ export default [ + // linting options { linterOptions: { reportUnusedDisableDirectives: true, }, + }, + // javascript files + { languageOptions: { ecmaVersion: 2024, sourceType: 'module', }, }, + // ignored directories { ignores: ['**/dist', '**/coverage'], }, - bestPractices, - errors, - node, - style, - variables, - es6, - imports, + eslintPluginPrettierRecommended, + // best practices + { + rules: { + 'array-callback-return': ['error', { allowImplicit: true }], + 'block-scoped-var': 'error', + 'complexity': ['warn', 31], + 'dot-notation': ['error', { allowKeywords: true }], + 'eqeqeq': ['error', 'allow-null'], + 'guard-for-in': 'error', + 'no-caller': 'error', + 'no-div-regex': 'off', + 'no-else-return': ['error', { allowElseIf: false }], + 'no-empty-function': [ + 'error', + { + allow: ['arrowFunctions', 'functions', 'methods'], + }, + ], + 'no-empty-pattern': 'error', + 'no-eval': 'error', + 'no-extend-native': 'error', + 'no-extra-bind': 'error', + 'no-extra-label': 'error', + 'no-fallthrough': 'error', + 'no-implied-eval': 'error', + 'no-invalid-this': 'off', + 'no-iterator': 'error', + 'no-lone-blocks': 'error', + 'no-loop-func': 'error', + 'no-multi-str': 'error', + 'no-new-wrappers': 'error', + 'no-octal': 'error', + 'no-proto': 'error', + 'no-redeclare': 'error', + 'no-restricted-properties': [ + 'error', + { + object: 'describe', + property: 'only', + }, + { + object: 'it', + property: 'only', + }, + { + object: 'context', + property: 'only', + }, + ], + 'no-return-assign': ['error', 'always'], + 'no-return-await': 'error', + 'no-self-compare': 'error', + 'no-sequences': 'error', + 'no-throw-literal': 'error', + 'no-unused-labels': 'error', + 'no-useless-call': 'off', + 'no-useless-concat': 'error', + 'no-useless-return': 'error', + 'no-void': 'off', + 'yoda': 'error', + }, + }, + // prevent common mistakes + { + rules: { + 'for-direction': 'error', + 'getter-return': ['error', { allowImplicit: true }], + // TODO: enable, semver-major + 'no-async-promise-executor': 'off', + 'no-await-in-loop': 'error', + 'no-compare-neg-zero': 'error', + 'no-cond-assign': 'error', + 'no-constant-condition': 'error', + 'no-control-regex': 'error', + 'no-debugger': 'error', + 'no-dupe-args': 'error', + 'no-dupe-keys': 'error', + 'no-duplicate-case': 'error', + 'no-empty': 'error', + 'no-empty-character-class': 'error', + 'no-ex-assign': 'error', + 'no-extra-boolean-cast': 'error', + 'no-func-assign': 'error', + 'no-inner-declarations': ['error', 'functions'], + 'no-invalid-regexp': 'error', + 'no-irregular-whitespace': 'error', + 'no-obj-calls': 'error', + 'no-regex-spaces': 'error', + 'no-sparse-arrays': 'error', + 'no-unreachable': 'error', + 'no-unsafe-finally': 'error', + 'no-unsafe-negation': 'error', + 'no-negated-in-lhs': 'error', + 'require-atomic-updates': 'off', + 'use-isnan': 'error', + 'valid-typeof': ['error', { requireStringLiterals: true }], + }, + }, + // Node.js and CommonJS globals + // TODO: disable, as they are not available in all environments + { + languageOptions: { + globals: { + ...globals.node, + }, + }, + }, + // stylistic issues + { + rules: { + 'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: false }], + 'lines-around-directive': [ + 'error', + { + before: 'always', + after: 'always', + }, + ], + 'max-depth': ['off', 4], + 'new-cap': 'error', + 'no-array-constructor': 'error', + 'no-lonely-if': 'error', + 'no-multi-assign': 'error', + 'no-nested-ternary': 'error', + 'no-unneeded-ternary': ['error', { defaultAssignment: false }], + 'one-var': ['error', 'never'], + 'operator-assignment': ['error', 'always'], + 'prefer-object-spread': 'off', + 'spaced-comment': 'error', + }, + }, + // variables related rules + { + rules: { + 'no-delete-var': 'error', + 'no-undef': 'error', + 'no-unused-vars': [ + 'error', + { + vars: 'all', + args: 'after-used', + ignoreRestSiblings: true, + }, + ], + 'no-use-before-define': ['error', { functions: true, classes: true, variables: true }], + }, + }, + // ES2015 related rules + { + rules: { + 'no-const-assign': 'error', + 'no-dupe-class-members': 'error', + 'no-duplicate-imports': 'off', + 'no-this-before-super': 'error', + 'no-useless-computed-key': 'error', + 'no-useless-constructor': 'error', + 'no-useless-rename': [ + 'error', + { + ignoreDestructuring: false, + ignoreImport: false, + ignoreExport: false, + }, + ], + 'no-var': 'error', + 'object-shorthand': 'error', + 'prefer-const': [ + 'error', + { + destructuring: 'any', + ignoreReadBeforeAssign: true, + }, + ], + 'prefer-destructuring': [ + 'error', + { + VariableDeclarator: { + array: false, + object: true, + }, + AssignmentExpression: { + array: false, + object: false, + }, + }, + { + enforceForRenamedProperties: false, + }, + ], + 'prefer-rest-params': 'error', + 'prefer-template': 'error', + }, + }, + // import related rules + { + plugins: { import: importPlugin }, + settings: { + 'import/resolver': { + node: { + extensions: ['.mjs', '.js', '.json'], + }, + }, + 'import/extensions': ['.js', '.mjs', '.jsx'], + 'import/core-modules': [], + 'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'], + }, + rules: { + 'import/no-unresolved': [ + 'error', + { + commonjs: true, + caseSensitive: true, + amd: true, + ignore: ['^meteor/.+$'], + }, + ], + 'import/named': 'off', + 'import/default': 'off', + 'import/namespace': 'off', + 'import/export': 'error', + 'import/no-named-as-default': 'off', + 'import/no-named-as-default-member': 'off', + 'import/first': 'error', + 'import/no-duplicates': 'error', + 'import/order': [ + 'error', + { + 'newlines-between': 'always', + 'groups': ['builtin', ['external', 'internal'], ['parent', 'sibling', 'index']], + 'alphabetize': { + order: 'asc', + }, + }, + ], + 'import/newline-after-import': 'error', + 'import/no-absolute-path': 'error', + 'import/no-dynamic-require': 'error', + 'import/no-self-import': 'error', + 'import/no-cycle': 'off', + 'import/no-useless-path-segments': 'error', + }, + }, jsxA11yPlugin.flatConfigs.recommended, { plugins: { @@ -72,7 +305,6 @@ export default [ 'react/no-multi-comp': 'off', }, }, - eslintPluginPrettierRecommended, importPlugin.flatConfigs.typescript, { languageOptions: { @@ -190,11 +422,9 @@ export default [ '@typescript-eslint/require-await': 'off', 'anti-trojan-source/no-bidi': 'error', 'func-call-spacing': 'off', - 'indent': 'off', 'jsx-quotes': ['error', 'prefer-single'], 'no-dupe-class-members': 'off', 'no-empty-function': 'off', - 'no-extra-parens': 'off', 'no-redeclare': 'off', 'no-spaced-func': 'off', 'no-undef': 'off', diff --git a/packages/eslint-config/imports.mjs b/packages/eslint-config/imports.mjs deleted file mode 100644 index 8fd63d40ed299..0000000000000 --- a/packages/eslint-config/imports.mjs +++ /dev/null @@ -1,261 +0,0 @@ -import importPlugin from 'eslint-plugin-import'; -import globals from 'globals'; - -/** @type {import('eslint').Linter.FlatConfig} */ -export default { - languageOptions: { - ecmaVersion: 6, - sourceType: 'module', - globals: { - ...globals.es2015, - }, - }, - plugins: { import: importPlugin }, - - settings: { - 'import/resolver': { - node: { - extensions: ['.mjs', '.js', '.json'], - }, - }, - 'import/extensions': ['.js', '.mjs', '.jsx'], - 'import/core-modules': [], - 'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'], - }, - - rules: { - // Static analysis: - - // ensure imports point to files/modules that can be resolved - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md - 'import/no-unresolved': [ - 'error', - { - commonjs: true, - caseSensitive: true, - amd: true, - ignore: ['^meteor/.+$'], - }, - ], - - // ensure named imports coupled with named exports - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it - 'import/named': 'off', - - // ensure default import coupled with default export - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it - 'import/default': 'off', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md - 'import/namespace': 'off', - - // Helpful warnings: - - // disallow invalid exports, e.g. multiple defaults - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md - 'import/export': 'error', - - // do not allow a default import name to match a named export - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md - // 'import/no-named-as-default': 'error', - 'import/no-named-as-default': 'off', - - // warn on accessing default export property names that are also named exports - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md - // 'import/no-named-as-default-member': 'error', - 'import/no-named-as-default-member': 'off', - - // // disallow use of jsdoc-marked-deprecated imports - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md - // 'import/no-deprecated': 'off', - - // // Forbid the use of extraneous packages - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md - // // paths are treated both as absolute paths, and relative to process.cwd() - // 'import/no-extraneous-dependencies': ['error', { - // devDependencies: [ - // 'test/**', // tape, common npm pattern - // 'tests/**', // also common npm pattern - // 'spec/**', // mocha, rspec-like pattern - // '**/__tests__/**', // jest pattern - // '**/__mocks__/**', // jest pattern - // 'test.{js,jsx}', // repos with a single test file - // 'test-*.{js,jsx}', // repos with multiple top-level test files - // '**/*{.,_}{test,spec}.{js,jsx}', // tests where the extension or filename suffix denotes that it is a test - // '**/jest.config.js', // jest config - // '**/vue.config.js', // vue-cli config - // '**/webpack.config.js', // webpack config - // '**/webpack.config.*.js', // webpack config - // '**/rollup.config.js', // rollup config - // '**/rollup.config.*.js', // rollup config - // '**/gulpfile.js', // gulp config - // '**/gulpfile.*.js', // gulp config - // '**/Gruntfile{,.js}', // grunt config - // '**/protractor.conf.js', // protractor config - // '**/protractor.conf.*.js', // protractor config - // ], - // optionalDependencies: false, - // }], - - // // Forbid mutable exports - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md - // 'import/no-mutable-exports': 'error', - - // Module systems: - - // // disallow require() - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md - // 'import/no-commonjs': 'off', - - // // disallow AMD require/define - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md - // 'import/no-amd': 'error', - - // // No Node.js builtin modules - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md - // // TODO: enable? - // 'import/no-nodejs-modules': 'off', - - // Style guide: - - // disallow non-import statements appearing before import statements - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md - 'import/first': 'error', - - // // disallow non-import statements appearing before import statements - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/imports-first.md - // // deprecated: use `import/first` - // 'import/imports-first': 'off', - - // disallow duplicate imports - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md - 'import/no-duplicates': 'error', - - // // disallow namespace imports - // // TODO: enable? - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md - // 'import/no-namespace': 'off', - - // // Ensure consistent use of file extension within the import path - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md - // 'import/extensions': ['error', 'ignorePackages', { - // js: 'never', - // mjs: 'never', - // jsx: 'never', - // }], - - // ensure absolute imports are above relative imports and that unassigned imports are ignored - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md - // TODO: enforce a stricter convention in module import order? - 'import/order': [ - 'error', - { - 'newlines-between': 'always', - 'groups': ['builtin', ['external', 'internal'], ['parent', 'sibling', 'index']], - 'alphabetize': { - order: 'asc', - }, - }, - ], - - // Require a newline after the last import/require in a group - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md - 'import/newline-after-import': 'error', - - // // Require modules with a single export to use a default export - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md - // 'import/prefer-default-export': 'error', - - // // Restrict which files can be imported in a given folder - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md - // 'import/no-restricted-paths': 'off', - - // // Forbid modules to have too many dependencies - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md - // 'import/max-dependencies': ['off', { max: 10 }], - - // Forbid import of modules using absolute paths - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md - 'import/no-absolute-path': 'error', - - // Forbid require() calls with expressions - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md - 'import/no-dynamic-require': 'error', - - // // prevent importing the submodules of other modules - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md - // 'import/no-internal-modules': ['off', { - // allow: [], - // }], - - // // Warn if a module could be mistakenly parsed as a script by a consumer - // // leveraging Unambiguous JavaScript Grammar - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/unambiguous.md - // // this should not be enabled until this proposal has at least been *presented* to TC39. - // // At the moment, it's not a thing. - // 'import/unambiguous': 'off', - - // // Forbid Webpack loader syntax in imports - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md - // 'import/no-webpack-loader-syntax': 'error', - - // // Prevent unassigned imports - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md - // // importing for side effects is perfectly acceptable, if you need side effects. - // 'import/no-unassigned-import': 'off', - - // // Prevent importing the default as if it were named - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md - // 'import/no-named-default': 'error', - - // // Reports if a module's default export is unnamed - // // https://github.com/benmosher/eslint-plugin-import/blob/d9b712ac7fd1fddc391f7b234827925c160d956f/docs/rules/no-anonymous-default-export.md - // 'import/no-anonymous-default-export': ['off', { - // allowArray: false, - // allowArrowFunction: false, - // allowAnonymousClass: false, - // allowAnonymousFunction: false, - // allowLiteral: false, - // allowObject: false, - // }], - - // // This rule enforces that all exports are declared at the bottom of the file. - // // https://github.com/benmosher/eslint-plugin-import/blob/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md - // // TODO: enable? - // 'import/exports-last': 'off', - - // // Reports when named exports are not grouped together in a single export declaration - // // or when multiple assignments to CommonJS module.exports or exports object are present - // // in a single file. - // // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md - // 'import/group-exports': 'off', - - // // forbid default exports. this is a terrible rule, do not use it. - // // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-default-export.md - // 'import/no-default-export': 'off', - - // Forbid a module from importing itself - // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-self-import.md - 'import/no-self-import': 'error', - - // Forbid cyclical dependencies between modules - // https://github.com/benmosher/eslint-plugin-import/blob/d81f48a2506182738409805f5272eff4d77c9348/docs/rules/no-cycle.md - // 'import/no-cycle': ['error', { maxDepth: Infinity }], - 'import/no-cycle': 'off', - - // Ensures that there are no useless path segments - // https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/no-useless-path-segments.md - 'import/no-useless-path-segments': 'error', - - // // dynamic imports require a leading comment with a webpackChunkName - // // https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/dynamic-import-chunkname.md - // 'import/dynamic-import-chunkname': ['off', { - // importFunctions: [], - // webpackChunknameFormat: '[0-9a-zA-Z-_/.]+', - // }], - - // // Use this rule to prevent imports to folders in relative parent paths. - // // https://github.com/benmosher/eslint-plugin-import/blob/c34f14f67f077acd5a61b3da9c0b0de298d20059/docs/rules/no-relative-parent-imports.md - // 'import/no-relative-parent-imports': 'off', - }, -}; diff --git a/packages/eslint-config/node.mjs b/packages/eslint-config/node.mjs deleted file mode 100644 index 17f4f6bcd51e0..0000000000000 --- a/packages/eslint-config/node.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import globals from 'globals'; - -/** @type {import('eslint').Linter.FlatConfig} */ -export default { - languageOptions: { - globals: { - ...globals.node, - }, - }, -}; diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index b390d42d65884..b5faa9a30108a 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -14,14 +14,7 @@ "/style", "/variables", "react.js", - "best-practices.mjs", - "errors.mjs", - "es6.mjs", - "flat.mjs", - "imports.mjs", - "node.mjs", - "style.mjs", - "variables.mjs" + "flat.mjs" ], "scripts": { "lint": "eslint .", diff --git a/packages/eslint-config/style.mjs b/packages/eslint-config/style.mjs deleted file mode 100644 index 03796f22ee846..0000000000000 --- a/packages/eslint-config/style.mjs +++ /dev/null @@ -1,474 +0,0 @@ -/** @type {import('eslint').Linter.FlatConfig} */ -export default { - rules: { - // enforce line breaks after opening and before closing array brackets - // https://eslint.org/docs/rules/array-bracket-newline - // TODO: enable? semver-major - // 'array-bracket-newline': ['off', 'consistent'], // object option alternative: { multiline: true, minItems: 3 } - - // // enforce line breaks between array elements - // // https://eslint.org/docs/rules/array-element-newline - // // TODO: enable? semver-major - // 'array-element-newline': ['off', { multiline: true, minItems: 3 }], - - // enforce spacing inside array brackets - 'array-bracket-spacing': ['error', 'never'], - - // enforce spacing inside single-line blocks - // https://eslint.org/docs/rules/block-spacing - 'block-spacing': 'error', - - // enforce one true brace style - 'brace-style': ['error', '1tbs', { allowSingleLine: true }], - - // // require camel case names - // // TODO: semver-major (eslint 5): add ignoreDestructuring: false option - // camelcase: ['error', { properties: 'never' }], - - // // enforce or disallow capitalization of the first letter of a comment - // // https://eslint.org/docs/rules/capitalized-comments - // 'capitalized-comments': ['off', 'never', { - // line: { - // ignorePattern: '.*', - // ignoreInlineComments: true, - // ignoreConsecutiveComments: true, - // }, - // block: { - // ignorePattern: '.*', - // ignoreInlineComments: true, - // ignoreConsecutiveComments: true, - // }, - // }], - - // require trailing commas in multiline object literals - 'comma-dangle': ['error', 'always-multiline'], - - // enforce spacing before and after comma - 'comma-spacing': 'error', - - // enforce one true comma style - 'comma-style': 'error', - - // disallow padding inside computed properties - 'computed-property-spacing': ['error', 'never'], - - // // enforces consistent naming when capturing the current execution context - // 'consistent-this': 'off', - - // enforce newline at the end of file, with no multiple empty lines - 'eol-last': ['error', 'always'], - - // enforce spacing between functions and their invocations - // https://eslint.org/docs/rules/func-call-spacing - 'func-call-spacing': ['error', 'never'], - - // // requires function names to match the name of the variable or property to which they are - // // assigned - // // https://eslint.org/docs/rules/func-name-matching - // // TODO: semver-major (eslint 5): add considerPropertyDescriptor: true - // 'func-name-matching': ['off', 'always', { - // includeCommonJSModuleExports: false - // }], - - // // require function expressions to have a name - // // https://eslint.org/docs/rules/func-names - // 'func-names': 'warn', - - // // enforces use of function declarations or expressions - // // https://eslint.org/docs/rules/func-style - // // TODO: enable - // 'func-style': ['off', 'expression'], - - // // enforce consistent line breaks inside function parentheses - // // https://eslint.org/docs/rules/function-paren-newline - // 'function-paren-newline': ['error', 'consistent'], - - // // Blacklist certain identifiers to prevent them being used - // // https://eslint.org/docs/rules/id-blacklist - // 'id-blacklist': 'off', - - // // this option enforces minimum and maximum identifier lengths - // // (variable names, property names etc.) - // 'id-length': 'off', - - // // require identifiers to match the provided regular expression - // 'id-match': 'off', - - // Enforce the location of arrow function bodies with implicit returns - // https://eslint.org/docs/rules/implicit-arrow-linebreak - // 'implicit-arrow-linebreak': ['error', 'beside'], - - // this option sets a specific tab width for your code - // https://eslint.org/docs/rules/indent - 'indent': ['error', 'tab', { SwitchCase: 1 }], - - // // specify whether double or single quotes should be used in JSX attributes - // // https://eslint.org/docs/rules/jsx-quotes - // 'jsx-quotes': ['off', 'prefer-double'], - - // enforces spacing between keys and values in object literal properties - 'key-spacing': ['error', { beforeColon: false, afterColon: true }], - - // require a space before & after certain keywords - 'keyword-spacing': 'error', - - // // enforce position of line comments - // // https://eslint.org/docs/rules/line-comment-position - // // TODO: enable? - // 'line-comment-position': ['off', { - // position: 'above', - // ignorePattern: '', - // applyDefaultPatterns: true, - // }], - - // disallow mixed 'LF' and 'CRLF' as linebreaks - // https://eslint.org/docs/rules/linebreak-style - 'linebreak-style': ['error', 'unix'], - - // require or disallow an empty line between class members - // https://eslint.org/docs/rules/lines-between-class-members - 'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: false }], - - // // enforces empty lines around comments - // 'lines-around-comment': 'off', - - // require or disallow newlines around directives - // https://eslint.org/docs/rules/lines-around-directive - 'lines-around-directive': [ - 'error', - { - before: 'always', - after: 'always', - }, - ], - - // specify the maximum depth that blocks can be nested - 'max-depth': ['off', 4], - - // // specify the maximum length of a line in your program - // // https://eslint.org/docs/rules/max-len - // 'max-len': ['error', 100, 2, { - // ignoreUrls: true, - // ignoreComments: false, - // ignoreRegExpLiterals: true, - // ignoreStrings: true, - // ignoreTemplateLiterals: true, - // }], - - // // specify the max number of lines in a file - // // https://eslint.org/docs/rules/max-lines - // 'max-lines': ['off', { - // max: 300, - // skipBlankLines: true, - // skipComments: true - // }], - - // // enforce a maximum function length - // // https://eslint.org/docs/rules/max-lines-per-function - // 'max-lines-per-function': ['off', { - // max: 50, - // skipBlankLines: true, - // skipComments: true, - // IIFEs: true, - // }], - - // // specify the maximum depth callbacks can be nested - // 'max-nested-callbacks': 'off', - - // // limits the number of parameters that can be used in the function declaration. - // 'max-params': ['off', 3], - - // // specify the maximum number of statement allowed in a function - // 'max-statements': ['off', 10], - - // // restrict the number of statements per line - // // https://eslint.org/docs/rules/max-statements-per-line - // 'max-statements-per-line': ['off', { max: 1 }], - - // // enforce a particular style for multiline comments - // // https://eslint.org/docs/rules/multiline-comment-style - // 'multiline-comment-style': ['off', 'starred-block'], - - // // require multiline ternary - // // https://eslint.org/docs/rules/multiline-ternary - // // TODO: enable? - // 'multiline-ternary': ['off', 'never'], - - // require a capital letter for constructors - 'new-cap': [ - 'error', - { - capIsNewExceptions: [ - 'Match.Optional', - 'Match.Maybe', - 'Match.OneOf', - 'Match.Where', - 'Match.ObjectIncluding', - 'Push.Configure', - 'SHA256', - ], - }, - ], - - // disallow the omission of parentheses when invoking a constructor with no arguments - // https://eslint.org/docs/rules/new-parens - 'new-parens': 'error', - - // // allow/disallow an empty newline after var statement - // 'newline-after-var': 'off', - - // // https://eslint.org/docs/rules/newline-before-return - // 'newline-before-return': 'off', - - // // enforces new line after each method call in the chain to make it - // // more readable and easy to maintain - // // https://eslint.org/docs/rules/newline-per-chained-call - // 'newline-per-chained-call': ['error', { ignoreChainWithDepth: 4 }], - - // disallow use of the Array constructor - 'no-array-constructor': 'error', - - // // disallow use of bitwise operators - // // https://eslint.org/docs/rules/no-bitwise - // 'no-bitwise': 'error', - - // // disallow use of the continue statement - // // https://eslint.org/docs/rules/no-continue - // 'no-continue': 'error', - - // // disallow comments inline after code - // 'no-inline-comments': 'off', - - // disallow if as the only statement in an else block - // https://eslint.org/docs/rules/no-lonely-if - 'no-lonely-if': 'error', - - // disallow un-paren'd mixes of different operators - // https://eslint.org/docs/rules/no-mixed-operators - 'no-mixed-operators': [ - 'error', - { - // the list of arthmetic groups disallows mixing `%` and `**` - // with other arithmetic operators. - groups: [ - ['%', '**'], - ['%', '+'], - ['%', '-'], - ['%', '*'], - ['%', '/'], - ['**', '+'], - ['**', '-'], - ['**', '*'], - ['**', '/'], - ['&', '|', '^', '~', '<<', '>>', '>>>'], - ['==', '!=', '===', '!==', '>', '>=', '<', '<='], - ['&&', '||'], - ['in', 'instanceof'], - ], - allowSamePrecedence: false, - }, - ], - - // disallow mixed spaces and tabs for indentation - 'no-mixed-spaces-and-tabs': 'error', - - // disallow use of chained assignment expressions - // https://eslint.org/docs/rules/no-multi-assign - 'no-multi-assign': ['error'], - - // disallow multiple empty lines and only one newline at the end - 'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0 }], - - // // disallow negated conditions - // // https://eslint.org/docs/rules/no-negated-condition - // 'no-negated-condition': 'off', - - // disallow nested ternary expressions - 'no-nested-ternary': 'error', - - // // disallow use of the Object constructor - // 'no-new-object': 'error', - - // // disallow use of unary operators, ++ and -- - // // https://eslint.org/docs/rules/no-plusplus - // 'no-plusplus': 'error', - - // // disallow certain syntax forms - // // https://eslint.org/docs/rules/no-restricted-syntax - // 'no-restricted-syntax': [ - // 'error', - // { - // selector: 'ForInStatement', - // message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.', - // }, - // { - // selector: 'ForOfStatement', - // message: 'iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.', - // }, - // { - // selector: 'LabeledStatement', - // message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.', - // }, - // { - // selector: 'WithStatement', - // message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.', - // }, - // ], - - // disallow space between function identifier and application - 'no-spaced-func': 'error', - - // // disallow tab characters entirely - // 'no-tabs': 'error', - - // // disallow the use of ternary operators - // 'no-ternary': 'off', - - // disallow trailing whitespace at the end of lines - 'no-trailing-spaces': [ - 'error', - { - skipBlankLines: false, - ignoreComments: false, - }, - ], - - // // disallow dangling underscores in identifiers - // // https://eslint.org/docs/rules/no-underscore-dangle - // 'no-underscore-dangle': ['error', { - // allow: [], - // allowAfterThis: false, - // allowAfterSuper: false, - // enforceInMethodNames: true, - // }], - - // disallow the use of Boolean literals in conditional expressions - // also, prefer `a || b` over `a ? a : b` - // https://eslint.org/docs/rules/no-unneeded-ternary - 'no-unneeded-ternary': ['error', { defaultAssignment: false }], - - // disallow whitespace before properties - // https://eslint.org/docs/rules/no-whitespace-before-property - 'no-whitespace-before-property': 'error', - - // // enforce the location of single-line statements - // // https://eslint.org/docs/rules/nonblock-statement-body-position - // 'nonblock-statement-body-position': ['error', 'beside', { overrides: {} }], - - // require padding inside curly braces - 'object-curly-spacing': ['error', 'always'], - - // // enforce line breaks between braces - // // https://eslint.org/docs/rules/object-curly-newline - // 'object-curly-newline': ['error', { - // ObjectExpression: { minProperties: 4, multiline: true, consistent: true }, - // ObjectPattern: { minProperties: 4, multiline: true, consistent: true }, - // ImportDeclaration: { minProperties: 4, multiline: true, consistent: true }, - // ExportDeclaration: { minProperties: 4, multiline: true, consistent: true }, - // }], - - // enforce "same line" or "multiple line" on object properties. - // https://eslint.org/docs/rules/object-property-newline - 'object-property-newline': [ - 'error', - { - allowAllPropertiesOnSameLine: true, - }, - ], - - // allow just one var statement per function - 'one-var': ['error', 'never'], - - // // require a newline around variable declaration - // // https://eslint.org/docs/rules/one-var-declaration-per-line - // 'one-var-declaration-per-line': ['error', 'always'], - - // require assignment operator shorthand where possible or prohibit it entirely - // https://eslint.org/docs/rules/operator-assignment - 'operator-assignment': ['error', 'always'], - - // Requires operator at the beginning of the line in multiline statements - // https://eslint.org/docs/rules/operator-linebreak - 'operator-linebreak': ['error', 'before', { overrides: { '=': 'none' } }], - - // disallow padding within blocks - 'padded-blocks': ['error', { blocks: 'never', classes: 'never', switches: 'never' }], - - // // Require or disallow padding lines between statements - // // https://eslint.org/docs/rules/padding-line-between-statements - // 'padding-line-between-statements': 'off', - - // Prefer use of an object spread over Object.assign - // https://eslint.org/docs/rules/prefer-object-spread - // TODO: semver-major (eslint 5): enable - 'prefer-object-spread': 'off', - - // require quotes around object literal property names - // https://eslint.org/docs/rules/quote-props.html - 'quote-props': ['error', 'as-needed', { keywords: false, unnecessary: true, numbers: false }], - - // specify whether double or single quotes should be used - 'quotes': ['error', 'single', { avoidEscape: true }], - - // // do not require jsdoc - // // https://eslint.org/docs/rules/require-jsdoc - // 'require-jsdoc': 'off', - - // require or disallow use of semicolons instead of ASI - 'semi': ['error', 'always'], - - // enforce spacing before and after semicolons - 'semi-spacing': ['error', { before: false, after: true }], - - // Enforce location of semicolons - // https://eslint.org/docs/rules/semi-style - 'semi-style': ['error', 'last'], - - // // requires object keys to be sorted - // 'sort-keys': ['off', 'asc', { caseSensitive: false, natural: true }], - - // // sort variables within the same declaration block - // 'sort-vars': 'off', - - // require or disallow space before blocks - 'space-before-blocks': ['error', 'always'], - - // require or disallow space before function opening parenthesis - // https://eslint.org/docs/rules/space-before-function-paren - 'space-before-function-paren': ['error', { anonymous: 'never', named: 'never', asyncArrow: 'always' }], - - // require or disallow spaces inside parentheses - 'space-in-parens': ['error', 'never'], - - // require spaces around operators - 'space-infix-ops': 'error', - - // // Require or disallow spaces before/after unary operators - // // https://eslint.org/docs/rules/space-unary-ops - // 'space-unary-ops': ['error', { - // words: true, - // nonwords: false, - // overrides: { - // }, - // }], - - // require or disallow a space immediately following the // or /* in a comment - // https://eslint.org/docs/rules/spaced-comment - 'spaced-comment': 'error', - - // Enforce spacing around colons of switch statements - // https://eslint.org/docs/rules/switch-colon-spacing - 'switch-colon-spacing': ['error', { after: true, before: false }], - - // // Require or disallow spacing between template tags and their literals - // // https://eslint.org/docs/rules/template-tag-spacing - // 'template-tag-spacing': ['error', 'never'], - - // // require or disallow the Unicode Byte Order Mark - // // https://eslint.org/docs/rules/unicode-bom - // 'unicode-bom': ['error', 'never'], - - // // require regex literals to be wrapped in parentheses - // 'wrap-regex': 'off' - }, -}; diff --git a/packages/eslint-config/variables.mjs b/packages/eslint-config/variables.mjs deleted file mode 100644 index 5c4fa119ea20b..0000000000000 --- a/packages/eslint-config/variables.mjs +++ /dev/null @@ -1,50 +0,0 @@ -/** @type {import('eslint').Linter.FlatConfig} */ -export default { - rules: { - // enforce or disallow variable initializations at definition - // 'init-declarations': 'off', - - // // disallow the catch clause parameter name being the same as a variable in the outer scope - // 'no-catch-shadow': 'off', - - // disallow deletion of variables - 'no-delete-var': 'error', - - // // disallow labels that share a name with a variable - // // https://eslint.org/docs/rules/no-label-var - // 'no-label-var': 'error', - - // // disallow specific globals - // 'no-restricted-globals': ['error', 'isFinite', 'isNaN'].concat(restrictedGlobals), - - // // disallow declaration of variables already declared in the outer scope - // 'no-shadow': 'error', - - // // disallow shadowing of names such as arguments - // 'no-shadow-restricted-names': 'error', - - // disallow use of undeclared variables unless mentioned in a /*global */ block - 'no-undef': 'error', - - // // disallow use of undefined when initializing variables - // 'no-undef-init': 'error', - - // // disallow use of undefined variable - // // https://eslint.org/docs/rules/no-undefined - // // TODO: enable? - // 'no-undefined': 'off', - - // disallow declaration of variables that are not used in the code - 'no-unused-vars': [ - 'error', - { - vars: 'all', - args: 'after-used', - ignoreRestSiblings: true, - }, - ], - - // disallow use of variables before they are defined - 'no-use-before-define': ['error', { functions: true, classes: true, variables: true }], - }, -}; From 69bc3847ebe69ea4f41fc47447524be6407444e9 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Wed, 25 Feb 2026 01:43:54 -0300 Subject: [PATCH 11/25] chore(eslint): compact configuration a little bit more --- eslint.config.mjs | 55 +++------ package.json | 1 + packages/eslint-config/flat.mjs | 177 ++++++++++++---------------- packages/eslint-config/package.json | 4 +- yarn.lock | 1 + 5 files changed, 101 insertions(+), 137 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index bb755bd0b4296..c95b655acd4ac 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,12 +1,7 @@ import rocketChatConfig from '@rocket.chat/eslint-config/flat.mjs'; -import typescriptPlugin from '@typescript-eslint/eslint-plugin'; -import typescriptParser from '@typescript-eslint/parser'; -import antiTrojanSourcePlugin from 'eslint-plugin-anti-trojan-source'; import jestPlugin from 'eslint-plugin-jest'; import noFloatingPromisePlugin from 'eslint-plugin-no-floating-promise'; -import prettierPlugin from 'eslint-plugin-prettier'; import reactRefreshPlugin from 'eslint-plugin-react-refresh'; -import storybookPlugin from 'eslint-plugin-storybook'; import testingLibraryPlugin from 'eslint-plugin-testing-library'; import youDontNeedLodashUnderscorePlugin from 'eslint-plugin-you-dont-need-lodash-underscore'; import globals from 'globals'; @@ -18,7 +13,6 @@ function getAbsolutePath(path) { /** @type {import('eslint').Linter.FlatConfig[]} */ export default [ ...rocketChatConfig, - ...storybookPlugin.configs['flat/recommended'], { ignores: [ 'apps/meteor/app/emoji-emojione/generateEmojiIndex.js', @@ -31,6 +25,7 @@ export default [ '!apps/meteor/**/.storybook', 'apps/meteor/**/storybook-static', 'apps/meteor/**/packages', + 'apps/meteor/.meteor/**', ], }, { @@ -49,6 +44,22 @@ export default [ 'you-dont-need-lodash-underscore': youDontNeedLodashUnderscorePlugin, }, rules: { + 'import/named': 'error', + 'import/no-unresolved': [ + 'error', + { + commonjs: true, + caseSensitive: true, + amd: true, + ignore: ['^meteor/.+$'], + }, + ], + 'react-hooks/exhaustive-deps': [ + 'warn', + { + additionalHooks: '(useComponentDidUpdate)', + }, + ], 'you-dont-need-lodash-underscore/concat': 'error', 'you-dont-need-lodash-underscore/drop': 'error', 'you-dont-need-lodash-underscore/drop-right': 'error', @@ -122,13 +133,6 @@ export default [ 'you-dont-need-lodash-underscore/get': 'warn', 'you-dont-need-lodash-underscore/union-by': 'warn', 'you-dont-need-lodash-underscore/is-array-buffer': 'warn', - 'import/named': 'error', - 'react-hooks/exhaustive-deps': [ - 'warn', - { - additionalHooks: '(useComponentDidUpdate)', - }, - ], 'new-cap': [ 'error', { @@ -269,15 +273,12 @@ export default [ { files: ['apps/meteor/tests/e2e/**/*'], languageOptions: { - parser: typescriptParser, parserOptions: { project: getAbsolutePath('./apps/meteor/tsconfig.json'), }, }, plugins: { - 'prettier': prettierPlugin, 'testing-library': testingLibraryPlugin, - 'anti-trojan-source': antiTrojanSourcePlugin, 'no-floating-promise': noFloatingPromisePlugin, }, rules: { @@ -301,13 +302,6 @@ export default [ }, ], }, - settings: { - 'import/resolver': { - node: { - extensions: ['.js', '.ts', '.tsx'], - }, - }, - }, }, { files: ['apps/meteor/packages/**/*'], @@ -321,8 +315,6 @@ export default [ { files: ['apps/uikit-playground/**/*'], languageOptions: { - parser: typescriptParser, - parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, globals: { ...globals.browser, ...globals.es2020, @@ -410,12 +402,8 @@ export default [ ignores: ['!ee/packages/pdf-worker/.storybook'], }, { - files: ['packages/apps-engine/**/*'], - plugins: { - '@typescript-eslint': typescriptPlugin, - }, + files: ['packages/apps-engine/**/*.ts'], languageOptions: { - parser: typescriptParser, parserOptions: { project: getAbsolutePath('./packages/apps-engine/tsconfig-lint.json'), }, @@ -561,12 +549,7 @@ export default [ }, }, settings: { - 'import/resolver': { - node: { - extensions: ['.js', '.ts', '.tsx'], - }, - }, - 'react': { + react: { pragma: 'h', pragmaFrag: 'Fragment', version: 'detect', diff --git a/package.json b/package.json index a16d21e2edfe5..fb18aea98ad17 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,7 @@ "@types/chart.js": "^2.9.41", "@types/js-yaml": "^4.0.9", "@types/node": "~22.16.5", + "eslint": "~8.57.1", "eslint-plugin-no-floating-promise": "~2.0.0", "eslint-plugin-you-dont-need-lodash-underscore": "~6.14.0", "ts-node": "^10.9.2", diff --git a/packages/eslint-config/flat.mjs b/packages/eslint-config/flat.mjs index 9e9d68cd579c7..f7a8e1d4e5b2f 100644 --- a/packages/eslint-config/flat.mjs +++ b/packages/eslint-config/flat.mjs @@ -1,14 +1,13 @@ -import babelParser from '@babel/eslint-parser'; import typescriptPlugin from '@typescript-eslint/eslint-plugin'; import typescriptParser from '@typescript-eslint/parser'; import antiTrojanSourcePlugin from 'eslint-plugin-anti-trojan-source'; import importPlugin from 'eslint-plugin-import'; import jsxA11yPlugin from 'eslint-plugin-jsx-a11y'; -import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; +import prettierPluginRecommended from 'eslint-plugin-prettier/recommended'; import reactPlugin from 'eslint-plugin-react'; import reactHooksPlugin from 'eslint-plugin-react-hooks'; +import storybookPlugin from 'eslint-plugin-storybook'; import globals from 'globals'; -// import tseslint from 'typescript-eslint'; /** @type {import('eslint').Linter.FlatConfig[]} */ export default [ @@ -18,18 +17,83 @@ export default [ reportUnusedDisableDirectives: true, }, }, + // ignored directories + { + ignores: ['**/dist', '**/coverage'], + }, + importPlugin.flatConfigs.recommended, + importPlugin.flatConfigs.typescript, + jsxA11yPlugin.flatConfigs.recommended, + { + rules: { + 'jsx-a11y/no-autofocus': ['error', { ignoreNonDOM: true }], + }, + }, + { + plugins: { + react: reactPlugin, + }, + settings: { + react: { + version: 'detect', + }, + }, + rules: { + 'react/display-name': 'error', + 'react/jsx-curly-brace-presence': 'error', + 'react/jsx-fragments': ['error', 'syntax'], + 'react/jsx-key': ['error', { checkFragmentShorthand: true, checkKeyMustBeforeSpread: true, warnOnDuplicates: true }], + 'react/jsx-no-undef': 'error', + 'react/jsx-uses-react': 'error', + 'react/jsx-uses-vars': 'error', + 'react/no-children-prop': 'error', + 'react/no-multi-comp': 'error', + }, + }, + { + plugins: { + 'react-hooks': reactHooksPlugin, + }, + rules: { + 'react-hooks/exhaustive-deps': 'error', + 'react-hooks/rules-of-hooks': 'error', + }, + }, + ...storybookPlugin.configs['flat/recommended'], + { + plugins: { + 'anti-trojan-source': antiTrojanSourcePlugin, + }, + rules: { + 'anti-trojan-source/no-bidi': 'error', + }, + }, + prettierPluginRecommended, // javascript files { languageOptions: { ecmaVersion: 2024, sourceType: 'module', + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + }, }, }, - // ignored directories + // typescript files { - ignores: ['**/dist', '**/coverage'], + files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'], + languageOptions: { + parser: typescriptParser, + parserOptions: { + warnOnUnsupportedTypeScriptVersion: false, + }, + }, + plugins: { + '@typescript-eslint': typescriptPlugin, + }, }, - eslintPluginPrettierRecommended, // best practices { rules: { @@ -225,16 +289,12 @@ export default [ }, // import related rules { - plugins: { import: importPlugin }, settings: { 'import/resolver': { - node: { - extensions: ['.mjs', '.js', '.json'], - }, + node: true, + typescript: true, }, - 'import/extensions': ['.js', '.mjs', '.jsx'], - 'import/core-modules': [], - 'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'], + 'import/ignore': ['meteor/.+'], }, rules: { 'import/no-unresolved': [ @@ -242,8 +302,6 @@ export default [ { commonjs: true, caseSensitive: true, - amd: true, - ignore: ['^meteor/.+$'], }, ], 'import/named': 'off', @@ -272,32 +330,6 @@ export default [ 'import/no-useless-path-segments': 'error', }, }, - jsxA11yPlugin.flatConfigs.recommended, - { - plugins: { - 'react': reactPlugin, - 'react-hooks': reactHooksPlugin, - }, - settings: { - react: { - version: 'detect', - }, - }, - rules: { - 'react-hooks/exhaustive-deps': 'error', - 'react-hooks/rules-of-hooks': 'error', - 'react/display-name': 'error', - 'react/jsx-curly-brace-presence': 'error', - 'react/jsx-fragments': ['error', 'syntax'], - 'react/jsx-key': ['error', { checkFragmentShorthand: true, checkKeyMustBeforeSpread: true, warnOnDuplicates: true }], - 'react/jsx-no-undef': 'error', - 'react/jsx-uses-react': 'error', - 'react/jsx-uses-vars': 'error', - 'react/no-children-prop': 'error', - 'react/no-multi-comp': 'error', - 'jsx-a11y/no-autofocus': [2, { ignoreNonDOM: true }], - }, - }, { files: ['**/*.stories.js', '**/*.stories.jsx', '**/*.stories.ts', '**/*.stories.tsx', '**/*.spec.tsx'], rules: { @@ -305,54 +337,9 @@ export default [ 'react/no-multi-comp': 'off', }, }, - importPlugin.flatConfigs.typescript, - { - languageOptions: { - parser: babelParser, - parserOptions: { - requireConfigFile: false, - }, - }, - settings: { - 'import/resolver': { - node: { - extensions: ['.js', '.ts', '.tsx', '.cts', '.mts'], - }, - }, - }, - rules: { - 'jsx-quotes': ['error', 'prefer-single'], - }, - }, - // ...tseslint.configs.recommended, - // tseslint.configs.eslintRecommended, { files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'], - languageOptions: { - parser: typescriptParser, - parserOptions: { - sourceType: 'module', - ecmaVersion: 2018, - warnOnUnsupportedTypeScriptVersion: false, - ecmaFeatures: { - experimentalObjectRestSpread: true, - legacyDecorators: true, - }, - }, - globals: { - ...globals.browser, - ...globals.commonjs, - ...globals.es6, - ...globals.node, - }, - }, - plugins: { - 'anti-trojan-source': antiTrojanSourcePlugin, - '@typescript-eslint': typescriptPlugin, - }, rules: { - // '@typescript-eslint/no-empty-object-type': 'warn', - // '@typescript-eslint/no-restricted-types': [ '@typescript-eslint/ban-types': [ 'warn', { @@ -405,9 +392,13 @@ export default [ }, ], '@typescript-eslint/no-dupe-class-members': 'error', + '@typescript-eslint/no-empty-function': 'error', + '@typescript-eslint/no-empty-interface': 'warn', '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-non-null-assertion': 'warn', '@typescript-eslint/no-redeclare': 'error', '@typescript-eslint/no-redundant-type-constituents': 'off', + '@typescript-eslint/no-this-alias': 'error', '@typescript-eslint/no-unused-vars': [ 'error', { @@ -420,29 +411,17 @@ export default [ '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/prefer-optional-chain': 'warn', '@typescript-eslint/require-await': 'off', - 'anti-trojan-source/no-bidi': 'error', - 'func-call-spacing': 'off', - 'jsx-quotes': ['error', 'prefer-single'], 'no-dupe-class-members': 'off', 'no-empty-function': 'off', 'no-redeclare': 'off', - 'no-spaced-func': 'off', 'no-undef': 'off', 'no-unused-vars': 'off', 'no-use-before-define': 'off', 'no-useless-constructor': 'off', }, - settings: { - 'import/resolver': { - node: { - extensions: ['.js', '.ts', '.tsx', '.cts', '.mts'], - }, - typescript: {}, - }, - }, }, { - files: ['**/*.ts', '**/*.tsx'], + files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'], ignores: [ '**/*.d.ts', '**/__tests__/**', diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index b5faa9a30108a..0c39a05761a50 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -13,8 +13,8 @@ "/node", "/style", "/variables", - "react.js", - "flat.mjs" + "/react.js", + "/flat.mjs" ], "scripts": { "lint": "eslint .", diff --git a/yarn.lock b/yarn.lock index 768c22fff1914..54816cd390cbf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -32250,6 +32250,7 @@ __metadata: "@types/js-yaml": "npm:^4.0.9" "@types/node": "npm:~22.16.5" "@types/stream-buffers": "npm:^3.0.8" + eslint: "npm:~8.57.1" eslint-plugin-no-floating-promise: "npm:~2.0.0" eslint-plugin-you-dont-need-lodash-underscore: "npm:~6.14.0" node-gyp: "npm:^10.2.0" From fc5aac8876cdb1d77edb2cbf9dbf104601e8c755 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Wed, 25 Feb 2026 12:21:14 -0300 Subject: [PATCH 12/25] chore(eslint): compact configuration a little bit more --- eslint.config.mjs | 92 +++++++-------------------------- packages/eslint-config/flat.mjs | 2 +- 2 files changed, 20 insertions(+), 74 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index c95b655acd4ac..f814b0c7b8419 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -19,11 +19,6 @@ export default [ 'apps/meteor/**/public', 'apps/meteor/**/private/moment-locales', 'apps/meteor/**/imports', - '!apps/meteor/**/.mocharc.js', - '!apps/meteor/**/.mocharc.*.js', - '!apps/meteor/**/.scripts', - '!apps/meteor/**/.storybook', - 'apps/meteor/**/storybook-static', 'apps/meteor/**/packages', 'apps/meteor/.meteor/**', ], @@ -32,7 +27,6 @@ export default [ files: ['apps/meteor/**/*'], languageOptions: { globals: { - __meteor_bootstrap__: 'readonly', __meteor_runtime_config__: 'readonly', Assets: 'readonly', chrome: 'readonly', @@ -50,16 +44,9 @@ export default [ { commonjs: true, caseSensitive: true, - amd: true, - ignore: ['^meteor/.+$'], - }, - ], - 'react-hooks/exhaustive-deps': [ - 'warn', - { - additionalHooks: '(useComponentDidUpdate)', }, ], + 'react-hooks/exhaustive-deps': 'warn', 'you-dont-need-lodash-underscore/concat': 'error', 'you-dont-need-lodash-underscore/drop': 'error', 'you-dont-need-lodash-underscore/drop-right': 'error', @@ -266,7 +253,6 @@ export default [ { files: ['apps/meteor/client/**/*.ts', 'apps/meteor/client/**/*.tsx', 'apps/meteor/ee/client/**/*.ts', 'apps/meteor/ee/client/**/*.tsx'], rules: { - '@typescript-eslint/no-misused-promises': 'off', '@typescript-eslint/no-floating-promises': 'off', }, }, @@ -349,9 +335,6 @@ export default [ { ignores: [ 'apps/uikit-playground/build', - 'apps/uikit-playground/storybook-static', - '!apps/uikit-playground/.jest', - '!apps/uikit-playground/.storybook', 'apps/uikit-playground/.storybook/jest-results.json', 'apps/uikit-playground/.DS_Store', 'apps/uikit-playground/.env.local', @@ -398,9 +381,6 @@ export default [ { ignores: ['ee/packages/federation-matrix/src/api/.well-known/server.ts'], }, - { - ignores: ['!ee/packages/pdf-worker/.storybook'], - }, { files: ['packages/apps-engine/**/*.ts'], languageOptions: { @@ -517,18 +497,6 @@ export default [ '@typescript-eslint/explicit-function-return-type': 'off', }, }, - { - ignores: ['packages/fuselage-ui-kit/storybook-static', '!packages/fuselage-ui-kit/.storybook'], - }, - { - files: ['packages/fuselage-ui-kit/**/*.ts', 'packages/fuselage-ui-kit/**/*.tsx'], - rules: { - '@typescript-eslint/no-misused-promises': 'off', - }, - }, - { - ignores: ['packages/gazzodown/storybook-static', '!packages/gazzodown/.storybook'], - }, { files: ['packages/instance-status/**/*.spec.js', 'packages/instance-status/**/*.spec.jsx'], languageOptions: { @@ -542,7 +510,6 @@ export default [ }, { files: ['packages/livechat/**/*'], - ignores: ['packages/livechat/storybook-static', '!packages/livechat/.storybook'], languageOptions: { globals: { ...globals.browser, @@ -641,7 +608,6 @@ export default [ leadingUnderscore: 'require', }, ], - '@typescript-eslint/no-misused-promises': 'off', }, }, { @@ -670,44 +636,24 @@ export default [ ignores: ['packages/storybook-config/*.d.ts', 'packages/storybook-config/*.js'], }, { - ignores: ['packages/ui-avatar/storybook-static', '!packages/ui-avatar/.storybook'], - }, - { - ignores: ['packages/ui-client/storybook-static', '!packages/ui-client/.storybook'], - }, - { - files: ['packages/ui-client/**/*.ts', 'packages/ui-client/**/*.tsx'], - rules: { - '@typescript-eslint/no-misused-promises': 'off', - }, - }, - { - ignores: ['packages/ui-composer/storybook-static', '!packages/ui-composer/.storybook'], - }, - { - files: ['packages/ui-contexts/**/*.ts', 'packages/ui-contexts/**/*.tsx'], - rules: { - '@typescript-eslint/no-misused-promises': 'off', - }, - }, - { - ignores: ['packages/ui-video-conf/storybook-static', '!packages/ui-video-conf/.storybook'], - }, - { - ignores: ['packages/ui-voip/storybook-static', '!packages/ui-voip/.storybook'], - }, - { - files: ['packages/ui-voip/**/*.ts', 'packages/ui-voip/**/*.tsx'], - rules: { - '@typescript-eslint/no-misused-promises': 'off', - }, - }, - { - files: ['packages/web-ui-registration/**/*'], - ignores: ['packages/web-ui-registration/storybook-static', '!packages/web-ui-registration/.storybook'], - }, - { - files: ['packages/web-ui-registration/**/*.ts', 'packages/web-ui-registration/**/*.tsx'], + files: [ + 'apps/meteor/client/**/*.ts', + 'apps/meteor/client/**/*.tsx', + 'apps/meteor/ee/client/**/*.ts', + 'apps/meteor/ee/client/**/*.tsx', + 'packages/fuselage-ui-kit/**/*.ts', + 'packages/fuselage-ui-kit/**/*.tsx', + 'packages/livechat/**/*.ts', + 'packages/livechat/**/*.tsx', + 'packages/ui-client/**/*.ts', + 'packages/ui-client/**/*.tsx', + 'packages/ui-contexts/**/*.ts', + 'packages/ui-contexts/**/*.tsx', + 'packages/ui-voip/**/*.ts', + 'packages/ui-voip/**/*.tsx', + 'packages/web-ui-registration/**/*.ts', + 'packages/web-ui-registration/**/*.tsx', + ], rules: { '@typescript-eslint/no-misused-promises': 'off', }, diff --git a/packages/eslint-config/flat.mjs b/packages/eslint-config/flat.mjs index f7a8e1d4e5b2f..b81d38f96f203 100644 --- a/packages/eslint-config/flat.mjs +++ b/packages/eslint-config/flat.mjs @@ -19,7 +19,7 @@ export default [ }, // ignored directories { - ignores: ['**/dist', '**/coverage'], + ignores: ['**/dist', '**/coverage', '**/storybook-static'], }, importPlugin.flatConfigs.recommended, importPlugin.flatConfigs.typescript, From d7bdf990ddf401f427c2261a4c244d67727f8f0f Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Wed, 25 Feb 2026 12:43:50 -0300 Subject: [PATCH 13/25] chore(eslint): turn `@rocket.chat/eslint-config` into a ESM package --- eslint.config.mjs | 2 +- .../eslint-config/best-practices/index.js | 303 ----------- packages/eslint-config/errors/index.js | 148 ------ packages/eslint-config/es6/index.js | 189 ------- packages/eslint-config/imports/index.js | 257 ---------- packages/eslint-config/{flat.mjs => index.js} | 0 packages/eslint-config/node/index.js | 33 -- packages/eslint-config/original/index.js | 148 ------ packages/eslint-config/package.json | 18 +- packages/eslint-config/react.js | 35 -- packages/eslint-config/standard/index.js | 174 ------- packages/eslint-config/style/index.js | 473 ------------------ packages/eslint-config/variables/index.js | 51 -- 13 files changed, 7 insertions(+), 1824 deletions(-) delete mode 100644 packages/eslint-config/best-practices/index.js delete mode 100644 packages/eslint-config/errors/index.js delete mode 100644 packages/eslint-config/es6/index.js delete mode 100644 packages/eslint-config/imports/index.js rename packages/eslint-config/{flat.mjs => index.js} (100%) delete mode 100644 packages/eslint-config/node/index.js delete mode 100644 packages/eslint-config/original/index.js delete mode 100644 packages/eslint-config/react.js delete mode 100644 packages/eslint-config/standard/index.js delete mode 100644 packages/eslint-config/style/index.js delete mode 100644 packages/eslint-config/variables/index.js diff --git a/eslint.config.mjs b/eslint.config.mjs index f814b0c7b8419..864057297b0c7 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,4 +1,4 @@ -import rocketChatConfig from '@rocket.chat/eslint-config/flat.mjs'; +import rocketChatConfig from '@rocket.chat/eslint-config'; import jestPlugin from 'eslint-plugin-jest'; import noFloatingPromisePlugin from 'eslint-plugin-no-floating-promise'; import reactRefreshPlugin from 'eslint-plugin-react-refresh'; diff --git a/packages/eslint-config/best-practices/index.js b/packages/eslint-config/best-practices/index.js deleted file mode 100644 index 28f86b76a508f..0000000000000 --- a/packages/eslint-config/best-practices/index.js +++ /dev/null @@ -1,303 +0,0 @@ -module.exports = { - rules: { - // // enforces getter/setter pairs in objects - // 'accessor-pairs': 'off', - - // enforces return statements in callbacks of array's methods - // https://eslint.org/docs/rules/array-callback-return - 'array-callback-return': ['error', { allowImplicit: true }], - - // treat var statements as if they were block scoped - 'block-scoped-var': 'error', - - // specify the maximum cyclomatic complexity allowed in a program - 'complexity': ['warn', 31], - - // enforce that class methods use "this" - // https://eslint.org/docs/rules/class-methods-use-this - // 'class-methods-use-this': ['error', { - // exceptMethods: [], - // }], - - // require return statements to either always or never specify values - // 'consistent-return': 'error', - - // specify curly brace conventions for all control statements - 'curly': ['error', 'all'], - - // // require default case in switch statements - // 'default-case': ['error', { commentPattern: '^no default$' }], - - // encourages use of dot notation whenever possible - 'dot-notation': ['error', { allowKeywords: true }], - - // enforces consistent newlines before or after dots - // https://eslint.org/docs/rules/dot-location - 'dot-location': ['error', 'property'], - - // require the use of === and !== - // https://eslint.org/docs/rules/eqeqeq - 'eqeqeq': ['error', 'allow-null'], - - // make sure for-in loops have an if statement - 'guard-for-in': 'error', - - // // enforce a maximum number of classes per file - // // https://eslint.org/docs/rules/max-classes-per-file - // // TODO: semver-major (eslint 5): enable - // 'max-classes-per-file': ['off', 1], - - // // disallow the use of alert, confirm, and prompt - // 'no-alert': 'warn', - - // disallow use of arguments.caller or arguments.callee - 'no-caller': 'error', - - // disallow lexical declarations in case/default clauses - // https://eslint.org/docs/rules/no-case-declarations.html - // 'no-case-declarations': 'error', - - // disallow division operators explicitly at beginning of regular expression - // https://eslint.org/docs/rules/no-div-regex - 'no-div-regex': 'off', - - // disallow else after a return in an if - // https://eslint.org/docs/rules/no-else-return - 'no-else-return': ['error', { allowElseIf: false }], - - // disallow empty functions, except for standalone funcs/arrows - // https://eslint.org/docs/rules/no-empty-function - 'no-empty-function': [ - 'error', - { - allow: ['arrowFunctions', 'functions', 'methods'], - }, - ], - - // disallow empty destructuring patterns - // https://eslint.org/docs/rules/no-empty-pattern - 'no-empty-pattern': 'error', - - // // disallow comparisons to null without a type-checking operator - // 'no-eq-null': 'off', - - // disallow use of eval() - 'no-eval': 'error', - - // disallow adding to native types - 'no-extend-native': 'error', - - // disallow unnecessary function binding - 'no-extra-bind': 'error', - - // disallow Unnecessary Labels - // https://eslint.org/docs/rules/no-extra-label - 'no-extra-label': 'error', - - // disallow fallthrough of case statements - 'no-fallthrough': 'error', - - // disallow the use of leading or trailing decimal points in numeric literals - 'no-floating-decimal': 'error', - - // // disallow reassignments of native objects or read-only globals - // // https://eslint.org/docs/rules/no-global-assign - // 'no-global-assign': ['error', { exceptions: [] }], - // // deprecated in favor of no-global-assign - // 'no-native-reassign': 'off', - - // // disallow implicit type conversions - // // https://eslint.org/docs/rules/no-implicit-coercion - // 'no-implicit-coercion': ['off', { - // boolean: false, - // number: true, - // string: true, - // allow: [], - // }], - - // // disallow var and named functions in global scope - // // https://eslint.org/docs/rules/no-implicit-globals - // 'no-implicit-globals': 'off', - - // disallow use of eval()-like methods - 'no-implied-eval': 'error', - - // disallow this keywords outside of classes or class-like objects - 'no-invalid-this': 'off', - - // disallow usage of __iterator__ property - 'no-iterator': 'error', - - // // disallow use of labels for anything other then loops and switches - // 'no-labels': ['error', { allowLoop: false, allowSwitch: false }], - - // disallow unnecessary nested blocks - 'no-lone-blocks': 'error', - - // disallow creation of functions within loops - 'no-loop-func': 'error', - - // // disallow magic numbers - // // https://eslint.org/docs/rules/no-magic-numbers - // 'no-magic-numbers': ['off', { - // ignore: [], - // ignoreArrayIndexes: true, - // enforceConst: true, - // detectObjects: false, - // }], - - // disallow use of multiple spaces - 'no-multi-spaces': 'error', - - // disallow use of multiline strings - 'no-multi-str': 'error', - - // disallow use of new operator when not part of the assignment or comparison - // 'no-new': 'error', - - // disallow use of new operator for Function object - // 'no-new-func': 'error', - - // disallows creating new instances of String, Number, and Boolean - 'no-new-wrappers': 'error', - - // disallow use of (old style) octal literals - 'no-octal': 'error', - - // // disallow use of octal escape sequences in string literals, such as - // // var foo = 'Copyright \251'; - // 'no-octal-escape': 'error', - - // // disallow reassignment of function parameters - // // disallow parameter object manipulation except for specific exclusions - // // rule: https://eslint.org/docs/rules/no-param-reassign.html - // 'no-param-reassign': ['error', { - // props: true, - // ignorePropertyModificationsFor: [ - // 'acc', // for reduce accumulators - // 'accumulator', // for reduce accumulators - // 'e', // for e.returnvalue - // 'ctx', // for Koa routing - // 'req', // for Express requests - // 'request', // for Express requests - // 'res', // for Express responses - // 'response', // for Express responses - // '$scope', // for Angular 1 scopes - // ] - // }], - - // disallow usage of __proto__ property - 'no-proto': 'error', - - // disallow declaring the same variable more then once - 'no-redeclare': 'error', - - // disallow certain object properties - // https://eslint.org/docs/rules/no-restricted-properties - 'no-restricted-properties': [ - 'error', - { - object: 'describe', - property: 'only', - }, - { - object: 'it', - property: 'only', - }, - { - object: 'context', - property: 'only', - }, - ], - - // disallow use of assignment in return statement - 'no-return-assign': ['error', 'always'], - - // disallow redundant `return await` - 'no-return-await': 'error', - - // // disallow use of `javascript:` urls. - // 'no-script-url': 'error', - - // // disallow self assignment - // // https://eslint.org/docs/rules/no-self-assign - // // TODO: semver-major: props -> true - // 'no-self-assign': ['error', { - // props: false, - // }], - - // disallow comparisons where both sides are exactly the same - 'no-self-compare': 'error', - - // disallow use of comma operator - 'no-sequences': 'error', - - // restrict what can be thrown as an exception - 'no-throw-literal': 'error', - - // // disallow unmodified conditions of loops - // // https://eslint.org/docs/rules/no-unmodified-loop-condition - // 'no-unmodified-loop-condition': 'off', - - // // disallow usage of expressions in statement position - // 'no-unused-expressions': ['error', { - // allowShortCircuit: false, - // allowTernary: false, - // allowTaggedTemplates: false, - // }], - - // disallow unused labels - // https://eslint.org/docs/rules/no-unused-labels - 'no-unused-labels': 'error', - - // disallow unnecessary .call() and .apply() - 'no-useless-call': 'off', - - // disallow useless string concatenation - // https://eslint.org/docs/rules/no-useless-concat - 'no-useless-concat': 'error', - - // // disallow unnecessary string escaping - // // https://eslint.org/docs/rules/no-useless-escape - // 'no-useless-escape': 'error', - - // disallow redundant return; keywords - // https://eslint.org/docs/rules/no-useless-return - 'no-useless-return': 'error', - - // disallow use of void operator - // https://eslint.org/docs/rules/no-void - 'no-void': 'off', - - // // disallow usage of configurable warning terms in comments: e.g. todo - // 'no-warning-comments': ['off', { terms: ['todo', 'fixme', 'xxx'], location: 'start' }], - - // // disallow use of the with statement - // 'no-with': 'error', - - // // require using Error objects as Promise rejection reasons - // // https://eslint.org/docs/rules/prefer-promise-reject-errors - // 'prefer-promise-reject-errors': ['error', { allowEmptyReject: true }], - - // // require use of the second argument for parseInt() - // radix: 'error', - - // // require `await` in `async function` (note: this is a horrible rule that should never be used) - // // https://eslint.org/docs/rules/require-await - // 'require-await': 'off', - - // // Enforce the use of u flag on RegExp - // // https://eslint.org/docs/rules/require-unicode-regexp - // 'require-unicode-regexp': 'off', - - // // requires to declare all vars on top of their containing scope - // 'vars-on-top': 'error', - - // require immediate function invocation to be wrapped in parentheses - // https://eslint.org/docs/rules/wrap-iife.html - 'wrap-iife': ['error', 'outside', { functionPrototypeMethods: false }], - - // require or disallow Yoda conditions - 'yoda': 'error', - }, -}; diff --git a/packages/eslint-config/errors/index.js b/packages/eslint-config/errors/index.js deleted file mode 100644 index 3223c31e34b27..0000000000000 --- a/packages/eslint-config/errors/index.js +++ /dev/null @@ -1,148 +0,0 @@ -module.exports = { - rules: { - // Enforce “for” loop update clause moving the counter in the right direction - // https://eslint.org/docs/rules/for-direction - 'for-direction': 'error', - - // Enforces that a return statement is present in property getters - // https://eslint.org/docs/rules/getter-return - 'getter-return': ['error', { allowImplicit: true }], - - // disallow using an async function as a Promise executor - // https://eslint.org/docs/rules/no-async-promise-executor - // TODO: enable, semver-major - 'no-async-promise-executor': 'off', - - // Disallow await inside of loops - // https://eslint.org/docs/rules/no-await-in-loop - 'no-await-in-loop': 'error', - - // Disallow comparisons to negative zero - // https://eslint.org/docs/rules/no-compare-neg-zero - 'no-compare-neg-zero': 'error', - - // disallow assignment in conditional expressions - 'no-cond-assign': 'error', - - // disallow use of console - // 'no-console': 'warn', - - // disallow use of constant expressions in conditions - 'no-constant-condition': 'error', - - // disallow control characters in regular expressions - 'no-control-regex': 'error', - - // disallow use of debugger - 'no-debugger': 'error', - - // disallow duplicate arguments in functions - 'no-dupe-args': 'error', - - // disallow duplicate keys when creating object literals - 'no-dupe-keys': 'error', - - // disallow a duplicate case label. - 'no-duplicate-case': 'error', - - // disallow empty statements - 'no-empty': 'error', - - // disallow the use of empty character classes in regular expressions - 'no-empty-character-class': 'error', - - // disallow assigning to the exception in a catch block - 'no-ex-assign': 'error', - - // disallow double-negation boolean casts in a boolean context - // https://eslint.org/docs/rules/no-extra-boolean-cast - 'no-extra-boolean-cast': 'error', - - // disallow unnecessary parentheses - // https://eslint.org/docs/rules/no-extra-parens - 'no-extra-parens': [ - 'error', - 'all', - { - conditionalAssign: true, - nestedBinaryExpressions: false, - returnAssign: true, - ignoreJSX: 'all', // delegate to eslint-plugin-react - enforceForArrowConditionals: false, - }, - ], - - // disallow unnecessary semicolons - 'no-extra-semi': 'error', - - // disallow overwriting functions written as function declarations - 'no-func-assign': 'error', - - // disallow function declarations in nested blocks - 'no-inner-declarations': ['error', 'functions'], - - // disallow invalid regular expression strings in the RegExp constructor - 'no-invalid-regexp': 'error', - - // disallow irregular whitespace outside of strings and comments - 'no-irregular-whitespace': 'error', - - // // Disallow characters which are made with multiple code points in character class syntax - // // https://eslint.org/docs/rules/no-misleading-character-class - // // TODO: enable, semver-major - // 'no-misleading-character-class': 'off', - - // disallow the use of object properties of the global object (Math and JSON) as functions - 'no-obj-calls': 'error', - - // // disallow use of Object.prototypes builtins directly - // // https://eslint.org/docs/rules/no-prototype-builtins - // 'no-prototype-builtins': 'error', - - // disallow multiple spaces in a regular expression literal - 'no-regex-spaces': 'error', - - // disallow sparse arrays - 'no-sparse-arrays': 'error', - - // // Disallow template literal placeholder syntax in regular strings - // // https://eslint.org/docs/rules/no-template-curly-in-string - // 'no-template-curly-in-string': 'error', - - // Avoid code that looks like two expressions but is actually one - // https://eslint.org/docs/rules/no-unexpected-multiline - 'no-unexpected-multiline': 'error', - - // disallow unreachable statements after a return, throw, continue, or break statement - 'no-unreachable': 'error', - - // disallow return/throw/break/continue inside finally blocks - // https://eslint.org/docs/rules/no-unsafe-finally - 'no-unsafe-finally': 'error', - - // disallow negating the left operand of relational operators - // https://eslint.org/docs/rules/no-unsafe-negation - 'no-unsafe-negation': 'error', - - // disallow negation of the left operand of an in expression - // deprecated in favor of no-unsafe-negation - // TODO: turn off - 'no-negated-in-lhs': 'error', - - // Disallow assignments that can lead to race conditions due to usage of await or yield - // https://eslint.org/docs/rules/require-atomic-updates - // TODO: enable, semver-major - 'require-atomic-updates': 'off', - - // disallow comparisons with the value NaN - 'use-isnan': 'error', - - // // ensure JSDoc comments are valid - // // https://eslint.org/docs/rules/valid-jsdoc - // 'valid-jsdoc': 'off', - - // ensure that the results of typeof are compared against a valid string - // https://eslint.org/docs/rules/valid-typeof - 'valid-typeof': ['error', { requireStringLiterals: true }], - }, -}; diff --git a/packages/eslint-config/es6/index.js b/packages/eslint-config/es6/index.js deleted file mode 100644 index b066791920857..0000000000000 --- a/packages/eslint-config/es6/index.js +++ /dev/null @@ -1,189 +0,0 @@ -module.exports = { - env: { - es6: true, - }, - parserOptions: { - ecmaVersion: 6, - sourceType: 'module', - ecmaFeatures: { - generators: false, - objectLiteralDuplicateProperties: false, - }, - }, - - rules: { - // enforces no braces where they can be omitted - // https://eslint.org/docs/rules/arrow-body-style - // TODO: enable requireReturnForObjectLiteral? - 'arrow-body-style': [ - 'error', - 'as-needed', - { - requireReturnForObjectLiteral: false, - }, - ], - - // require parens in arrow function arguments - // https://eslint.org/docs/rules/arrow-parens - 'arrow-parens': ['error', 'always'], - - // require space before/after arrow function's arrow - // https://eslint.org/docs/rules/arrow-spacing - 'arrow-spacing': ['error', { before: true, after: true }], - - // // verify super() callings in constructors - // 'constructor-super': 'error', - - // // enforce the spacing around the * in generator functions - // // https://eslint.org/docs/rules/generator-star-spacing - // 'generator-star-spacing': ['error', { before: false, after: true }], - - // // disallow modifying variables of class declarations - // // https://eslint.org/docs/rules/no-class-assign - // 'no-class-assign': 'error', - - // disallow arrow functions where they could be confused with comparisons - // https://eslint.org/docs/rules/no-confusing-arrow - 'no-confusing-arrow': [ - 'error', - { - allowParens: true, - }, - ], - - // disallow modifying variables that are declared using const - 'no-const-assign': 'error', - - // disallow duplicate class members - // https://eslint.org/docs/rules/no-dupe-class-members - 'no-dupe-class-members': 'error', - - // disallow importing from the same path more than once - // https://eslint.org/docs/rules/no-duplicate-imports - // replaced by https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md - 'no-duplicate-imports': 'off', - - // // disallow symbol constructor - // // https://eslint.org/docs/rules/no-new-symbol - // 'no-new-symbol': 'error', - - // // disallow specific imports - // // https://eslint.org/docs/rules/no-restricted-imports - // 'no-restricted-imports': ['off', { - // paths: [], - // patterns: [] - // }], - - // disallow to use this/super before super() calling in constructors. - // https://eslint.org/docs/rules/no-this-before-super - 'no-this-before-super': 'error', - - // disallow useless computed property keys - // https://eslint.org/docs/rules/no-useless-computed-key - 'no-useless-computed-key': 'error', - - // disallow unnecessary constructor - // https://eslint.org/docs/rules/no-useless-constructor - 'no-useless-constructor': 'error', - - // disallow renaming import, export, and destructured assignments to the same name - // https://eslint.org/docs/rules/no-useless-rename - 'no-useless-rename': [ - 'error', - { - ignoreDestructuring: false, - ignoreImport: false, - ignoreExport: false, - }, - ], - - // require let or const instead of var - 'no-var': 'error', - - // require method and property shorthand syntax for object literals - // https://eslint.org/docs/rules/object-shorthand - 'object-shorthand': 'error', - - // // suggest using arrow functions as callbacks - // 'prefer-arrow-callback': ['error', { - // allowNamedFunctions: false, - // allowUnboundThis: true, - // }], - - // suggest using of const declaration for variables that are never modified after declared - 'prefer-const': [ - 'error', - { - destructuring: 'any', - ignoreReadBeforeAssign: true, - }, - ], - - // Prefer destructuring from arrays and objects - // https://eslint.org/docs/rules/prefer-destructuring - 'prefer-destructuring': [ - 'error', - { - VariableDeclarator: { - array: false, - object: true, - }, - AssignmentExpression: { - array: false, - object: false, - }, - }, - { - enforceForRenamedProperties: false, - }, - ], - - // // disallow parseInt() in favor of binary, octal, and hexadecimal literals - // // https://eslint.org/docs/rules/prefer-numeric-literals - // 'prefer-numeric-literals': 'error', - - // // suggest using Reflect methods where applicable - // // https://eslint.org/docs/rules/prefer-reflect - // 'prefer-reflect': 'off', - - // use rest parameters instead of arguments - // https://eslint.org/docs/rules/prefer-rest-params - 'prefer-rest-params': 'error', - - // // suggest using the spread operator instead of .apply() - // // https://eslint.org/docs/rules/prefer-spread - // 'prefer-spread': 'error', - - // suggest using template literals instead of string concatenation - // https://eslint.org/docs/rules/prefer-template - 'prefer-template': 'error', - - // // disallow generator functions that do not have yield - // // https://eslint.org/docs/rules/require-yield - // 'require-yield': 'error', - - // enforce spacing between object rest-spread - // https://eslint.org/docs/rules/rest-spread-spacing - 'rest-spread-spacing': ['error', 'never'], - - // // import sorting - // // https://eslint.org/docs/rules/sort-imports - // 'sort-imports': ['off', { - // ignoreCase: false, - // ignoreMemberSort: false, - // memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], - // }], - - // // require a Symbol description - // // https://eslint.org/docs/rules/symbol-description - // 'symbol-description': 'error', - - // enforce usage of spacing in template strings - // https://eslint.org/docs/rules/template-curly-spacing - 'template-curly-spacing': ['error', 'always'], - - // // enforce spacing around the * in yield* expressions - // // https://eslint.org/docs/rules/yield-star-spacing - // 'yield-star-spacing': ['error', 'after'] - }, -}; diff --git a/packages/eslint-config/imports/index.js b/packages/eslint-config/imports/index.js deleted file mode 100644 index 5b0b65ec48697..0000000000000 --- a/packages/eslint-config/imports/index.js +++ /dev/null @@ -1,257 +0,0 @@ -module.exports = { - env: { - es6: true, - }, - parserOptions: { - ecmaVersion: 6, - sourceType: 'module', - }, - plugins: ['import'], - - settings: { - 'import/resolver': { - node: { - extensions: ['.mjs', '.js', '.json'], - }, - }, - 'import/extensions': ['.js', '.mjs', '.jsx'], - 'import/core-modules': [], - 'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'], - }, - - rules: { - // Static analysis: - - // ensure imports point to files/modules that can be resolved - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md - 'import/no-unresolved': [ - 'error', - { - commonjs: true, - caseSensitive: true, - amd: true, - ignore: ['^meteor/.+$'], - }, - ], - - // ensure named imports coupled with named exports - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it - 'import/named': 'off', - - // ensure default import coupled with default export - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it - 'import/default': 'off', - - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md - 'import/namespace': 'off', - - // Helpful warnings: - - // disallow invalid exports, e.g. multiple defaults - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md - 'import/export': 'error', - - // do not allow a default import name to match a named export - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md - // 'import/no-named-as-default': 'error', - 'import/no-named-as-default': 'off', - - // warn on accessing default export property names that are also named exports - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md - // 'import/no-named-as-default-member': 'error', - 'import/no-named-as-default-member': 'off', - - // // disallow use of jsdoc-marked-deprecated imports - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md - // 'import/no-deprecated': 'off', - - // // Forbid the use of extraneous packages - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md - // // paths are treated both as absolute paths, and relative to process.cwd() - // 'import/no-extraneous-dependencies': ['error', { - // devDependencies: [ - // 'test/**', // tape, common npm pattern - // 'tests/**', // also common npm pattern - // 'spec/**', // mocha, rspec-like pattern - // '**/__tests__/**', // jest pattern - // '**/__mocks__/**', // jest pattern - // 'test.{js,jsx}', // repos with a single test file - // 'test-*.{js,jsx}', // repos with multiple top-level test files - // '**/*{.,_}{test,spec}.{js,jsx}', // tests where the extension or filename suffix denotes that it is a test - // '**/jest.config.js', // jest config - // '**/vue.config.js', // vue-cli config - // '**/webpack.config.js', // webpack config - // '**/webpack.config.*.js', // webpack config - // '**/rollup.config.js', // rollup config - // '**/rollup.config.*.js', // rollup config - // '**/gulpfile.js', // gulp config - // '**/gulpfile.*.js', // gulp config - // '**/Gruntfile{,.js}', // grunt config - // '**/protractor.conf.js', // protractor config - // '**/protractor.conf.*.js', // protractor config - // ], - // optionalDependencies: false, - // }], - - // // Forbid mutable exports - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md - // 'import/no-mutable-exports': 'error', - - // Module systems: - - // // disallow require() - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md - // 'import/no-commonjs': 'off', - - // // disallow AMD require/define - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md - // 'import/no-amd': 'error', - - // // No Node.js builtin modules - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md - // // TODO: enable? - // 'import/no-nodejs-modules': 'off', - - // Style guide: - - // disallow non-import statements appearing before import statements - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md - 'import/first': 'error', - - // // disallow non-import statements appearing before import statements - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/imports-first.md - // // deprecated: use `import/first` - // 'import/imports-first': 'off', - - // disallow duplicate imports - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md - 'import/no-duplicates': 'error', - - // // disallow namespace imports - // // TODO: enable? - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md - // 'import/no-namespace': 'off', - - // // Ensure consistent use of file extension within the import path - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md - // 'import/extensions': ['error', 'ignorePackages', { - // js: 'never', - // mjs: 'never', - // jsx: 'never', - // }], - - // ensure absolute imports are above relative imports and that unassigned imports are ignored - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md - // TODO: enforce a stricter convention in module import order? - 'import/order': [ - 'error', - { - 'newlines-between': 'always', - 'groups': ['builtin', ['external', 'internal'], ['parent', 'sibling', 'index']], - 'alphabetize': { - order: 'asc', - }, - }, - ], - - // Require a newline after the last import/require in a group - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md - 'import/newline-after-import': 'error', - - // // Require modules with a single export to use a default export - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md - // 'import/prefer-default-export': 'error', - - // // Restrict which files can be imported in a given folder - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md - // 'import/no-restricted-paths': 'off', - - // // Forbid modules to have too many dependencies - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md - // 'import/max-dependencies': ['off', { max: 10 }], - - // Forbid import of modules using absolute paths - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md - 'import/no-absolute-path': 'error', - - // Forbid require() calls with expressions - // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md - 'import/no-dynamic-require': 'error', - - // // prevent importing the submodules of other modules - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md - // 'import/no-internal-modules': ['off', { - // allow: [], - // }], - - // // Warn if a module could be mistakenly parsed as a script by a consumer - // // leveraging Unambiguous JavaScript Grammar - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/unambiguous.md - // // this should not be enabled until this proposal has at least been *presented* to TC39. - // // At the moment, it's not a thing. - // 'import/unambiguous': 'off', - - // // Forbid Webpack loader syntax in imports - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md - // 'import/no-webpack-loader-syntax': 'error', - - // // Prevent unassigned imports - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md - // // importing for side effects is perfectly acceptable, if you need side effects. - // 'import/no-unassigned-import': 'off', - - // // Prevent importing the default as if it were named - // // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md - // 'import/no-named-default': 'error', - - // // Reports if a module's default export is unnamed - // // https://github.com/benmosher/eslint-plugin-import/blob/d9b712ac7fd1fddc391f7b234827925c160d956f/docs/rules/no-anonymous-default-export.md - // 'import/no-anonymous-default-export': ['off', { - // allowArray: false, - // allowArrowFunction: false, - // allowAnonymousClass: false, - // allowAnonymousFunction: false, - // allowLiteral: false, - // allowObject: false, - // }], - - // // This rule enforces that all exports are declared at the bottom of the file. - // // https://github.com/benmosher/eslint-plugin-import/blob/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md - // // TODO: enable? - // 'import/exports-last': 'off', - - // // Reports when named exports are not grouped together in a single export declaration - // // or when multiple assignments to CommonJS module.exports or exports object are present - // // in a single file. - // // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md - // 'import/group-exports': 'off', - - // // forbid default exports. this is a terrible rule, do not use it. - // // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-default-export.md - // 'import/no-default-export': 'off', - - // Forbid a module from importing itself - // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-self-import.md - 'import/no-self-import': 'error', - - // Forbid cyclical dependencies between modules - // https://github.com/benmosher/eslint-plugin-import/blob/d81f48a2506182738409805f5272eff4d77c9348/docs/rules/no-cycle.md - // 'import/no-cycle': ['error', { maxDepth: Infinity }], - 'import/no-cycle': 'off', - - // Ensures that there are no useless path segments - // https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/no-useless-path-segments.md - 'import/no-useless-path-segments': 'error', - - // // dynamic imports require a leading comment with a webpackChunkName - // // https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/dynamic-import-chunkname.md - // 'import/dynamic-import-chunkname': ['off', { - // importFunctions: [], - // webpackChunknameFormat: '[0-9a-zA-Z-_/.]+', - // }], - - // // Use this rule to prevent imports to folders in relative parent paths. - // // https://github.com/benmosher/eslint-plugin-import/blob/c34f14f67f077acd5a61b3da9c0b0de298d20059/docs/rules/no-relative-parent-imports.md - // 'import/no-relative-parent-imports': 'off', - }, -}; diff --git a/packages/eslint-config/flat.mjs b/packages/eslint-config/index.js similarity index 100% rename from packages/eslint-config/flat.mjs rename to packages/eslint-config/index.js diff --git a/packages/eslint-config/node/index.js b/packages/eslint-config/node/index.js deleted file mode 100644 index 396bb969c7df3..0000000000000 --- a/packages/eslint-config/node/index.js +++ /dev/null @@ -1,33 +0,0 @@ -module.exports = { - env: { - node: true, - }, - - rules: { - // enforce return after a callback - // 'callback-return': 'off', - // // require all requires be top-level - // // https://eslint.org/docs/rules/global-require - // 'global-require': 'error', - // // enforces error handling in callbacks (node environment) - // 'handle-callback-err': 'off', - // // disallow use of the Buffer() constructor - // // https://eslint.org/docs/rules/no-buffer-constructor - // 'no-buffer-constructor': 'error', - // // disallow mixing regular variable and require declarations - // 'no-mixed-requires': ['off', false], - // // disallow use of new operator with the require function - // 'no-new-require': 'error', - // // disallow string concatenation with __dirname and __filename - // // https://eslint.org/docs/rules/no-path-concat - // 'no-path-concat': 'error', - // // disallow use of process.env - // 'no-process-env': 'off', - // // disallow process.exit() - // 'no-process-exit': 'off', - // // restrict usage of specified node modules - // 'no-restricted-modules': 'off', - // // disallow use of synchronous methods (off by default) - // 'no-sync': 'off', - }, -}; diff --git a/packages/eslint-config/original/index.js b/packages/eslint-config/original/index.js deleted file mode 100644 index 0f01f4c570c56..0000000000000 --- a/packages/eslint-config/original/index.js +++ /dev/null @@ -1,148 +0,0 @@ -module.exports = { - extends: [ - '../best-practices/index.js', - '../errors/index.js', - '../node/index.js', - '../style/index.js', - '../variables/index.js', - '../es6/index.js', - '../imports/index.js', - ], - - parserOptions: { - sourceType: 'module', - ecmaVersion: 2018, - ecmaFeatures: { - generators: false, - objectLiteralDuplicateProperties: false, - }, - }, - env: { - browser: true, - commonjs: true, - es6: true, - node: true, - }, - // rules: { - // // 'no-multi-spaces': 2, - // // 'no-eval': 2, - // // 'no-extend-native': 2, - // // 'no-multi-str': 2, - // // 'no-use-before-define': 2, - // // 'no-const-assign': 2, - // // 'no-cond-assign': 2, - // // 'no-constant-condition': 2, - // // 'no-control-regex': 2, - // // 'no-debugger': 2, - // // 'no-delete-var': 2, - // // 'no-dupe-keys': 2, - // // 'no-dupe-args': 2, - // // 'no-dupe-class-members': 2, - // // 'no-duplicate-case': 2, - // // 'no-empty': 2, - // // 'no-empty-character-class': 2, - // // 'no-ex-assign': 2, - // // 'no-extra-boolean-cast': 2, - // // 'no-extra-semi': 2, - // // 'no-fallthrough': 2, - // // 'no-func-assign': 2, - // // 'no-inner-declarations': [2, 'functions'], - // // 'no-invalid-regexp': 2, - // // 'no-irregular-whitespace': 2, - // // 'no-mixed-operators': [2, { - // // 'groups': [ - // // ['%', '**'], - // // ['%', '+'], - // // ['%', '-'], - // // ['%', '*'], - // // ['%', '/'], - // // ['**', '+'], - // // ['**', '-'], - // // ['**', '*'], - // // ['**', '/'], - // // ['&', '|', '^', '~', '<<', '>>', '>>>'], - // // ['==', '!=', '===', '!==', '>', '>=', '<', '<='], - // // ['&&', '||'], - // // ['in', 'instanceof'] - // // ], - // // 'allowSamePrecedence': false - // // }], - // // 'no-mixed-spaces-and-tabs': 2, - // // 'no-sparse-arrays': 2, - // // 'no-negated-in-lhs': 2, - // // 'no-obj-calls': 2, - // // 'no-octal': 2, - // // 'no-redeclare': 2, - // // 'no-regex-spaces': 2, - // // 'no-undef': 2, - // // 'no-unreachable': 2, - // // 'no-unused-vars': [2, { - // // 'vars': 'all', - // // 'args': 'after-used' - // // }], - // // 'no-void': 2, - // // 'no-var': 2, - // // 'no-multiple-empty-lines': [2, { 'max': 2 }], - // // 'no-nested-ternary': 2, - // // 'prefer-rest-params': 2, - // // 'array-callback-return': 2, - // // 'prefer-destructuring': [2, { - // // 'VariableDeclarator': { - // // 'array': false, - // // 'object': true - // // }, - // // 'AssignmentExpression': { - // // 'array': false, - // // 'object': false - // // } - // // }, { - // // 'enforceForRenamedProperties': false - // // }], - // // 'no-duplicate-imports': 2, - // // 'arrow-parens': [2, 'always'], - // // 'quote-props': [2, 'as-needed'], - // // 'no-array-constructor': 2, - // // 'arrow-spacing': 2, - // // 'arrow-body-style': [2, 'as-needed'], - // // 'no-confusing-arrow': [2, { 'allowParens': true }], - // // 'dot-notation': 2, - // // 'no-unneeded-ternary': 2, - // // 'spaced-comment': 2, - // // 'space-infix-ops': 2, - // // 'array-bracket-spacing': [2, 'never'], - // // 'object-curly-spacing': [2, 'always'], - // // 'one-var': [2, 'never'], - // // 'no-lonely-if': 2, - // // 'no-trailing-spaces': 2, - // // 'complexity': [1, 31], - // // 'space-in-parens': [2, 'never'], - // // 'space-before-function-paren': [2, 'never'], - // // 'space-before-blocks': [2, 'always'], - // // 'indent': [2, 'tab', {'SwitchCase': 1}], - // // 'eol-last': [2, 'always'], - // // 'comma-dangle': [2, 'always-multiline'], - // // 'keyword-spacing': 2, - // // 'block-spacing': 2, - // // 'brace-style': [2, '1tbs', { 'allowSingleLine': true }], - // // 'computed-property-spacing': 2, - // // 'comma-spacing': 2, - // // 'comma-style': 2, - // // 'guard-for-in': 2, - // // 'wrap-iife': 2, - // // 'block-scoped-var': 2, - // // 'curly': [2, 'all'], - // // 'eqeqeq': [2, 'allow-null'], - // // 'new-cap': [2, { - // // 'capIsNewExceptions': ['Match.Optional', 'Match.Maybe', 'Match.OneOf', 'Match.Where', 'Match.ObjectIncluding', 'Push.Configure', 'SHA256'] - // // }], - // // 'use-isnan': 2, - // // 'valid-typeof': 2, - // // 'linebreak-style': [2, 'unix'], - // // 'prefer-template': 2, - // // 'template-curly-spacing': [2, 'always'], - // // 'quotes': [2, 'single'], - // // 'semi': [2, 'always'], - // // 'prefer-const': 2, - // // 'object-shorthand': 2 - // } -}; diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 0c39a05761a50..3127cad8823c3 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -2,19 +2,13 @@ "name": "@rocket.chat/eslint-config", "version": "0.7.0", "description": "Rocket.Chat's JS/TS ESLint config", - "main": "./standard/index.js", + "type": "module", + "main": "./index.js", + "exports": { + ".": "./index.js" + }, "files": [ - "/standard", - "/original", - "/best-practices", - "/errors", - "/es6", - "/imports", - "/node", - "/style", - "/variables", - "/react.js", - "/flat.mjs" + "/index.js" ], "scripts": { "lint": "eslint .", diff --git a/packages/eslint-config/react.js b/packages/eslint-config/react.js deleted file mode 100644 index a5b7d88652309..0000000000000 --- a/packages/eslint-config/react.js +++ /dev/null @@ -1,35 +0,0 @@ -/** @type {import('eslint').ESLint.ConfigData} */ -const config = { - plugins: ['react', 'react-hooks', 'jsx-a11y'], - extends: ['plugin:jsx-a11y/recommended'], - rules: { - 'react-hooks/exhaustive-deps': 'error', - 'react-hooks/rules-of-hooks': 'error', - 'react/display-name': 'error', - 'react/jsx-curly-brace-presence': 'error', - 'react/jsx-fragments': ['error', 'syntax'], - 'react/jsx-key': ['error', { checkFragmentShorthand: true, checkKeyMustBeforeSpread: true, warnOnDuplicates: true }], - 'react/jsx-no-undef': 'error', - 'react/jsx-uses-react': 'error', - 'react/jsx-uses-vars': 'error', - 'react/no-children-prop': 'error', - 'react/no-multi-comp': 'error', - 'jsx-a11y/no-autofocus': [2, { ignoreNonDOM: true }], - }, - settings: { - react: { - version: 'detect', - }, - }, - overrides: [ - { - files: ['**/*.stories.js', '**/*.stories.jsx', '**/*.stories.ts', '**/*.stories.tsx', '**/*.spec.tsx'], - rules: { - 'react/display-name': 'off', - 'react/no-multi-comp': 'off', - }, - }, - ], -}; - -module.exports = config; diff --git a/packages/eslint-config/standard/index.js b/packages/eslint-config/standard/index.js deleted file mode 100644 index a10b3e149acb7..0000000000000 --- a/packages/eslint-config/standard/index.js +++ /dev/null @@ -1,174 +0,0 @@ -module.exports = { - extends: ['../original/index.js', '../react.js', 'plugin:prettier/recommended', 'plugin:import/typescript'], - parser: '@babel/eslint-parser', - parserOptions: { - requireConfigFile: false, - }, - settings: { - 'import/resolver': { - node: { - extensions: ['.js', '.ts', '.tsx', '.cts', '.mts'], - }, - }, - }, - rules: { - 'jsx-quotes': ['error', 'prefer-single'], - }, - overrides: [ - { - files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'], - extends: [ - 'plugin:@typescript-eslint/recommended', - 'plugin:@typescript-eslint/eslint-recommended', - '../original/index.js', - '../react.js', - 'plugin:prettier/recommended', - ], - parser: '@typescript-eslint/parser', - parserOptions: { - sourceType: 'module', - ecmaVersion: 2018, - warnOnUnsupportedTypeScriptVersion: false, - ecmaFeatures: { - experimentalObjectRestSpread: true, - legacyDecorators: true, - }, - }, - plugins: ['@typescript-eslint', 'anti-trojan-source'], - rules: { - '@typescript-eslint/ban-types': [ - 'warn', - { - types: { - 'FC': 'Useless and has some drawbacks, see https://adr.rocket.chat/0094', - 'React.FC': 'Useless and has some drawbacks, see https://adr.rocket.chat/0094', - 'VFC': 'Useless and has some drawbacks, see https://adr.rocket.chat/0094', - 'React.VFC': 'Useless and has some drawbacks, see https://adr.rocket.chat/0094', - 'FunctionComponent': 'Useless and has some drawbacks, see https://adr.rocket.chat/0094', - 'React.FunctionComponent': 'Useless and has some drawbacks, see https://adr.rocket.chat/0094', - }, - }, - ], - '@typescript-eslint/ban-ts-comment': 'warn', - '@typescript-eslint/consistent-type-imports': 'error', - '@typescript-eslint/naming-convention': [ - 'error', - { selector: 'variableLike', format: ['camelCase'], leadingUnderscore: 'allow' }, - { - selector: ['variable'], - format: ['camelCase', 'UPPER_CASE', 'PascalCase'], - leadingUnderscore: 'allowSingleOrDouble', - }, - { - selector: ['function'], - format: ['camelCase', 'PascalCase'], - leadingUnderscore: 'allowSingleOrDouble', - }, - { - selector: 'parameter', - format: null, - filter: { - regex: '^Story$', - match: true, - }, - }, - { - selector: 'parameter', - format: ['camelCase'], - modifiers: ['unused'], - leadingUnderscore: 'require', - }, - { - selector: 'interface', - format: ['PascalCase'], - custom: { - regex: '^I[A-Z]', - match: true, - }, - }, - ], - '@typescript-eslint/no-dupe-class-members': 'error', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-redeclare': 'error', - '@typescript-eslint/no-unused-vars': [ - 'error', - { - argsIgnorePattern: '^_', - ignoreRestSiblings: true, - }, - ], - '@typescript-eslint/prefer-optional-chain': 'warn', - 'anti-trojan-source/no-bidi': 'error', - 'func-call-spacing': 'off', - 'indent': 'off', - 'jsx-quotes': ['error', 'prefer-single'], - 'no-dupe-class-members': 'off', - 'no-empty-function': 'off', - 'no-extra-parens': 'off', - 'no-redeclare': 'off', - 'no-spaced-func': 'off', - 'no-undef': 'off', - 'no-unused-vars': 'off', - 'no-use-before-define': 'off', - 'no-useless-constructor': 'off', - }, - env: { - browser: true, - commonjs: true, - es6: true, - node: true, - }, - settings: { - 'import/resolver': { - node: { - extensions: ['.js', '.ts', '.tsx', '.cts', '.mts'], - }, - typescript: {}, - }, - }, - }, - { - files: ['**/*.ts', '**/*.tsx'], - excludedFiles: [ - '**/*.d.ts', - '**/__tests__/**', - '**/*.spec.ts', - '**/*.spec.tsx', - '**/*.test.ts', - '**/*.test.tsx', - '**/tests/**', - '**/.storybook/**', - 'jest.config.ts', - 'jest.config.js', - 'jest.config.*.ts', - 'jest.config.*.js', - 'webpack.config.ts', - 'webpack.config.js', - 'vite.config.ts', - 'vite.config.js', - 'rollup.config.ts', - 'rollup.config.js', - ], - parserOptions: { - project: true, - }, - rules: { - '@typescript-eslint/no-misused-promises': [ - 'error', - { - checksVoidReturn: { - arguments: false, - }, - }, - ], - '@typescript-eslint/no-floating-promises': 'error', - }, - }, - { - files: ['**/*.d.ts'], - rules: { - '@typescript-eslint/naming-convention': 'off', - }, - }, - ], -}; diff --git a/packages/eslint-config/style/index.js b/packages/eslint-config/style/index.js deleted file mode 100644 index ca875683dbeb2..0000000000000 --- a/packages/eslint-config/style/index.js +++ /dev/null @@ -1,473 +0,0 @@ -module.exports = { - rules: { - // enforce line breaks after opening and before closing array brackets - // https://eslint.org/docs/rules/array-bracket-newline - // TODO: enable? semver-major - // 'array-bracket-newline': ['off', 'consistent'], // object option alternative: { multiline: true, minItems: 3 } - - // // enforce line breaks between array elements - // // https://eslint.org/docs/rules/array-element-newline - // // TODO: enable? semver-major - // 'array-element-newline': ['off', { multiline: true, minItems: 3 }], - - // enforce spacing inside array brackets - 'array-bracket-spacing': ['error', 'never'], - - // enforce spacing inside single-line blocks - // https://eslint.org/docs/rules/block-spacing - 'block-spacing': 'error', - - // enforce one true brace style - 'brace-style': ['error', '1tbs', { allowSingleLine: true }], - - // // require camel case names - // // TODO: semver-major (eslint 5): add ignoreDestructuring: false option - // camelcase: ['error', { properties: 'never' }], - - // // enforce or disallow capitalization of the first letter of a comment - // // https://eslint.org/docs/rules/capitalized-comments - // 'capitalized-comments': ['off', 'never', { - // line: { - // ignorePattern: '.*', - // ignoreInlineComments: true, - // ignoreConsecutiveComments: true, - // }, - // block: { - // ignorePattern: '.*', - // ignoreInlineComments: true, - // ignoreConsecutiveComments: true, - // }, - // }], - - // require trailing commas in multiline object literals - 'comma-dangle': ['error', 'always-multiline'], - - // enforce spacing before and after comma - 'comma-spacing': 'error', - - // enforce one true comma style - 'comma-style': 'error', - - // disallow padding inside computed properties - 'computed-property-spacing': ['error', 'never'], - - // // enforces consistent naming when capturing the current execution context - // 'consistent-this': 'off', - - // enforce newline at the end of file, with no multiple empty lines - 'eol-last': ['error', 'always'], - - // enforce spacing between functions and their invocations - // https://eslint.org/docs/rules/func-call-spacing - 'func-call-spacing': ['error', 'never'], - - // // requires function names to match the name of the variable or property to which they are - // // assigned - // // https://eslint.org/docs/rules/func-name-matching - // // TODO: semver-major (eslint 5): add considerPropertyDescriptor: true - // 'func-name-matching': ['off', 'always', { - // includeCommonJSModuleExports: false - // }], - - // // require function expressions to have a name - // // https://eslint.org/docs/rules/func-names - // 'func-names': 'warn', - - // // enforces use of function declarations or expressions - // // https://eslint.org/docs/rules/func-style - // // TODO: enable - // 'func-style': ['off', 'expression'], - - // // enforce consistent line breaks inside function parentheses - // // https://eslint.org/docs/rules/function-paren-newline - // 'function-paren-newline': ['error', 'consistent'], - - // // Blacklist certain identifiers to prevent them being used - // // https://eslint.org/docs/rules/id-blacklist - // 'id-blacklist': 'off', - - // // this option enforces minimum and maximum identifier lengths - // // (variable names, property names etc.) - // 'id-length': 'off', - - // // require identifiers to match the provided regular expression - // 'id-match': 'off', - - // Enforce the location of arrow function bodies with implicit returns - // https://eslint.org/docs/rules/implicit-arrow-linebreak - // 'implicit-arrow-linebreak': ['error', 'beside'], - - // this option sets a specific tab width for your code - // https://eslint.org/docs/rules/indent - 'indent': ['error', 'tab', { SwitchCase: 1 }], - - // // specify whether double or single quotes should be used in JSX attributes - // // https://eslint.org/docs/rules/jsx-quotes - // 'jsx-quotes': ['off', 'prefer-double'], - - // enforces spacing between keys and values in object literal properties - 'key-spacing': ['error', { beforeColon: false, afterColon: true }], - - // require a space before & after certain keywords - 'keyword-spacing': 'error', - - // // enforce position of line comments - // // https://eslint.org/docs/rules/line-comment-position - // // TODO: enable? - // 'line-comment-position': ['off', { - // position: 'above', - // ignorePattern: '', - // applyDefaultPatterns: true, - // }], - - // disallow mixed 'LF' and 'CRLF' as linebreaks - // https://eslint.org/docs/rules/linebreak-style - 'linebreak-style': ['error', 'unix'], - - // require or disallow an empty line between class members - // https://eslint.org/docs/rules/lines-between-class-members - 'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: false }], - - // // enforces empty lines around comments - // 'lines-around-comment': 'off', - - // require or disallow newlines around directives - // https://eslint.org/docs/rules/lines-around-directive - 'lines-around-directive': [ - 'error', - { - before: 'always', - after: 'always', - }, - ], - - // specify the maximum depth that blocks can be nested - 'max-depth': ['off', 4], - - // // specify the maximum length of a line in your program - // // https://eslint.org/docs/rules/max-len - // 'max-len': ['error', 100, 2, { - // ignoreUrls: true, - // ignoreComments: false, - // ignoreRegExpLiterals: true, - // ignoreStrings: true, - // ignoreTemplateLiterals: true, - // }], - - // // specify the max number of lines in a file - // // https://eslint.org/docs/rules/max-lines - // 'max-lines': ['off', { - // max: 300, - // skipBlankLines: true, - // skipComments: true - // }], - - // // enforce a maximum function length - // // https://eslint.org/docs/rules/max-lines-per-function - // 'max-lines-per-function': ['off', { - // max: 50, - // skipBlankLines: true, - // skipComments: true, - // IIFEs: true, - // }], - - // // specify the maximum depth callbacks can be nested - // 'max-nested-callbacks': 'off', - - // // limits the number of parameters that can be used in the function declaration. - // 'max-params': ['off', 3], - - // // specify the maximum number of statement allowed in a function - // 'max-statements': ['off', 10], - - // // restrict the number of statements per line - // // https://eslint.org/docs/rules/max-statements-per-line - // 'max-statements-per-line': ['off', { max: 1 }], - - // // enforce a particular style for multiline comments - // // https://eslint.org/docs/rules/multiline-comment-style - // 'multiline-comment-style': ['off', 'starred-block'], - - // // require multiline ternary - // // https://eslint.org/docs/rules/multiline-ternary - // // TODO: enable? - // 'multiline-ternary': ['off', 'never'], - - // require a capital letter for constructors - 'new-cap': [ - 'error', - { - capIsNewExceptions: [ - 'Match.Optional', - 'Match.Maybe', - 'Match.OneOf', - 'Match.Where', - 'Match.ObjectIncluding', - 'Push.Configure', - 'SHA256', - ], - }, - ], - - // disallow the omission of parentheses when invoking a constructor with no arguments - // https://eslint.org/docs/rules/new-parens - 'new-parens': 'error', - - // // allow/disallow an empty newline after var statement - // 'newline-after-var': 'off', - - // // https://eslint.org/docs/rules/newline-before-return - // 'newline-before-return': 'off', - - // // enforces new line after each method call in the chain to make it - // // more readable and easy to maintain - // // https://eslint.org/docs/rules/newline-per-chained-call - // 'newline-per-chained-call': ['error', { ignoreChainWithDepth: 4 }], - - // disallow use of the Array constructor - 'no-array-constructor': 'error', - - // // disallow use of bitwise operators - // // https://eslint.org/docs/rules/no-bitwise - // 'no-bitwise': 'error', - - // // disallow use of the continue statement - // // https://eslint.org/docs/rules/no-continue - // 'no-continue': 'error', - - // // disallow comments inline after code - // 'no-inline-comments': 'off', - - // disallow if as the only statement in an else block - // https://eslint.org/docs/rules/no-lonely-if - 'no-lonely-if': 'error', - - // disallow un-paren'd mixes of different operators - // https://eslint.org/docs/rules/no-mixed-operators - 'no-mixed-operators': [ - 'error', - { - // the list of arthmetic groups disallows mixing `%` and `**` - // with other arithmetic operators. - groups: [ - ['%', '**'], - ['%', '+'], - ['%', '-'], - ['%', '*'], - ['%', '/'], - ['**', '+'], - ['**', '-'], - ['**', '*'], - ['**', '/'], - ['&', '|', '^', '~', '<<', '>>', '>>>'], - ['==', '!=', '===', '!==', '>', '>=', '<', '<='], - ['&&', '||'], - ['in', 'instanceof'], - ], - allowSamePrecedence: false, - }, - ], - - // disallow mixed spaces and tabs for indentation - 'no-mixed-spaces-and-tabs': 'error', - - // disallow use of chained assignment expressions - // https://eslint.org/docs/rules/no-multi-assign - 'no-multi-assign': ['error'], - - // disallow multiple empty lines and only one newline at the end - 'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0 }], - - // // disallow negated conditions - // // https://eslint.org/docs/rules/no-negated-condition - // 'no-negated-condition': 'off', - - // disallow nested ternary expressions - 'no-nested-ternary': 'error', - - // // disallow use of the Object constructor - // 'no-new-object': 'error', - - // // disallow use of unary operators, ++ and -- - // // https://eslint.org/docs/rules/no-plusplus - // 'no-plusplus': 'error', - - // // disallow certain syntax forms - // // https://eslint.org/docs/rules/no-restricted-syntax - // 'no-restricted-syntax': [ - // 'error', - // { - // selector: 'ForInStatement', - // message: 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.', - // }, - // { - // selector: 'ForOfStatement', - // message: 'iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.', - // }, - // { - // selector: 'LabeledStatement', - // message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.', - // }, - // { - // selector: 'WithStatement', - // message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.', - // }, - // ], - - // disallow space between function identifier and application - 'no-spaced-func': 'error', - - // // disallow tab characters entirely - // 'no-tabs': 'error', - - // // disallow the use of ternary operators - // 'no-ternary': 'off', - - // disallow trailing whitespace at the end of lines - 'no-trailing-spaces': [ - 'error', - { - skipBlankLines: false, - ignoreComments: false, - }, - ], - - // // disallow dangling underscores in identifiers - // // https://eslint.org/docs/rules/no-underscore-dangle - // 'no-underscore-dangle': ['error', { - // allow: [], - // allowAfterThis: false, - // allowAfterSuper: false, - // enforceInMethodNames: true, - // }], - - // disallow the use of Boolean literals in conditional expressions - // also, prefer `a || b` over `a ? a : b` - // https://eslint.org/docs/rules/no-unneeded-ternary - 'no-unneeded-ternary': ['error', { defaultAssignment: false }], - - // disallow whitespace before properties - // https://eslint.org/docs/rules/no-whitespace-before-property - 'no-whitespace-before-property': 'error', - - // // enforce the location of single-line statements - // // https://eslint.org/docs/rules/nonblock-statement-body-position - // 'nonblock-statement-body-position': ['error', 'beside', { overrides: {} }], - - // require padding inside curly braces - 'object-curly-spacing': ['error', 'always'], - - // // enforce line breaks between braces - // // https://eslint.org/docs/rules/object-curly-newline - // 'object-curly-newline': ['error', { - // ObjectExpression: { minProperties: 4, multiline: true, consistent: true }, - // ObjectPattern: { minProperties: 4, multiline: true, consistent: true }, - // ImportDeclaration: { minProperties: 4, multiline: true, consistent: true }, - // ExportDeclaration: { minProperties: 4, multiline: true, consistent: true }, - // }], - - // enforce "same line" or "multiple line" on object properties. - // https://eslint.org/docs/rules/object-property-newline - 'object-property-newline': [ - 'error', - { - allowAllPropertiesOnSameLine: true, - }, - ], - - // allow just one var statement per function - 'one-var': ['error', 'never'], - - // // require a newline around variable declaration - // // https://eslint.org/docs/rules/one-var-declaration-per-line - // 'one-var-declaration-per-line': ['error', 'always'], - - // require assignment operator shorthand where possible or prohibit it entirely - // https://eslint.org/docs/rules/operator-assignment - 'operator-assignment': ['error', 'always'], - - // Requires operator at the beginning of the line in multiline statements - // https://eslint.org/docs/rules/operator-linebreak - 'operator-linebreak': ['error', 'before', { overrides: { '=': 'none' } }], - - // disallow padding within blocks - 'padded-blocks': ['error', { blocks: 'never', classes: 'never', switches: 'never' }], - - // // Require or disallow padding lines between statements - // // https://eslint.org/docs/rules/padding-line-between-statements - // 'padding-line-between-statements': 'off', - - // Prefer use of an object spread over Object.assign - // https://eslint.org/docs/rules/prefer-object-spread - // TODO: semver-major (eslint 5): enable - 'prefer-object-spread': 'off', - - // require quotes around object literal property names - // https://eslint.org/docs/rules/quote-props.html - 'quote-props': ['error', 'as-needed', { keywords: false, unnecessary: true, numbers: false }], - - // specify whether double or single quotes should be used - 'quotes': ['error', 'single', { avoidEscape: true }], - - // // do not require jsdoc - // // https://eslint.org/docs/rules/require-jsdoc - // 'require-jsdoc': 'off', - - // require or disallow use of semicolons instead of ASI - 'semi': ['error', 'always'], - - // enforce spacing before and after semicolons - 'semi-spacing': ['error', { before: false, after: true }], - - // Enforce location of semicolons - // https://eslint.org/docs/rules/semi-style - 'semi-style': ['error', 'last'], - - // // requires object keys to be sorted - // 'sort-keys': ['off', 'asc', { caseSensitive: false, natural: true }], - - // // sort variables within the same declaration block - // 'sort-vars': 'off', - - // require or disallow space before blocks - 'space-before-blocks': ['error', 'always'], - - // require or disallow space before function opening parenthesis - // https://eslint.org/docs/rules/space-before-function-paren - 'space-before-function-paren': ['error', { anonymous: 'never', named: 'never', asyncArrow: 'always' }], - - // require or disallow spaces inside parentheses - 'space-in-parens': ['error', 'never'], - - // require spaces around operators - 'space-infix-ops': 'error', - - // // Require or disallow spaces before/after unary operators - // // https://eslint.org/docs/rules/space-unary-ops - // 'space-unary-ops': ['error', { - // words: true, - // nonwords: false, - // overrides: { - // }, - // }], - - // require or disallow a space immediately following the // or /* in a comment - // https://eslint.org/docs/rules/spaced-comment - 'spaced-comment': 'error', - - // Enforce spacing around colons of switch statements - // https://eslint.org/docs/rules/switch-colon-spacing - 'switch-colon-spacing': ['error', { after: true, before: false }], - - // // Require or disallow spacing between template tags and their literals - // // https://eslint.org/docs/rules/template-tag-spacing - // 'template-tag-spacing': ['error', 'never'], - - // // require or disallow the Unicode Byte Order Mark - // // https://eslint.org/docs/rules/unicode-bom - // 'unicode-bom': ['error', 'never'], - - // // require regex literals to be wrapped in parentheses - // 'wrap-regex': 'off' - }, -}; diff --git a/packages/eslint-config/variables/index.js b/packages/eslint-config/variables/index.js deleted file mode 100644 index a6b1e24f88321..0000000000000 --- a/packages/eslint-config/variables/index.js +++ /dev/null @@ -1,51 +0,0 @@ -// const restrictedGlobals = require('eslint-restricted-globals'); - -module.exports = { - rules: { - // enforce or disallow variable initializations at definition - // 'init-declarations': 'off', - - // // disallow the catch clause parameter name being the same as a variable in the outer scope - // 'no-catch-shadow': 'off', - - // disallow deletion of variables - 'no-delete-var': 'error', - - // // disallow labels that share a name with a variable - // // https://eslint.org/docs/rules/no-label-var - // 'no-label-var': 'error', - - // // disallow specific globals - // 'no-restricted-globals': ['error', 'isFinite', 'isNaN'].concat(restrictedGlobals), - - // // disallow declaration of variables already declared in the outer scope - // 'no-shadow': 'error', - - // // disallow shadowing of names such as arguments - // 'no-shadow-restricted-names': 'error', - - // disallow use of undeclared variables unless mentioned in a /*global */ block - 'no-undef': 'error', - - // // disallow use of undefined when initializing variables - // 'no-undef-init': 'error', - - // // disallow use of undefined variable - // // https://eslint.org/docs/rules/no-undefined - // // TODO: enable? - // 'no-undefined': 'off', - - // disallow declaration of variables that are not used in the code - 'no-unused-vars': [ - 'error', - { - vars: 'all', - args: 'after-used', - ignoreRestSiblings: true, - }, - ], - - // disallow use of variables before they are defined - 'no-use-before-define': ['error', { functions: true, classes: true, variables: true }], - }, -}; From 4ba6ebf29ab33bd83fb7fbda56af0db3e64fda2c Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Wed, 25 Feb 2026 14:04:35 -0300 Subject: [PATCH 14/25] chore(eslint): resolve Meteor packages' types before linting --- .github/workflows/ci-code-check.yml | 2 -- apps/meteor/package.json | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci-code-check.yml b/.github/workflows/ci-code-check.yml index 52e3b7c085d9d..5555cead5e580 100644 --- a/.github/workflows/ci-code-check.yml +++ b/.github/workflows/ci-code-check.yml @@ -56,7 +56,6 @@ jobs: - name: Cache TypeCheck uses: actions/cache@v5 - if: matrix.check == 'ts' with: path: ./apps/meteor/tsconfig.typecheck.tsbuildinfo key: typecheck-cache-${{ runner.OS }}-${{ hashFiles('yarn.lock') }}-${{ github.event.issue.number }} @@ -66,7 +65,6 @@ jobs: typecheck-cache - name: Install Meteor - if: matrix.check == 'ts' shell: bash run: | # Restore bin from cache diff --git a/apps/meteor/package.json b/apps/meteor/package.json index 45d818dda716b..ed8766ba33335 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -39,7 +39,7 @@ "ha": "meteor npm run ha:start", "ha:add": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' ts-node .scripts/run-ha.ts instance", "ha:start": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' ts-node .scripts/run-ha.ts main", - "lint": "yarn stylelint && yarn eslint .", + "lint": "yarn stylelint && meteor lint && yarn eslint .", "migration:add": "ts-node-transpile-only --skip-project .scripts/make-migration.ts", "ms": "TRANSPORTER=${TRANSPORTER:-TCP} meteor npm run dev", "obj:dev": "TEST_MODE=true yarn dev", From 9214d501dc0982d31ba23d50be76f1cbd092f597 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Wed, 25 Feb 2026 20:25:33 -0300 Subject: [PATCH 15/25] chore(eslint): upgrade to ESLint 9 --- apps/meteor/package.json | 16 +- apps/uikit-playground/package.json | 7 +- ee/apps/account-service/package.json | 2 +- ee/apps/authorization-service/package.json | 2 +- ee/apps/ddp-streamer/package.json | 2 +- ee/apps/omnichannel-transcript/package.json | 2 +- ee/apps/presence-service/package.json | 2 +- ee/apps/queue-worker/package.json | 2 +- ee/packages/abac/package.json | 2 +- ee/packages/federation-matrix/package.json | 2 +- ee/packages/license/package.json | 2 +- ee/packages/media-calls/package.json | 2 +- ee/packages/network-broker/package.json | 2 +- ee/packages/omni-core-ee/package.json | 2 +- ee/packages/omnichannel-services/package.json | 2 +- ee/packages/pdf-worker/package.json | 3 +- ee/packages/presence/package.json | 2 +- ee/packages/ui-theming/package.json | 6 +- eslint.config.mjs | 111 +- package.json | 4 +- packages/account-utils/package.json | 2 +- packages/agenda/package.json | 2 +- packages/api-client/package.json | 2 +- packages/apps-engine/package.json | 4 +- packages/apps/package.json | 2 +- packages/base64/package.json | 1 - packages/cas-validate/package.json | 2 +- packages/core-services/package.json | 2 +- packages/core-typings/package.json | 2 +- packages/core-typings/src/utils.ts | 1 - packages/cron/package.json | 2 +- packages/ddp-client/package.json | 2 +- packages/desktop-api/package.json | 2 +- packages/eslint-config/index.js | 6 +- packages/eslint-config/package.json | 19 +- packages/favicon/package.json | 2 +- packages/fuselage-ui-kit/package.json | 3 +- packages/gazzodown/package.json | 8 +- packages/http-router/package.json | 2 +- packages/i18n/package.json | 2 +- packages/instance-status/package.json | 2 +- packages/jest-presets/package.json | 2 +- packages/jwt/package.json | 2 +- packages/livechat/package.json | 9 +- packages/log-format/package.json | 2 +- packages/logger/package.json | 2 +- packages/media-signaling/package.json | 2 +- packages/message-parser/package.json | 3 +- packages/message-types/package.json | 2 +- packages/mock-providers/package.json | 2 +- packages/model-typings/package.json | 2 +- packages/models/package.json | 2 +- packages/mongo-adapter/package.json | 2 +- packages/node-poplib/package.json | 1 - packages/omni-core/package.json | 2 +- packages/password-policies/package.json | 2 +- packages/patch-injection/package.json | 2 +- packages/peggy-loader/package.json | 2 +- packages/random/package.json | 2 +- packages/release-action/package.json | 2 +- packages/release-changelog/package.json | 2 +- packages/rest-typings/package.json | 2 +- .../server-cloud-communication/package.json | 2 +- packages/server-fetch/package.json | 2 +- packages/sha256/package.json | 2 +- packages/storybook-config/package.json | 2 +- packages/tools/package.json | 2 +- packages/tracing/package.json | 2 +- packages/ui-avatar/package.json | 6 +- packages/ui-client/package.json | 7 +- packages/ui-composer/package.json | 5 +- packages/ui-contexts/package.json | 3 +- packages/ui-kit/package.json | 2 +- packages/ui-video-conf/package.json | 5 +- packages/ui-voip/package.json | 5 +- packages/web-ui-registration/package.json | 3 +- yarn.lock | 1424 ++++++++++------- 77 files changed, 995 insertions(+), 771 deletions(-) diff --git a/apps/meteor/package.json b/apps/meteor/package.json index ed8766ba33335..4f56db912a2e2 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -309,7 +309,6 @@ "devDependencies": { "@axe-core/playwright": "^4.10.2", "@babel/core": "~7.28.6", - "@babel/eslint-parser": "~7.28.6", "@babel/preset-env": "~7.28.6", "@babel/preset-react": "~7.27.1", "@babel/register": "~7.28.6", @@ -399,8 +398,6 @@ "@types/underscore": "^1.13.0", "@types/xml-crypto": "~1.4.6", "@types/xml-encryption": "~1.2.4", - "@typescript-eslint/eslint-plugin": "~5.60.1", - "@typescript-eslint/parser": "~5.60.1", "autoprefixer": "^9.8.8", "babel-loader": "~10.0.0", "babel-plugin-array-includes": "^2.0.3", @@ -413,18 +410,7 @@ "cross-env": "^7.0.3", "docker-compose": "^0.24.8", "emojione-assets": "^4.5.0", - "eslint": "~8.57.1", - "eslint-config-prettier": "~9.1.2", - "eslint-plugin-anti-trojan-source": "~1.1.2", - "eslint-plugin-import": "~2.31.0", - "eslint-plugin-no-floating-promise": "~2.0.0", - "eslint-plugin-playwright": "~2.2.2", - "eslint-plugin-prettier": "~5.2.6", - "eslint-plugin-react": "~7.37.5", - "eslint-plugin-react-hooks": "~5.0.0", - "eslint-plugin-storybook": "~0.11.6", - "eslint-plugin-testing-library": "~6.4.0", - "eslint-plugin-you-dont-need-lodash-underscore": "~6.14.0", + "eslint": "~9.39.3", "fast-glob": "^3.3.3", "i18next": "~23.4.9", "jest": "~30.2.0", diff --git a/apps/uikit-playground/package.json b/apps/uikit-playground/package.json index 92ba25feb901c..88ee5ad0811e7 100644 --- a/apps/uikit-playground/package.json +++ b/apps/uikit-playground/package.json @@ -48,13 +48,8 @@ "@types/react": "~18.3.27", "@types/react-beautiful-dnd": "^13.1.8", "@types/react-dom": "~18.3.7", - "@typescript-eslint/eslint-plugin": "~5.60.1", - "@typescript-eslint/parser": "~5.60.1", "@vitejs/plugin-react": "~4.5.2", - "eslint": "~8.57.1", - "eslint-plugin-react": "~7.37.5", - "eslint-plugin-react-hooks": "^5.0.0", - "eslint-plugin-react-refresh": "^0.4.26", + "eslint": "~9.39.3", "typescript": "~5.9.3", "vite": "^6.2.4" }, diff --git a/ee/apps/account-service/package.json b/ee/apps/account-service/package.json index 31a183e06dd08..d28b5ef257570 100644 --- a/ee/apps/account-service/package.json +++ b/ee/apps/account-service/package.json @@ -47,7 +47,7 @@ "@types/bcrypt": "^5.0.2", "@types/polka": "^0.5.8", "@types/prometheus-gc-stats": "^0.6.4", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "ts-node": "^10.9.2", "typescript": "~5.9.3" }, diff --git a/ee/apps/authorization-service/package.json b/ee/apps/authorization-service/package.json index 89cb4a85ef8dc..cfc089aa73702 100644 --- a/ee/apps/authorization-service/package.json +++ b/ee/apps/authorization-service/package.json @@ -45,7 +45,7 @@ "@rocket.chat/tsconfig": "workspace:*", "@types/polka": "^0.5.8", "@types/prometheus-gc-stats": "^0.6.4", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "ts-node": "^10.9.2", "typescript": "~5.9.3" }, diff --git a/ee/apps/ddp-streamer/package.json b/ee/apps/ddp-streamer/package.json index 5f87762d39395..9ba9e9047876e 100644 --- a/ee/apps/ddp-streamer/package.json +++ b/ee/apps/ddp-streamer/package.json @@ -56,7 +56,7 @@ "@types/underscore": "^1.13.0", "@types/uuid": "^10.0.0", "@types/ws": "^8.5.13", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "pino-pretty": "^7.6.1", "ts-node": "^10.9.2", "typescript": "~5.9.3" diff --git a/ee/apps/omnichannel-transcript/package.json b/ee/apps/omnichannel-transcript/package.json index a429f874ef396..bd8511da43f01 100644 --- a/ee/apps/omnichannel-transcript/package.json +++ b/ee/apps/omnichannel-transcript/package.json @@ -54,7 +54,7 @@ "@types/polka": "^0.5.8", "@types/prometheus-gc-stats": "^0.6.4", "@types/react": "~18.3.27", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "react": "~18.3.1", "ts-node": "^10.9.2", "typescript": "~5.9.3" diff --git a/ee/apps/presence-service/package.json b/ee/apps/presence-service/package.json index 4f2454b35f82b..c3646a81e2af4 100644 --- a/ee/apps/presence-service/package.json +++ b/ee/apps/presence-service/package.json @@ -44,7 +44,7 @@ "@rocket.chat/tsconfig": "workspace:*", "@types/polka": "^0.5.8", "@types/prometheus-gc-stats": "^0.6.4", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "ts-node": "^10.9.2", "typescript": "~5.9.3" }, diff --git a/ee/apps/queue-worker/package.json b/ee/apps/queue-worker/package.json index 865c70e984482..38d09153d80a5 100644 --- a/ee/apps/queue-worker/package.json +++ b/ee/apps/queue-worker/package.json @@ -46,7 +46,7 @@ "@rocket.chat/tsconfig": "workspace:*", "@types/polka": "^0.5.8", "@types/prometheus-gc-stats": "^0.6.4", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "ts-node": "^10.9.2", "typescript": "~5.9.3" }, diff --git a/ee/packages/abac/package.json b/ee/packages/abac/package.json index 7fbcaaf6c9425..f65aa0f0fd4f7 100644 --- a/ee/packages/abac/package.json +++ b/ee/packages/abac/package.json @@ -39,7 +39,7 @@ "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", "@types/node": "~22.16.5", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "mongodb-memory-server": "^10.1.4", "typescript": "~5.9.3" diff --git a/ee/packages/federation-matrix/package.json b/ee/packages/federation-matrix/package.json index e977bc559abe9..99ab6c1e4786c 100644 --- a/ee/packages/federation-matrix/package.json +++ b/ee/packages/federation-matrix/package.json @@ -42,7 +42,7 @@ "@types/emojione": "^2.2.9", "@types/node": "~22.16.5", "@types/sanitize-html": "~2.16.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "jest-qase-reporter": "^2.1.4", "matrix-js-sdk": "^38.4.0", diff --git a/ee/packages/license/package.json b/ee/packages/license/package.json index e9997bfe153ac..5e5b68b861aa2 100644 --- a/ee/packages/license/package.json +++ b/ee/packages/license/package.json @@ -28,7 +28,7 @@ "@types/bcrypt": "^5.0.2", "@types/jest": "~30.0.0", "@types/ws": "^8.5.13", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "jest-websocket-mock": "~2.5.0", "typescript": "~5.9.3" diff --git a/ee/packages/media-calls/package.json b/ee/packages/media-calls/package.json index 8619008248486..3b9b1081da686 100644 --- a/ee/packages/media-calls/package.json +++ b/ee/packages/media-calls/package.json @@ -26,7 +26,7 @@ "devDependencies": { "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "typescript": "~5.9.3" } } diff --git a/ee/packages/network-broker/package.json b/ee/packages/network-broker/package.json index 1141160b03ab3..62102a08de406 100644 --- a/ee/packages/network-broker/package.json +++ b/ee/packages/network-broker/package.json @@ -28,7 +28,7 @@ "@types/node": "~22.16.5", "@types/sinon": "^10.0.20", "chai": "^4.5.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "sinon": "^19.0.5", "typescript": "~5.9.3" diff --git a/ee/packages/omni-core-ee/package.json b/ee/packages/omni-core-ee/package.json index 897f5c644e2d0..1698e1a375d85 100644 --- a/ee/packages/omni-core-ee/package.json +++ b/ee/packages/omni-core-ee/package.json @@ -27,7 +27,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/ee/packages/omnichannel-services/package.json b/ee/packages/omnichannel-services/package.json index b115b3c1090b5..7ac6af64d0cc5 100644 --- a/ee/packages/omnichannel-services/package.json +++ b/ee/packages/omnichannel-services/package.json @@ -45,7 +45,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/ee/packages/pdf-worker/package.json b/ee/packages/pdf-worker/package.json index 38055d6f596bf..e040323b2973e 100644 --- a/ee/packages/pdf-worker/package.json +++ b/ee/packages/pdf-worker/package.json @@ -42,8 +42,7 @@ "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", "buffer": "~6.0.3", - "eslint": "~8.57.1", - "eslint-plugin-storybook": "~0.11.6", + "eslint": "~9.39.3", "i18next": "~23.4.9", "jest": "~30.2.0", "react-dom": "~18.3.1", diff --git a/ee/packages/presence/package.json b/ee/packages/presence/package.json index af51a3eeda273..ceb33d6225af7 100644 --- a/ee/packages/presence/package.json +++ b/ee/packages/presence/package.json @@ -25,7 +25,7 @@ "@rocket.chat/apps-engine": "workspace:^", "@rocket.chat/rest-typings": "workspace:^", "@types/node": "~22.16.5", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/ee/packages/ui-theming/package.json b/ee/packages/ui-theming/package.json index 7627fdcd46c2f..36eccdba5c44f 100644 --- a/ee/packages/ui-theming/package.json +++ b/ee/packages/ui-theming/package.json @@ -23,11 +23,7 @@ "@rocket.chat/ui-contexts": "workspace:~", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.57.1", - "eslint-plugin-anti-trojan-source": "~1.1.2", - "eslint-plugin-react": "~7.37.5", - "eslint-plugin-react-hooks": "~5.0.0", - "eslint-plugin-testing-library": "^6.4.0", + "eslint": "~9.39.3", "react": "~18.3.1", "react-docgen-typescript-plugin": "~1.0.8", "react-dom": "~18.3.1", diff --git a/eslint.config.mjs b/eslint.config.mjs index 864057297b0c7..70f5976ca3ff6 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -251,7 +251,18 @@ export default [ }, }, { - files: ['apps/meteor/client/**/*.ts', 'apps/meteor/client/**/*.tsx', 'apps/meteor/ee/client/**/*.ts', 'apps/meteor/ee/client/**/*.tsx'], + files: [ + 'apps/meteor/client/**/*.ts', + 'apps/meteor/client/**/*.tsx', + 'apps/meteor/server/**/*.ts', + 'apps/meteor/ee/app/**/*.ts', + 'apps/meteor/ee/client/**/*.ts', + 'apps/meteor/ee/client/**/*.tsx', + 'apps/meteor/ee/server/**/*.ts', + 'packages/ui-contexts/**/*.ts', + 'packages/ui-contexts/**/*.tsx', + 'packages/i18n/src/scripts/common.mts', + ], rules: { '@typescript-eslint/no-floating-promises': 'off', }, @@ -389,14 +400,9 @@ export default [ }, }, rules: { - '@typescript-eslint/ban-types': [ - 'error', - { - types: { - '{}': false, - }, - }, - ], + '@typescript-eslint/no-empty-object-type': 'off', + '@typescript-eslint/no-unsafe-function-type': 'error', + '@typescript-eslint/no-wrapper-object-types': 'error', '@typescript-eslint/naming-convention': [ 'error', { @@ -639,8 +645,12 @@ export default [ files: [ 'apps/meteor/client/**/*.ts', 'apps/meteor/client/**/*.tsx', + 'apps/meteor/app/lib/**/*.ts', + 'apps/meteor/app/livechat/**/*.ts', 'apps/meteor/ee/client/**/*.ts', 'apps/meteor/ee/client/**/*.tsx', + 'apps/meteor/ee/server/**/*.ts', + 'apps/meteor/server/**/*.ts', 'packages/fuselage-ui-kit/**/*.ts', 'packages/fuselage-ui-kit/**/*.tsx', 'packages/livechat/**/*.ts', @@ -655,7 +665,7 @@ export default [ 'packages/web-ui-registration/**/*.tsx', ], rules: { - '@typescript-eslint/no-misused-promises': 'off', + '@typescript-eslint/no-misused-promises': 'warn', }, }, { @@ -669,4 +679,85 @@ export default [ ], }, }, + // FIXME: React 19 useEffectEvent conflicts with fuselage-hooks + { + files: ['**/*.ts', '**/*.tsx'], + rules: { + 'react-hooks/exhaustive-deps': 'warn', + 'react-hooks/rules-of-hooks': 'warn', + }, + }, + // FIXME: these rules require type information and the files are not included in the main tsconfig.json + { + files: [ + '**/*.d.ts', + '**/__tests__/**', + '**/*.spec.ts', + '**/*.spec.tsx', + '**/*.test.ts', + '**/*.test.tsx', + '**/tests/**', + '**/.storybook/**', + '**/jest.config.ts', + '**/jest.config.js', + '**/jest.config.*.ts', + '**/jest.config.*.js', + '**/webpack.config.ts', + '**/webpack.config.js', + '**/vite.config.ts', + '**/vite.config.js', + '**/rollup.config.ts', + '**/rollup.config.js', + + 'apps/meteor/.storybook/logo.svg.d.ts', + 'packages/fuselage-ui-kit/.storybook/logo.svg.d.ts', + 'packages/storybook-config/src/logo.svg.d.ts', + + 'ee/packages/*/jest.config.ts', + 'packages/*/jest.config.ts', + + 'ee/packages/pdf-worker/.storybook/*.ts', + 'ee/packages/pdf-worker/.storybook/*.tsx', + 'packages/gazzodown/.storybook/*.ts', + 'packages/gazzodown/.storybook/*.tsx', + 'packages/ui-client/.storybook/*.ts', + 'packages/ui-client/.storybook/*.tsx', + 'packages/ui-composer/.storybook/*.ts', + 'packages/ui-composer/.storybook/*.tsx', + 'packages/ui-voip/.storybook/*.ts', + 'packages/ui-voip/.storybook/*.tsx', + 'packages/web-ui-registration/.storybook/*.ts', + 'packages/web-ui-registration/.storybook/*.tsx', + ], + rules: { + '@typescript-eslint/prefer-optional-chain': 'off', + '@typescript-eslint/no-misused-promises': 'off', + }, + }, + // FIXME: catch clause with unused error variable + { + files: ['**/*.ts', '**/*.tsx'], + rules: { + '@typescript-eslint/no-unused-vars': 'warn', + }, + }, + { + files: [ + 'apps/meteor/.scripts/version.js', + 'apps/meteor/app/lib/server/functions/validateCustomFields.js', + 'apps/meteor/app/lib/server/lib/validateEmailDomain.js', + 'apps/meteor/app/markdown/lib/parser/original/markdown.js', + 'packages/apps-engine/scripts/deno-cache.js', + ], + rules: { + 'no-unused-vars': 'warn', + }, + }, + // FIXME: these storybook rules cannot be enabled until Storybook is upgraded to >=9 + { + files: ['**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)'], + rules: { + 'storybook/no-renderer-packages': 'off', + }, + }, ]; diff --git a/package.json b/package.json index fb18aea98ad17..294a4cc130657 100644 --- a/package.json +++ b/package.json @@ -67,8 +67,10 @@ "@types/chart.js": "^2.9.41", "@types/js-yaml": "^4.0.9", "@types/node": "~22.16.5", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "eslint-plugin-no-floating-promise": "~2.0.0", + "eslint-plugin-react-refresh": "~0.5.2", + "eslint-plugin-testing-library": "~7.16.0", "eslint-plugin-you-dont-need-lodash-underscore": "~6.14.0", "ts-node": "^10.9.2", "turbo": "~2.8.11", diff --git a/packages/account-utils/package.json b/packages/account-utils/package.json index 5b7f1de006f15..f1b84a771d844 100644 --- a/packages/account-utils/package.json +++ b/packages/account-utils/package.json @@ -14,7 +14,7 @@ "lint:fix": "eslint --fix ." }, "devDependencies": { - "eslint": "~8.57.1", + "eslint": "~9.39.3", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/agenda/package.json b/packages/agenda/package.json index 60a2d72ef1ebd..c11e16d470eef 100644 --- a/packages/agenda/package.json +++ b/packages/agenda/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "@types/debug": "^4.1.12", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 6cde3c80ac537..7ff645504cbfb 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -27,7 +27,7 @@ "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", "@types/strict-uri-encode": "^2.0.2", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "jest-fetch-mock": "~3.0.3", "typescript": "~5.9.3" diff --git a/packages/apps-engine/package.json b/packages/apps-engine/package.json index aa5ce91190ff3..405374c40dc30 100644 --- a/packages/apps-engine/package.json +++ b/packages/apps-engine/package.json @@ -100,11 +100,9 @@ "@types/semver": "^7.5.8", "@types/stack-trace": "0.0.33", "@types/uuid": "~10.0.0", - "@typescript-eslint/eslint-plugin": "~5.60.1", - "@typescript-eslint/parser": "~5.60.1", "alsatian": "^2.4.0", "browserify": "^16.5.2", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "npm-run-all": "^4.1.5", "nyc": "^17.1.0", "rimraf": "^6.0.1", diff --git a/packages/apps/package.json b/packages/apps/package.json index 91bccb907220f..06ea0e9fe186a 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@rocket.chat/tsconfig": "workspace:*", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/base64/package.json b/packages/base64/package.json index a4de9d802ddc4..69f40bf6bda29 100644 --- a/packages/base64/package.json +++ b/packages/base64/package.json @@ -16,7 +16,6 @@ "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", - "eslint": "~8.57.1", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/cas-validate/package.json b/packages/cas-validate/package.json index 67395915aab00..aeef6f4faf2ae 100644 --- a/packages/cas-validate/package.json +++ b/packages/cas-validate/package.json @@ -19,7 +19,7 @@ "cheerio": "1.0.0" }, "devDependencies": { - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/core-services/package.json b/packages/core-services/package.json index ce94be48da16d..323d474c7cf95 100644 --- a/packages/core-services/package.json +++ b/packages/core-services/package.json @@ -33,7 +33,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "mongodb": "6.16.0", "prettier": "~3.3.3", diff --git a/packages/core-typings/package.json b/packages/core-typings/package.json index 1d4c5af3bc3e9..24fc235563153 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -28,7 +28,7 @@ "devDependencies": { "@rocket.chat/apps-engine": "workspace:^", "@types/express": "^4.17.25", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "mongodb": "6.16.0", "npm-run-all": "~4.1.5", "prettier": "~3.3.3", diff --git a/packages/core-typings/src/utils.ts b/packages/core-typings/src/utils.ts index e314a791e20d0..5832a65eccd48 100644 --- a/packages/core-typings/src/utils.ts +++ b/packages/core-typings/src/utils.ts @@ -48,7 +48,6 @@ export type Branded = T & Brand; type SerializablePrimitive = boolean | number | string | null; -// eslint-disable-next-line @typescript-eslint/ban-types type UnserializablePrimitive = bigint | symbol | undefined; type CustomSerializable = { diff --git a/packages/cron/package.json b/packages/cron/package.json index 1f5dcc2549cf0..4d02ce8f5c389 100644 --- a/packages/cron/package.json +++ b/packages/cron/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "@rocket.chat/tsconfig": "workspace:*", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/ddp-client/package.json b/packages/ddp-client/package.json index 1a7ca014d36e9..c84402536220d 100644 --- a/packages/ddp-client/package.json +++ b/packages/ddp-client/package.json @@ -26,7 +26,7 @@ "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", "@types/ws": "^8.5.13", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "jest-websocket-mock": "~2.5.0", "typescript": "~5.9.3", diff --git a/packages/desktop-api/package.json b/packages/desktop-api/package.json index f00a494f17385..3a3399c02e402 100644 --- a/packages/desktop-api/package.json +++ b/packages/desktop-api/package.json @@ -16,7 +16,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "devDependencies": { - "eslint": "~8.57.1", + "eslint": "~9.39.3", "rimraf": "~6.0.1", "typescript": "~5.9.3" }, diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index b81d38f96f203..8398ab6dcc63b 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -340,7 +340,10 @@ export default [ { files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'], rules: { - '@typescript-eslint/ban-types': [ + '@typescript-eslint/no-empty-object-type': 'warn', + '@typescript-eslint/no-unsafe-function-type': 'warn', + '@typescript-eslint/no-wrapper-object-types': 'warn', + '@typescript-eslint/no-restricted-types': [ 'warn', { types: { @@ -453,6 +456,7 @@ export default [ { checksVoidReturn: { arguments: false, + inheritedMethods: false, }, }, ], diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 3127cad8823c3..b4534637dc318 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -19,16 +19,19 @@ "@babel/eslint-parser": "~7.28.6", "@types/eslint": "~8.44.9", "@types/prettier": "^2.7.3", - "@typescript-eslint/eslint-plugin": "~5.60.1", - "@typescript-eslint/parser": "~5.60.1", - "eslint": "~8.57.1", - "eslint-config-prettier": "~9.1.2", + "@typescript-eslint/eslint-plugin": "~8.56.1", + "@typescript-eslint/parser": "~8.56.1", + "eslint": "~9.39.3", + "eslint-config-prettier": "~10.1.8", "eslint-import-resolver-typescript": "~4.4.4", "eslint-plugin-anti-trojan-source": "~1.1.2", - "eslint-plugin-import": "~2.31.0", - "eslint-plugin-jest": "~28.8.3", - "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-prettier": "~5.2.6", + "eslint-plugin-import": "~2.32.0", + "eslint-plugin-jest": "~29.15.0", + "eslint-plugin-jsx-a11y": "~6.10.2", + "eslint-plugin-prettier": "~5.5.5", + "eslint-plugin-react": "~7.37.5", + "eslint-plugin-react-hooks": "~7.0.1", + "eslint-plugin-storybook": "~10.2.12", "globals": "~17.3.0", "prettier": "~3.3.3" }, diff --git a/packages/favicon/package.json b/packages/favicon/package.json index bf1862f648df2..47a3e8dabe421 100644 --- a/packages/favicon/package.json +++ b/packages/favicon/package.json @@ -14,7 +14,7 @@ "lint:fix": "eslint --fix ." }, "devDependencies": { - "eslint": "~8.57.1", + "eslint": "~9.39.3", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/fuselage-ui-kit/package.json b/packages/fuselage-ui-kit/package.json index 2d2bf6a05f9b9..8e93d55562fcb 100644 --- a/packages/fuselage-ui-kit/package.json +++ b/packages/fuselage-ui-kit/package.json @@ -72,8 +72,7 @@ "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", "cross-env": "^7.0.3", - "eslint": "~8.57.1", - "eslint-plugin-storybook": "~0.11.6", + "eslint": "~9.39.3", "i18next": "~23.4.9", "jest": "~30.2.0", "normalize.css": "^8.0.1", diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index 1edd8cdc59ff1..8b526b0831ba5 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -56,13 +56,7 @@ "@types/katex": "~0.16.8", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "@typescript-eslint/eslint-plugin": "~5.60.1", - "@typescript-eslint/parser": "~5.60.1", - "eslint": "~8.57.1", - "eslint-plugin-anti-trojan-source": "~1.1.2", - "eslint-plugin-react": "~7.37.5", - "eslint-plugin-react-hooks": "~5.0.0", - "eslint-plugin-storybook": "~0.11.6", + "eslint": "~9.39.3", "i18next": "~23.4.9", "identity-obj-proxy": "^3.0.0", "jest": "~30.2.0", diff --git a/packages/http-router/package.json b/packages/http-router/package.json index e9b2075fb465c..c7ebf1f164176 100644 --- a/packages/http-router/package.json +++ b/packages/http-router/package.json @@ -31,7 +31,7 @@ "@types/express": "^4.17.25", "@types/jest": "~30.0.0", "@types/supertest": "~6.0.3", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "supertest": "~7.1.4", "ts-jest": "~29.4.6", diff --git a/packages/i18n/package.json b/packages/i18n/package.json index 18282e8832f50..481040a80d538 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -36,7 +36,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tools": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "i18next": "~23.4.9", "jest": "~30.2.0", "typescript": "~5.9.3" diff --git a/packages/instance-status/package.json b/packages/instance-status/package.json index 740594cd6fb65..ed726c27fd98f 100644 --- a/packages/instance-status/package.json +++ b/packages/instance-status/package.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@rocket.chat/tsconfig": "workspace:*", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "mongodb": "6.16.0", "prettier": "~3.3.3", "typescript": "~5.9.3" diff --git a/packages/jest-presets/package.json b/packages/jest-presets/package.json index 156143292e38a..9b5c00394f06f 100644 --- a/packages/jest-presets/package.json +++ b/packages/jest-presets/package.json @@ -41,7 +41,7 @@ "@types/identity-obj-proxy": "^3.0.2", "@types/jest": "~30.0.0", "@types/uuid": "^10.0.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/jwt/package.json b/packages/jwt/package.json index 5931bebf1d786..9dc5f11803b44 100644 --- a/packages/jwt/package.json +++ b/packages/jwt/package.json @@ -23,7 +23,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/livechat/package.json b/packages/livechat/package.json index 629923816c538..ec8ef8a9b60db 100644 --- a/packages/livechat/package.json +++ b/packages/livechat/package.json @@ -53,7 +53,6 @@ }, "devDependencies": { "@babel/core": "~7.28.6", - "@babel/eslint-parser": "~7.28.6", "@babel/preset-env": "~7.28.6", "@babel/preset-react": "~7.27.1", "@babel/preset-typescript": "~7.27.1", @@ -74,19 +73,13 @@ "@types/react": "~18.3.27", "@types/webpack-env": "~1.18.8", "@types/whatwg-fetch": "~0.0.33", - "@typescript-eslint/eslint-plugin": "~5.60.1", - "@typescript-eslint/parser": "~5.60.1", "autoprefixer": "^9.8.8", "babel-loader": "~10.0.0", "cross-env": "^7.0.3", "css-loader": "^4.3.0", "cssnano": "^7.0.7", "desvg-loader": "^0.1.0", - "eslint": "~8.57.1", - "eslint-plugin-import": "~2.31.0", - "eslint-plugin-react": "~7.37.5", - "eslint-plugin-react-hooks": "~5.0.0", - "eslint-plugin-storybook": "~0.11.6", + "eslint": "~9.39.3", "file-loader": "^6.2.0", "html-webpack-plugin": "~5.6.6", "if-env": "^1.0.4", diff --git a/packages/log-format/package.json b/packages/log-format/package.json index 6c9884060e793..afb43d3c03d49 100644 --- a/packages/log-format/package.json +++ b/packages/log-format/package.json @@ -20,7 +20,7 @@ "devDependencies": { "@types/chalk": "^2.2.4", "@types/ejson": "^2.2.2", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/logger/package.json b/packages/logger/package.json index 3cda92fb1c3ac..9e5e10396edab 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -18,7 +18,7 @@ "pino": "^8.21.0" }, "devDependencies": { - "eslint": "~8.57.1", + "eslint": "~9.39.3", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/media-signaling/package.json b/packages/media-signaling/package.json index 56fa430e29e26..93cc0d1c56446 100644 --- a/packages/media-signaling/package.json +++ b/packages/media-signaling/package.json @@ -23,7 +23,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "typescript": "~5.9.3" } diff --git a/packages/message-parser/package.json b/packages/message-parser/package.json index c27dcd4689643..680874f3ff7b4 100644 --- a/packages/message-parser/package.json +++ b/packages/message-parser/package.json @@ -51,8 +51,7 @@ "@rocket.chat/prettier-config": "~0.31.25", "@types/jest": "~30.0.0", "@types/node": "~22.16.5", - "@typescript-eslint/parser": "~5.60.1", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "npm-run-all": "^4.1.5", "peggy": "4.1.1", diff --git a/packages/message-types/package.json b/packages/message-types/package.json index 91ca287d2f93f..13def43629c9a 100644 --- a/packages/message-types/package.json +++ b/packages/message-types/package.json @@ -16,7 +16,7 @@ "devDependencies": { "@rocket.chat/core-typings": "workspace:~", "date-fns": "~4.1.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "i18next": "~23.4.9", "jest": "~30.2.0", "moment": "^2.30.1", diff --git a/packages/mock-providers/package.json b/packages/mock-providers/package.json index 29adffabaf527..fd84e7cd7bb7a 100644 --- a/packages/mock-providers/package.json +++ b/packages/mock-providers/package.json @@ -33,7 +33,7 @@ "@testing-library/react": "~16.3.2", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "react": "~18.3.1", "react-dom": "~18.3.1", diff --git a/packages/model-typings/package.json b/packages/model-typings/package.json index 0221cccc5ab39..548eb2bbb8b03 100644 --- a/packages/model-typings/package.json +++ b/packages/model-typings/package.json @@ -17,7 +17,7 @@ }, "devDependencies": { "@types/node-rsa": "^1.1.4", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "mongodb": "6.16.0", "typescript": "~5.9.3" }, diff --git a/packages/models/package.json b/packages/models/package.json index 5a715fe7b1890..074ca526b8e52 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -32,7 +32,7 @@ "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", "@types/node-rsa": "^1.1.4", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/mongo-adapter/package.json b/packages/mongo-adapter/package.json index d07ae5c6a1670..151220525c203 100644 --- a/packages/mongo-adapter/package.json +++ b/packages/mongo-adapter/package.json @@ -17,7 +17,7 @@ }, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "mongodb": "6.16.0", "typescript": "~5.9.3" diff --git a/packages/node-poplib/package.json b/packages/node-poplib/package.json index 499dddb34ae29..57853a798ec94 100644 --- a/packages/node-poplib/package.json +++ b/packages/node-poplib/package.json @@ -4,7 +4,6 @@ "private": true, "main": "./src/index.js", "devDependencies": { - "eslint": "~8.57.1", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/omni-core/package.json b/packages/omni-core/package.json index 7f1cae0ce1825..5e8a138d17f04 100644 --- a/packages/omni-core/package.json +++ b/packages/omni-core/package.json @@ -25,7 +25,7 @@ "@rocket.chat/tools": "workspace:*", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/password-policies/package.json b/packages/password-policies/package.json index 79326930a4b7f..30d768b97e4ab 100644 --- a/packages/password-policies/package.json +++ b/packages/password-policies/package.json @@ -20,7 +20,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/patch-injection/package.json b/packages/patch-injection/package.json index f87df24f89984..0c7e2764ea869 100644 --- a/packages/patch-injection/package.json +++ b/packages/patch-injection/package.json @@ -20,7 +20,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/peggy-loader/package.json b/packages/peggy-loader/package.json index b4bcc41fed406..f4818858c7c50 100644 --- a/packages/peggy-loader/package.json +++ b/packages/peggy-loader/package.json @@ -35,7 +35,7 @@ "devDependencies": { "@rocket.chat/prettier-config": "~0.31.25", "@types/node": "~22.16.5", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "npm-run-all": "^4.1.5", "peggy": "4.1.1", "prettier": "~3.3.3", diff --git a/packages/random/package.json b/packages/random/package.json index 19237a9de4115..f484d4843ce48 100644 --- a/packages/random/package.json +++ b/packages/random/package.json @@ -18,7 +18,7 @@ "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/release-action/package.json b/packages/release-action/package.json index 706500d9fb6bf..e1dbfdb837692 100644 --- a/packages/release-action/package.json +++ b/packages/release-action/package.json @@ -14,7 +14,6 @@ "@actions/github": "^6.0.1", "@octokit/core": "^5.0.1", "@octokit/plugin-throttling": "^6.1.0", - "eslint": "~8.57.1", "mdast-util-to-string": "2.0.0", "remark-parse": "9.0.0", "remark-stringify": "9.0.1", @@ -23,6 +22,7 @@ }, "devDependencies": { "@types/node": "~22.16.5", + "eslint": "~9.39.3", "typescript": "~5.9.3" }, "packageManager": "yarn@4.12.0", diff --git a/packages/release-changelog/package.json b/packages/release-changelog/package.json index def80f754f921..83c58df8ac45a 100644 --- a/packages/release-changelog/package.json +++ b/packages/release-changelog/package.json @@ -14,7 +14,7 @@ "devDependencies": { "@changesets/types": "^6.0.0", "@types/node": "~22.16.5", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index 9c09515c4646a..a217392c65673 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -23,7 +23,7 @@ "devDependencies": { "@rocket.chat/apps-engine": "workspace:^", "@types/jest": "~30.0.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "mongodb": "6.16.0", "typescript": "~5.9.3" }, diff --git a/packages/server-cloud-communication/package.json b/packages/server-cloud-communication/package.json index a7b56daff4dfe..22271f6378421 100644 --- a/packages/server-cloud-communication/package.json +++ b/packages/server-cloud-communication/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "@rocket.chat/license": "workspace:^", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "typescript": "~5.9.3" }, "volta": { diff --git a/packages/server-fetch/package.json b/packages/server-fetch/package.json index e48e2b4bb593c..39951bb9d083d 100644 --- a/packages/server-fetch/package.json +++ b/packages/server-fetch/package.json @@ -28,7 +28,7 @@ "devDependencies": { "@types/jest": "^29.5.5", "@types/node-fetch": "~2.6.13", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "^29.7.0", "typescript": "~5.9.3" }, diff --git a/packages/sha256/package.json b/packages/sha256/package.json index a25de3e52115d..62e9df1194fba 100644 --- a/packages/sha256/package.json +++ b/packages/sha256/package.json @@ -17,7 +17,7 @@ "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/storybook-config/package.json b/packages/storybook-config/package.json index 01a011a8b19d7..3803e5a5e78b6 100644 --- a/packages/storybook-config/package.json +++ b/packages/storybook-config/package.json @@ -40,7 +40,7 @@ "@rocket.chat/icons": "~0.46.0", "@rocket.chat/tsconfig": "workspace:*", "@storybook/react": "^8.6.15", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "react": "~18.3.1", "react-dom": "~18.3.1", "typescript": "~5.9.3" diff --git a/packages/tools/package.json b/packages/tools/package.json index af2bab50ef6a2..e14fbd9ceff95 100644 --- a/packages/tools/package.json +++ b/packages/tools/package.json @@ -24,7 +24,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "typescript": "~5.9.3" }, diff --git a/packages/tracing/package.json b/packages/tracing/package.json index ba67b2140f54d..6feea40f3c6ea 100644 --- a/packages/tracing/package.json +++ b/packages/tracing/package.json @@ -21,7 +21,7 @@ }, "devDependencies": { "@types/jest": "~30.0.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "ts-jest": "~29.4.6", "typescript": "~5.9.3" diff --git a/packages/ui-avatar/package.json b/packages/ui-avatar/package.json index f4ab3cd92e4b5..7ef4980b0e950 100644 --- a/packages/ui-avatar/package.json +++ b/packages/ui-avatar/package.json @@ -24,11 +24,7 @@ "@rocket.chat/ui-contexts": "workspace:^", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.57.1", - "eslint-plugin-react": "~7.37.5", - "eslint-plugin-react-hooks": "~5.0.0", - "eslint-plugin-storybook": "~0.11.6", - "eslint-plugin-testing-library": "~6.4.0", + "eslint": "~9.39.3", "react": "~18.3.1", "react-dom": "~18.3.1", "react-virtuoso": "^4.12.0", diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json index a4df6aa314a4a..72b9384a0a412 100644 --- a/packages/ui-client/package.json +++ b/packages/ui-client/package.json @@ -44,12 +44,7 @@ "@types/jest": "~30.0.0", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.57.1", - "eslint-plugin-anti-trojan-source": "~1.1.2", - "eslint-plugin-react": "~7.37.5", - "eslint-plugin-react-hooks": "~5.0.0", - "eslint-plugin-storybook": "~0.11.6", - "eslint-plugin-testing-library": "~6.4.0", + "eslint": "~9.39.3", "jest": "~30.2.0", "overlayscrollbars": "^2.11.4", "overlayscrollbars-react": "^0.5.6", diff --git a/packages/ui-composer/package.json b/packages/ui-composer/package.json index 5070291c56434..c4501dd4b8625 100644 --- a/packages/ui-composer/package.json +++ b/packages/ui-composer/package.json @@ -39,10 +39,7 @@ "@types/jest": "~30.0.0", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.57.1", - "eslint-plugin-react": "~7.37.5", - "eslint-plugin-react-hooks": "~5.0.0", - "eslint-plugin-storybook": "~0.11.6", + "eslint": "~9.39.3", "jest": "~30.2.0", "react": "~18.3.1", "react-dom": "~18.3.1", diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index 6b4b8842b8d3c..fcb99572f308c 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -33,8 +33,7 @@ "@types/jest": "~30.0.0", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.57.1", - "eslint-plugin-react-hooks": "^5.0.0", + "eslint": "~9.39.3", "i18next": "~23.4.9", "jest": "~30.2.0", "mongodb": "6.16.0", diff --git a/packages/ui-kit/package.json b/packages/ui-kit/package.json index e2a1af11b68b3..ba9616264d1d3 100644 --- a/packages/ui-kit/package.json +++ b/packages/ui-kit/package.json @@ -38,7 +38,7 @@ "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/tsconfig": "workspace:*", "@types/jest": "~30.0.0", - "eslint": "~8.57.1", + "eslint": "~9.39.3", "jest": "~30.2.0", "npm-run-all": "~4.1.5", "prettier": "~3.3.3", diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json index 3e6ec9778d83f..d42e8900dc106 100644 --- a/packages/ui-video-conf/package.json +++ b/packages/ui-video-conf/package.json @@ -43,10 +43,7 @@ "@types/jest-axe": "~3.5.9", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.57.1", - "eslint-plugin-react": "~7.37.5", - "eslint-plugin-react-hooks": "~5.0.0", - "eslint-plugin-storybook": "~0.11.6", + "eslint": "~9.39.3", "jest": "~30.2.0", "jest-axe": "~10.0.0", "react": "~18.3.1", diff --git a/packages/ui-voip/package.json b/packages/ui-voip/package.json index 500c992c48a5c..952a93f4d0e4b 100644 --- a/packages/ui-voip/package.json +++ b/packages/ui-voip/package.json @@ -61,10 +61,7 @@ "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", "date-fns": "~4.1.0", - "eslint": "~8.57.1", - "eslint-plugin-react": "~7.37.5", - "eslint-plugin-react-hooks": "~5.0.0", - "eslint-plugin-storybook": "~0.11.6", + "eslint": "~9.39.3", "i18next": "~23.4.9", "jest": "~30.2.0", "jest-axe": "~10.0.0", diff --git a/packages/web-ui-registration/package.json b/packages/web-ui-registration/package.json index 98fd41600f675..4559294b3e3fa 100644 --- a/packages/web-ui-registration/package.json +++ b/packages/web-ui-registration/package.json @@ -46,8 +46,7 @@ "@testing-library/react": "~16.3.2", "@types/react": "~18.3.27", "@types/react-dom": "~18.3.7", - "eslint": "~8.57.1", - "eslint-plugin-storybook": "~0.11.6", + "eslint": "~9.39.3", "i18next": "~23.4.9", "react": "~18.3.1", "react-dom": "~18.3.1", diff --git a/yarn.lock b/yarn.lock index 54816cd390cbf..036f6fdd08974 100644 --- a/yarn.lock +++ b/yarn.lock @@ -133,6 +133,17 @@ __metadata: languageName: node linkType: hard +"@babel/code-frame@npm:^7.29.0": + version: 7.29.0 + resolution: "@babel/code-frame@npm:7.29.0" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.28.5" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.1.1" + checksum: 10/199e15ff89007dd30675655eec52481cb245c9fdf4f81e4dc1f866603b0217b57aff25f5ffa0a95bbc8e31eb861695330cd7869ad52cc211aa63016320ef72c5 + languageName: node + linkType: hard + "@babel/compat-data@npm:^7.27.2": version: 7.27.5 resolution: "@babel/compat-data@npm:7.27.5" @@ -177,6 +188,29 @@ __metadata: languageName: node linkType: hard +"@babel/core@npm:^7.24.4": + version: 7.29.0 + resolution: "@babel/core@npm:7.29.0" + dependencies: + "@babel/code-frame": "npm:^7.29.0" + "@babel/generator": "npm:^7.29.0" + "@babel/helper-compilation-targets": "npm:^7.28.6" + "@babel/helper-module-transforms": "npm:^7.28.6" + "@babel/helpers": "npm:^7.28.6" + "@babel/parser": "npm:^7.29.0" + "@babel/template": "npm:^7.28.6" + "@babel/traverse": "npm:^7.29.0" + "@babel/types": "npm:^7.29.0" + "@jridgewell/remapping": "npm:^2.3.5" + convert-source-map: "npm:^2.0.0" + debug: "npm:^4.1.0" + gensync: "npm:^1.0.0-beta.2" + json5: "npm:^2.2.3" + semver: "npm:^6.3.1" + checksum: 10/25f4e91688cdfbaf1365831f4f245b436cdaabe63d59389b75752013b8d61819ee4257101b52fc328b0546159fd7d0e74457ed7cf12c365fea54be4fb0a40229 + languageName: node + linkType: hard + "@babel/core@npm:~7.28.6": version: 7.28.6 resolution: "@babel/core@npm:7.28.6" @@ -279,6 +313,19 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.29.0": + version: 7.29.1 + resolution: "@babel/generator@npm:7.29.1" + dependencies: + "@babel/parser": "npm:^7.29.0" + "@babel/types": "npm:^7.29.0" + "@jridgewell/gen-mapping": "npm:^0.3.12" + "@jridgewell/trace-mapping": "npm:^0.3.28" + jsesc: "npm:^3.0.2" + checksum: 10/61fe4ddd6e817aa312a14963ccdbb5c9a8c57e8b97b98d19a8a99ccab2215fda1a5f52bc8dd8d2e3c064497ddeb3ab8ceb55c76fa0f58f8169c34679d2256fe0 + languageName: node + linkType: hard + "@babel/helper-annotate-as-pure@npm:^7.25.9, @babel/helper-annotate-as-pure@npm:^7.27.1, @babel/helper-annotate-as-pure@npm:^7.27.3": version: 7.27.3 resolution: "@babel/helper-annotate-as-pure@npm:7.27.3" @@ -641,6 +688,17 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.24.4, @babel/parser@npm:^7.29.0": + version: 7.29.0 + resolution: "@babel/parser@npm:7.29.0" + dependencies: + "@babel/types": "npm:^7.29.0" + bin: + parser: ./bin/babel-parser.js + checksum: 10/b1576dca41074997a33ee740d87b330ae2e647f4b7da9e8d2abd3772b18385d303b0cee962b9b88425e0f30d58358dbb8d63792c1a2d005c823d335f6a029747 + languageName: node + linkType: hard + "@babel/parser@npm:^7.25.7, @babel/parser@npm:^7.25.9, @babel/parser@npm:^7.27.1, @babel/parser@npm:^7.28.3, @babel/parser@npm:^7.28.4": version: 7.28.4 resolution: "@babel/parser@npm:7.28.4" @@ -2002,6 +2060,21 @@ __metadata: languageName: node linkType: hard +"@babel/traverse@npm:^7.29.0": + version: 7.29.0 + resolution: "@babel/traverse@npm:7.29.0" + dependencies: + "@babel/code-frame": "npm:^7.29.0" + "@babel/generator": "npm:^7.29.0" + "@babel/helper-globals": "npm:^7.28.0" + "@babel/parser": "npm:^7.29.0" + "@babel/template": "npm:^7.28.6" + "@babel/types": "npm:^7.29.0" + debug: "npm:^4.3.1" + checksum: 10/3a0d0438f1ba9fed4fbe1706ea598a865f9af655a16ca9517ab57bda526e224569ca1b980b473fb68feea5e08deafbbf2cf9febb941f92f2d2533310c3fc4abc + languageName: node + linkType: hard + "@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.5, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4": version: 7.23.5 resolution: "@babel/types@npm:7.23.5" @@ -2094,6 +2167,16 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.29.0": + version: 7.29.0 + resolution: "@babel/types@npm:7.29.0" + dependencies: + "@babel/helper-string-parser": "npm:^7.27.1" + "@babel/helper-validator-identifier": "npm:^7.28.5" + checksum: 10/bfc2b211210f3894dcd7e6a33b2d1c32c93495dc1e36b547376aa33441abe551ab4bc1640d4154ee2acd8e46d3bbc925c7224caae02fcaf0e6a771e97fccc661 + languageName: node + linkType: hard + "@bcoe/v8-coverage@npm:^0.2.3": version: 0.2.3 resolution: "@bcoe/v8-coverage@npm:0.2.3" @@ -3229,52 +3312,91 @@ __metadata: languageName: node linkType: hard -"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": - version: 4.4.0 - resolution: "@eslint-community/eslint-utils@npm:4.4.0" +"@eslint-community/eslint-utils@npm:^4.8.0, @eslint-community/eslint-utils@npm:^4.9.1": + version: 4.9.1 + resolution: "@eslint-community/eslint-utils@npm:4.9.1" dependencies: - eslint-visitor-keys: "npm:^3.3.0" + eslint-visitor-keys: "npm:^3.4.3" peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: 10/8d70bcdcd8cd279049183aca747d6c2ed7092a5cf0cf5916faac1ef37ffa74f0c245c2a3a3d3b9979d9dfdd4ca59257b4c5621db699d637b847a2c5e02f491c2 - languageName: node - linkType: hard - -"@eslint-community/regexpp@npm:^4.4.0": - version: 4.5.1 - resolution: "@eslint-community/regexpp@npm:4.5.1" - checksum: 10/e31e456d44e9bf98d59c8ac445549098e1a6d9c4e22053cad58e86a9f78a1e64104ef7f7f46255c442e0c878fe0e566ffba287787d070196c83510ef30d1d197 + checksum: 10/863b5467868551c9ae34d03eefe634633d08f623fc7b19d860f8f26eb6f303c1a5934253124163bee96181e45ed22bf27473dccc295937c3078493a4a8c9eddd languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.6.1": +"@eslint-community/regexpp@npm:^4.12.1, @eslint-community/regexpp@npm:^4.12.2": version: 4.12.2 resolution: "@eslint-community/regexpp@npm:4.12.2" checksum: 10/049b280fddf71dd325514e0a520024969431dc3a8b02fa77476e6820e9122f28ab4c9168c11821f91a27982d2453bcd7a66193356ea84e84fb7c8d793be1ba0c languageName: node linkType: hard -"@eslint/eslintrc@npm:^2.1.4": - version: 2.1.4 - resolution: "@eslint/eslintrc@npm:2.1.4" +"@eslint/config-array@npm:^0.21.1": + version: 0.21.1 + resolution: "@eslint/config-array@npm:0.21.1" dependencies: - ajv: "npm:^6.12.4" + "@eslint/object-schema": "npm:^2.1.7" + debug: "npm:^4.3.1" + minimatch: "npm:^3.1.2" + checksum: 10/6eaa0435972f735ce52d581f355a0b616e50a9b8a73304a7015398096e252798b9b3b968a67b524eefb0fdeacc57c4d960f0ec6432abe1c1e24be815b88c5d18 + languageName: node + linkType: hard + +"@eslint/config-helpers@npm:^0.4.2": + version: 0.4.2 + resolution: "@eslint/config-helpers@npm:0.4.2" + dependencies: + "@eslint/core": "npm:^0.17.0" + checksum: 10/3f2b4712d8e391c36ec98bc200f7dea423dfe518e42956569666831b89ede83b33120c761dfd3ab6347d8e8894a6d4af47254a18d464a71c6046fd88065f6daf + languageName: node + linkType: hard + +"@eslint/core@npm:^0.17.0": + version: 0.17.0 + resolution: "@eslint/core@npm:0.17.0" + dependencies: + "@types/json-schema": "npm:^7.0.15" + checksum: 10/f9a428cc651ec15fb60d7d60c2a7bacad4666e12508320eafa98258e976fafaa77d7be7be91519e75f801f15f830105420b14a458d4aab121a2b0a59bc43517b + languageName: node + linkType: hard + +"@eslint/eslintrc@npm:^3.3.1": + version: 3.3.4 + resolution: "@eslint/eslintrc@npm:3.3.4" + dependencies: + ajv: "npm:^6.14.0" debug: "npm:^4.3.2" - espree: "npm:^9.6.0" - globals: "npm:^13.19.0" + espree: "npm:^10.0.1" + globals: "npm:^14.0.0" ignore: "npm:^5.2.0" import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.0" - minimatch: "npm:^3.1.2" + js-yaml: "npm:^4.1.1" + minimatch: "npm:^3.1.3" strip-json-comments: "npm:^3.1.1" - checksum: 10/7a3b14f4b40fc1a22624c3f84d9f467a3d9ea1ca6e9a372116cb92507e485260359465b58e25bcb6c9981b155416b98c9973ad9b796053fd7b3f776a6946bce8 + checksum: 10/537e6bddb55d37a6b128910d54eaa2c1851992781f82dbf36294583de50386ca92bd669eadc99db9181ab4d735f7e6fa286cba10dab1327b1ea88599a2c5e6a7 + languageName: node + linkType: hard + +"@eslint/js@npm:9.39.3": + version: 9.39.3 + resolution: "@eslint/js@npm:9.39.3" + checksum: 10/91a1a1822cfeb2eb8a89aae86be5dfabad0b66b0915946516690a8485ddd80b91f43eee346789313fea1acbb7390a4958119ca7dc9a684a5c4014f12fcb3aaf3 languageName: node linkType: hard -"@eslint/js@npm:8.57.1": - version: 8.57.1 - resolution: "@eslint/js@npm:8.57.1" - checksum: 10/7562b21be10c2adbfa4aa5bb2eccec2cb9ac649a3569560742202c8d1cb6c931ce634937a2f0f551e078403a1c1285d6c2c0aa345dafc986149665cd69fe8b59 +"@eslint/object-schema@npm:^2.1.7": + version: 2.1.7 + resolution: "@eslint/object-schema@npm:2.1.7" + checksum: 10/946ef5d6235b4d1c0907c6c6e6429c8895f535380c562b7705c131f63f2e961b06e8785043c86a293da48e0a60c6286d98ba395b8b32ea55561fe6e4417cb7e4 + languageName: node + linkType: hard + +"@eslint/plugin-kit@npm:^0.4.1": + version: 0.4.1 + resolution: "@eslint/plugin-kit@npm:0.4.1" + dependencies: + "@eslint/core": "npm:^0.17.0" + levn: "npm:^0.4.1" + checksum: 10/c5947d0ffeddca77d996ac1b886a66060c1a15ed1d5e425d0c7e7d7044a4bd3813fc968892d03950a7831c9b89368a2f7b281e45dd3c74a048962b74bf3a1cb4 languageName: node linkType: hard @@ -3466,14 +3588,20 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.13.0": - version: 0.13.0 - resolution: "@humanwhocodes/config-array@npm:0.13.0" +"@humanfs/core@npm:^0.19.1": + version: 0.19.1 + resolution: "@humanfs/core@npm:0.19.1" + checksum: 10/270d936be483ab5921702623bc74ce394bf12abbf57d9145a69e8a0d1c87eb1c768bd2d93af16c5705041e257e6d9cc7529311f63a1349f3678abc776fc28523 + languageName: node + linkType: hard + +"@humanfs/node@npm:^0.16.6": + version: 0.16.7 + resolution: "@humanfs/node@npm:0.16.7" dependencies: - "@humanwhocodes/object-schema": "npm:^2.0.3" - debug: "npm:^4.3.1" - minimatch: "npm:^3.0.5" - checksum: 10/524df31e61a85392a2433bf5d03164e03da26c03d009f27852e7dcfdafbc4a23f17f021dacf88e0a7a9fe04ca032017945d19b57a16e2676d9114c22a53a9d11 + "@humanfs/core": "npm:^0.19.1" + "@humanwhocodes/retry": "npm:^0.4.0" + checksum: 10/b3633d3dce898592cac515ba5e6693c78e6be92863541d3eaf2c009b10f52b2fa62ff6e6e06f240f2447ddbe7b5f1890bc34e9308470675c876eee207553a08d languageName: node linkType: hard @@ -3484,10 +3612,10 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/object-schema@npm:^2.0.3": - version: 2.0.3 - resolution: "@humanwhocodes/object-schema@npm:2.0.3" - checksum: 10/05bb99ed06c16408a45a833f03a732f59bf6184795d4efadd33238ff8699190a8c871ad1121241bb6501589a9598dc83bf25b99dcbcf41e155cdf36e35e937a3 +"@humanwhocodes/retry@npm:^0.4.0, @humanwhocodes/retry@npm:^0.4.2": + version: 0.4.3 + resolution: "@humanwhocodes/retry@npm:0.4.3" + checksum: 10/0b32cfd362bea7a30fbf80bb38dcaf77fee9c2cae477ee80b460871d03590110ac9c77d654f04ec5beaf71b6f6a89851bdf6c1e34ccdf2f686bd86fcd97d9e61 languageName: node linkType: hard @@ -5076,7 +5204,7 @@ __metadata: languageName: node linkType: hard -"@nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": +"@nodelib/fs.walk@npm:^1.2.3": version: 1.2.8 resolution: "@nodelib/fs.walk@npm:1.2.8" dependencies: @@ -5944,6 +6072,13 @@ __metadata: languageName: node linkType: hard +"@pkgr/core@npm:^0.2.9": + version: 0.2.9 + resolution: "@pkgr/core@npm:0.2.9" + checksum: 10/bb2fb86977d63f836f8f5b09015d74e6af6488f7a411dcd2bfdca79d76b5a681a9112f41c45bdf88a9069f049718efc6f3900d7f1de66a2ec966068308ae517f + languageName: node + linkType: hard + "@playwright/test@npm:^1.52.0": version: 1.52.0 resolution: "@playwright/test@npm:1.52.0" @@ -7913,7 +8048,7 @@ __metadata: "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" "@types/node": "npm:~22.16.5" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" mem: "npm:^8.1.1" mongodb: "npm:6.10.0" @@ -7945,7 +8080,7 @@ __metadata: "@types/prometheus-gc-stats": "npm:^0.6.4" bcrypt: "npm:^5.1.1" ejson: "npm:^2.2.3" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" eventemitter3: "npm:^5.0.4" mem: "npm:^8.1.1" moleculer: "npm:^0.14.35" @@ -7963,7 +8098,7 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/account-utils@workspace:packages/account-utils" dependencies: - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" typescript: "npm:~5.9.3" languageName: unknown linkType: soft @@ -7976,7 +8111,7 @@ __metadata: cron: "npm:~1.8.2" date.js: "npm:~0.3.3" debug: "npm:~4.3.7" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" human-interval: "npm:^2.0.1" moment-timezone: "npm:~0.5.48" mongodb: "npm:6.16.0" @@ -7994,7 +8129,7 @@ __metadata: "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" "@types/strict-uri-encode": "npm:^2.0.2" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" filter-obj: "npm:^3.0.0" jest: "npm:~30.2.0" jest-fetch-mock: "npm:~3.0.3" @@ -8019,14 +8154,12 @@ __metadata: "@types/semver": "npm:^7.5.8" "@types/stack-trace": "npm:0.0.33" "@types/uuid": "npm:~10.0.0" - "@typescript-eslint/eslint-plugin": "npm:~5.60.1" - "@typescript-eslint/parser": "npm:~5.60.1" adm-zip: "npm:^0.5.16" alsatian: "npm:^2.4.0" browserify: "npm:^16.5.2" debug: "npm:^4.3.7" esbuild: "npm:~0.25.12" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jose: "npm:^4.15.9" jsonrpc-lite: "npm:^2.2.0" lodash.clonedeep: "npm:^4.5.0" @@ -8052,7 +8185,7 @@ __metadata: "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/model-typings": "workspace:^" "@rocket.chat/tsconfig": "workspace:*" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" typescript: "npm:~5.9.3" languageName: unknown linkType: soft @@ -8077,7 +8210,7 @@ __metadata: "@types/polka": "npm:^0.5.8" "@types/prometheus-gc-stats": "npm:^0.6.4" ejson: "npm:^2.2.3" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" eventemitter3: "npm:^5.0.4" mem: "npm:^8.1.1" moleculer: "npm:^0.14.35" @@ -8097,7 +8230,6 @@ __metadata: dependencies: "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" - eslint: "npm:~8.57.1" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" languageName: unknown @@ -8108,7 +8240,7 @@ __metadata: resolution: "@rocket.chat/cas-validate@workspace:packages/cas-validate" dependencies: cheerio: "npm:1.0.0" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" languageName: unknown @@ -8132,7 +8264,7 @@ __metadata: "@rocket.chat/tsconfig": "workspace:*" "@rocket.chat/ui-kit": "workspace:~" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" mongodb: "npm:6.16.0" prettier: "npm:~3.3.3" @@ -8149,7 +8281,7 @@ __metadata: "@rocket.chat/message-parser": "workspace:^" "@rocket.chat/ui-kit": "workspace:~" "@types/express": "npm:^4.17.25" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" mongodb: "npm:6.16.0" npm-run-all: "npm:~4.1.5" prettier: "npm:~3.3.3" @@ -8171,7 +8303,7 @@ __metadata: "@rocket.chat/models": "workspace:^" "@rocket.chat/random": "workspace:^" "@rocket.chat/tsconfig": "workspace:*" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" mongodb: "npm:6.16.0" typescript: "npm:~5.9.3" languageName: unknown @@ -8211,7 +8343,7 @@ __metadata: "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" "@types/ws": "npm:^8.5.13" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" jest-websocket-mock: "npm:~2.5.0" typescript: "npm:~5.9.3" @@ -8247,7 +8379,7 @@ __metadata: "@types/ws": "npm:^8.5.13" colorette: "npm:^1.4.0" ejson: "npm:^2.2.3" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" eventemitter3: "npm:^5.0.4" jaeger-client: "npm:^3.19.0" mem: "npm:^8.1.1" @@ -8271,7 +8403,7 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/desktop-api@workspace:packages/desktop-api" dependencies: - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" rimraf: "npm:~6.0.1" typescript: "npm:~5.9.3" languageName: unknown @@ -8299,16 +8431,19 @@ __metadata: "@babel/eslint-parser": "npm:~7.28.6" "@types/eslint": "npm:~8.44.9" "@types/prettier": "npm:^2.7.3" - "@typescript-eslint/eslint-plugin": "npm:~5.60.1" - "@typescript-eslint/parser": "npm:~5.60.1" - eslint: "npm:~8.57.1" - eslint-config-prettier: "npm:~9.1.2" + "@typescript-eslint/eslint-plugin": "npm:~8.56.1" + "@typescript-eslint/parser": "npm:~8.56.1" + eslint: "npm:~9.39.3" + eslint-config-prettier: "npm:~10.1.8" eslint-import-resolver-typescript: "npm:~4.4.4" eslint-plugin-anti-trojan-source: "npm:~1.1.2" - eslint-plugin-import: "npm:~2.31.0" - eslint-plugin-jest: "npm:~28.8.3" - eslint-plugin-jsx-a11y: "npm:^6.10.2" - eslint-plugin-prettier: "npm:~5.2.6" + eslint-plugin-import: "npm:~2.32.0" + eslint-plugin-jest: "npm:~29.15.0" + eslint-plugin-jsx-a11y: "npm:~6.10.2" + eslint-plugin-prettier: "npm:~5.5.5" + eslint-plugin-react: "npm:~7.37.5" + eslint-plugin-react-hooks: "npm:~7.0.1" + eslint-plugin-storybook: "npm:~10.2.12" globals: "npm:~17.3.0" prettier: "npm:~3.3.3" typescript: "npm:~5.9.3" @@ -8319,7 +8454,7 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/favicon@workspace:packages/favicon" dependencies: - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" typescript: "npm:~5.9.3" languageName: unknown linkType: soft @@ -8342,7 +8477,7 @@ __metadata: "@types/node": "npm:~22.16.5" "@types/sanitize-html": "npm:~2.16.0" emojione: "npm:^4.5.0" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" jest-qase-reporter: "npm:^2.1.4" marked: "npm:^16.1.2" @@ -8459,8 +8594,7 @@ __metadata: "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" cross-env: "npm:^7.0.3" - eslint: "npm:~8.57.1" - eslint-plugin-storybook: "npm:~0.11.6" + eslint: "npm:~9.39.3" i18next: "npm:~23.4.9" jest: "npm:~30.2.0" normalize.css: "npm:^8.0.1" @@ -8548,15 +8682,9 @@ __metadata: "@types/katex": "npm:~0.16.8" "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" - "@typescript-eslint/eslint-plugin": "npm:~5.60.1" - "@typescript-eslint/parser": "npm:~5.60.1" date-fns: "npm:~4.1.0" dompurify: "npm:~3.3.1" - eslint: "npm:~8.57.1" - eslint-plugin-anti-trojan-source: "npm:~1.1.2" - eslint-plugin-react: "npm:~7.37.5" - eslint-plugin-react-hooks: "npm:~5.0.0" - eslint-plugin-storybook: "npm:~0.11.6" + eslint: "npm:~9.39.3" highlight.js: "npm:11.8.0" i18next: "npm:~23.4.9" identity-obj-proxy: "npm:^3.0.0" @@ -8600,7 +8728,7 @@ __metadata: "@types/jest": "npm:~30.0.0" "@types/supertest": "npm:~6.0.3" ajv: "npm:^8.17.1" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" express: "npm:^4.21.2" hono: "npm:^4.11.9" jest: "npm:~30.2.0" @@ -8618,7 +8746,7 @@ __metadata: "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tools": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" i18next: "npm:~23.4.9" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" @@ -8642,7 +8770,7 @@ __metadata: "@rocket.chat/models": "workspace:^" "@rocket.chat/tracing": "workspace:^" "@rocket.chat/tsconfig": "workspace:*" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" mongodb: "npm:6.16.0" prettier: "npm:~3.3.3" typescript: "npm:~5.9.3" @@ -8660,7 +8788,7 @@ __metadata: "@types/jest": "npm:~30.0.0" "@types/jest-axe": "npm:~3.5.9" "@types/uuid": "npm:^10.0.0" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" identity-obj-proxy: "npm:~3.0.0" jest: "npm:~30.2.0" jest-axe: "npm:~10.0.0" @@ -8678,7 +8806,7 @@ __metadata: "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" jose: "npm:^4.15.9" typescript: "npm:~5.9.3" @@ -8710,7 +8838,7 @@ __metadata: "@types/jest": "npm:~30.0.0" "@types/ws": "npm:^8.5.13" bcrypt: "npm:^5.1.1" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" jest-websocket-mock: "npm:~2.5.0" typescript: "npm:~5.9.3" @@ -8722,7 +8850,6 @@ __metadata: resolution: "@rocket.chat/livechat@workspace:packages/livechat" dependencies: "@babel/core": "npm:~7.28.6" - "@babel/eslint-parser": "npm:~7.28.6" "@babel/preset-env": "npm:~7.28.6" "@babel/preset-react": "npm:~7.27.1" "@babel/preset-typescript": "npm:~7.27.1" @@ -8748,8 +8875,6 @@ __metadata: "@types/react": "npm:~18.3.27" "@types/webpack-env": "npm:~1.18.8" "@types/whatwg-fetch": "npm:~0.0.33" - "@typescript-eslint/eslint-plugin": "npm:~5.60.1" - "@typescript-eslint/parser": "npm:~5.60.1" ajv: "npm:^8.17.1" ajv-formats: "npm:^3.0.1" autoprefixer: "npm:^9.8.8" @@ -8762,11 +8887,7 @@ __metadata: desvg-loader: "npm:^0.1.0" dompurify: "npm:~3.3.1" emoji-mart: "npm:^3.0.1" - eslint: "npm:~8.57.1" - eslint-plugin-import: "npm:~2.31.0" - eslint-plugin-react: "npm:~7.37.5" - eslint-plugin-react-hooks: "npm:~5.0.0" - eslint-plugin-storybook: "npm:~0.11.6" + eslint: "npm:~9.39.3" file-loader: "npm:^6.2.0" history: "npm:~5.3.0" html-webpack-plugin: "npm:~5.6.6" @@ -8823,7 +8944,7 @@ __metadata: "@types/ejson": "npm:^2.2.2" chalk: "npm:^4.1.2" ejson: "npm:^2.2.3" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" typescript: "npm:~5.9.3" languageName: unknown linkType: soft @@ -8833,7 +8954,7 @@ __metadata: resolution: "@rocket.chat/logger@workspace:packages/logger" dependencies: "@rocket.chat/emitter": "npm:^0.32.0" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" pino: "npm:^8.21.0" typescript: "npm:~5.9.3" languageName: unknown @@ -8864,7 +8985,7 @@ __metadata: "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" drachtio-srf: "patch:drachtio-srf@npm%3A5.0.12#~/.yarn/patches/drachtio-srf-npm-5.0.12-b0b1afaad6.patch" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" typescript: "npm:~5.9.3" languageName: unknown linkType: soft @@ -8878,7 +8999,7 @@ __metadata: "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" ajv: "npm:^8.17.1" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" languageName: unknown @@ -8900,8 +9021,7 @@ __metadata: "@rocket.chat/prettier-config": "npm:~0.31.25" "@types/jest": "npm:~30.0.0" "@types/node": "npm:~22.16.5" - "@typescript-eslint/parser": "npm:~5.60.1" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" npm-run-all: "npm:^4.1.5" peggy: "npm:4.1.1" @@ -8923,7 +9043,7 @@ __metadata: dependencies: "@rocket.chat/core-typings": "workspace:~" date-fns: "npm:~4.1.0" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" i18next: "npm:~23.4.9" jest: "npm:~30.2.0" moment: "npm:^2.30.1" @@ -8940,7 +9060,6 @@ __metadata: dependencies: "@axe-core/playwright": "npm:^4.10.2" "@babel/core": "npm:~7.28.6" - "@babel/eslint-parser": "npm:~7.28.6" "@babel/preset-env": "npm:~7.28.6" "@babel/preset-react": "npm:~7.27.1" "@babel/register": "npm:~7.28.6" @@ -9123,8 +9242,6 @@ __metadata: "@types/underscore": "npm:^1.13.0" "@types/xml-crypto": "npm:~1.4.6" "@types/xml-encryption": "npm:~1.2.4" - "@typescript-eslint/eslint-plugin": "npm:~5.60.1" - "@typescript-eslint/parser": "npm:~5.60.1" "@xmldom/xmldom": "npm:~0.8.11" adm-zip: "npm:0.5.16" ajv: "npm:^8.17.1" @@ -9174,18 +9291,7 @@ __metadata: emojione: "npm:^4.5.0" emojione-assets: "npm:^4.5.0" esl: "npm:^11.2.1" - eslint: "npm:~8.57.1" - eslint-config-prettier: "npm:~9.1.2" - eslint-plugin-anti-trojan-source: "npm:~1.1.2" - eslint-plugin-import: "npm:~2.31.0" - eslint-plugin-no-floating-promise: "npm:~2.0.0" - eslint-plugin-playwright: "npm:~2.2.2" - eslint-plugin-prettier: "npm:~5.2.6" - eslint-plugin-react: "npm:~7.37.5" - eslint-plugin-react-hooks: "npm:~5.0.0" - eslint-plugin-storybook: "npm:~0.11.6" - eslint-plugin-testing-library: "npm:~6.4.0" - eslint-plugin-you-dont-need-lodash-underscore: "npm:~6.14.0" + eslint: "npm:~9.39.3" eventemitter3: "npm:^5.0.4" exif-be-gone: "npm:^1.5.1" expiry-map: "npm:^2.0.0" @@ -9354,7 +9460,7 @@ __metadata: "@testing-library/react": "npm:~16.3.2" "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" i18next: "npm:~23.4.9" jest: "npm:~30.2.0" react: "npm:~18.3.1" @@ -9374,7 +9480,7 @@ __metadata: dependencies: "@rocket.chat/core-typings": "workspace:^" "@types/node-rsa": "npm:^1.1.4" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" mongodb: "npm:6.16.0" typescript: "npm:~5.9.3" languageName: unknown @@ -9395,7 +9501,7 @@ __metadata: "@types/jest": "npm:~30.0.0" "@types/node-rsa": "npm:^1.1.4" date-fns: "npm:~4.1.0" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" node-rsa: "npm:^1.1.1" typescript: "npm:~5.9.3" @@ -9407,7 +9513,7 @@ __metadata: resolution: "@rocket.chat/mongo-adapter@workspace:packages/mongo-adapter" dependencies: "@rocket.chat/jest-presets": "workspace:~" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" mongodb: "npm:6.16.0" typescript: "npm:~5.9.3" @@ -9435,7 +9541,7 @@ __metadata: "@types/sinon": "npm:^10.0.20" chai: "npm:^4.5.0" ejson: "npm:^2.2.3" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" moleculer: "npm:^0.14.35" pino: "npm:^8.21.0" @@ -9455,7 +9561,7 @@ __metadata: "@rocket.chat/omni-core": "workspace:^" "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" mem: "npm:^8.1.1" mongodb: "npm:6.16.0" @@ -9473,7 +9579,7 @@ __metadata: "@rocket.chat/tools": "workspace:*" "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" mongodb: "npm:6.16.0" typescript: "npm:~5.9.3" @@ -9503,7 +9609,7 @@ __metadata: date-fns: "npm:~4.1.0" ejson: "npm:^2.2.3" emoji-toolkit: "npm:^7.0.1" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" eventemitter3: "npm:^5.0.4" i18next: "npm:~23.4.9" jest: "npm:~30.2.0" @@ -9541,7 +9647,7 @@ __metadata: "@types/react": "npm:~18.3.27" ejson: "npm:^2.2.3" emoji-toolkit: "npm:^7.0.1" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" eventemitter3: "npm:^5.0.4" i18next: "npm:~23.4.9" i18next-sprintf-postprocessor: "npm:^0.2.2" @@ -9587,7 +9693,7 @@ __metadata: "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" languageName: unknown @@ -9600,7 +9706,7 @@ __metadata: "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" languageName: unknown @@ -9628,8 +9734,7 @@ __metadata: "@types/react-dom": "npm:~18.3.7" buffer: "npm:~6.0.3" emoji-toolkit: "npm:^7.0.1" - eslint: "npm:~8.57.1" - eslint-plugin-storybook: "npm:~0.11.6" + eslint: "npm:~9.39.3" i18next: "npm:~23.4.9" jest: "npm:~30.2.0" moment: "npm:^2.30.1" @@ -9648,7 +9753,7 @@ __metadata: dependencies: "@rocket.chat/prettier-config": "npm:~0.31.25" "@types/node": "npm:~22.16.5" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" npm-run-all: "npm:^4.1.5" peggy: "npm:4.1.1" prettier: "npm:~3.3.3" @@ -9665,7 +9770,6 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/poplib@workspace:packages/node-poplib" dependencies: - eslint: "npm:~8.57.1" typescript: "npm:~5.9.3" languageName: unknown linkType: soft @@ -9689,7 +9793,7 @@ __metadata: "@types/polka": "npm:^0.5.8" "@types/prometheus-gc-stats": "npm:^0.6.4" ejson: "npm:^2.2.3" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" eventemitter3: "npm:^5.0.4" mem: "npm:^8.1.1" moleculer: "npm:^0.14.35" @@ -9713,7 +9817,7 @@ __metadata: "@rocket.chat/models": "workspace:^" "@rocket.chat/rest-typings": "workspace:^" "@types/node": "npm:~22.16.5" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" mongodb: "npm:6.16.0" typescript: "npm:~5.9.3" @@ -9748,7 +9852,7 @@ __metadata: "@types/prometheus-gc-stats": "npm:^0.6.4" ejson: "npm:^2.2.3" emoji-toolkit: "npm:^7.0.1" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" eventemitter3: "npm:^5.0.4" mem: "npm:^8.1.1" moleculer: "npm:^0.14.35" @@ -9770,7 +9874,7 @@ __metadata: dependencies: "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" languageName: unknown @@ -9786,7 +9890,7 @@ __metadata: "@octokit/core": "npm:^5.0.1" "@octokit/plugin-throttling": "npm:^6.1.0" "@types/node": "npm:~22.16.5" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" mdast-util-to-string: "npm:2.0.0" remark-parse: "npm:9.0.0" remark-stringify: "npm:9.0.1" @@ -9803,7 +9907,7 @@ __metadata: "@changesets/types": "npm:^6.0.0" "@types/node": "npm:~22.16.5" dataloader: "npm:^2.2.3" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" node-fetch: "npm:^2.7.0" typescript: "npm:~5.9.3" languageName: unknown @@ -9820,7 +9924,7 @@ __metadata: "@types/jest": "npm:~30.0.0" ajv: "npm:^8.17.1" ajv-formats: "npm:^3.0.1" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" mongodb: "npm:6.16.0" typescript: "npm:~5.9.3" languageName: unknown @@ -9831,7 +9935,7 @@ __metadata: resolution: "@rocket.chat/server-cloud-communication@workspace:packages/server-cloud-communication" dependencies: "@rocket.chat/license": "workspace:^" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" typescript: "npm:~5.9.3" languageName: unknown linkType: soft @@ -9846,7 +9950,7 @@ __metadata: "@types/jest": "npm:^29.5.5" "@types/node-fetch": "npm:~2.6.13" "@types/proxy-from-env": "npm:^1.0.4" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" http-proxy-agent: "npm:^7.0.2" https-proxy-agent: "npm:^7.0.6" jest: "npm:^29.7.0" @@ -9862,7 +9966,7 @@ __metadata: dependencies: "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" typescript: "npm:~5.9.3" languageName: unknown @@ -9887,7 +9991,7 @@ __metadata: "@storybook/react": "npm:^8.6.15" "@storybook/react-webpack5": "npm:^8.6.15" "@storybook/theming": "npm:^8.6.15" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" react: "npm:~18.3.1" react-dom: "npm:~18.3.1" react-virtuoso: "npm:^4.12.0" @@ -9937,7 +10041,7 @@ __metadata: "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" moment-timezone: "npm:^0.5.48" typescript: "npm:~5.9.3" @@ -9952,7 +10056,7 @@ __metadata: "@opentelemetry/exporter-trace-otlp-grpc": "npm:^0.54.2" "@opentelemetry/sdk-node": "npm:^0.54.2" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" ts-jest: "npm:~29.4.6" typescript: "npm:~5.9.3" @@ -9978,11 +10082,7 @@ __metadata: "@rocket.chat/ui-contexts": "workspace:^" "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" - eslint: "npm:~8.57.1" - eslint-plugin-react: "npm:~7.37.5" - eslint-plugin-react-hooks: "npm:~5.0.0" - eslint-plugin-storybook: "npm:~0.11.6" - eslint-plugin-testing-library: "npm:~6.4.0" + eslint: "npm:~9.39.3" react: "npm:~18.3.1" react-dom: "npm:~18.3.1" react-virtuoso: "npm:^4.12.0" @@ -10022,12 +10122,7 @@ __metadata: "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" dompurify: "npm:~3.3.1" - eslint: "npm:~8.57.1" - eslint-plugin-anti-trojan-source: "npm:~1.1.2" - eslint-plugin-react: "npm:~7.37.5" - eslint-plugin-react-hooks: "npm:~5.0.0" - eslint-plugin-storybook: "npm:~0.11.6" - eslint-plugin-testing-library: "npm:~6.4.0" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" overlayscrollbars: "npm:^2.11.4" overlayscrollbars-react: "npm:^0.5.6" @@ -10077,10 +10172,7 @@ __metadata: "@types/jest": "npm:~30.0.0" "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" - eslint: "npm:~8.57.1" - eslint-plugin-react: "npm:~7.37.5" - eslint-plugin-react-hooks: "npm:~5.0.0" - eslint-plugin-storybook: "npm:~0.11.6" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" react: "npm:~18.3.1" react-dom: "npm:~18.3.1" @@ -10116,8 +10208,7 @@ __metadata: "@types/jest": "npm:~30.0.0" "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" - eslint: "npm:~8.57.1" - eslint-plugin-react-hooks: "npm:^5.0.0" + eslint: "npm:~9.39.3" i18next: "npm:~23.4.9" jest: "npm:~30.2.0" mongodb: "npm:6.16.0" @@ -10142,7 +10233,7 @@ __metadata: "@rocket.chat/jest-presets": "workspace:~" "@rocket.chat/tsconfig": "workspace:*" "@types/jest": "npm:~30.0.0" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" npm-run-all: "npm:~4.1.5" prettier: "npm:~3.3.3" @@ -10169,11 +10260,7 @@ __metadata: "@rocket.chat/ui-contexts": "workspace:~" "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" - eslint: "npm:~8.57.1" - eslint-plugin-anti-trojan-source: "npm:~1.1.2" - eslint-plugin-react: "npm:~7.37.5" - eslint-plugin-react-hooks: "npm:~5.0.0" - eslint-plugin-testing-library: "npm:^6.4.0" + eslint: "npm:~9.39.3" react: "npm:~18.3.1" react-docgen-typescript-plugin: "npm:~1.0.8" react-dom: "npm:~18.3.1" @@ -10216,10 +10303,7 @@ __metadata: "@types/jest-axe": "npm:~3.5.9" "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" - eslint: "npm:~8.57.1" - eslint-plugin-react: "npm:~7.37.5" - eslint-plugin-react-hooks: "npm:~5.0.0" - eslint-plugin-storybook: "npm:~0.11.6" + eslint: "npm:~9.39.3" jest: "npm:~30.2.0" jest-axe: "npm:~10.0.0" react: "npm:~18.3.1" @@ -10284,10 +10368,7 @@ __metadata: "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" date-fns: "npm:~4.1.0" - eslint: "npm:~8.57.1" - eslint-plugin-react: "npm:~7.37.5" - eslint-plugin-react-hooks: "npm:~5.0.0" - eslint-plugin-storybook: "npm:~0.11.6" + eslint: "npm:~9.39.3" i18next: "npm:~23.4.9" jest: "npm:~30.2.0" jest-axe: "npm:~10.0.0" @@ -10340,14 +10421,9 @@ __metadata: "@types/react": "npm:~18.3.27" "@types/react-beautiful-dnd": "npm:^13.1.8" "@types/react-dom": "npm:~18.3.7" - "@typescript-eslint/eslint-plugin": "npm:~5.60.1" - "@typescript-eslint/parser": "npm:~5.60.1" "@vitejs/plugin-react": "npm:~4.5.2" codemirror: "npm:^6.0.2" - eslint: "npm:~8.57.1" - eslint-plugin-react: "npm:~7.37.5" - eslint-plugin-react-hooks: "npm:^5.0.0" - eslint-plugin-react-refresh: "npm:^0.4.26" + eslint: "npm:~9.39.3" eslint4b-prebuilt: "npm:^6.7.2" moment: "npm:^2.30.1" prettier: "npm:~3.3.3" @@ -10395,8 +10471,7 @@ __metadata: "@types/react": "npm:~18.3.27" "@types/react-dom": "npm:~18.3.7" dompurify: "npm:~3.3.1" - eslint: "npm:~8.57.1" - eslint-plugin-storybook: "npm:~0.11.6" + eslint: "npm:~9.39.3" i18next: "npm:~23.4.9" react: "npm:~18.3.1" react-dom: "npm:~18.3.1" @@ -13501,7 +13576,7 @@ __metadata: languageName: node linkType: hard -"@types/semver@npm:^7.3.12, @types/semver@npm:^7.3.4, @types/semver@npm:^7.5.8": +"@types/semver@npm:^7.3.4, @types/semver@npm:^7.5.8": version: 7.5.8 resolution: "@types/semver@npm:7.5.8" checksum: 10/3496808818ddb36deabfe4974fd343a78101fa242c4690044ccdc3b95dcf8785b494f5d628f2f47f38a702f8db9c53c67f47d7818f2be1b79f2efb09692e1178 @@ -13872,247 +13947,138 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:~5.60.1": - version: 5.60.1 - resolution: "@typescript-eslint/eslint-plugin@npm:5.60.1" +"@typescript-eslint/eslint-plugin@npm:~8.56.1": + version: 8.56.1 + resolution: "@typescript-eslint/eslint-plugin@npm:8.56.1" dependencies: - "@eslint-community/regexpp": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:5.60.1" - "@typescript-eslint/type-utils": "npm:5.60.1" - "@typescript-eslint/utils": "npm:5.60.1" - debug: "npm:^4.3.4" - grapheme-splitter: "npm:^1.0.4" - ignore: "npm:^5.2.0" - natural-compare-lite: "npm:^1.4.0" - semver: "npm:^7.3.7" - tsutils: "npm:^3.21.0" + "@eslint-community/regexpp": "npm:^4.12.2" + "@typescript-eslint/scope-manager": "npm:8.56.1" + "@typescript-eslint/type-utils": "npm:8.56.1" + "@typescript-eslint/utils": "npm:8.56.1" + "@typescript-eslint/visitor-keys": "npm:8.56.1" + ignore: "npm:^7.0.5" + natural-compare: "npm:^1.4.0" + ts-api-utils: "npm:^2.4.0" peerDependencies: - "@typescript-eslint/parser": ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/0d05b59a14a96f72feb32060d7776387d1d447a49cdfd796291e98354c118f1e60ff8088945ce18060d66496e61b37346fdd84d1077f25b56755402448a99a80 + "@typescript-eslint/parser": ^8.56.1 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: ">=4.8.4 <6.0.0" + checksum: 10/669d19cff91fcad5fe34dba97cc8c0c2df3160ae14646759fb23dfd6ffbb861d00d8d081e74d1060d544bfba0ea4d05588c5b73ae104907af26cc18189c0d139 languageName: node linkType: hard -"@typescript-eslint/parser@npm:~5.60.1": - version: 5.60.1 - resolution: "@typescript-eslint/parser@npm:5.60.1" +"@typescript-eslint/parser@npm:~8.56.1": + version: 8.56.1 + resolution: "@typescript-eslint/parser@npm:8.56.1" dependencies: - "@typescript-eslint/scope-manager": "npm:5.60.1" - "@typescript-eslint/types": "npm:5.60.1" - "@typescript-eslint/typescript-estree": "npm:5.60.1" - debug: "npm:^4.3.4" + "@typescript-eslint/scope-manager": "npm:8.56.1" + "@typescript-eslint/types": "npm:8.56.1" + "@typescript-eslint/typescript-estree": "npm:8.56.1" + "@typescript-eslint/visitor-keys": "npm:8.56.1" + debug: "npm:^4.4.3" peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/4117ce76b1b177278e6e1554f10978c4ae558f5b12d758626979dd78f63228aefabb36148eddd2a050877e8d013bfc33bc2451a8c9a63ed2f208911cbb34a3d5 - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:5.60.1": - version: 5.60.1 - resolution: "@typescript-eslint/scope-manager@npm:5.60.1" - dependencies: - "@typescript-eslint/types": "npm:5.60.1" - "@typescript-eslint/visitor-keys": "npm:5.60.1" - checksum: 10/0fb618d6895e5a742ec61cb0d0f3a5e3d9e5c76e6aa876b90eaacd546295ef9e8f43d8e72331d4daf7b4fd926364a78d4d6a5e8e29579a35361fd5f13903fce8 - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/scope-manager@npm:5.62.0" - dependencies: - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/visitor-keys": "npm:5.62.0" - checksum: 10/e827770baa202223bc0387e2fd24f630690809e460435b7dc9af336c77322290a770d62bd5284260fa881c86074d6a9fd6c97b07382520b115f6786b8ed499da - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:8.12.2": - version: 8.12.2 - resolution: "@typescript-eslint/scope-manager@npm:8.12.2" - dependencies: - "@typescript-eslint/types": "npm:8.12.2" - "@typescript-eslint/visitor-keys": "npm:8.12.2" - checksum: 10/a2cd6ad4b31f4d0ca6f94c4df8a94bdee762abd556686817ab4143d80a27506f43fbf96769b44e698d573784a464bfd78e0cbc17ac61c36a868e02311c754ce1 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: ">=4.8.4 <6.0.0" + checksum: 10/280b041a69153caf9e721b307781830483dd39d881b02d993156635bd8600e30e6a816aaead8bdd662ae5149b8870aef7b3823d3b98ec974d924c23a786fb6d9 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:5.60.1": - version: 5.60.1 - resolution: "@typescript-eslint/type-utils@npm:5.60.1" +"@typescript-eslint/project-service@npm:8.56.1": + version: 8.56.1 + resolution: "@typescript-eslint/project-service@npm:8.56.1" dependencies: - "@typescript-eslint/typescript-estree": "npm:5.60.1" - "@typescript-eslint/utils": "npm:5.60.1" - debug: "npm:^4.3.4" - tsutils: "npm:^3.21.0" + "@typescript-eslint/tsconfig-utils": "npm:^8.56.1" + "@typescript-eslint/types": "npm:^8.56.1" + debug: "npm:^4.4.3" peerDependencies: - eslint: "*" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/415ef8a618379bdd241b1bdb699e842ce695e301fcbecbabdbe328b744217130b05a5464fdbfc0863a3d58c7fe9483e3c98f7115823692c5c8fda3ce0eb0554e - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:5.60.1": - version: 5.60.1 - resolution: "@typescript-eslint/types@npm:5.60.1" - checksum: 10/69c2b31e6fb2a2bbe1b60e9470e39c2e0840e8e499d9ed7dab158f9191b0bc84a81ed7d437658ff9677372ca5b2b23dd9690265801c4c7ce03b20a7c60a252fa - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/types@npm:5.62.0" - checksum: 10/24e8443177be84823242d6729d56af2c4b47bfc664dd411a1d730506abf2150d6c31bdefbbc6d97c8f91043e3a50e0c698239dcb145b79bb6b0c34469aaf6c45 - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:8.12.2": - version: 8.12.2 - resolution: "@typescript-eslint/types@npm:8.12.2" - checksum: 10/57981e5fa45b03a0398ffb82418fdb716f476aa0b9c17d96edeb7fd3e3f4a720466868af7c2a02ddca65c27e70bfaff50c523b2a570582c4645a2702e17dc94a - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:5.60.1": - version: 5.60.1 - resolution: "@typescript-eslint/typescript-estree@npm:5.60.1" - dependencies: - "@typescript-eslint/types": "npm:5.60.1" - "@typescript-eslint/visitor-keys": "npm:5.60.1" - debug: "npm:^4.3.4" - globby: "npm:^11.1.0" - is-glob: "npm:^4.0.3" - semver: "npm:^7.3.7" - tsutils: "npm:^3.21.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/f67ad9bc86b17351d8ee9f1737521f8be39c8a73cb2f9b55be2c1e30c6d8d9f7f33293f450d24bef1ad7e18635007e01de4948a9b25ffc3be381b3cb1ba3353b - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" - dependencies: - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/visitor-keys": "npm:5.62.0" - debug: "npm:^4.3.4" - globby: "npm:^11.1.0" - is-glob: "npm:^4.0.3" - semver: "npm:^7.3.7" - tsutils: "npm:^3.21.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/06c975eb5f44b43bd19fadc2e1023c50cf87038fe4c0dd989d4331c67b3ff509b17fa60a3251896668ab4d7322bdc56162a9926971218d2e1a1874d2bef9a52e + typescript: ">=4.8.4 <6.0.0" + checksum: 10/5e7fdc95aebcefc72fec77806bb0821a9a59e5e88f86d72b15ad011eb6110da05419b803875f021716a219fc7fb8517331a6736364344c8613a90209539a6d32 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.12.2": - version: 8.12.2 - resolution: "@typescript-eslint/typescript-estree@npm:8.12.2" +"@typescript-eslint/scope-manager@npm:8.56.1, @typescript-eslint/scope-manager@npm:^8.56.0": + version: 8.56.1 + resolution: "@typescript-eslint/scope-manager@npm:8.56.1" dependencies: - "@typescript-eslint/types": "npm:8.12.2" - "@typescript-eslint/visitor-keys": "npm:8.12.2" - debug: "npm:^4.3.4" - fast-glob: "npm:^3.3.2" - is-glob: "npm:^4.0.3" - minimatch: "npm:^9.0.4" - semver: "npm:^7.6.0" - ts-api-utils: "npm:^1.3.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/9995929ec4b66afa53d52c16f5cecd7c9aa45994f943c41e9ec91fe178593e83d9049ff056fe2638c3cf7da01476861eff0dc3cb76c314cc130458d3f828930d + "@typescript-eslint/types": "npm:8.56.1" + "@typescript-eslint/visitor-keys": "npm:8.56.1" + checksum: 10/f358cf8bd32952eed005d4f34c1e95805baefe35abee96d866222b0eff8027cc02f831cee04b308707d74db2b415437a134191207b4213ee8acbc6d67a435616 languageName: node linkType: hard -"@typescript-eslint/utils@npm:5.60.1": - version: 5.60.1 - resolution: "@typescript-eslint/utils@npm:5.60.1" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@types/json-schema": "npm:^7.0.9" - "@types/semver": "npm:^7.3.12" - "@typescript-eslint/scope-manager": "npm:5.60.1" - "@typescript-eslint/types": "npm:5.60.1" - "@typescript-eslint/typescript-estree": "npm:5.60.1" - eslint-scope: "npm:^5.1.1" - semver: "npm:^7.3.7" +"@typescript-eslint/tsconfig-utils@npm:8.56.1, @typescript-eslint/tsconfig-utils@npm:^8.56.1": + version: 8.56.1 + resolution: "@typescript-eslint/tsconfig-utils@npm:8.56.1" peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 10/7658936e2fc9bc0586efb40b372de77dc88f752208b94d3df1a0a4c236dfb438fa46796b392bc0e9e7fdf8b45002542c3a21d143442435bc9c6161f2c1ff9695 + typescript: ">=4.8.4 <6.0.0" + checksum: 10/d509f1ae4b14969173e498db6d15c833b6407db456c7fca9e25396798a35014229a73754691f353c4a99f5f0bbb4535b4144f42f84e596645a16d88a2022135f languageName: node linkType: hard -"@typescript-eslint/utils@npm:^5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/utils@npm:5.62.0" +"@typescript-eslint/type-utils@npm:8.56.1": + version: 8.56.1 + resolution: "@typescript-eslint/type-utils@npm:8.56.1" dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@types/json-schema": "npm:^7.0.9" - "@types/semver": "npm:^7.3.12" - "@typescript-eslint/scope-manager": "npm:5.62.0" - "@typescript-eslint/types": "npm:5.62.0" - "@typescript-eslint/typescript-estree": "npm:5.62.0" - eslint-scope: "npm:^5.1.1" - semver: "npm:^7.3.7" + "@typescript-eslint/types": "npm:8.56.1" + "@typescript-eslint/typescript-estree": "npm:8.56.1" + "@typescript-eslint/utils": "npm:8.56.1" + debug: "npm:^4.4.3" + ts-api-utils: "npm:^2.4.0" peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 10/15ef13e43998a082b15f85db979f8d3ceb1f9ce4467b8016c267b1738d5e7cdb12aa90faf4b4e6dd6486c236cf9d33c463200465cf25ff997dbc0f12358550a1 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: ">=4.8.4 <6.0.0" + checksum: 10/2b07c674c26d797d05c05779ac5c89761b6b96680ecaf01440957727d12c6d06a2e48f0b139e45752eb4b53bf13c03940628656c519d362082b716d6a0ece6d9 languageName: node linkType: hard -"@typescript-eslint/utils@npm:^6.0.0 || ^7.0.0 || ^8.0.0, @typescript-eslint/utils@npm:^8.8.1": - version: 8.12.2 - resolution: "@typescript-eslint/utils@npm:8.12.2" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.12.2" - "@typescript-eslint/types": "npm:8.12.2" - "@typescript-eslint/typescript-estree": "npm:8.12.2" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - checksum: 10/4588866ca43314692a0e685d8936c470dca4e6d119a4a1adefbc2fd54682ff081bc21d60bf4e8077d3668aa680bada851b88566264d09c92a840fe2e4feb331b +"@typescript-eslint/types@npm:8.56.1, @typescript-eslint/types@npm:^8.56.1": + version: 8.56.1 + resolution: "@typescript-eslint/types@npm:8.56.1" + checksum: 10/4bcffab5b0fd48adb731fcade86a776ca4a66e229defa5a282b58ba9c95af16ffc459a7d188e27c988a35be1f6fb5b812f9cf0952692eac38d5b3e87daafb20a languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:5.60.1": - version: 5.60.1 - resolution: "@typescript-eslint/visitor-keys@npm:5.60.1" +"@typescript-eslint/typescript-estree@npm:8.56.1": + version: 8.56.1 + resolution: "@typescript-eslint/typescript-estree@npm:8.56.1" dependencies: - "@typescript-eslint/types": "npm:5.60.1" - eslint-visitor-keys: "npm:^3.3.0" - checksum: 10/15826a8373f09885e9a4c761932580cadad1b596bf3638675bd23c3e0708d03e5d6337a7df925d702f1869684989c468ca2303600fb49672a5238c4a75b0db50 + "@typescript-eslint/project-service": "npm:8.56.1" + "@typescript-eslint/tsconfig-utils": "npm:8.56.1" + "@typescript-eslint/types": "npm:8.56.1" + "@typescript-eslint/visitor-keys": "npm:8.56.1" + debug: "npm:^4.4.3" + minimatch: "npm:^10.2.2" + semver: "npm:^7.7.3" + tinyglobby: "npm:^0.2.15" + ts-api-utils: "npm:^2.4.0" + peerDependencies: + typescript: ">=4.8.4 <6.0.0" + checksum: 10/af39dae0a8fada72295a11f0efb49f311241134b0a3d819100eeda6a2f92368844645873ba785de5513ad541cd9c2ba17b9bfed2679daac4682fa2a3b627f087 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:5.62.0": - version: 5.62.0 - resolution: "@typescript-eslint/visitor-keys@npm:5.62.0" +"@typescript-eslint/utils@npm:8.56.1, @typescript-eslint/utils@npm:^8.0.0, @typescript-eslint/utils@npm:^8.48.0, @typescript-eslint/utils@npm:^8.56.0": + version: 8.56.1 + resolution: "@typescript-eslint/utils@npm:8.56.1" dependencies: - "@typescript-eslint/types": "npm:5.62.0" - eslint-visitor-keys: "npm:^3.3.0" - checksum: 10/dc613ab7569df9bbe0b2ca677635eb91839dfb2ca2c6fa47870a5da4f160db0b436f7ec0764362e756d4164e9445d49d5eb1ff0b87f4c058946ae9d8c92eb388 + "@eslint-community/eslint-utils": "npm:^4.9.1" + "@typescript-eslint/scope-manager": "npm:8.56.1" + "@typescript-eslint/types": "npm:8.56.1" + "@typescript-eslint/typescript-estree": "npm:8.56.1" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: ">=4.8.4 <6.0.0" + checksum: 10/528cbd187d8288a8cfce24a043f993b93711087f53d2b6f95cdd615a1a4087af1dab083a747761af97474a621c7b14f11c84ee50c250f31566ebc64cf73867fe languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.12.2": - version: 8.12.2 - resolution: "@typescript-eslint/visitor-keys@npm:8.12.2" +"@typescript-eslint/visitor-keys@npm:8.56.1": + version: 8.56.1 + resolution: "@typescript-eslint/visitor-keys@npm:8.56.1" dependencies: - "@typescript-eslint/types": "npm:8.12.2" - eslint-visitor-keys: "npm:^3.4.3" - checksum: 10/42795ad1c71520a367e2b53c3511b6cf922dcee05d61f6b0ec56b71c0b89a58889e0c3282b1bb13befc69df07204d0e4e053436d0c2b808460ce310b58a2a92e + "@typescript-eslint/types": "npm:8.56.1" + eslint-visitor-keys: "npm:^5.0.0" + checksum: 10/efed6a9867e7be203eec543e5a65da5aaec96aae55fba6fe74a305bf600e57c707764835e82bb8eb541f49a9b70442ff1e1a0ecf3543c78c91b84dda43b95c53 languageName: node linkType: hard @@ -14123,7 +14089,7 @@ __metadata: languageName: node linkType: hard -"@ungap/structured-clone@npm:^1.2.0, @ungap/structured-clone@npm:^1.3.0": +"@ungap/structured-clone@npm:^1.3.0": version: 1.3.0 resolution: "@ungap/structured-clone@npm:1.3.0" checksum: 10/80d6910946f2b1552a2406650051c91bbd1f24a6bf854354203d84fe2714b3e8ce4618f49cc3410494173a1c1e8e9777372fe68dce74bd45faf0a7a1a6ccf448 @@ -14730,7 +14696,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.12.1, acorn@npm:^8.14.0, acorn@npm:^8.4.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": +"acorn@npm:^8.12.1, acorn@npm:^8.14.0, acorn@npm:^8.4.1, acorn@npm:^8.8.2": version: 8.14.0 resolution: "acorn@npm:8.14.0" bin: @@ -14739,6 +14705,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^8.15.0": + version: 8.16.0 + resolution: "acorn@npm:8.16.0" + bin: + acorn: bin/acorn + checksum: 10/690c673bb4d61b38ef82795fab58526471ad7f7e67c0e40c4ff1e10ecd80ce5312554ef633c9995bfc4e6d170cef165711f9ca9e49040b62c0c66fbf2dd3df2b + languageName: node + linkType: hard + "add-px-to-style@npm:1.0.0": version: 1.0.0 resolution: "add-px-to-style@npm:1.0.0" @@ -14849,6 +14824,18 @@ __metadata: languageName: node linkType: hard +"ajv@npm:^6.14.0": + version: 6.14.0 + resolution: "ajv@npm:6.14.0" + dependencies: + fast-deep-equal: "npm:^3.1.1" + fast-json-stable-stringify: "npm:^2.0.0" + json-schema-traverse: "npm:^0.4.1" + uri-js: "npm:^4.2.2" + checksum: 10/c71f14dd2b6f2535d043f74019c8169f7aeb1106bafbb741af96f34fdbf932255c919ddd46344043d03b62ea0ccb319f83667ec5eedf612393f29054fe5ce4a5 + languageName: node + linkType: hard + "ajv@npm:^8.0.0, ajv@npm:^8.0.1, ajv@npm:^8.17.1, ajv@npm:^8.9.0": version: 8.17.1 resolution: "ajv@npm:8.17.1" @@ -15171,6 +15158,22 @@ __metadata: languageName: node linkType: hard +"array-includes@npm:^3.1.9": + version: 3.1.9 + resolution: "array-includes@npm:3.1.9" + dependencies: + call-bind: "npm:^1.0.8" + call-bound: "npm:^1.0.4" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.24.0" + es-object-atoms: "npm:^1.1.1" + get-intrinsic: "npm:^1.3.0" + is-string: "npm:^1.1.1" + math-intrinsics: "npm:^1.1.0" + checksum: 10/8bfe9a58df74f326b4a76b04ee05c13d871759e888b4ee8f013145297cf5eb3c02cfa216067ebdaac5d74eb9763ac5cad77cdf2773b8ab475833701e032173aa + languageName: node + linkType: hard + "array-timsort@npm:^1.0.3": version: 1.0.3 resolution: "array-timsort@npm:1.0.3" @@ -15222,21 +15225,22 @@ __metadata: languageName: node linkType: hard -"array.prototype.findlastindex@npm:^1.2.5": - version: 1.2.5 - resolution: "array.prototype.findlastindex@npm:1.2.5" +"array.prototype.findlastindex@npm:^1.2.6": + version: 1.2.6 + resolution: "array.prototype.findlastindex@npm:1.2.6" dependencies: - call-bind: "npm:^1.0.7" + call-bind: "npm:^1.0.8" + call-bound: "npm:^1.0.4" define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" + es-abstract: "npm:^1.23.9" es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10/7c5c821f357cd53ab6cc305de8086430dd8d7a2485db87b13f843e868055e9582b1fd338f02338f67fc3a1603ceaf9610dd2a470b0b506f9d18934780f95b246 + es-object-atoms: "npm:^1.1.1" + es-shim-unscopables: "npm:^1.1.0" + checksum: 10/5ddb6420e820bef6ddfdcc08ce780d0fd5e627e97457919c27e32359916de5a11ce12f7c55073555e503856618eaaa70845d6ca11dcba724766f38eb1c22f7a2 languageName: node linkType: hard -"array.prototype.flat@npm:^1.3.1, array.prototype.flat@npm:^1.3.2": +"array.prototype.flat@npm:^1.3.1": version: 1.3.2 resolution: "array.prototype.flat@npm:1.3.2" dependencies: @@ -15248,6 +15252,18 @@ __metadata: languageName: node linkType: hard +"array.prototype.flat@npm:^1.3.3": + version: 1.3.3 + resolution: "array.prototype.flat@npm:1.3.3" + dependencies: + call-bind: "npm:^1.0.8" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.5" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10/f9b992fa0775d8f7c97abc91eb7f7b2f0ed8430dd9aeb9fdc2967ac4760cdd7fc2ef7ead6528fef40c7261e4d790e117808ce0d3e7e89e91514d4963a531cd01 + languageName: node + linkType: hard + "array.prototype.flatmap@npm:^1.3.2, array.prototype.flatmap@npm:^1.3.3": version: 1.3.3 resolution: "array.prototype.flatmap@npm:1.3.3" @@ -15900,6 +15916,13 @@ __metadata: languageName: node linkType: hard +"balanced-match@npm:^4.0.2": + version: 4.0.4 + resolution: "balanced-match@npm:4.0.4" + checksum: 10/fb07bb66a0959c2843fc055838047e2a95ccebb837c519614afb067ebfdf2fa967ca8d712c35ced07f2cd26fc6f07964230b094891315ad74f11eba3d53178a0 + languageName: node + linkType: hard + "bare-addon-resolve@npm:^1.3.0": version: 1.9.4 resolution: "bare-addon-resolve@npm:1.9.4" @@ -16250,6 +16273,15 @@ __metadata: languageName: node linkType: hard +"brace-expansion@npm:^5.0.2": + version: 5.0.3 + resolution: "brace-expansion@npm:5.0.3" + dependencies: + balanced-match: "npm:^4.0.2" + checksum: 10/8ba7deae4ca333d52418d2cde3287ac23f44f7330d92c3ecd96a8941597bea8aab02227bd990944d6711dd549bcc6e550fe70be5d94aa02e2fdc88942f480c9b + languageName: node + linkType: hard + "braces@npm:^3.0.3, braces@npm:~3.0.2": version: 3.0.3 resolution: "braces@npm:3.0.3" @@ -18690,7 +18722,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4.4.3": +"debug@npm:4.4.3, debug@npm:^4.4.3": version: 4.4.3 resolution: "debug@npm:4.4.3" dependencies: @@ -19849,7 +19881,69 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.17.5, es-abstract@npm:^1.19.1, es-abstract@npm:^1.22.1, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.6, es-abstract@npm:^1.23.9": +"es-abstract@npm:^1.17.5, es-abstract@npm:^1.24.0, es-abstract@npm:^1.24.1": + version: 1.24.1 + resolution: "es-abstract@npm:1.24.1" + dependencies: + array-buffer-byte-length: "npm:^1.0.2" + arraybuffer.prototype.slice: "npm:^1.0.4" + available-typed-arrays: "npm:^1.0.7" + call-bind: "npm:^1.0.8" + call-bound: "npm:^1.0.4" + data-view-buffer: "npm:^1.0.2" + data-view-byte-length: "npm:^1.0.2" + data-view-byte-offset: "npm:^1.0.1" + es-define-property: "npm:^1.0.1" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.1.1" + es-set-tostringtag: "npm:^2.1.0" + es-to-primitive: "npm:^1.3.0" + function.prototype.name: "npm:^1.1.8" + get-intrinsic: "npm:^1.3.0" + get-proto: "npm:^1.0.1" + get-symbol-description: "npm:^1.1.0" + globalthis: "npm:^1.0.4" + gopd: "npm:^1.2.0" + has-property-descriptors: "npm:^1.0.2" + has-proto: "npm:^1.2.0" + has-symbols: "npm:^1.1.0" + hasown: "npm:^2.0.2" + internal-slot: "npm:^1.1.0" + is-array-buffer: "npm:^3.0.5" + is-callable: "npm:^1.2.7" + is-data-view: "npm:^1.0.2" + is-negative-zero: "npm:^2.0.3" + is-regex: "npm:^1.2.1" + is-set: "npm:^2.0.3" + is-shared-array-buffer: "npm:^1.0.4" + is-string: "npm:^1.1.1" + is-typed-array: "npm:^1.1.15" + is-weakref: "npm:^1.1.1" + math-intrinsics: "npm:^1.1.0" + object-inspect: "npm:^1.13.4" + object-keys: "npm:^1.1.1" + object.assign: "npm:^4.1.7" + own-keys: "npm:^1.0.1" + regexp.prototype.flags: "npm:^1.5.4" + safe-array-concat: "npm:^1.1.3" + safe-push-apply: "npm:^1.0.0" + safe-regex-test: "npm:^1.1.0" + set-proto: "npm:^1.0.0" + stop-iteration-iterator: "npm:^1.1.0" + string.prototype.trim: "npm:^1.2.10" + string.prototype.trimend: "npm:^1.0.9" + string.prototype.trimstart: "npm:^1.0.8" + typed-array-buffer: "npm:^1.0.3" + typed-array-byte-length: "npm:^1.0.3" + typed-array-byte-offset: "npm:^1.0.4" + typed-array-length: "npm:^1.0.7" + unbox-primitive: "npm:^1.1.0" + which-typed-array: "npm:^1.1.19" + checksum: 10/c84cb69ebae36781309a3ed70ff40b4767a921d3b3518060fac4e08f14ede04491b68e9f318aedf186e349d4af4a40f5d0e4111e46513800e8368551fd09de8c + languageName: node + linkType: hard + +"es-abstract@npm:^1.19.1, es-abstract@npm:^1.22.1, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.6, es-abstract@npm:^1.23.9": version: 1.23.9 resolution: "es-abstract@npm:1.23.9" dependencies: @@ -19947,26 +20041,26 @@ __metadata: linkType: hard "es-iterator-helpers@npm:^1.2.1": - version: 1.2.1 - resolution: "es-iterator-helpers@npm:1.2.1" + version: 1.2.2 + resolution: "es-iterator-helpers@npm:1.2.2" dependencies: call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" + call-bound: "npm:^1.0.4" define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.6" + es-abstract: "npm:^1.24.1" es-errors: "npm:^1.3.0" - es-set-tostringtag: "npm:^2.0.3" + es-set-tostringtag: "npm:^2.1.0" function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.6" + get-intrinsic: "npm:^1.3.0" globalthis: "npm:^1.0.4" gopd: "npm:^1.2.0" has-property-descriptors: "npm:^1.0.2" has-proto: "npm:^1.2.0" has-symbols: "npm:^1.1.0" internal-slot: "npm:^1.1.0" - iterator.prototype: "npm:^1.1.4" + iterator.prototype: "npm:^1.1.5" safe-array-concat: "npm:^1.1.3" - checksum: 10/802e0e8427a05ff4a5b0c70c7fdaaeff37cdb81a28694aeb7bfb831c6ab340d8f3deeb67b96732ff9e9699ea240524d5ea8a9a6a335fcd15aa3983b27b06113f + checksum: 10/17b5b2834c4f5719d6ce0e837a4d11c6ba4640bee28290d22ec4daf7106ec3d5fe0ff4f7e5dbaa2b4612e8335934360e964a8f08608d43f2889da106b25481ee languageName: node linkType: hard @@ -19986,7 +20080,7 @@ __metadata: languageName: node linkType: hard -"es-set-tostringtag@npm:^2.0.3, es-set-tostringtag@npm:^2.1.0": +"es-set-tostringtag@npm:^2.1.0": version: 2.1.0 resolution: "es-set-tostringtag@npm:2.1.0" dependencies: @@ -20007,6 +20101,15 @@ __metadata: languageName: node linkType: hard +"es-shim-unscopables@npm:^1.1.0": + version: 1.1.0 + resolution: "es-shim-unscopables@npm:1.1.0" + dependencies: + hasown: "npm:^2.0.2" + checksum: 10/c351f586c30bbabc62355be49564b2435468b52c3532b8a1663672e3d10dc300197e69c247869dd173e56d86423ab95fc0c10b0939cdae597094e0fdca078cba + languageName: node + linkType: hard + "es-to-primitive@npm:^1.3.0": version: 1.3.0 resolution: "es-to-primitive@npm:1.3.0" @@ -20349,14 +20452,14 @@ __metadata: languageName: node linkType: hard -"eslint-config-prettier@npm:~9.1.2": - version: 9.1.2 - resolution: "eslint-config-prettier@npm:9.1.2" +"eslint-config-prettier@npm:~10.1.8": + version: 10.1.8 + resolution: "eslint-config-prettier@npm:10.1.8" peerDependencies: eslint: ">=7.0.0" bin: eslint-config-prettier: bin/cli.js - checksum: 10/e4bba2d76df9dc6e2adca2866e544bfd1ff32232fc483743c04cedd93918a90a327b56d4a7e3f9d3fa32d90bd50b034d09df987860260064b18c026b8bbd15aa + checksum: 10/03f8e6ea1a6a9b8f9eeaf7c8c52a96499ec4b275b9ded33331a6cc738ed1d56de734097dbd0091f136f0e84bc197388bd8ec22a52a4658105883f8c8b7d8921a languageName: node linkType: hard @@ -20410,15 +20513,15 @@ __metadata: languageName: node linkType: hard -"eslint-module-utils@npm:^2.12.0": - version: 2.12.0 - resolution: "eslint-module-utils@npm:2.12.0" +"eslint-module-utils@npm:^2.12.1": + version: 2.12.1 + resolution: "eslint-module-utils@npm:2.12.1" dependencies: debug: "npm:^3.2.7" peerDependenciesMeta: eslint: optional: true - checksum: 10/dd27791147eca17366afcb83f47d6825b6ce164abb256681e5de4ec1d7e87d8605641eb869298a0dbc70665e2446dbcc2f40d3e1631a9475dd64dd23d4ca5dee + checksum: 10/bd25d6610ec3abaa50e8f1beb0119541562bbb8dd02c035c7e887976fe1e0c5dd8175f4607ca8d86d1146df24d52a071bd3d1dd329f6902bd58df805a8ca16d3 languageName: node linkType: hard @@ -20431,54 +20534,57 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-import@npm:~2.31.0": - version: 2.31.0 - resolution: "eslint-plugin-import@npm:2.31.0" +"eslint-plugin-import@npm:~2.32.0": + version: 2.32.0 + resolution: "eslint-plugin-import@npm:2.32.0" dependencies: "@rtsao/scc": "npm:^1.1.0" - array-includes: "npm:^3.1.8" - array.prototype.findlastindex: "npm:^1.2.5" - array.prototype.flat: "npm:^1.3.2" - array.prototype.flatmap: "npm:^1.3.2" + array-includes: "npm:^3.1.9" + array.prototype.findlastindex: "npm:^1.2.6" + array.prototype.flat: "npm:^1.3.3" + array.prototype.flatmap: "npm:^1.3.3" debug: "npm:^3.2.7" doctrine: "npm:^2.1.0" eslint-import-resolver-node: "npm:^0.3.9" - eslint-module-utils: "npm:^2.12.0" + eslint-module-utils: "npm:^2.12.1" hasown: "npm:^2.0.2" - is-core-module: "npm:^2.15.1" + is-core-module: "npm:^2.16.1" is-glob: "npm:^4.0.3" minimatch: "npm:^3.1.2" object.fromentries: "npm:^2.0.8" object.groupby: "npm:^1.0.3" - object.values: "npm:^1.2.0" + object.values: "npm:^1.2.1" semver: "npm:^6.3.1" - string.prototype.trimend: "npm:^1.0.8" + string.prototype.trimend: "npm:^1.0.9" tsconfig-paths: "npm:^3.15.0" peerDependencies: eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 - checksum: 10/6b76bd009ac2db0615d9019699d18e2a51a86cb8c1d0855a35fb1b418be23b40239e6debdc6e8c92c59f1468ed0ea8d7b85c817117a113d5cc225be8a02ad31c + checksum: 10/1bacf4967e9ebf99e12176a795f0d6d3a87d1c9a030c2207f27b267e10d96a1220be2647504c7fc13ab543cdf13ffef4b8f5620e0447032dba4ff0d3922f7c9e languageName: node linkType: hard -"eslint-plugin-jest@npm:~28.8.3": - version: 28.8.3 - resolution: "eslint-plugin-jest@npm:28.8.3" +"eslint-plugin-jest@npm:~29.15.0": + version: 29.15.0 + resolution: "eslint-plugin-jest@npm:29.15.0" dependencies: - "@typescript-eslint/utils": "npm:^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/utils": "npm:^8.0.0" peerDependencies: - "@typescript-eslint/eslint-plugin": ^6.0.0 || ^7.0.0 || ^8.0.0 - eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 + "@typescript-eslint/eslint-plugin": ^8.0.0 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 jest: "*" + typescript: ">=4.8.4 <6.0.0" peerDependenciesMeta: "@typescript-eslint/eslint-plugin": optional: true jest: optional: true - checksum: 10/3f1798c61e143981eefcfb2fbc4b2e5b329378ebaafdec6485f443c79ee0d3304e9409e8ea8ce089ac15abb4e700d8d838e0a1da29feb528d77a2b3cce6989ec + typescript: + optional: true + checksum: 10/552361326c55564fe09092adeb34bf4aae179fdd39b4de6aa561511cebedee370b4ed53f98683af6c695a30891589f54e6fa9ed03ae87957fbe16a506732d0ab languageName: node linkType: hard -"eslint-plugin-jsx-a11y@npm:^6.10.2": +"eslint-plugin-jsx-a11y@npm:~6.10.2": version: 6.10.2 resolution: "eslint-plugin-jsx-a11y@npm:6.10.2" dependencies: @@ -20512,23 +20618,12 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-playwright@npm:~2.2.2": - version: 2.2.2 - resolution: "eslint-plugin-playwright@npm:2.2.2" +"eslint-plugin-prettier@npm:~5.5.5": + version: 5.5.5 + resolution: "eslint-plugin-prettier@npm:5.5.5" dependencies: - globals: "npm:^13.23.0" - peerDependencies: - eslint: ">=8.40.0" - checksum: 10/861bb486e30e607a3c38bf46b69b01e759a2e7db3d7e79eabb18aa006c505b632b6c6f24e8402b59b8a9b5f94a72ed454fd5a934265081028a1ca0dd4582019f - languageName: node - linkType: hard - -"eslint-plugin-prettier@npm:~5.2.6": - version: 5.2.6 - resolution: "eslint-plugin-prettier@npm:5.2.6" - dependencies: - prettier-linter-helpers: "npm:^1.0.0" - synckit: "npm:^0.11.0" + prettier-linter-helpers: "npm:^1.0.1" + synckit: "npm:^0.11.12" peerDependencies: "@types/eslint": ">=8.0.0" eslint: ">=8.0.0" @@ -20539,25 +20634,31 @@ __metadata: optional: true eslint-config-prettier: optional: true - checksum: 10/8f82a3c6bbf2db358476e745501349c8f3d5f0976f15c4af2a07dd62bb70291d29500ad09a354bb33e645c98a378d35544a92e9758aeb65530b1ec6e2dc8b8f9 + checksum: 10/36c22c2fa2fd7c61ed292af1280e1d8f94dfe1671eacc5a503a249ca4b27fd226dbf6a1820457d611915926946f42729488d2dc7a5c320601e6cf1fad0d28f66 languageName: node linkType: hard -"eslint-plugin-react-hooks@npm:^5.0.0, eslint-plugin-react-hooks@npm:~5.0.0": - version: 5.0.0 - resolution: "eslint-plugin-react-hooks@npm:5.0.0" +"eslint-plugin-react-hooks@npm:~7.0.1": + version: 7.0.1 + resolution: "eslint-plugin-react-hooks@npm:7.0.1" + dependencies: + "@babel/core": "npm:^7.24.4" + "@babel/parser": "npm:^7.24.4" + hermes-parser: "npm:^0.25.1" + zod: "npm:^3.25.0 || ^4.0.0" + zod-validation-error: "npm:^3.5.0 || ^4.0.0" peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - checksum: 10/b762789832806b6981e2d910994e72aa7a85136fe0880572334b26cf1274ba37bd3b1365e77d2c2f92465337c4a65c84ef647bc499d33b86fc1110f2df7ef1bb + checksum: 10/12e96c68d58c6588305fd17d660524a1ef1e872650ec591d5b138f059431290831c373d4b1c9ae8991fb25f96c43935497d2149678c027e65d0417d3d99ecc85 languageName: node linkType: hard -"eslint-plugin-react-refresh@npm:^0.4.26": - version: 0.4.26 - resolution: "eslint-plugin-react-refresh@npm:0.4.26" +"eslint-plugin-react-refresh@npm:~0.5.2": + version: 0.5.2 + resolution: "eslint-plugin-react-refresh@npm:0.5.2" peerDependencies: - eslint: ">=8.40" - checksum: 10/068da7edcd39d802dda4c03b7ea8923891145eb95f4dfd4cfce82a53a5eb55f5cbe66b33cf8e57b71f1525a684517bda4bfca1bc5c6b12c82ba03c9e8197764d + eslint: ^9 || ^10 + checksum: 10/155a2e66d74866352f023b2a2d9b0daf1fb3033638851321caafa48fe9c9984830acc089d3832348ff2df2848791db96d17bd43639860b045b9f7ee4e5f86dcc languageName: node linkType: hard @@ -20589,27 +20690,27 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-storybook@npm:~0.11.6": - version: 0.11.6 - resolution: "eslint-plugin-storybook@npm:0.11.6" +"eslint-plugin-storybook@npm:~10.2.12": + version: 10.2.12 + resolution: "eslint-plugin-storybook@npm:10.2.12" dependencies: - "@storybook/csf": "npm:^0.1.11" - "@typescript-eslint/utils": "npm:^8.8.1" - ts-dedent: "npm:^2.2.0" + "@typescript-eslint/utils": "npm:^8.48.0" peerDependencies: eslint: ">=8" - checksum: 10/9872dd37386bed244b56589348949d54cad0a526ef81229681a5c918fe1a74dbef56fd7a6cf1c8014b5b38744ba759d1b24a3f94fdbec5d0fddfc6a54f5e6eb7 + storybook: ^10.2.12 + checksum: 10/b412630703b86b7630550e3adaa809889de630a52fe04ae070457bfd94aa6d500ee36498f62dc4b3c9515221c05bbf082fe19d8cbfe61267fedc7e31b527e9bf languageName: node linkType: hard -"eslint-plugin-testing-library@npm:^6.4.0, eslint-plugin-testing-library@npm:~6.4.0": - version: 6.4.0 - resolution: "eslint-plugin-testing-library@npm:6.4.0" +"eslint-plugin-testing-library@npm:~7.16.0": + version: 7.16.0 + resolution: "eslint-plugin-testing-library@npm:7.16.0" dependencies: - "@typescript-eslint/utils": "npm:^5.62.0" + "@typescript-eslint/scope-manager": "npm:^8.56.0" + "@typescript-eslint/utils": "npm:^8.56.0" peerDependencies: - eslint: ^7.5.0 || ^8.0.0 || ^9.0.0 - checksum: 10/b9461e6662542fbfb3c0b768e6038bbaa56e345cb0600c7f07e26ff8154166abb9f7dcdc08d565c314cd9ccf0416eca8c3ce3c235b375c5fbf3f152a81142969 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + checksum: 10/6581b41d25838c61b818f6b80e998ff2d72a646531c1c017023842fe5523a9ea3e9e75e7ce0d84abee9d73309602d64911985cbaace8dfbb0a94415da1b213a8 languageName: node linkType: hard @@ -20622,7 +20723,7 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:5.1.1, eslint-scope@npm:^5.1.1": +"eslint-scope@npm:5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" dependencies: @@ -20632,13 +20733,13 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:^7.2.2": - version: 7.2.2 - resolution: "eslint-scope@npm:7.2.2" +"eslint-scope@npm:^8.4.0": + version: 8.4.0 + resolution: "eslint-scope@npm:8.4.0" dependencies: esrecurse: "npm:^4.3.0" estraverse: "npm:^5.2.0" - checksum: 10/5c660fb905d5883ad018a6fea2b49f3cb5b1cbf2cd4bd08e98646e9864f9bc2c74c0839bed2d292e90a4a328833accc197c8f0baed89cbe8d605d6f918465491 + checksum: 10/e8e611701f65375e034c62123946e628894f0b54aa8cb11abe224816389abe5cd74cf16b62b72baa36504f22d1a958b9b8b0169b82397fe2e7997674c0d09b06 languageName: node linkType: hard @@ -20649,13 +20750,27 @@ __metadata: languageName: node linkType: hard -"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": +"eslint-visitor-keys@npm:^3.4.3": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" checksum: 10/3f357c554a9ea794b094a09bd4187e5eacd1bc0d0653c3adeb87962c548e6a1ab8f982b86963ae1337f5d976004146536dcee5d0e2806665b193fbfbf1a9231b languageName: node linkType: hard +"eslint-visitor-keys@npm:^4.2.1": + version: 4.2.1 + resolution: "eslint-visitor-keys@npm:4.2.1" + checksum: 10/3ee00fc6a7002d4b0ffd9dc99e13a6a7882c557329e6c25ab254220d71e5c9c4f89dca4695352949ea678eb1f3ba912a18ef8aac0a7fe094196fd92f441bfce2 + languageName: node + linkType: hard + +"eslint-visitor-keys@npm:^5.0.0": + version: 5.0.1 + resolution: "eslint-visitor-keys@npm:5.0.1" + checksum: 10/f9cc1a57b75e0ef949545cac33d01e8367e302de4c1483266ed4d8646ee5c306376660196bbb38b004e767b7043d1e661cb4336b49eff634a1bbe75c1db709ec + languageName: node + linkType: hard + "eslint4b-prebuilt@npm:^6.7.2": version: 6.7.2 resolution: "eslint4b-prebuilt@npm:6.7.2" @@ -20663,73 +20778,63 @@ __metadata: languageName: node linkType: hard -"eslint@npm:~8.57.1": - version: 8.57.1 - resolution: "eslint@npm:8.57.1" +"eslint@npm:~9.39.3": + version: 9.39.3 + resolution: "eslint@npm:9.39.3" dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.6.1" - "@eslint/eslintrc": "npm:^2.1.4" - "@eslint/js": "npm:8.57.1" - "@humanwhocodes/config-array": "npm:^0.13.0" + "@eslint-community/eslint-utils": "npm:^4.8.0" + "@eslint-community/regexpp": "npm:^4.12.1" + "@eslint/config-array": "npm:^0.21.1" + "@eslint/config-helpers": "npm:^0.4.2" + "@eslint/core": "npm:^0.17.0" + "@eslint/eslintrc": "npm:^3.3.1" + "@eslint/js": "npm:9.39.3" + "@eslint/plugin-kit": "npm:^0.4.1" + "@humanfs/node": "npm:^0.16.6" "@humanwhocodes/module-importer": "npm:^1.0.1" - "@nodelib/fs.walk": "npm:^1.2.8" - "@ungap/structured-clone": "npm:^1.2.0" + "@humanwhocodes/retry": "npm:^0.4.2" + "@types/estree": "npm:^1.0.6" ajv: "npm:^6.12.4" chalk: "npm:^4.0.0" - cross-spawn: "npm:^7.0.2" + cross-spawn: "npm:^7.0.6" debug: "npm:^4.3.2" - doctrine: "npm:^3.0.0" escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^7.2.2" - eslint-visitor-keys: "npm:^3.4.3" - espree: "npm:^9.6.1" - esquery: "npm:^1.4.2" + eslint-scope: "npm:^8.4.0" + eslint-visitor-keys: "npm:^4.2.1" + espree: "npm:^10.4.0" + esquery: "npm:^1.5.0" esutils: "npm:^2.0.2" fast-deep-equal: "npm:^3.1.3" - file-entry-cache: "npm:^6.0.1" + file-entry-cache: "npm:^8.0.0" find-up: "npm:^5.0.0" glob-parent: "npm:^6.0.2" - globals: "npm:^13.19.0" - graphemer: "npm:^1.4.0" ignore: "npm:^5.2.0" imurmurhash: "npm:^0.1.4" is-glob: "npm:^4.0.0" - is-path-inside: "npm:^3.0.3" - js-yaml: "npm:^4.1.0" json-stable-stringify-without-jsonify: "npm:^1.0.1" - levn: "npm:^0.4.1" lodash.merge: "npm:^4.6.2" minimatch: "npm:^3.1.2" natural-compare: "npm:^1.4.0" optionator: "npm:^0.9.3" - strip-ansi: "npm:^6.0.1" - text-table: "npm:^0.2.0" + peerDependencies: + jiti: "*" + peerDependenciesMeta: + jiti: + optional: true bin: eslint: bin/eslint.js - checksum: 10/5504fa24879afdd9f9929b2fbfc2ee9b9441a3d464efd9790fbda5f05738858530182029f13323add68d19fec749d3ab4a70320ded091ca4432b1e9cc4ed104c + checksum: 10/1c95c92983ddf435e7f7d54edd06d703a15773a7d189583d3388e5b5ac714f0a2450b91c0b3bb9b9ccec9bd20994fd8e48d231ed6dabca0be56ef314b32820ff languageName: node linkType: hard -"espree@npm:^9.6.0": - version: 9.6.0 - resolution: "espree@npm:9.6.0" - dependencies: - acorn: "npm:^8.9.0" - acorn-jsx: "npm:^5.3.2" - eslint-visitor-keys: "npm:^3.4.1" - checksum: 10/870834c0ab188213ba56fae7003ff9fadbad2b9285dae941840c3d425cedbb2221ad3cffaabd217bc36b96eb80d651c2a2d9b0b1f3b9394b2358b27052c942e2 - languageName: node - linkType: hard - -"espree@npm:^9.6.1": - version: 9.6.1 - resolution: "espree@npm:9.6.1" +"espree@npm:^10.0.1, espree@npm:^10.4.0": + version: 10.4.0 + resolution: "espree@npm:10.4.0" dependencies: - acorn: "npm:^8.9.0" + acorn: "npm:^8.15.0" acorn-jsx: "npm:^5.3.2" - eslint-visitor-keys: "npm:^3.4.1" - checksum: 10/255ab260f0d711a54096bdeda93adff0eadf02a6f9b92f02b323e83a2b7fc258797919437ad331efec3930475feb0142c5ecaaf3cdab4befebd336d47d3f3134 + eslint-visitor-keys: "npm:^4.2.1" + checksum: 10/9b355b32dbd1cc9f57121d5ee3be258fab87ebeb7c83fc6c02e5af1a74fc8c5ba79fe8c663e69ea112c3e84a1b95e6a2067ac4443ee7813bb85ac7581acb8bf9 languageName: node linkType: hard @@ -20743,12 +20848,12 @@ __metadata: languageName: node linkType: hard -"esquery@npm:^1.4.2": - version: 1.5.0 - resolution: "esquery@npm:1.5.0" +"esquery@npm:^1.5.0": + version: 1.7.0 + resolution: "esquery@npm:1.7.0" dependencies: estraverse: "npm:^5.1.0" - checksum: 10/e65fcdfc1e0ff5effbf50fb4f31ea20143ae5df92bb2e4953653d8d40aa4bc148e0d06117a592ce4ea53eeab1dafdfded7ea7e22a5be87e82d73757329a1b01d + checksum: 10/4afaf3089367e1f5885caa116ef386dffd8bfd64da21fd3d0e56e938d2667cfb2e5400ab4a825aa70e799bb3741e5b5d63c0b94d86e2d4cf3095c9e64b2f5a15 languageName: node linkType: hard @@ -21317,12 +21422,12 @@ __metadata: languageName: node linkType: hard -"file-entry-cache@npm:^6.0.1": - version: 6.0.1 - resolution: "file-entry-cache@npm:6.0.1" +"file-entry-cache@npm:^8.0.0": + version: 8.0.0 + resolution: "file-entry-cache@npm:8.0.0" dependencies: - flat-cache: "npm:^3.0.4" - checksum: 10/099bb9d4ab332cb93c48b14807a6918a1da87c45dce91d4b61fd40e6505d56d0697da060cb901c729c90487067d93c9243f5da3dc9c41f0358483bfdebca736b + flat-cache: "npm:^4.0.0" + checksum: 10/afe55c4de4e0d226a23c1eae62a7219aafb390859122608a89fa4df6addf55c7fd3f1a2da6f5b41e7cdff496e4cf28bbd215d53eab5c817afa96d2b40c81bfb0 languageName: node linkType: hard @@ -21573,6 +21678,16 @@ __metadata: languageName: node linkType: hard +"flat-cache@npm:^4.0.0": + version: 4.0.1 + resolution: "flat-cache@npm:4.0.1" + dependencies: + flatted: "npm:^3.2.9" + keyv: "npm:^4.5.4" + checksum: 10/58ce851d9045fffc7871ce2bd718bc485ad7e777bf748c054904b87c351ff1080c2c11da00788d78738bfb51b71e4d5ea12d13b98eb36e3358851ffe495b62dc + languageName: node + linkType: hard + "flat-cache@npm:^5.0.0": version: 5.0.0 resolution: "flat-cache@npm:5.0.0" @@ -21599,6 +21714,13 @@ __metadata: languageName: node linkType: hard +"flatted@npm:^3.2.9": + version: 3.3.3 + resolution: "flatted@npm:3.3.3" + checksum: 10/8c96c02fbeadcf4e8ffd0fa24983241e27698b0781295622591fc13585e2f226609d95e422bcf2ef044146ffacb6b68b1f20871454eddf75ab3caa6ee5f4a1fe + languageName: node + linkType: hard + "follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.15.4, follow-redirects@npm:^1.15.6, follow-redirects@npm:^1.15.9": version: 1.15.9 resolution: "follow-redirects@npm:1.15.9" @@ -21635,6 +21757,15 @@ __metadata: languageName: node linkType: hard +"for-each@npm:^0.3.5": + version: 0.3.5 + resolution: "for-each@npm:0.3.5" + dependencies: + is-callable: "npm:^1.2.7" + checksum: 10/330cc2439f85c94f4609de3ee1d32c5693ae15cdd7fe3d112c4fd9efd4ce7143f2c64ef6c2c9e0cfdb0058437f33ef05b5bdae5b98fcc903fb2143fbaf0fea0f + languageName: node + linkType: hard + "foreground-child@npm:^2.0.0": version: 2.0.0 resolution: "foreground-child@npm:2.0.0" @@ -22258,12 +22389,10 @@ __metadata: languageName: node linkType: hard -"globals@npm:^13.19.0, globals@npm:^13.23.0": - version: 13.24.0 - resolution: "globals@npm:13.24.0" - dependencies: - type-fest: "npm:^0.20.2" - checksum: 10/62c5b1997d06674fc7191d3e01e324d3eda4d65ac9cc4e78329fa3b5c4fd42a0e1c8722822497a6964eee075255ce21ccf1eec2d83f92ef3f06653af4d0ee28e +"globals@npm:^14.0.0": + version: 14.0.0 + resolution: "globals@npm:14.0.0" + checksum: 10/03939c8af95c6df5014b137cac83aa909090c3a3985caef06ee9a5a669790877af8698ab38007e4c0186873adc14c0b13764acc754b16a754c216cc56aa5f021 languageName: node linkType: hard @@ -22367,20 +22496,6 @@ __metadata: languageName: node linkType: hard -"grapheme-splitter@npm:^1.0.4": - version: 1.0.4 - resolution: "grapheme-splitter@npm:1.0.4" - checksum: 10/fdb2f51fd430ce881e18e44c4934ad30e59736e46213f7ad35ea5970a9ebdf7d0fe56150d15cc98230d55d2fd48c73dc6781494c38d8cf2405718366c36adb88 - languageName: node - linkType: hard - -"graphemer@npm:^1.4.0": - version: 1.4.0 - resolution: "graphemer@npm:1.4.0" - checksum: 10/6dd60dba97007b21e3a829fab3f771803cc1292977fe610e240ea72afd67e5690ac9eeaafc4a99710e78962e5936ab5a460787c2a1180f1cb0ccfac37d29f897 - languageName: node - linkType: hard - "gravatar@npm:^1.8.2": version: 1.8.2 resolution: "gravatar@npm:1.8.2" @@ -22633,6 +22748,22 @@ __metadata: languageName: node linkType: hard +"hermes-estree@npm:0.25.1": + version: 0.25.1 + resolution: "hermes-estree@npm:0.25.1" + checksum: 10/7b1eca98b264a25632064cffa5771360d30cf452e77db1e191f9913ee45cf78c292b2dbca707e92fb71b0870abb97e94b506a5ab80abd96ba237fee169b601fe + languageName: node + linkType: hard + +"hermes-parser@npm:^0.25.1": + version: 0.25.1 + resolution: "hermes-parser@npm:0.25.1" + dependencies: + hermes-estree: "npm:0.25.1" + checksum: 10/805efc05691420f236654349872c70731121791fa54de521c7ee51059eae34f84dd19f22ee846741dcb60372f8fb5335719b96b4ecb010d2aed7d872f2eff9cc + languageName: node + linkType: hard + "hexer@npm:^1.5.0": version: 1.5.0 resolution: "hexer@npm:1.5.0" @@ -23248,6 +23379,13 @@ __metadata: languageName: node linkType: hard +"ignore@npm:^7.0.5": + version: 7.0.5 + resolution: "ignore@npm:7.0.5" + checksum: 10/f134b96a4de0af419196f52c529d5c6120c4456ff8a6b5a14ceaaa399f883e15d58d2ce651c9b69b9388491d4669dda47285d307e827de9304a53a1824801bc6 + languageName: node + linkType: hard + "image-size@npm:^1.2.1": version: 1.2.1 resolution: "image-size@npm:1.2.1" @@ -23647,7 +23785,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.12.0, is-core-module@npm:^2.16.0": +"is-core-module@npm:^2.12.0, is-core-module@npm:^2.16.0, is-core-module@npm:^2.16.1": version: 2.16.1 resolution: "is-core-module@npm:2.16.1" dependencies: @@ -23656,7 +23794,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.13.0, is-core-module@npm:^2.15.1, is-core-module@npm:^2.5.0": +"is-core-module@npm:^2.13.0, is-core-module@npm:^2.5.0": version: 2.15.1 resolution: "is-core-module@npm:2.15.1" dependencies: @@ -23815,6 +23953,13 @@ __metadata: languageName: node linkType: hard +"is-negative-zero@npm:^2.0.3": + version: 2.0.3 + resolution: "is-negative-zero@npm:2.0.3" + checksum: 10/8fe5cffd8d4fb2ec7b49d657e1691889778d037494c6f40f4d1a524cadd658b4b53ad7b6b73a59bcb4b143ae9a3d15829af864b2c0f9d65ac1e678c4c80f17e5 + languageName: node + linkType: hard + "is-network-error@npm:^1.0.0": version: 1.1.0 resolution: "is-network-error@npm:1.1.0" @@ -23853,13 +23998,6 @@ __metadata: languageName: node linkType: hard -"is-path-inside@npm:^3.0.3": - version: 3.0.3 - resolution: "is-path-inside@npm:3.0.3" - checksum: 10/abd50f06186a052b349c15e55b182326f1936c89a78bf6c8f2b707412517c097ce04bc49a0ca221787bc44e1049f51f09a2ffb63d22899051988d3a618ba13e9 - languageName: node - linkType: hard - "is-plain-obj@npm:^1.1.0": version: 1.1.0 resolution: "is-plain-obj@npm:1.1.0" @@ -24029,7 +24167,7 @@ __metadata: languageName: node linkType: hard -"is-weakref@npm:^1.0.2, is-weakref@npm:^1.1.0": +"is-weakref@npm:^1.0.2, is-weakref@npm:^1.1.0, is-weakref@npm:^1.1.1": version: 1.1.1 resolution: "is-weakref@npm:1.1.1" dependencies: @@ -24274,7 +24412,7 @@ __metadata: languageName: node linkType: hard -"iterator.prototype@npm:^1.1.4": +"iterator.prototype@npm:^1.1.5": version: 1.1.5 resolution: "iterator.prototype@npm:1.1.5" dependencies: @@ -25504,6 +25642,17 @@ __metadata: languageName: node linkType: hard +"js-yaml@npm:^4.1.1": + version: 4.1.1 + resolution: "js-yaml@npm:4.1.1" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/a52d0519f0f4ef5b4adc1cde466cb54c50d56e2b4a983b9d5c9c0f2f99462047007a6274d7e95617a21d3c91fde3ee6115536ed70991cd645ba8521058b78f77 + languageName: node + linkType: hard + "jsbn@npm:1.1.0": version: 1.1.0 resolution: "jsbn@npm:1.1.0" @@ -27224,7 +27373,16 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^3.0.0, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": +"minimatch@npm:^10.2.2": + version: 10.2.4 + resolution: "minimatch@npm:10.2.4" + dependencies: + brace-expansion: "npm:^5.0.2" + checksum: 10/aea4874e521c55bb60744685bbffe3d152e5460f84efac3ea936e6bbe2ceba7deb93345fec3f9bb17f7b6946776073a64d40ae32bf5f298ad690308121068a1f + languageName: node + linkType: hard + +"minimatch@npm:^3.0.0, minimatch@npm:^3.0.4, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -27233,6 +27391,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^3.1.3": + version: 3.1.5 + resolution: "minimatch@npm:3.1.5" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/b11a7ee5773cd34c1a0c8436cdbe910901018fb4b6cb47aa508a18d567f6efd2148507959e35fba798389b161b8604a2d704ccef751ea36bd4582f9852b7d63f + languageName: node + linkType: hard + "minimatch@npm:^5.1.0": version: 5.1.6 resolution: "minimatch@npm:5.1.6" @@ -27840,13 +28007,6 @@ __metadata: languageName: node linkType: hard -"natural-compare-lite@npm:^1.4.0": - version: 1.4.0 - resolution: "natural-compare-lite@npm:1.4.0" - checksum: 10/5222ac3986a2b78dd6069ac62cbb52a7bf8ffc90d972ab76dfe7b01892485d229530ed20d0c62e79a6b363a663b273db3bde195a1358ce9e5f779d4453887225 - languageName: node - linkType: hard - "natural-compare@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare@npm:1.4.0" @@ -27971,6 +28131,18 @@ __metadata: languageName: node linkType: hard +"node-exports-info@npm:^1.6.0": + version: 1.6.0 + resolution: "node-exports-info@npm:1.6.0" + dependencies: + array.prototype.flatmap: "npm:^1.3.3" + es-errors: "npm:^1.3.0" + object.entries: "npm:^1.1.9" + semver: "npm:^6.3.1" + checksum: 10/0a1667d535f499ac1fe6c6d22f8146bc8b68abc76fa355856219202f6cf5f386027e0ff054e66a22d08be02acbc63fcdc9f98d0fbc97993f5eabc66408fdadad + languageName: node + linkType: hard + "node-fetch@npm:2.6.7": version: 2.6.7 resolution: "node-fetch@npm:2.6.7" @@ -28361,7 +28533,7 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.13.3": +"object-inspect@npm:^1.13.3, object-inspect@npm:^1.13.4": version: 1.13.4 resolution: "object-inspect@npm:1.13.4" checksum: 10/aa13b1190ad3e366f6c83ad8a16ed37a19ed57d267385aa4bfdccda833d7b90465c057ff6c55d035a6b2e52c1a2295582b294217a0a3a1ae7abdd6877ef781fb @@ -28441,7 +28613,7 @@ __metadata: languageName: node linkType: hard -"object.values@npm:^1.1.6, object.values@npm:^1.2.0, object.values@npm:^1.2.1": +"object.values@npm:^1.1.6, object.values@npm:^1.2.1": version: 1.2.1 resolution: "object.values@npm:1.2.1" dependencies: @@ -30325,12 +30497,12 @@ __metadata: languageName: node linkType: hard -"prettier-linter-helpers@npm:^1.0.0": - version: 1.0.0 - resolution: "prettier-linter-helpers@npm:1.0.0" +"prettier-linter-helpers@npm:^1.0.1": + version: 1.0.1 + resolution: "prettier-linter-helpers@npm:1.0.1" dependencies: fast-diff: "npm:^1.1.2" - checksum: 10/00ce8011cf6430158d27f9c92cfea0a7699405633f7f1d4a45f07e21bf78e99895911cbcdc3853db3a824201a7c745bd49bfea8abd5fb9883e765a90f74f8392 + checksum: 10/2dc35f5036a35f4c4f5e645887edda1436acb63687a7f12b2383e0a6f3c1f76b8a0a4709fe4d82e19157210feb5984b159bb714d43290022911ab53d606474ec languageName: node linkType: hard @@ -31737,7 +31909,7 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.3": +"regexp.prototype.flags@npm:^1.5.3, regexp.prototype.flags@npm:^1.5.4": version: 1.5.4 resolution: "regexp.prototype.flags@npm:1.5.4" dependencies: @@ -32075,15 +32247,18 @@ __metadata: linkType: hard "resolve@npm:^2.0.0-next.5": - version: 2.0.0-next.5 - resolution: "resolve@npm:2.0.0-next.5" + version: 2.0.0-next.6 + resolution: "resolve@npm:2.0.0-next.6" dependencies: - is-core-module: "npm:^2.13.0" + es-errors: "npm:^1.3.0" + is-core-module: "npm:^2.16.1" + node-exports-info: "npm:^1.6.0" + object-keys: "npm:^1.1.1" path-parse: "npm:^1.0.7" supports-preserve-symlinks-flag: "npm:^1.0.0" bin: resolve: bin/resolve - checksum: 10/2d6fd28699f901744368e6f2032b4268b4c7b9185fd8beb64f68c93ac6b22e52ae13560ceefc96241a665b985edf9ffd393ae26d2946a7d3a07b7007b7d51e79 + checksum: 10/c95cb98b8d3f9e2a979e6eb8b7e0b0e13f08da62607a45207275f151d640152244568a9a9cd01662a21e3746792177cbf9be1dacb88f7355edf4db49d9ee27e5 languageName: node linkType: hard @@ -32114,15 +32289,18 @@ __metadata: linkType: hard "resolve@patch:resolve@npm%3A^2.0.0-next.5#optional!builtin": - version: 2.0.0-next.5 - resolution: "resolve@patch:resolve@npm%3A2.0.0-next.5#optional!builtin::version=2.0.0-next.5&hash=c3c19d" + version: 2.0.0-next.6 + resolution: "resolve@patch:resolve@npm%3A2.0.0-next.6#optional!builtin::version=2.0.0-next.6&hash=c3c19d" dependencies: - is-core-module: "npm:^2.13.0" + es-errors: "npm:^1.3.0" + is-core-module: "npm:^2.16.1" + node-exports-info: "npm:^1.6.0" + object-keys: "npm:^1.1.1" path-parse: "npm:^1.0.7" supports-preserve-symlinks-flag: "npm:^1.0.0" bin: resolve: bin/resolve - checksum: 10/05fa778de9d0347c8b889eb7a18f1f06bf0f801b0eb4610b4871a4b2f22e220900cf0ad525e94f990bb8d8921c07754ab2122c0c225ab4cdcea98f36e64fa4c2 + checksum: 10/1b26738af76c80b341075e6bf4b202ef85f85f4a2cbf2934246c3b5f20c682cf352833fc6e32579c6967419226d3ab63e8d321328da052c87a31eaad91e3571a languageName: node linkType: hard @@ -32250,8 +32428,10 @@ __metadata: "@types/js-yaml": "npm:^4.0.9" "@types/node": "npm:~22.16.5" "@types/stream-buffers": "npm:^3.0.8" - eslint: "npm:~8.57.1" + eslint: "npm:~9.39.3" eslint-plugin-no-floating-promise: "npm:~2.0.0" + eslint-plugin-react-refresh: "npm:~0.5.2" + eslint-plugin-testing-library: "npm:~7.16.0" eslint-plugin-you-dont-need-lodash-underscore: "npm:~6.14.0" node-gyp: "npm:^10.2.0" ts-node: "npm:^10.9.2" @@ -32718,7 +32898,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.2, semver@npm:^7.6.3, semver@npm:^7.7.1, semver@npm:^7.7.2": +"semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.2, semver@npm:^7.6.3, semver@npm:^7.7.1, semver@npm:^7.7.2": version: 7.7.2 resolution: "semver@npm:7.7.2" bin: @@ -33688,7 +33868,7 @@ __metadata: languageName: node linkType: hard -"stop-iteration-iterator@npm:^1.0.0": +"stop-iteration-iterator@npm:^1.0.0, stop-iteration-iterator@npm:^1.1.0": version: 1.1.0 resolution: "stop-iteration-iterator@npm:1.1.0" dependencies: @@ -33969,7 +34149,7 @@ __metadata: languageName: node linkType: hard -"string.prototype.trimend@npm:^1.0.8, string.prototype.trimend@npm:^1.0.9": +"string.prototype.trimend@npm:^1.0.9": version: 1.0.9 resolution: "string.prototype.trimend@npm:1.0.9" dependencies: @@ -34448,7 +34628,16 @@ __metadata: languageName: node linkType: hard -"synckit@npm:^0.11.0, synckit@npm:^0.11.8": +"synckit@npm:^0.11.12": + version: 0.11.12 + resolution: "synckit@npm:0.11.12" + dependencies: + "@pkgr/core": "npm:^0.2.9" + checksum: 10/2f51978bfed81aaf0b093f596709a72c49b17909020f42b43c5549f9c0fe18b1fe29f82e41ef771172d729b32e9ce82900a85d2b87fa14d59f886d4df8d7a329 + languageName: node + linkType: hard + +"synckit@npm:^0.11.8": version: 0.11.8 resolution: "synckit@npm:0.11.8" dependencies: @@ -34716,13 +34905,6 @@ __metadata: languageName: node linkType: hard -"text-table@npm:^0.2.0": - version: 0.2.0 - resolution: "text-table@npm:0.2.0" - checksum: 10/4383b5baaeffa9bb4cda2ac33a4aa2e6d1f8aaf811848bf73513a9b88fd76372dc461f6fd6d2e9cb5100f48b473be32c6f95bd983509b7d92bb4d92c10747452 - languageName: node - linkType: hard - "textarea-caret@npm:^3.1.0": version: 3.1.0 resolution: "textarea-caret@npm:3.1.0" @@ -34824,7 +35006,7 @@ __metadata: languageName: node linkType: hard -"tinyglobby@npm:^0.2.14": +"tinyglobby@npm:^0.2.14, tinyglobby@npm:^0.2.15": version: 0.2.15 resolution: "tinyglobby@npm:0.2.15" dependencies: @@ -35061,12 +35243,12 @@ __metadata: languageName: node linkType: hard -"ts-api-utils@npm:^1.3.0": - version: 1.3.0 - resolution: "ts-api-utils@npm:1.3.0" +"ts-api-utils@npm:^2.4.0": + version: 2.4.0 + resolution: "ts-api-utils@npm:2.4.0" peerDependencies: - typescript: ">=4.2.0" - checksum: 10/3ee44faa24410cd649b5c864e068d438aa437ef64e9e4a66a41646a6d3024d3097a695eeb3fb26ee364705d3cb9653a65756d009e6a53badb6066a5f447bf7ed + typescript: ">=4.8.4" + checksum: 10/d6b2b3b6caad8d2f4ddc0c3785d22bb1a6041773335a1c71d73a5d67d11d993763fe8e4faefc4a4d03bb42b26c6126bbcf2e34826baed1def5369d0ebad358fa languageName: node linkType: hard @@ -35254,7 +35436,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^1.8.1, tslib@npm:^1.9.3": +"tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" checksum: 10/7dbf34e6f55c6492637adb81b555af5e3b4f9cc6b998fb440dac82d3b42bdc91560a35a5fb75e20e24a076c651438234da6743d139e4feabf0783f3cdfe1dddb @@ -35282,17 +35464,6 @@ __metadata: languageName: node linkType: hard -"tsutils@npm:^3.21.0": - version: 3.21.0 - resolution: "tsutils@npm:3.21.0" - dependencies: - tslib: "npm:^1.8.1" - peerDependencies: - typescript: ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - checksum: 10/ea036bec1dd024e309939ffd49fda7a351c0e87a1b8eb049570dd119d447250e2c56e0e6c00554e8205760e7417793fdebff752a46e573fbe07d4f375502a5b2 - languageName: node - linkType: hard - "tsx@npm:~4.20.6": version: 4.20.6 resolution: "tsx@npm:4.20.6" @@ -35482,13 +35653,6 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^0.20.2": - version: 0.20.2 - resolution: "type-fest@npm:0.20.2" - checksum: 10/8907e16284b2d6cfa4f4817e93520121941baba36b39219ea36acfe64c86b9dbc10c9941af450bd60832c8f43464974d51c0957f9858bc66b952b66b6914cbb9 - languageName: node - linkType: hard - "type-fest@npm:^0.21.3": version: 0.21.3 resolution: "type-fest@npm:0.21.3" @@ -36916,6 +37080,21 @@ __metadata: languageName: node linkType: hard +"which-typed-array@npm:^1.1.19": + version: 1.1.20 + resolution: "which-typed-array@npm:1.1.20" + dependencies: + available-typed-arrays: "npm:^1.0.7" + call-bind: "npm:^1.0.8" + call-bound: "npm:^1.0.4" + for-each: "npm:^0.3.5" + get-proto: "npm:^1.0.1" + gopd: "npm:^1.2.0" + has-tostringtag: "npm:^1.0.2" + checksum: 10/e56da3fc995d330ff012f682476f7883c16b12d36c6717c87c7ca23eb5a5ef957fa89115dacb389b11a9b4e99d5dbe2d12689b4d5d08c050b5aed0eae385b840 + languageName: node + linkType: hard + "which@npm:2.0.2, which@npm:^2.0.1": version: 2.0.2 resolution: "which@npm:2.0.2" @@ -37434,6 +37613,15 @@ __metadata: languageName: node linkType: hard +"zod-validation-error@npm:^3.5.0 || ^4.0.0": + version: 4.0.2 + resolution: "zod-validation-error@npm:4.0.2" + peerDependencies: + zod: ^3.25.0 || ^4.0.0 + checksum: 10/5e35ca8ebb4602dcb526e122d7e9fca695c4a479bd97535f3400a732d49160f24f7213a9ed64986fc9dc3a2e8a6c4e1241ec0c4d8a4e3e69ea91a0328ded2192 + languageName: node + linkType: hard + "zod@npm:^3.24.1": version: 3.24.1 resolution: "zod@npm:3.24.1" @@ -37441,7 +37629,7 @@ __metadata: languageName: node linkType: hard -"zod@npm:~4.3.6": +"zod@npm:^3.25.0 || ^4.0.0, zod@npm:~4.3.6": version: 4.3.6 resolution: "zod@npm:4.3.6" checksum: 10/25fc0f62e01b557b4644bf0b393bbaf47542ab30877c37837ea8caf314a8713d220c7d7fe51f68ffa72f0e1018ddfa34d96f1973d23033f5a2a5a9b6b9d9da01 From 096a80e226437f2c64ebd6b133e78b97ff21043c Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Wed, 25 Feb 2026 22:28:26 -0300 Subject: [PATCH 16/25] chore(eslint): use React configs --- eslint.config.mjs | 13 +++++-- packages/eslint-config/index.js | 62 ++++++++++++++++++++------------- 2 files changed, 49 insertions(+), 26 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 70f5976ca3ff6..81177593cb168 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -331,12 +331,12 @@ export default [ 'import/export': 'off', 'jsx-quotes': 'off', 'import/newline-after-import': 'off', - 'react/jsx-curly-brace-presence': 'off', + 'react/jsx-curly-brace-presence': 'warn', 'prefer-destructuring': 'off', 'object-shorthand': 'off', 'import/no-duplicates': 'off', '@typescript-eslint/naming-convention': 'off', - 'react/jsx-key': 'off', + 'react/jsx-key': 'warn', 'jsx-a11y/click-events-have-key-events': 'off', 'jsx-a11y/no-static-element-interactions': 'off', 'no-nested-ternary': 'off', @@ -578,10 +578,12 @@ export default [ 'react/no-deprecated': 'error', 'react/no-did-mount-set-state': 'error', 'react/no-did-update-set-state': 'error', + 'react/no-direct-mutation-state': 'warn', 'react/no-find-dom-node': 'error', 'react/no-is-mounted': 'error', 'react/no-multi-comp': 'off', 'react/no-string-refs': 'error', + 'react/no-unknown-property': ['error', { ignore: ['class'] }], 'react/prefer-es6-class': 'error', 'react/prefer-stateless-function': 'warn', 'react/require-render-return': 'error', @@ -760,4 +762,11 @@ export default [ 'storybook/no-renderer-packages': 'off', }, }, + // FIXME + { + files: ['apps/meteor/client/views/root/MainLayout/LayoutWithSidebar.spec.tsx'], + rules: { + '@typescript-eslint/consistent-type-imports': 'off', + }, + }, ]; diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index 8398ab6dcc63b..a30d3f25ac525 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -29,37 +29,56 @@ export default [ 'jsx-a11y/no-autofocus': ['error', { ignoreNonDOM: true }], }, }, + reactPlugin.configs.flat.recommended, + reactPlugin.configs.flat['jsx-runtime'], { - plugins: { - react: reactPlugin, - }, settings: { react: { version: 'detect', }, }, rules: { - 'react/display-name': 'error', 'react/jsx-curly-brace-presence': 'error', 'react/jsx-fragments': ['error', 'syntax'], 'react/jsx-key': ['error', { checkFragmentShorthand: true, checkKeyMustBeforeSpread: true, warnOnDuplicates: true }], - 'react/jsx-no-undef': 'error', - 'react/jsx-uses-react': 'error', - 'react/jsx-uses-vars': 'error', - 'react/no-children-prop': 'error', + 'react/jsx-no-target-blank': 'warn', 'react/no-multi-comp': 'error', + 'react/no-unescaped-entities': 'warn', + 'react/prop-types': 'warn', }, }, + reactHooksPlugin.configs.flat.recommended, { - plugins: { - 'react-hooks': reactHooksPlugin, - }, rules: { + // Core hooks rules 'react-hooks/exhaustive-deps': 'error', - 'react-hooks/rules-of-hooks': 'error', + + // React Compiler rules (currently not in use) + 'react-hooks/component-hook-factories': 'off', + 'react-hooks/config': 'off', + 'react-hooks/error-boundaries': 'off', + 'react-hooks/gating': 'off', + 'react-hooks/globals': 'off', + 'react-hooks/immutability': 'off', + 'react-hooks/incompatible-library': 'off', + 'react-hooks/preserve-manual-memoization': 'off', + 'react-hooks/purity': 'off', + 'react-hooks/refs': 'off', + 'react-hooks/set-state-in-effect': 'off', + 'react-hooks/set-state-in-render': 'off', + 'react-hooks/static-components': 'off', + 'react-hooks/unsupported-syntax': 'off', + 'react-hooks/use-memo': 'off', }, }, ...storybookPlugin.configs['flat/recommended'], + { + files: ['**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)'], + rules: { + 'react/display-name': 'off', + 'react/no-multi-comp': 'off', + }, + }, { plugins: { 'anti-trojan-source': antiTrojanSourcePlugin, @@ -74,11 +93,6 @@ export default [ languageOptions: { ecmaVersion: 2024, sourceType: 'module', - parserOptions: { - ecmaFeatures: { - jsx: true, - }, - }, }, }, // typescript files @@ -330,13 +344,6 @@ export default [ 'import/no-useless-path-segments': 'error', }, }, - { - files: ['**/*.stories.js', '**/*.stories.jsx', '**/*.stories.ts', '**/*.stories.tsx', '**/*.spec.tsx'], - rules: { - 'react/display-name': 'off', - 'react/no-multi-comp': 'off', - }, - }, { files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'], rules: { @@ -469,4 +476,11 @@ export default [ '@typescript-eslint/naming-convention': 'off', }, }, + { + files: ['**/*.spec.@(ts|tsx|js|jsx|mjs|cjs)'], + rules: { + 'react/display-name': 'off', + 'react/no-multi-comp': 'off', + }, + }, ]; From da6be391fd0adc828f70be224b443db1cfb26c24 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Wed, 25 Feb 2026 23:30:48 -0300 Subject: [PATCH 17/25] chore(eslint): attach recommended javascript configuration --- packages/eslint-config/index.js | 65 +++++++++++------------------ packages/eslint-config/package.json | 1 + yarn.lock | 3 +- 3 files changed, 27 insertions(+), 42 deletions(-) diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index a30d3f25ac525..3a3985df81a15 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -1,5 +1,7 @@ +import eslint from '@eslint/js'; import typescriptPlugin from '@typescript-eslint/eslint-plugin'; import typescriptParser from '@typescript-eslint/parser'; +import { defineConfig } from 'eslint/config'; import antiTrojanSourcePlugin from 'eslint-plugin-anti-trojan-source'; import importPlugin from 'eslint-plugin-import'; import jsxA11yPlugin from 'eslint-plugin-jsx-a11y'; @@ -10,21 +12,23 @@ import storybookPlugin from 'eslint-plugin-storybook'; import globals from 'globals'; /** @type {import('eslint').Linter.FlatConfig[]} */ -export default [ - // linting options +export default defineConfig( { + name: 'rocket.chat/linter', linterOptions: { reportUnusedDisableDirectives: true, }, }, - // ignored directories { + name: 'rocket.chat/ignored', ignores: ['**/dist', '**/coverage', '**/storybook-static'], }, + eslint.configs.recommended, importPlugin.flatConfigs.recommended, importPlugin.flatConfigs.typescript, jsxA11yPlugin.flatConfigs.recommended, { + name: 'rocket.chat/jsx-a11y', rules: { 'jsx-a11y/no-autofocus': ['error', { ignoreNonDOM: true }], }, @@ -32,6 +36,7 @@ export default [ reactPlugin.configs.flat.recommended, reactPlugin.configs.flat['jsx-runtime'], { + name: 'rocket.chat/react', settings: { react: { version: 'detect', @@ -49,6 +54,7 @@ export default [ }, reactHooksPlugin.configs.flat.recommended, { + name: 'rocket.chat/react-hooks', rules: { // Core hooks rules 'react-hooks/exhaustive-deps': 'error', @@ -73,13 +79,15 @@ export default [ }, ...storybookPlugin.configs['flat/recommended'], { - files: ['**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)'], + name: 'rocket.chat/storybook', + files: ['**/*.stories.@(ts|tsx|mts|cts|js|jsx|mjs|cjs)'], rules: { 'react/display-name': 'off', 'react/no-multi-comp': 'off', }, }, { + name: 'rocket.chat/anti-trojan', plugins: { 'anti-trojan-source': antiTrojanSourcePlugin, }, @@ -88,8 +96,8 @@ export default [ }, }, prettierPluginRecommended, - // javascript files { + name: 'rocket.chat/javascript-syntax', languageOptions: { ecmaVersion: 2024, sourceType: 'module', @@ -97,7 +105,7 @@ export default [ }, // typescript files { - files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'], + files: ['**/*.@(ts|tsx|cts|mts)'], languageOptions: { parser: typescriptParser, parserOptions: { @@ -126,12 +134,10 @@ export default [ allow: ['arrowFunctions', 'functions', 'methods'], }, ], - 'no-empty-pattern': 'error', 'no-eval': 'error', 'no-extend-native': 'error', 'no-extra-bind': 'error', 'no-extra-label': 'error', - 'no-fallthrough': 'error', 'no-implied-eval': 'error', 'no-invalid-this': 'off', 'no-iterator': 'error', @@ -139,9 +145,7 @@ export default [ 'no-loop-func': 'error', 'no-multi-str': 'error', 'no-new-wrappers': 'error', - 'no-octal': 'error', 'no-proto': 'error', - 'no-redeclare': 'error', 'no-restricted-properties': [ 'error', { @@ -162,47 +166,30 @@ export default [ 'no-self-compare': 'error', 'no-sequences': 'error', 'no-throw-literal': 'error', - 'no-unused-labels': 'error', 'no-useless-call': 'off', + 'no-useless-catch': 'warn', 'no-useless-concat': 'error', 'no-useless-return': 'error', 'no-void': 'off', + 'preserve-caught-error': 'warn', 'yoda': 'error', }, }, // prevent common mistakes { rules: { - 'for-direction': 'error', 'getter-return': ['error', { allowImplicit: true }], - // TODO: enable, semver-major - 'no-async-promise-executor': 'off', + 'no-async-promise-executor': 'warn', 'no-await-in-loop': 'error', - 'no-compare-neg-zero': 'error', - 'no-cond-assign': 'error', - 'no-constant-condition': 'error', - 'no-control-regex': 'error', + 'no-case-declarations': 'warn', + 'no-constant-binary-expression': 'warn', 'no-debugger': 'error', - 'no-dupe-args': 'error', - 'no-dupe-keys': 'error', - 'no-duplicate-case': 'error', - 'no-empty': 'error', - 'no-empty-character-class': 'error', - 'no-ex-assign': 'error', - 'no-extra-boolean-cast': 'error', - 'no-func-assign': 'error', 'no-inner-declarations': ['error', 'functions'], - 'no-invalid-regexp': 'error', - 'no-irregular-whitespace': 'error', - 'no-obj-calls': 'error', - 'no-regex-spaces': 'error', - 'no-sparse-arrays': 'error', - 'no-unreachable': 'error', - 'no-unsafe-finally': 'error', - 'no-unsafe-negation': 'error', 'no-negated-in-lhs': 'error', + 'no-prototype-builtins': 'warn', + 'no-unsafe-optional-chaining': 'warn', + 'no-useless-assignment': 'warn', 'require-atomic-updates': 'off', - 'use-isnan': 'error', 'valid-typeof': ['error', { requireStringLiterals: true }], }, }, @@ -233,6 +220,7 @@ export default [ 'no-multi-assign': 'error', 'no-nested-ternary': 'error', 'no-unneeded-ternary': ['error', { defaultAssignment: false }], + 'no-useless-escape': 'warn', 'one-var': ['error', 'never'], 'operator-assignment': ['error', 'always'], 'prefer-object-spread': 'off', @@ -242,8 +230,6 @@ export default [ // variables related rules { rules: { - 'no-delete-var': 'error', - 'no-undef': 'error', 'no-unused-vars': [ 'error', { @@ -258,10 +244,7 @@ export default [ // ES2015 related rules { rules: { - 'no-const-assign': 'error', - 'no-dupe-class-members': 'error', 'no-duplicate-imports': 'off', - 'no-this-before-super': 'error', 'no-useless-computed-key': 'error', 'no-useless-constructor': 'error', 'no-useless-rename': [ @@ -483,4 +466,4 @@ export default [ 'react/no-multi-comp': 'off', }, }, -]; +); diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index b4534637dc318..333fff539a665 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -17,6 +17,7 @@ "dependencies": { "@babel/core": "~7.28.6", "@babel/eslint-parser": "~7.28.6", + "@eslint/js": "~9.39.3", "@types/eslint": "~8.44.9", "@types/prettier": "^2.7.3", "@typescript-eslint/eslint-plugin": "~8.56.1", diff --git a/yarn.lock b/yarn.lock index 036f6fdd08974..5e34c7b32e043 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3376,7 +3376,7 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:9.39.3": +"@eslint/js@npm:9.39.3, @eslint/js@npm:~9.39.3": version: 9.39.3 resolution: "@eslint/js@npm:9.39.3" checksum: 10/91a1a1822cfeb2eb8a89aae86be5dfabad0b66b0915946516690a8485ddd80b91f43eee346789313fea1acbb7390a4958119ca7dc9a684a5c4014f12fcb3aaf3 @@ -8429,6 +8429,7 @@ __metadata: dependencies: "@babel/core": "npm:~7.28.6" "@babel/eslint-parser": "npm:~7.28.6" + "@eslint/js": "npm:~9.39.3" "@types/eslint": "npm:~8.44.9" "@types/prettier": "npm:^2.7.3" "@typescript-eslint/eslint-plugin": "npm:~8.56.1" From c0b146f5e4f64e6391d746ec2086033a846a0ec2 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Thu, 26 Feb 2026 01:17:44 -0300 Subject: [PATCH 18/25] chore(eslint): attach recommended typescript configuration --- packages/eslint-config/index.js | 103 ++++++++++++++++++++++------ packages/eslint-config/package.json | 5 +- yarn.lock | 22 ++++-- 3 files changed, 101 insertions(+), 29 deletions(-) diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index 3a3985df81a15..d67aa9a7d7638 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -1,6 +1,4 @@ import eslint from '@eslint/js'; -import typescriptPlugin from '@typescript-eslint/eslint-plugin'; -import typescriptParser from '@typescript-eslint/parser'; import { defineConfig } from 'eslint/config'; import antiTrojanSourcePlugin from 'eslint-plugin-anti-trojan-source'; import importPlugin from 'eslint-plugin-import'; @@ -10,8 +8,8 @@ import reactPlugin from 'eslint-plugin-react'; import reactHooksPlugin from 'eslint-plugin-react-hooks'; import storybookPlugin from 'eslint-plugin-storybook'; import globals from 'globals'; +import tseslint from 'typescript-eslint'; -/** @type {import('eslint').Linter.FlatConfig[]} */ export default defineConfig( { name: 'rocket.chat/linter', @@ -24,6 +22,7 @@ export default defineConfig( ignores: ['**/dist', '**/coverage', '**/storybook-static'], }, eslint.configs.recommended, + tseslint.configs.recommendedTypeChecked, importPlugin.flatConfigs.recommended, importPlugin.flatConfigs.typescript, jsxA11yPlugin.flatConfigs.recommended, @@ -97,27 +96,45 @@ export default defineConfig( }, prettierPluginRecommended, { - name: 'rocket.chat/javascript-syntax', + name: 'rocket.chat/ecmascript', languageOptions: { ecmaVersion: 2024, sourceType: 'module', }, }, - // typescript files { - files: ['**/*.@(ts|tsx|cts|mts)'], - languageOptions: { - parser: typescriptParser, - parserOptions: { - warnOnUnsupportedTypeScriptVersion: false, - }, - }, - plugins: { - '@typescript-eslint': typescriptPlugin, + name: 'rocket.chat/disable-typescript-rules-for-js', + files: ['**/*.@(js|jsx|mjs|cjs)'], + rules: { + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/no-array-constructor': 'off', + '@typescript-eslint/no-duplicate-enum-values': 'off', + '@typescript-eslint/no-empty-object-type': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-extra-non-null-assertion': 'off', + '@typescript-eslint/no-misused-new': 'off', + '@typescript-eslint/no-namespace': 'off', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'off', + '@typescript-eslint/no-require-imports': 'off', + '@typescript-eslint/no-this-alias': 'off', + '@typescript-eslint/no-unnecessary-type-constraint': 'off', + '@typescript-eslint/no-unsafe-declaration-merging': 'off', + '@typescript-eslint/no-unsafe-function-type': 'off', + '@typescript-eslint/no-unused-expressions': 'off', + '@typescript-eslint/no-unused-vars': 'off', + '@typescript-eslint/no-wrapper-object-types': 'off', + '@typescript-eslint/prefer-as-const': 'off', + '@typescript-eslint/prefer-namespace-keyword': 'off', + '@typescript-eslint/triple-slash-reference': 'off', }, }, - // best practices { + name: 'rocket.chat/disable-type-checked-rules-for-js', + files: ['**/*.@(js|jsx|mjs|cjs)'], + ...tseslint.configs.disableTypeChecked, + }, + { + name: 'rocket.chat/best-practices', rules: { 'array-callback-return': ['error', { allowImplicit: true }], 'block-scoped-var': 'error', @@ -175,8 +192,8 @@ export default defineConfig( 'yoda': 'error', }, }, - // prevent common mistakes { + name: 'rocket.chat/common-mistakes', rules: { 'getter-return': ['error', { allowImplicit: true }], 'no-async-promise-executor': 'warn', @@ -193,17 +210,17 @@ export default defineConfig( 'valid-typeof': ['error', { requireStringLiterals: true }], }, }, - // Node.js and CommonJS globals // TODO: disable, as they are not available in all environments { + name: 'rocket.chat/node-globals', languageOptions: { globals: { ...globals.node, }, }, }, - // stylistic issues { + name: 'rocket.chat/stylistic', rules: { 'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: false }], 'lines-around-directive': [ @@ -227,8 +244,8 @@ export default defineConfig( 'spaced-comment': 'error', }, }, - // variables related rules { + name: 'rocket.chat/variables', rules: { 'no-unused-vars': [ 'error', @@ -241,8 +258,8 @@ export default defineConfig( 'no-use-before-define': ['error', { functions: true, classes: true, variables: true }], }, }, - // ES2015 related rules { + name: 'rocket.chat/es2015', rules: { 'no-duplicate-imports': 'off', 'no-useless-computed-key': 'error', @@ -284,8 +301,8 @@ export default defineConfig( 'prefer-template': 'error', }, }, - // import related rules { + name: 'rocket.chat/import', settings: { 'import/resolver': { node: true, @@ -328,7 +345,7 @@ export default defineConfig( }, }, { - files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'], + files: ['**/*.@(ts|tsx|cts|mts)'], rules: { '@typescript-eslint/no-empty-object-type': 'warn', '@typescript-eslint/no-unsafe-function-type': 'warn', @@ -384,14 +401,24 @@ export default defineConfig( }, }, ], + '@typescript-eslint/await-thenable': 'warn', + '@typescript-eslint/no-array-delete': 'warn', + '@typescript-eslint/no-base-to-string': 'warn', '@typescript-eslint/no-dupe-class-members': 'error', + '@typescript-eslint/no-duplicate-enum-values': 'warn', + '@typescript-eslint/no-duplicate-type-constituents': 'warn', '@typescript-eslint/no-empty-function': 'error', '@typescript-eslint/no-empty-interface': 'warn', '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-for-in-array': 'warn', + '@typescript-eslint/no-implied-eval': 'warn', '@typescript-eslint/no-non-null-assertion': 'warn', '@typescript-eslint/no-redeclare': 'error', '@typescript-eslint/no-redundant-type-constituents': 'off', + '@typescript-eslint/no-require-imports': 'warn', '@typescript-eslint/no-this-alias': 'error', + '@typescript-eslint/no-unnecessary-type-assertion': 'warn', + '@typescript-eslint/no-unused-expressions': 'warn', '@typescript-eslint/no-unused-vars': [ 'error', { @@ -401,9 +428,18 @@ export default defineConfig( ], '@typescript-eslint/no-unsafe-argument': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-call': 'warn', + '@typescript-eslint/no-unsafe-declaration-merging': 'warn', + '@typescript-eslint/no-unsafe-enum-comparison': 'warn', '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-return': 'warn', + '@typescript-eslint/only-throw-error': 'warn', + '@typescript-eslint/prefer-promise-reject-errors': 'warn', '@typescript-eslint/prefer-optional-chain': 'warn', '@typescript-eslint/require-await': 'off', + '@typescript-eslint/restrict-plus-operands': 'warn', + '@typescript-eslint/restrict-template-expressions': 'warn', + '@typescript-eslint/unbound-method': 'off', 'no-dupe-class-members': 'off', 'no-empty-function': 'off', 'no-redeclare': 'off', @@ -413,6 +449,29 @@ export default defineConfig( 'no-useless-constructor': 'off', }, }, + { + files: [ + '**/*.d.ts', + '**/__tests__/**', + '**/*.spec.ts', + '**/*.spec.tsx', + '**/*.test.ts', + '**/*.test.tsx', + '**/tests/**', + '**/.storybook/**', + '**/jest.config.ts', + '**/jest.config.js', + '**/jest.config.*.ts', + '**/jest.config.*.js', + '**/webpack.config.ts', + '**/webpack.config.js', + '**/vite.config.ts', + '**/vite.config.js', + '**/rollup.config.ts', + '**/rollup.config.js', + ], + ...tseslint.configs.disableTypeChecked, + }, { files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'], ignores: [ diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 333fff539a665..fae701b4c6b8c 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -20,8 +20,6 @@ "@eslint/js": "~9.39.3", "@types/eslint": "~8.44.9", "@types/prettier": "^2.7.3", - "@typescript-eslint/eslint-plugin": "~8.56.1", - "@typescript-eslint/parser": "~8.56.1", "eslint": "~9.39.3", "eslint-config-prettier": "~10.1.8", "eslint-import-resolver-typescript": "~4.4.4", @@ -34,7 +32,8 @@ "eslint-plugin-react-hooks": "~7.0.1", "eslint-plugin-storybook": "~10.2.12", "globals": "~17.3.0", - "prettier": "~3.3.3" + "prettier": "~3.3.3", + "typescript-eslint": "~8.56.1" }, "devDependencies": { "typescript": "~5.9.3" diff --git a/yarn.lock b/yarn.lock index 5e34c7b32e043..a95e7d980327f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8432,8 +8432,6 @@ __metadata: "@eslint/js": "npm:~9.39.3" "@types/eslint": "npm:~8.44.9" "@types/prettier": "npm:^2.7.3" - "@typescript-eslint/eslint-plugin": "npm:~8.56.1" - "@typescript-eslint/parser": "npm:~8.56.1" eslint: "npm:~9.39.3" eslint-config-prettier: "npm:~10.1.8" eslint-import-resolver-typescript: "npm:~4.4.4" @@ -8448,6 +8446,7 @@ __metadata: globals: "npm:~17.3.0" prettier: "npm:~3.3.3" typescript: "npm:~5.9.3" + typescript-eslint: "npm:~8.56.1" languageName: unknown linkType: soft @@ -13948,7 +13947,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:~8.56.1": +"@typescript-eslint/eslint-plugin@npm:8.56.1": version: 8.56.1 resolution: "@typescript-eslint/eslint-plugin@npm:8.56.1" dependencies: @@ -13968,7 +13967,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/parser@npm:~8.56.1": +"@typescript-eslint/parser@npm:8.56.1": version: 8.56.1 resolution: "@typescript-eslint/parser@npm:8.56.1" dependencies: @@ -35796,6 +35795,21 @@ __metadata: languageName: node linkType: hard +"typescript-eslint@npm:~8.56.1": + version: 8.56.1 + resolution: "typescript-eslint@npm:8.56.1" + dependencies: + "@typescript-eslint/eslint-plugin": "npm:8.56.1" + "@typescript-eslint/parser": "npm:8.56.1" + "@typescript-eslint/typescript-estree": "npm:8.56.1" + "@typescript-eslint/utils": "npm:8.56.1" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: ">=4.8.4 <6.0.0" + checksum: 10/e18cd347ddce0f0e5b28121346f27736a418adf68e73d613690ea3a1d0adfe03bc393f77a8872c2cef77ca74bcc0974212d1775c360de33a9987a94cda11a05b + languageName: node + linkType: hard + "typescript@npm:~5.9.3": version: 5.9.3 resolution: "typescript@npm:5.9.3" From 05dee87b3e064117008a556902aa3409493b8e5f Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Thu, 26 Feb 2026 02:44:57 -0300 Subject: [PATCH 19/25] chore(eslint): ease some workarounds --- eslint.config.mjs | 46 ++++++++------------------------- packages/eslint-config/index.js | 10 ++++++- 2 files changed, 20 insertions(+), 36 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 81177593cb168..0c524ce199d93 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -279,13 +279,6 @@ export default [ 'no-floating-promise': noFloatingPromisePlugin, }, rules: { - '@typescript-eslint/no-unused-vars': [ - 'error', - { - argsIgnorePattern: '^_', - ignoreRestSiblings: true, - }, - ], '@typescript-eslint/no-floating-promises': 'error', 'import/named': 'error', 'import/order': [ @@ -647,8 +640,8 @@ export default [ files: [ 'apps/meteor/client/**/*.ts', 'apps/meteor/client/**/*.tsx', - 'apps/meteor/app/lib/**/*.ts', - 'apps/meteor/app/livechat/**/*.ts', + 'apps/meteor/app/**/*.ts', + 'apps/meteor/ee/app/**/*.ts', 'apps/meteor/ee/client/**/*.ts', 'apps/meteor/ee/client/**/*.tsx', 'apps/meteor/ee/server/**/*.ts', @@ -668,6 +661,15 @@ export default [ ], rules: { '@typescript-eslint/no-misused-promises': 'warn', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + varsIgnorePattern: 'Endpoints?$|Routes$|^invites$|^livechatVisitorDepartmentTransfer$', // FIXME? + argsIgnorePattern: '^_', + ignoreRestSiblings: true, + caughtErrors: 'none', + }, + ], }, }, { @@ -736,25 +738,6 @@ export default [ '@typescript-eslint/no-misused-promises': 'off', }, }, - // FIXME: catch clause with unused error variable - { - files: ['**/*.ts', '**/*.tsx'], - rules: { - '@typescript-eslint/no-unused-vars': 'warn', - }, - }, - { - files: [ - 'apps/meteor/.scripts/version.js', - 'apps/meteor/app/lib/server/functions/validateCustomFields.js', - 'apps/meteor/app/lib/server/lib/validateEmailDomain.js', - 'apps/meteor/app/markdown/lib/parser/original/markdown.js', - 'packages/apps-engine/scripts/deno-cache.js', - ], - rules: { - 'no-unused-vars': 'warn', - }, - }, // FIXME: these storybook rules cannot be enabled until Storybook is upgraded to >=9 { files: ['**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)'], @@ -762,11 +745,4 @@ export default [ 'storybook/no-renderer-packages': 'off', }, }, - // FIXME - { - files: ['apps/meteor/client/views/root/MainLayout/LayoutWithSidebar.spec.tsx'], - rules: { - '@typescript-eslint/consistent-type-imports': 'off', - }, - }, ]; diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index d67aa9a7d7638..ba78416be2241 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -253,6 +253,7 @@ export default defineConfig( vars: 'all', args: 'after-used', ignoreRestSiblings: true, + caughtErrors: 'none', }, ], 'no-use-before-define': ['error', { functions: true, classes: true, variables: true }], @@ -364,7 +365,13 @@ export default defineConfig( }, ], '@typescript-eslint/ban-ts-comment': 'warn', - '@typescript-eslint/consistent-type-imports': 'error', + '@typescript-eslint/consistent-type-imports': [ + 'warn', + { + disallowTypeAnnotations: false, + fixStyle: 'inline-type-imports', + }, + ], '@typescript-eslint/naming-convention': [ 'error', { selector: 'variableLike', format: ['camelCase'], leadingUnderscore: 'allow' }, @@ -424,6 +431,7 @@ export default defineConfig( { argsIgnorePattern: '^_', ignoreRestSiblings: true, + caughtErrors: 'none', }, ], '@typescript-eslint/no-unsafe-argument': 'off', From 3bce266ab5538abc6cd17914e0a01e35ad7d4606 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Thu, 26 Feb 2026 11:10:28 -0300 Subject: [PATCH 20/25] chore(eslint): move jest and testing-library plugins to eslint-config --- eslint.config.mjs | 143 +++++----------------------- package.json | 2 - packages/eslint-config/index.js | 52 +++++++--- packages/eslint-config/package.json | 1 + yarn.lock | 19 +--- 5 files changed, 66 insertions(+), 151 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 0c524ce199d93..ff5361f787304 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,8 +1,5 @@ import rocketChatConfig from '@rocket.chat/eslint-config'; -import jestPlugin from 'eslint-plugin-jest'; -import noFloatingPromisePlugin from 'eslint-plugin-no-floating-promise'; import reactRefreshPlugin from 'eslint-plugin-react-refresh'; -import testingLibraryPlugin from 'eslint-plugin-testing-library'; import youDontNeedLodashUnderscorePlugin from 'eslint-plugin-you-dont-need-lodash-underscore'; import globals from 'globals'; @@ -201,29 +198,9 @@ export default [ ], 'no-unreachable-loop': 'error', }, - languageOptions: { - parserOptions: { - project: getAbsolutePath('./apps/meteor/tsconfig.json'), - }, - }, - }, - { - files: ['apps/meteor/**/*.tests.js', 'apps/meteor/**/*.tests.ts', 'apps/meteor/**/*.spec.ts'], - languageOptions: { - globals: { - ...globals.mocha, - }, - }, }, { - files: ['apps/meteor/**/*.spec.ts', 'apps/meteor/**/*.spec.tsx'], - ...testingLibraryPlugin.configs['flat/react'], - rules: { - 'testing-library/no-await-sync-events': 'warn', - 'testing-library/no-manual-cleanup': 'warn', - 'testing-library/prefer-explicit-assert': 'warn', - 'testing-library/prefer-user-event': 'warn', - }, + files: ['apps/meteor/**/*.tests.js'], languageOptions: { globals: { ...globals.mocha, @@ -231,23 +208,25 @@ export default [ }, }, { - files: [ - 'apps/meteor/**/*.stories.js', - 'apps/meteor/**/*.stories.jsx', - 'apps/meteor/**/*.stories.ts', - 'apps/meteor/**/*.stories.tsx', - 'apps/meteor/**/*.spec.tsx', - ], + files: ['apps/meteor/tests/end-to-end/**/*.spec.ts', 'apps/meteor/tests/unit/**/*.spec.ts'], rules: { - 'react/display-name': 'off', - 'react/no-multi-comp': 'off', + 'jest/expect-expect': 'off', + 'jest/no-conditional-expect': 'off', + 'jest/no-done-callback': 'off', + 'jest/no-export': 'off', + 'jest/no-identical-title': 'off', + 'jest/no-standalone-expect': 'off', + 'jest/no-test-prefixes': 'off', + 'jest/valid-describe-callback': 'off', + 'jest/valid-expect-in-promise': 'off', + 'jest/valid-expect': 'off', + 'jest/valid-title': 'off', }, }, { - files: ['apps/meteor/**/*.stories.ts', 'apps/meteor/**/*.stories.tsx'], + files: ['apps/meteor/tests/end-to-end/**/*.ts', 'apps/meteor/tests/unit/**/*.ts'], rules: { - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-unused-expressions': 'off', }, }, { @@ -271,13 +250,9 @@ export default [ files: ['apps/meteor/tests/e2e/**/*'], languageOptions: { parserOptions: { - project: getAbsolutePath('./apps/meteor/tsconfig.json'), + projectService: true, }, }, - plugins: { - 'testing-library': testingLibraryPlugin, - 'no-floating-promise': noFloatingPromisePlugin, - }, rules: { '@typescript-eslint/no-floating-promises': 'error', 'import/named': 'error', @@ -350,41 +325,6 @@ export default [ 'apps/uikit-playground/yarn-error.log*', ], }, - { - files: ['ee/apps/account-service/**/*.spec.js', 'ee/apps/account-service/**/*.spec.jsx'], - languageOptions: { - globals: { - ...globals.jest, - }, - }, - }, - { - files: ['ee/apps/authorization-service/**/*.spec.js', 'ee/apps/authorization-service/**/*.spec.jsx'], - languageOptions: { - globals: { - ...globals.jest, - }, - }, - }, - { - files: ['ee/apps/ddp-streamer/**/*.spec.js', 'ee/apps/ddp-streamer/**/*.spec.jsx'], - languageOptions: { - globals: { - ...globals.jest, - }, - }, - }, - { - files: ['ee/apps/presence-service/**/*.spec.js', 'ee/apps/presence-service/**/*.spec.jsx'], - languageOptions: { - globals: { - ...globals.jest, - }, - }, - }, - { - ignores: ['ee/packages/federation-matrix/src/api/.well-known/server.ts'], - }, { files: ['packages/apps-engine/**/*.ts'], languageOptions: { @@ -457,14 +397,6 @@ export default [ '@typescript-eslint/no-empty-interface': 'off', }, }, - { - files: ['packages/core-typings/**/*.spec.js', 'packages/core-typings/**/*.spec.jsx'], - languageOptions: { - globals: { - ...globals.jest, - }, - }, - }, { files: ['packages/ddp-client/**/*'], rules: { @@ -490,20 +422,6 @@ export default [ ], }, }, - { - files: ['packages/favicon/**/*'], - rules: { - '@typescript-eslint/explicit-function-return-type': 'off', - }, - }, - { - files: ['packages/instance-status/**/*.spec.js', 'packages/instance-status/**/*.spec.jsx'], - languageOptions: { - globals: { - ...globals.jest, - }, - }, - }, { ignores: ['packages/jest-presets/client/**', 'packages/jest-presets/server/**'], }, @@ -611,28 +529,6 @@ export default [ ], }, }, - { - files: ['packages/password-policies/**/*'], - plugins: { - jest: jestPlugin, - }, - languageOptions: { - globals: { - ...globals.jest, - }, - }, - }, - { - files: ['packages/release-changelog/**/*'], - plugins: { - jest: jestPlugin, - }, - languageOptions: { - globals: { - ...globals.jest, - }, - }, - }, { ignores: ['packages/storybook-config/*.d.ts', 'packages/storybook-config/*.js'], }, @@ -745,4 +641,11 @@ export default [ 'storybook/no-renderer-packages': 'off', }, }, + // FIXME + { + files: ['ee/packages/federation-matrix/src/api/.well-known/server.ts'], + rules: { + 'import/order': 'warn', + }, + }, ]; diff --git a/package.json b/package.json index 294a4cc130657..9718c07cbb810 100644 --- a/package.json +++ b/package.json @@ -68,9 +68,7 @@ "@types/js-yaml": "^4.0.9", "@types/node": "~22.16.5", "eslint": "~9.39.3", - "eslint-plugin-no-floating-promise": "~2.0.0", "eslint-plugin-react-refresh": "~0.5.2", - "eslint-plugin-testing-library": "~7.16.0", "eslint-plugin-you-dont-need-lodash-underscore": "~6.14.0", "ts-node": "^10.9.2", "turbo": "~2.8.11", diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index ba78416be2241..c7ee745e401f0 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -2,11 +2,13 @@ import eslint from '@eslint/js'; import { defineConfig } from 'eslint/config'; import antiTrojanSourcePlugin from 'eslint-plugin-anti-trojan-source'; import importPlugin from 'eslint-plugin-import'; +import jestPlugin from 'eslint-plugin-jest'; import jsxA11yPlugin from 'eslint-plugin-jsx-a11y'; import prettierPluginRecommended from 'eslint-plugin-prettier/recommended'; import reactPlugin from 'eslint-plugin-react'; import reactHooksPlugin from 'eslint-plugin-react-hooks'; import storybookPlugin from 'eslint-plugin-storybook'; +import testingLibraryPlugin from 'eslint-plugin-testing-library'; import globals from 'globals'; import tseslint from 'typescript-eslint'; @@ -23,6 +25,13 @@ export default defineConfig( }, eslint.configs.recommended, tseslint.configs.recommendedTypeChecked, + { + languageOptions: { + parserOptions: { + projectService: true, + }, + }, + }, importPlugin.flatConfigs.recommended, importPlugin.flatConfigs.typescript, jsxA11yPlugin.flatConfigs.recommended, @@ -76,15 +85,40 @@ export default defineConfig( 'react-hooks/use-memo': 'off', }, }, - ...storybookPlugin.configs['flat/recommended'], { - name: 'rocket.chat/storybook', - files: ['**/*.stories.@(ts|tsx|mts|cts|js|jsx|mjs|cjs)'], + files: ['**/*.@(spec|test).@(ts|tsx|js|jsx|mjs|cjs)'], + ...jestPlugin.configs['flat/recommended'], + ...testingLibraryPlugin.configs['flat/react'], + plugins: { + ...jestPlugin.configs['flat/recommended'].plugins, + ...testingLibraryPlugin.configs['flat/react'].plugins, + }, rules: { - 'react/display-name': 'off', - 'react/no-multi-comp': 'off', + ...jestPlugin.configs['flat/recommended'].rules, + ...testingLibraryPlugin.configs['flat/react'].rules, + 'jest/no-conditional-expect': 'warn', + 'jest/no-done-callback': 'warn', + 'jest/no-export': 'warn', + 'jest/no-identical-title': 'warn', + 'jest/no-standalone-expect': 'warn', + 'jest/no-test-prefixes': 'warn', + 'jest/valid-describe-callback': 'warn', + 'jest/valid-expect-in-promise': 'warn', + 'jest/valid-expect': 'warn', + 'jest/valid-title': 'warn', + 'testing-library/no-await-sync-events': 'warn', + 'testing-library/no-container': 'warn', + 'testing-library/no-manual-cleanup': 'warn', + 'testing-library/no-node-access': 'warn', + 'testing-library/no-render-in-lifecycle': 'warn', + 'testing-library/prefer-explicit-assert': 'warn', + 'testing-library/prefer-find-by': 'warn', + 'testing-library/prefer-screen-queries': 'warn', + 'testing-library/prefer-user-event': 'warn', + 'testing-library/render-result-naming-convention': 'warn', }, }, + ...storybookPlugin.configs['flat/recommended'], { name: 'rocket.chat/anti-trojan', plugins: { @@ -502,11 +536,6 @@ export default defineConfig( '**/rollup.config.ts', '**/rollup.config.js', ], - languageOptions: { - parserOptions: { - project: true, - }, - }, rules: { '@typescript-eslint/no-misused-promises': [ 'error', @@ -527,7 +556,8 @@ export default defineConfig( }, }, { - files: ['**/*.spec.@(ts|tsx|js|jsx|mjs|cjs)'], + name: 'rocket.chat/react-testing', + files: ['**/*.stories.@(ts|tsx|mts|cts|js|jsx|mjs|cjs)', '**/*.spec.@(ts|tsx|js|jsx|mjs|cjs)'], rules: { 'react/display-name': 'off', 'react/no-multi-comp': 'off', diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index fae701b4c6b8c..c7adb4c32642c 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -31,6 +31,7 @@ "eslint-plugin-react": "~7.37.5", "eslint-plugin-react-hooks": "~7.0.1", "eslint-plugin-storybook": "~10.2.12", + "eslint-plugin-testing-library": "~7.16.0", "globals": "~17.3.0", "prettier": "~3.3.3", "typescript-eslint": "~8.56.1" diff --git a/yarn.lock b/yarn.lock index a95e7d980327f..88f1024df3206 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8443,6 +8443,7 @@ __metadata: eslint-plugin-react: "npm:~7.37.5" eslint-plugin-react-hooks: "npm:~7.0.1" eslint-plugin-storybook: "npm:~10.2.12" + eslint-plugin-testing-library: "npm:~7.16.0" globals: "npm:~17.3.0" prettier: "npm:~3.3.3" typescript: "npm:~5.9.3" @@ -20609,15 +20610,6 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-no-floating-promise@npm:~2.0.0": - version: 2.0.0 - resolution: "eslint-plugin-no-floating-promise@npm:2.0.0" - dependencies: - requireindex: "npm:1.2.0" - checksum: 10/4f56c5acfc7ba3189b6a5428cdc97aa1004f7ba69784949d193a9a88ef9766e2b2070463eedbb26f17e3852ea7362c4205eaa026ea2e0af5471a9daa1469096e - languageName: node - linkType: hard - "eslint-plugin-prettier@npm:~5.5.5": version: 5.5.5 resolution: "eslint-plugin-prettier@npm:5.5.5" @@ -32136,13 +32128,6 @@ __metadata: languageName: node linkType: hard -"requireindex@npm:1.2.0": - version: 1.2.0 - resolution: "requireindex@npm:1.2.0" - checksum: 10/266d1cb31f6cbc4b6cf2e898f5bbc45581f7919bcf61bba5c45d0adb69b722b9ff5a13727be3350cde4520d7cd37f39df45d58a29854baaa4552cd6b05ae4a1a - languageName: node - linkType: hard - "requires-port@npm:^1.0.0": version: 1.0.0 resolution: "requires-port@npm:1.0.0" @@ -32429,9 +32414,7 @@ __metadata: "@types/node": "npm:~22.16.5" "@types/stream-buffers": "npm:^3.0.8" eslint: "npm:~9.39.3" - eslint-plugin-no-floating-promise: "npm:~2.0.0" eslint-plugin-react-refresh: "npm:~0.5.2" - eslint-plugin-testing-library: "npm:~7.16.0" eslint-plugin-you-dont-need-lodash-underscore: "npm:~6.14.0" node-gyp: "npm:^10.2.0" ts-node: "npm:^10.9.2" From 8f73be4a18ff74d34dbead3f638727909f78b0bf Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Thu, 26 Feb 2026 11:46:48 -0300 Subject: [PATCH 21/25] chore(eslint): ignore workspaces under `scripts/` (for now?) --- eslint.config.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index ff5361f787304..ae05561ebc735 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -532,6 +532,9 @@ export default [ { ignores: ['packages/storybook-config/*.d.ts', 'packages/storybook-config/*.js'], }, + { + ignores: ['scripts/**'], + }, { files: [ 'apps/meteor/client/**/*.ts', From 948dfe5e98795b886c52db6e369a0c90112dbdf1 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Thu, 26 Feb 2026 11:55:58 -0300 Subject: [PATCH 22/25] chore(eslint): condense globs --- eslint.config.mjs | 108 ++++++++++++++-------------------------------- 1 file changed, 32 insertions(+), 76 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index ae05561ebc735..7c9f46d80d2a6 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -140,7 +140,7 @@ export default [ }, }, { - files: ['apps/meteor/**/*.ts', 'apps/meteor/**/*.tsx'], + files: ['apps/meteor/**/*.@(ts|tsx)'], ignores: ['apps/meteor/.scripts/*.ts', 'apps/meteor/**/*.d.ts'], rules: { '@typescript-eslint/naming-convention': [ @@ -208,7 +208,7 @@ export default [ }, }, { - files: ['apps/meteor/tests/end-to-end/**/*.spec.ts', 'apps/meteor/tests/unit/**/*.spec.ts'], + files: ['apps/meteor/tests/@(end-to-end|unit)/**/*.spec.ts'], rules: { 'jest/expect-expect': 'off', 'jest/no-conditional-expect': 'off', @@ -224,22 +224,19 @@ export default [ }, }, { - files: ['apps/meteor/tests/end-to-end/**/*.ts', 'apps/meteor/tests/unit/**/*.ts'], + files: ['apps/meteor/tests/@(end-to-end|unit)/**/*.ts'], rules: { '@typescript-eslint/no-unused-expressions': 'off', }, }, { files: [ - 'apps/meteor/client/**/*.ts', - 'apps/meteor/client/**/*.tsx', + 'apps/meteor/client/**/*.@(ts|tsx)', 'apps/meteor/server/**/*.ts', 'apps/meteor/ee/app/**/*.ts', - 'apps/meteor/ee/client/**/*.ts', - 'apps/meteor/ee/client/**/*.tsx', + 'apps/meteor/ee/client/**/*.@(ts|tsx)', 'apps/meteor/ee/server/**/*.ts', - 'packages/ui-contexts/**/*.ts', - 'packages/ui-contexts/**/*.tsx', + 'packages/ui-contexts/**/*.@(ts|tsx)', 'packages/i18n/src/scripts/common.mts', ], rules: { @@ -316,13 +313,8 @@ export default [ 'apps/uikit-playground/build', 'apps/uikit-playground/.storybook/jest-results.json', 'apps/uikit-playground/.DS_Store', - 'apps/uikit-playground/.env.local', - 'apps/uikit-playground/.env.development.local', - 'apps/uikit-playground/.env.test.local', - 'apps/uikit-playground/.env.production.local', - 'apps/uikit-playground/npm-debug.log*', - 'apps/uikit-playground/yarn-debug.log*', - 'apps/uikit-playground/yarn-error.log*', + 'apps/uikit-playground/.env*.local', + 'apps/uikit-playground/@(npm-debug|yarn-debug|yarn-error).log*', ], }, { @@ -380,16 +372,7 @@ export default [ }, }, { - ignores: [ - 'packages/apps-engine/**/client/**/*', - 'packages/apps-engine/**/definition/**/*', - 'packages/apps-engine/**/docs/**/*', - 'packages/apps-engine/**/server/**/*', - 'packages/apps-engine/**/lib/**/*', - 'packages/apps-engine/**/deno-runtime/**/*', - 'packages/apps-engine/**/.deno/**/*', - 'packages/apps-engine/**/.deno-cache/**/*', - ], + ignores: ['packages/apps-engine/**/@(client|definition|docs|server|lib|deno-runtime|.deno|.deno-cache)/**'], }, { files: ['packages/core-typings/**/*'], @@ -423,7 +406,7 @@ export default [ }, }, { - ignores: ['packages/jest-presets/client/**', 'packages/jest-presets/server/**'], + ignores: ['packages/jest-presets/@(client|server)/**'], }, { files: ['packages/livechat/**/*'], @@ -505,7 +488,7 @@ export default [ }, }, { - files: ['packages/livechat/**/*.ts', 'packages/livechat/**/*.tsx'], + files: ['packages/livechat/**/*.@(ts|tsx)'], rules: { '@typescript-eslint/naming-convention': [ 'error', @@ -530,33 +513,25 @@ export default [ }, }, { - ignores: ['packages/storybook-config/*.d.ts', 'packages/storybook-config/*.js'], + ignores: ['packages/node-poplib/**/*'], }, { - ignores: ['scripts/**'], + ignores: ['packages/storybook-config/*.@(d.ts|js)', 'scripts/**'], }, { files: [ - 'apps/meteor/client/**/*.ts', - 'apps/meteor/client/**/*.tsx', + 'apps/meteor/client/**/*.@(ts|tsx)', 'apps/meteor/app/**/*.ts', 'apps/meteor/ee/app/**/*.ts', - 'apps/meteor/ee/client/**/*.ts', - 'apps/meteor/ee/client/**/*.tsx', + 'apps/meteor/ee/client/**/*.@(ts|tsx)', 'apps/meteor/ee/server/**/*.ts', 'apps/meteor/server/**/*.ts', - 'packages/fuselage-ui-kit/**/*.ts', - 'packages/fuselage-ui-kit/**/*.tsx', - 'packages/livechat/**/*.ts', - 'packages/livechat/**/*.tsx', - 'packages/ui-client/**/*.ts', - 'packages/ui-client/**/*.tsx', - 'packages/ui-contexts/**/*.ts', - 'packages/ui-contexts/**/*.tsx', - 'packages/ui-voip/**/*.ts', - 'packages/ui-voip/**/*.tsx', - 'packages/web-ui-registration/**/*.ts', - 'packages/web-ui-registration/**/*.tsx', + 'packages/fuselage-ui-kit/**/*.@(ts|tsx)', + 'packages/livechat/**/*.@(ts|tsx)', + 'packages/ui-client/**/*.@(ts|tsx)', + 'packages/ui-contexts/**/*.@(ts|tsx)', + 'packages/ui-voip/**/*.@(ts|tsx)', + 'packages/web-ui-registration/**/*.@(ts|tsx)', ], rules: { '@typescript-eslint/no-misused-promises': 'warn', @@ -572,7 +547,7 @@ export default [ }, }, { - files: ['packages/sha256/**/*', 'packages/models/**/*'], + files: ['packages/@(sha256|models)/**/*'], rules: { 'new-cap': [ 'error', @@ -584,7 +559,7 @@ export default [ }, // FIXME: React 19 useEffectEvent conflicts with fuselage-hooks { - files: ['**/*.ts', '**/*.tsx'], + files: ['**/*.@(ts|tsx)'], rules: { 'react-hooks/exhaustive-deps': 'warn', 'react-hooks/rules-of-hooks': 'warn', @@ -595,42 +570,23 @@ export default [ files: [ '**/*.d.ts', '**/__tests__/**', - '**/*.spec.ts', - '**/*.spec.tsx', - '**/*.test.ts', - '**/*.test.tsx', + '**/*.@(spec|test).@(ts|tsx)', '**/tests/**', '**/.storybook/**', - '**/jest.config.ts', - '**/jest.config.js', - '**/jest.config.*.ts', - '**/jest.config.*.js', - '**/webpack.config.ts', - '**/webpack.config.js', - '**/vite.config.ts', - '**/vite.config.js', - '**/rollup.config.ts', - '**/rollup.config.js', + '**/jest.config.@(ts|js)', + '**/jest.config.*.@(ts|js)', + '**/webpack.config.@(ts|js)', + '**/vite.config.@(ts|js)', + '**/rollup.config.@(ts|js)', 'apps/meteor/.storybook/logo.svg.d.ts', 'packages/fuselage-ui-kit/.storybook/logo.svg.d.ts', 'packages/storybook-config/src/logo.svg.d.ts', - 'ee/packages/*/jest.config.ts', - 'packages/*/jest.config.ts', + '@(ee/packages|packages)/*/jest.config.ts', - 'ee/packages/pdf-worker/.storybook/*.ts', - 'ee/packages/pdf-worker/.storybook/*.tsx', - 'packages/gazzodown/.storybook/*.ts', - 'packages/gazzodown/.storybook/*.tsx', - 'packages/ui-client/.storybook/*.ts', - 'packages/ui-client/.storybook/*.tsx', - 'packages/ui-composer/.storybook/*.ts', - 'packages/ui-composer/.storybook/*.tsx', - 'packages/ui-voip/.storybook/*.ts', - 'packages/ui-voip/.storybook/*.tsx', - 'packages/web-ui-registration/.storybook/*.ts', - 'packages/web-ui-registration/.storybook/*.tsx', + 'ee/packages/pdf-worker/.storybook/*.@(ts|tsx)', + 'packages/@(gazzodown|ui-client|ui-composer|ui-voip|web-ui-registration)/.storybook/*.@(ts|tsx)', ], rules: { '@typescript-eslint/prefer-optional-chain': 'off', From 45f4f583f9351e4eb30a8a4132f2f3fa4e4238dd Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Thu, 26 Feb 2026 14:01:30 -0300 Subject: [PATCH 23/25] chore(eslint): ignore `meteor/*` in `import/no-unresolved` --- eslint.config.mjs | 9 +++++---- packages/eslint-config/index.js | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 7c9f46d80d2a6..744081a217cbc 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -34,6 +34,9 @@ export default [ plugins: { 'you-dont-need-lodash-underscore': youDontNeedLodashUnderscorePlugin, }, + settings: { + 'import/ignore': ['meteor/.+'], + }, rules: { 'import/named': 'error', 'import/no-unresolved': [ @@ -41,6 +44,7 @@ export default [ { commonjs: true, caseSensitive: true, + ignore: ['meteor/.+'], }, ], 'react-hooks/exhaustive-deps': 'warn', @@ -513,10 +517,7 @@ export default [ }, }, { - ignores: ['packages/node-poplib/**/*'], - }, - { - ignores: ['packages/storybook-config/*.@(d.ts|js)', 'scripts/**'], + ignores: ['packages/node-poplib/**', 'packages/storybook-config/*.@(d.ts|js)', 'scripts/**', '.github/**', '.houston/**'], }, { files: [ diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index c7ee745e401f0..af35dc0d6c437 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -343,7 +343,6 @@ export default defineConfig( node: true, typescript: true, }, - 'import/ignore': ['meteor/.+'], }, rules: { 'import/no-unresolved': [ From c76978086ef768a7575a7b1c0e3309aa6b4dbcde Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Thu, 26 Feb 2026 14:41:55 -0300 Subject: [PATCH 24/25] chore(eslint): handle `getAbsolutePath` cross-platform support --- eslint.config.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 744081a217cbc..c100011518493 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,10 +1,12 @@ +import { fileURLToPath } from 'node:url'; + import rocketChatConfig from '@rocket.chat/eslint-config'; import reactRefreshPlugin from 'eslint-plugin-react-refresh'; import youDontNeedLodashUnderscorePlugin from 'eslint-plugin-you-dont-need-lodash-underscore'; import globals from 'globals'; function getAbsolutePath(path) { - return new URL(path, import.meta.url).pathname; + return fileURLToPath(new URL(path, import.meta.url)); } /** @type {import('eslint').Linter.FlatConfig[]} */ From bfbc553a0e68a987d62518e6b70727d708fcd063 Mon Sep 17 00:00:00 2001 From: Tasso Evangelista Date: Thu, 26 Feb 2026 14:57:05 -0300 Subject: [PATCH 25/25] chore: add changeset --- .changeset/little-eyes-kneel.md | 76 +++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .changeset/little-eyes-kneel.md diff --git a/.changeset/little-eyes-kneel.md b/.changeset/little-eyes-kneel.md new file mode 100644 index 0000000000000..0ae80efde92b3 --- /dev/null +++ b/.changeset/little-eyes-kneel.md @@ -0,0 +1,76 @@ +--- +'@rocket.chat/eslint-config': minor +'@rocket.chat/server-cloud-communication': patch +'@rocket.chat/omnichannel-services': patch +'@rocket.chat/omnichannel-transcript': patch +'@rocket.chat/authorization-service': patch +'@rocket.chat/federation-matrix': patch +'@rocket.chat/web-ui-registration': patch +'@rocket.chat/network-broker': patch +'@rocket.chat/password-policies': patch +'@rocket.chat/release-changelog': patch +'@rocket.chat/storybook-config': patch +'@rocket.chat/presence-service': patch +'@rocket.chat/omni-core-ee': patch +'@rocket.chat/fuselage-ui-kit': patch +'@rocket.chat/instance-status': patch +'@rocket.chat/media-signaling': patch +'@rocket.chat/patch-injection': patch +'@rocket.chat/account-service': patch +'@rocket.chat/media-calls': patch +'@rocket.chat/message-parser': patch +'@rocket.chat/mock-providers': patch +'@rocket.chat/release-action': patch +'@rocket.chat/pdf-worker': patch +'@rocket.chat/ui-theming': patch +'@rocket.chat/account-utils': patch +'@rocket.chat/core-services': patch +'@rocket.chat/message-types': patch +'@rocket.chat/model-typings': patch +'@rocket.chat/mongo-adapter': patch +'@rocket.chat/ui-video-conf': patch +'@rocket.chat/uikit-playground': patch +'@rocket.chat/cas-validate': patch +'@rocket.chat/core-typings': patch +'@rocket.chat/jest-presets': patch +'@rocket.chat/peggy-loader': patch +'@rocket.chat/rest-typings': patch +'@rocket.chat/server-fetch': patch +'@rocket.chat/ddp-streamer': patch +'@rocket.chat/queue-worker': patch +'@rocket.chat/presence': patch +'@rocket.chat/apps-engine': patch +'@rocket.chat/desktop-api': patch +'@rocket.chat/http-router': patch +'@rocket.chat/poplib': patch +'@rocket.chat/ui-composer': patch +'@rocket.chat/ui-contexts': patch +'@rocket.chat/license': patch +'@rocket.chat/api-client': patch +'@rocket.chat/ddp-client': patch +'@rocket.chat/log-format': patch +'@rocket.chat/gazzodown': patch +'@rocket.chat/omni-core': patch +'@rocket.chat/ui-avatar': patch +'@rocket.chat/ui-client': patch +'@rocket.chat/livechat': patch +'@rocket.chat/abac': patch +'@rocket.chat/favicon': patch +'@rocket.chat/tracing': patch +'@rocket.chat/ui-voip': patch +'@rocket.chat/agenda': patch +'@rocket.chat/base64': patch +'@rocket.chat/logger': patch +'@rocket.chat/models': patch +'@rocket.chat/random': patch +'@rocket.chat/sha256': patch +'@rocket.chat/ui-kit': patch +'@rocket.chat/tools': patch +'@rocket.chat/apps': patch +'@rocket.chat/cron': patch +'@rocket.chat/i18n': patch +'@rocket.chat/jwt': patch +'@rocket.chat/meteor': patch +--- + +chore(eslint): Upgrades ESLint and its configuration