diff --git a/packages/api/README.md b/packages/api/README.md index 4d1cfb5f35f..c5e66d70862 100644 --- a/packages/api/README.md +++ b/packages/api/README.md @@ -197,7 +197,7 @@ const profileMod = moderateProfile(profileView, getOpts()) // = if (postMod.content.filter) { - // dont render in feeds or similar + // don't render in feeds or similar // in contexts where this is disruptive (eg threads) you should ignore this and instead check blur } if (postMod.content.blur) { @@ -315,7 +315,7 @@ import { BskyAgent } from '@atproto/api' const agent = new BskyAgent({ service: 'https://example.com' }) -// provide a custom fetch implementation (shouldnt be needed in node or the browser) +// provide a custom fetch implementation (shouldn't be needed in node or the browser) import { AtpAgentFetchHeaders, AtpAgentFetchHandlerResponse, diff --git a/packages/api/docs/moderation.md b/packages/api/docs/moderation.md index 23446f11b54..0c722dffcb1 100644 --- a/packages/api/docs/moderation.md +++ b/packages/api/docs/moderation.md @@ -85,7 +85,7 @@ import { moderatePost } from '@atproto/api' const postMod = moderatePost(postView, getOpts()) if (postMod.content.filter) { - // dont render in feeds or similar + // don't render in feeds or similar // in contexts where this is disruptive (eg threads) you should ignore this and instead check blur } if (postMod.content.blur) { @@ -123,8 +123,8 @@ import { moderateProfile } from '@atproto/api' const profileMod = moderateProfile(profileView, getOpts()) -if (profileMod.acount.filter) { - // dont render in discovery +if (profileMod.account.filter) { + // don't render in discovery } if (profileMod.account.blur) { // render the whole account behind a cover (use profileMod.account.cause to explain) diff --git a/packages/api/src/moderation/index.ts b/packages/api/src/moderation/index.ts index a5f62ab33e4..4ca38c1fc60 100644 --- a/packages/api/src/moderation/index.ts +++ b/packages/api/src/moderation/index.ts @@ -56,7 +56,7 @@ export function moderateProfile( account.blur = true } - // dont give profile.filter because that is meaningless + // don't give profile.filter because that is meaningless profile.filter = false // downgrade based on authorship @@ -67,7 +67,7 @@ export function moderateProfile( downgradeDecision(profile, 'alert') } - // derive avatar blurring from account & profile, but override for mutes because that shouldnt blur + // derive avatar blurring from account & profile, but override for mutes because that shouldn't blur let avatarBlur = false let avatarNoOverride = false if ((account.blur || account.blurMedia) && account.cause?.type !== 'muted') { @@ -78,7 +78,7 @@ export function moderateProfile( avatarNoOverride = account.noOverride || profile.noOverride } - // dont blur the account for blocking & muting + // don't blur the account for blocking & muting if ( account.cause?.type === 'blocking' || account.cause?.type === 'blocked-by' || @@ -188,7 +188,7 @@ export function moderatePost( // derive embed blurring from the quoted post and the quoted post author's account const mergedQuote = takeHighestPriorityDecision(quote, quotedAccount) - // derive avatar blurring from account & profile, but override for mutes because that shouldnt blur + // derive avatar blurring from account & profile, but override for mutes because that shouldn't blur let blurAvatar = false if ((account.blur || account.blurMedia) && account.cause?.type !== 'muted') { blurAvatar = true diff --git a/packages/api/tests/moderation.test.ts b/packages/api/tests/moderation.test.ts index dba625b7cfe..d9dd98086d8 100644 --- a/packages/api/tests/moderation.test.ts +++ b/packages/api/tests/moderation.test.ts @@ -300,7 +300,7 @@ describe('Moderation', () => { }) /* - TODO enable when 3P labeler support is addded + TODO enable when 3P labeler support is added it('Ignores labels from unknown labelers', () => { const res1 = moderateProfile( mock.profileViewBasic({ diff --git a/packages/bsky/src/db/migrations/20230929T192920807Z-record-cursor-indexes.ts b/packages/bsky/src/db/migrations/20230929T192920807Z-record-cursor-indexes.ts index 0b587fe0eaf..8e7a73e78ed 100644 --- a/packages/bsky/src/db/migrations/20230929T192920807Z-record-cursor-indexes.ts +++ b/packages/bsky/src/db/migrations/20230929T192920807Z-record-cursor-indexes.ts @@ -17,7 +17,7 @@ export async function up(db: Kysely): Promise { .columns(['subjectDid', 'sortAt', 'cid']) .execute() - // drop old indices that are superceded by these + // drop old indices that are superseded by these await db.schema.dropIndex('like_creator_idx').execute() await db.schema.dropIndex('follow_subjectdid_idx').execute() } diff --git a/packages/bsky/src/services/util/notification.ts b/packages/bsky/src/services/util/notification.ts index 811e6e41713..e8eb618cff6 100644 --- a/packages/bsky/src/services/util/notification.ts +++ b/packages/bsky/src/services/util/notification.ts @@ -42,7 +42,7 @@ export const tidyNotifications = async (db: PrimaryDatabase, did: string) => { // take most recent of read/unread cutoffs const cutoffAt = greatest(readCutoffAt, unreadCutoffAt) if (cutoffAt) { - // skip delete if it wont catch any notifications + // skip delete if it won't catch any notifications const earliestAt = least(readStats?.earliestAt, unreadStats?.earliestAt) if (earliestAt && earliestAt < cutoffAt.toISOString()) { await db.db diff --git a/packages/dev-infra/README.md b/packages/dev-infra/README.md index e4864d7a8ce..4b01d6af42b 100644 --- a/packages/dev-infra/README.md +++ b/packages/dev-infra/README.md @@ -32,7 +32,7 @@ Going to remove pg-db_test-1 ### `with-redis-and-test-db.sh` -This script is similar to `with-test-db.sh`, but in addition to an ephemeral/single-use postgres database it also provies a single-use redis instance. When the script starts, Dockerized postgres and redis containers start-up, and when the script completes the containers are removed. +This script is similar to `with-test-db.sh`, but in addition to an ephemeral/single-use postgres database it also provides a single-use redis instance. When the script starts, Dockerized postgres and redis containers start-up, and when the script completes the containers are removed. The environment variables `DB_POSTGRES_URL` and `REDIS_HOST` will be set with a connection strings that can be used to connect to postgres and redis respectively. diff --git a/packages/lexicon/src/lexicons.ts b/packages/lexicon/src/lexicons.ts index 1ae36377cd5..dfd84be9bcc 100644 --- a/packages/lexicon/src/lexicons.ts +++ b/packages/lexicon/src/lexicons.ts @@ -122,7 +122,7 @@ export class Lexicons { } else if (def.type === 'object') { return ComplexValidators.object(this, 'Object', def, value) } else { - // shouldnt happen + // shouldn't happen throw new InvalidLexiconError('Definition must be a record or object') } } diff --git a/packages/syntax/src/datetime.ts b/packages/syntax/src/datetime.ts index 96643271c8d..0e81ec7f1f8 100644 --- a/packages/syntax/src/datetime.ts +++ b/packages/syntax/src/datetime.ts @@ -46,9 +46,9 @@ export const isValidDatetime = (dtStr: string): boolean => { return true } -/* Takes a flexible datetime sting and normalizes representation. +/* Takes a flexible datetime string and normalizes representation. * - * This function will work with any valid atproto datetime (eg, anything which isValidDatetime() is true for). It *additinally* is more flexible about accepting datetimes that don't comply to RFC 3339, or are missing timezone information, and normalizing them to a valid datetime. + * This function will work with any valid atproto datetime (eg, anything which isValidDatetime() is true for). It *additionally* is more flexible about accepting datetimes that don't comply to RFC 3339, or are missing timezone information, and normalizing them to a valid datetime. * * One use-case is a consistent, sortable string. Another is to work with older invalid createdAt datetimes. *