Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ export default [
"no-console": "off",
"vitest/no-focused-tests": "error", // Equivalent to mocha/no-exclusive-tests
"vitest/no-disabled-tests": "warn", // Equivalent to mocha/no-skipped-tests
// WebSocket constructor mocks use `this` to refer to the new instance — no alternative API
"unicorn/no-this-outside-of-class": "off",
},
},
{
Expand Down Expand Up @@ -270,6 +272,8 @@ export default [
eslintConfigPrettier,
{
// All test and test-helper files: disable no-unsafe-* rules (tests legitimately use `any` for mocking)
// Also disable no-this-outside-of-class: Mocha root hooks use `this.currentTest` as the framework
// context mechanism — there is no alternative API for accessing the current test in hook functions.
files: ["test/**/*.ts"],
rules: {
"@typescript-eslint/no-unsafe-assignment": "off",
Expand All @@ -280,6 +284,15 @@ export default [
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/unbound-method": "off",
"unicorn/no-this-outside-of-class": "off",
},
},
{
// oclif hook files: oclif calls hook functions with `this` set to the Hook.Context object,
// so `this.warn()`, `this.error()`, `this.log()` are the correct oclif-idiomatic API here.
files: ["src/hooks/**/*.ts"],
rules: {
"unicorn/no-this-outside-of-class": "off",
},
},
{
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"./dist/src/hooks/init/version-flag",
"./dist/src/hooks/init/patch-arg-names"
],
"command_not_found": "./dist/src/hooks/command_not_found/did-you-mean"
"command_not_found": "./dist/src/hooks/command-not-found/did-you-mean"
},
"hidden": [
"aliases"
Expand Down Expand Up @@ -160,10 +160,10 @@
"dotenv": "^17.4.2",
"eslint": "^10.3.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-n": "^17.24.0",
"eslint-plugin-n": "^18.0.1",
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-unicorn": "^64.0.0",
"eslint-plugin-unicorn": "^65.0.0",
"execa": "^9.6.1",
"fs-extra": "^11.3.5",
"get-port": "^7.2.0",
Expand Down
9 changes: 5 additions & 4 deletions packages/react-web-cli/src/AblyCliTerminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1742,10 +1742,11 @@ const AblyCliTerminalInner = (
updateSessionActive(false);

// Check if this was a user-initiated close
const userClosedTerminal =
event.reason === "user-closed-primary" ||
event.reason === "user-closed-secondary" ||
event.reason === "manual-reconnect";
const userClosedTerminal = [
"user-closed-primary",
"user-closed-secondary",
"manual-reconnect",
].includes(event.reason);

if (userClosedTerminal) {
debugLog(
Expand Down
Loading
Loading