From 526d0daf59bf8a2db4bcc4fe61de82d85f2fd212 Mon Sep 17 00:00:00 2001 From: CDeltakai Date: Thu, 29 May 2025 15:24:25 +1000 Subject: [PATCH] chore: update js-lint to 0.2.11 and delete .prettierrc since its no longer needed --- .prettierrc | 7 ------- README.md | 22 ++++++++++++++++------ package-lock.json | 8 ++++---- package.json | 2 +- 4 files changed, 21 insertions(+), 18 deletions(-) delete mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index fa9699b..0000000 --- a/.prettierrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "semi": true, - "trailingComma": "all", - "singleQuote": true, - "printWidth": 80, - "tabWidth": 2 -} diff --git a/README.md b/README.md index 613ee60..b7f636e 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,14 @@ class Event5 extends AbstractEvent { } ``` -When redispatching an event, you must call `event.clone()`. The same instance cannot be redispatched. When the event is cloned, all constructor parameters are shallow-copied. +When redispatching an event, you must call `event.clone()`. The same instance +cannot be redispatched. When the event is cloned, all constructor parameters are +shallow-copied. ### `Evented` -We combine `Evented` with `AbstractEvent` to gain type-safety and convenience of the wildcard any handler. +We combine `Evented` with `AbstractEvent` to gain type-safety and convenience of +the wildcard any handler. ```ts class EventCustom extends AbstractEvent {} @@ -62,9 +65,13 @@ x.addEventListener(EventAll.name, (e) => { }); ``` -You can use this style to handle relevant events to perform side-effects, as well as propagate upwards irrelevant events. +You can use this style to handle relevant events to perform side-effects, as +well as propagate upwards irrelevant events. -Note that some side-effects you perform may trigger an infinite loop by causing something to emit the specific event type that you are handling. In these cases you should specialise handling of those events with a `once: true` option, so that they are only handled once. +Note that some side-effects you perform may trigger an infinite loop by causing +something to emit the specific event type that you are handling. In these cases +you should specialise handling of those events with a `once: true` option, so +that they are only handled once. ```ts x.addEventListener( @@ -79,9 +86,12 @@ x.addEventListener( This will terminate the infinite loop on the first time it gets handled. -Therefore it is a good idea to always be as specific with your event types as possible. +Therefore it is a good idea to always be as specific with your event types as +possible. -Furthermore any unhandled rejections or uncaught exceptions will be redispatched as `EventError`. However if there's no listener registered for this, it will be thrown up as an uncaught exception. +Furthermore any unhandled rejections or uncaught exceptions will be redispatched +as `EventError`. However if there's no listener registered for this, it will be +thrown up as an uncaught exception. ## Installation diff --git a/package-lock.json b/package-lock.json index 9d81a35..dc9c925 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "4.0.1", "license": "Apache-2.0", "devDependencies": { - "@matrixai/lint": "^0.2.6", + "@matrixai/lint": "^0.2.11", "@swc/core": "1.3.82", "@swc/jest": "^0.2.29", "@types/jest": "^29.5.2", @@ -2118,9 +2118,9 @@ } }, "node_modules/@matrixai/lint": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/@matrixai/lint/-/lint-0.2.6.tgz", - "integrity": "sha512-Cbx6SCTAqSt7lTKkaXL7wB+KbkiXYpQ0LdV5fPcnzEfG0sCuG8dbJcwzgHT5Qn7ubG71BBLUVFjHY1EGADzT8g==", + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/@matrixai/lint/-/lint-0.2.11.tgz", + "integrity": "sha512-Q/atLaVExgQbd7b/sXCvTAIus0M+egxr6fjHFNzpUZGY3Gu+UkYQrel/440JnvZ+fK8fq9GTHewpa14H08AcRw==", "dev": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index 09780b4..ab36cbd 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "docs": "shx rm -rf ./docs && typedoc --gitRevision master --tsconfig ./tsconfig.build.json --out ./docs src" }, "devDependencies": { - "@matrixai/lint": "^0.2.6", + "@matrixai/lint": "^0.2.11", "@swc/core": "1.3.82", "@swc/jest": "^0.2.29", "@types/jest": "^29.5.2",