Skip to content

Commit

Permalink
style: lint javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Oct 8, 2024
1 parent 5abe46c commit 25a68aa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/endpoint-micropub/lib/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const deleteEntries = (object, deletions) => {

for (const value of valuesToDelete) {
const index = values.indexOf(value);
if (index > -1) {
if (index !== -1) {
values.splice(index, 1);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/components/character-count/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const CharacterCountComponent = class extends HTMLElement {
* @access private
*/
#handleFocus() {
this.valueChecker = window.setInterval(() => {
this.valueChecker = globalThis.setInterval(() => {
if (
!this.lastInputTimestamp ||
Date.now() - 500 >= this.lastInputTimestamp
Expand All @@ -93,7 +93,7 @@ export const CharacterCountComponent = class extends HTMLElement {
*/
#handleBlur() {
if (this.valueChecker) {
window.clearInterval(this.valueChecker);
globalThis.clearInterval(this.valueChecker);
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/components/share-preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export const SharePreviewComponent = class extends HTMLElement {
if (this.$form) {
const { scrollWidth, scrollHeight } = this.$form;

const chromeWidth = window.outerWidth - window.innerWidth;
const chromeHeight = window.outerHeight - window.innerHeight;
const chromeWidth = globalThis.outerWidth - window.innerWidth;
const chromeHeight = globalThis.outerHeight - window.innerHeight;

const width = scrollWidth + chromeWidth;
const height = scrollHeight + chromeHeight;
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/lib/serviceworker.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ self.addEventListener("install", async (event) => {
(async () => {
await updateAssetCache();
await cacheClients();
self.skipWaiting();
globalThis.skipWaiting();
})(),
);
});
Expand Down

0 comments on commit 25a68aa

Please sign in to comment.