diff --git a/.markdownlint.yaml b/.markdownlint.yaml index 8ec60837e0..9e29f1ed59 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -12,7 +12,7 @@ MD004: style: dash # MD013 - Line length -# We do not want to artificially limit line lengh in a language like markdown because of the nature of the language's handling of whitespace. Line wrapping is just a fact of life in markdown and trying to impose the conventions of other languages on markdown is an impedance mismatch that leads to people thinking that whitespace in markdown is more representative of the rendered HTML than it really is. +# We do not want to artificially limit line length in a language like markdown because of the nature of the language's handling of whitespace. Line wrapping is just a fact of life in markdown and trying to impose the conventions of other languages on markdown is an impedance mismatch that leads to people thinking that whitespace in markdown is more representative of the rendered HTML than it really is. MD013: false # MD033 - Inline HTML diff --git a/packages/insomnia-inso/src/types.ts b/packages/insomnia-inso/src/types.ts index b0ca41afc0..ffc98b4fd3 100644 --- a/packages/insomnia-inso/src/types.ts +++ b/packages/insomnia-inso/src/types.ts @@ -1,5 +1,5 @@ /** TypeScript version of "TODO" but for types */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a utility type explicitly inteded for the sake of typescript conversions +// eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a utility type explicitly intended for the sake of typescript conversions export type UNKNOWN = any; /** TypeScript version of "TODO" but for Objects */ diff --git a/packages/insomnia/bin/yarn-standalone.js b/packages/insomnia/bin/yarn-standalone.js index 0ecfb34cdd..cf5dcca678 100644 --- a/packages/insomnia/bin/yarn-standalone.js +++ b/packages/insomnia/bin/yarn-standalone.js @@ -4189,7 +4189,7 @@ function outside(version, range, hilo, loose) { throw new TypeError('Must provide a hilo val of "<" or ">"'); } - // If it satisifes the range it is not outside + // If it satisfies the range it is not outside if (satisfies(version, range, loose)) { return false; } @@ -40618,7 +40618,7 @@ function Certificate(opts) { assert.object(opts.signatures, 'options.signatures'); assert.buffer(opts.serial, 'options.serial'); assert.date(opts.validFrom, 'options.validFrom'); - assert.date(opts.validUntil, 'optons.validUntil'); + assert.date(opts.validUntil, 'options.validUntil'); assert.optionalArrayOfString(opts.purposes, 'options.purposes'); @@ -76945,7 +76945,7 @@ function readBitField(bits, bitIndex) { /* * `setBits` is an array of strings, containing the names for each bit that - * sould be set to 1. `bitIndex` is same as in `readBitField()`. + * should be set to 1. `bitIndex` is same as in `readBitField()`. * * Returns a Buffer, ready to be written out with `BerWriter#writeString()`. */ @@ -78512,7 +78512,7 @@ function addSchema(schema, key, _skipValidation, _meta) { /** * Add schema that will be used to validate other schemas - * options in META_IGNORE_OPTIONS are alway set to false + * options in META_IGNORE_OPTIONS are always set to false * @this Ajv * @param {Object} schema schema object * @param {String} key optional schema key @@ -116949,7 +116949,7 @@ var emojiNameRegex = /:([a-zA-Z0-9_\-\+]+):/g; /** * regex to trim whitespace - * use instead of String.prototype.trim() for IE8 supprt + * use instead of String.prototype.trim() for IE8 support */ var trimSpaceRegex = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; @@ -120653,7 +120653,7 @@ HarWrapper.prototype.request = function (options) { var self = this; // make call to true request module return this.requestModule(options, function (err, incomingMessage, response) { - // create new har entry with reponse timings + // create new har entry with response timings if (!err) { self.entries.push(self.buildHarEntry(incomingMessage)); } @@ -132468,11 +132468,11 @@ var anyCorrection = function (identifier, check) { } module.exports = function (identifier) { - var validArugment = ( + var validArgument = ( typeof identifier === 'string' && identifier.trim().length !== 0 ) - if (!validArugment) { + if (!validArgument) { throw Error('Invalid argument. Expected non-empty string.') } identifier = identifier.replace(/\+$/, '').trim() @@ -136201,4 +136201,4 @@ module.exports = require("dns"); module.exports = require("domain"); /***/ }) -/******/ ]); \ No newline at end of file +/******/ ]); diff --git a/packages/insomnia/src/common/__tests__/validate-insomnia-config.test.ts b/packages/insomnia/src/common/__tests__/validate-insomnia-config.test.ts index c03065c6f8..a83ed47149 100644 --- a/packages/insomnia/src/common/__tests__/validate-insomnia-config.test.ts +++ b/packages/insomnia/src/common/__tests__/validate-insomnia-config.test.ts @@ -68,7 +68,7 @@ describe('validateInsomniaConfig', () => { const result = validateInsomniaConfig(); // Assert - expect(result.error?.title).toBe('An unexpected error occured while parsing Insomnia Config'); + expect(result.error?.title).toBe('An unexpected error occurred while parsing Insomnia Config'); expect(result.error?.message).toMatchSnapshot(); }); diff --git a/packages/insomnia/src/common/hotkeys.ts b/packages/insomnia/src/common/hotkeys.ts index f026064091..0f4d7fb3ed 100644 --- a/packages/insomnia/src/common/hotkeys.ts +++ b/packages/insomnia/src/common/hotkeys.ts @@ -274,12 +274,12 @@ export function constructKeyCombinationDisplay( }; if (isMac()) { - // Note: on Mac the cannonical order is Control, Option (i.e. Alt), Shift, Command (i.e. Meta) + // Note: on Mac the canonical order is Control, Option (i.e. Alt), Shift, Command (i.e. Meta) // see: https://developer.apple.com/design/human-interface-guidelines/macos/user-interaction/keyboard addModifierKeys(['ctrl', 'alt', 'shift', 'meta']); } else { // Note: on Windows the observed oreder (as in, if you just try to make a shortcut with all modifiers) is Windows (i.e. Super/Meta), Ctrl, Alt, Shift. - // No such standard really exists, but at least on Ubunut it follows the Windows ordering. + // No such standard really exists, but at least on Ubuntu it follows the Windows ordering. addModifierKeys(['meta', 'ctrl', 'alt', 'shift']); } diff --git a/packages/insomnia/src/common/validate-insomnia-config.ts b/packages/insomnia/src/common/validate-insomnia-config.ts index af3e61e03f..501a352c66 100644 --- a/packages/insomnia/src/common/validate-insomnia-config.ts +++ b/packages/insomnia/src/common/validate-insomnia-config.ts @@ -46,7 +46,7 @@ export const validateInsomniaConfig = (): Result => { errors, ].join('\n'); } else { - title = 'An unexpected error occured while parsing Insomnia Config'; + title = 'An unexpected error occurred while parsing Insomnia Config'; message = JSON.stringify(configSettings); } diff --git a/packages/insomnia/src/main/network/libcurl-promise.ts b/packages/insomnia/src/main/network/libcurl-promise.ts index 6d4d8c443d..d96bee5762 100644 --- a/packages/insomnia/src/main/network/libcurl-promise.ts +++ b/packages/insomnia/src/main/network/libcurl-promise.ts @@ -371,7 +371,7 @@ export const curlRequest = (options: CurlRequestOptions) => new Promise { fs.closeSync(fd); // NOTE: multipart files are combined before sending, so this file is deleted after - // alt implemention to send one part at a time https://github.com/JCMais/node-libcurl/blob/develop/examples/04-multi.js + // alt implementation to send one part at a time https://github.com/JCMais/node-libcurl/blob/develop/examples/04-multi.js if (isMultipart && path) { fs.unlink(path, () => { }); } diff --git a/packages/insomnia/src/models/helpers/settings.ts b/packages/insomnia/src/models/helpers/settings.ts index 797de4c443..16d3fdc5dd 100644 --- a/packages/insomnia/src/models/helpers/settings.ts +++ b/packages/insomnia/src/models/helpers/settings.ts @@ -243,7 +243,7 @@ export const getControlledStatus = (userSettings: Settings) => (setting: keyof S if (isControlledByConfig(setting)) { - // note that the raw config settings are being passed here (rathern than `settings` alone), because we must verify that the controller does not itself also have a specification in the config + // note that the raw config settings are being passed here (rather than `settings` alone), because we must verify that the controller does not itself also have a specification in the config const controllerSetting = isControlledByAnotherSetting(configSettings)(setting); // TLDR; the config always wins diff --git a/packages/insomnia/src/models/index.ts b/packages/insomnia/src/models/index.ts index b4f90032b3..27ac7043ff 100644 --- a/packages/insomnia/src/models/index.ts +++ b/packages/insomnia/src/models/index.ts @@ -216,7 +216,7 @@ export async function initModel(type: string, ...sources: R } } - // @ts-expect-error -- TSCONVERSION not sure why this error is occuring + // @ts-expect-error -- TSCONVERSION not sure why this error is occurring return migratedDoc; } diff --git a/packages/insomnia/src/network/__tests__/network.test.ts b/packages/insomnia/src/network/__tests__/network.test.ts index e5c99a556c..ebd527c4a5 100644 --- a/packages/insomnia/src/network/__tests__/network.test.ts +++ b/packages/insomnia/src/network/__tests__/network.test.ts @@ -737,8 +737,8 @@ describe('sendCurlAndWriteTimeline()', () => { POSTFIELDS: 'foo=bar', POST: 1, PROXY: '', - SSL_VERIFYHOST: 0, // should disbale SSL - SSL_VERIFYPEER: 0, // should disbale SSL + SSL_VERIFYHOST: 0, // should disable SSL + SSL_VERIFYPEER: 0, // should disable SSL TIMEOUT_MS: 30000, URL: 'http://localhost/?foo%20bar=hello%26world', USERAGENT: `insomnia/${getAppVersion()}`, diff --git a/packages/insomnia/src/network/o-auth-2/get-token.ts b/packages/insomnia/src/network/o-auth-2/get-token.ts index 890a3d409d..6ab014ae99 100644 --- a/packages/insomnia/src/network/o-auth-2/get-token.ts +++ b/packages/insomnia/src/network/o-auth-2/get-token.ts @@ -26,7 +26,7 @@ export const getOAuth2Token = async ( authentication: AuthTypeOAuth2, forceRefresh = false, ): Promise => { - const oAuth2Token = await getExisingAccessTokenAndRefreshIfExpired(requestId, authentication, forceRefresh); + const oAuth2Token = await getExistingAccessTokenAndRefreshIfExpired(requestId, authentication, forceRefresh); if (oAuth2Token) { return oAuth2Token; } @@ -156,7 +156,7 @@ export const getOAuth2Token = async ( // 2. if expired, and no refresh token return null // 3. run refresh token query and return new token or null if it fails -async function getExisingAccessTokenAndRefreshIfExpired( +async function getExistingAccessTokenAndRefreshIfExpired( requestId: string, authentication: AuthTypeOAuth2, forceRefresh: boolean, diff --git a/packages/insomnia/src/tough-cookie.d.ts b/packages/insomnia/src/tough-cookie.d.ts index 09914299a3..4166239806 100644 --- a/packages/insomnia/src/tough-cookie.d.ts +++ b/packages/insomnia/src/tough-cookie.d.ts @@ -42,7 +42,7 @@ declare module 'tough-cookie' { export function domainMatch(str: string, domStr: string, canonicalize?: boolean): boolean; /** - * Given a current request/response path, gives the Path apropriate for storing in a cookie. + * Given a current request/response path, gives the Path appropriate for storing in a cookie. * This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC. * * The path parameter MUST be only the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). diff --git a/packages/insomnia/src/ui/analytics.ts b/packages/insomnia/src/ui/analytics.ts index 9317074459..27cc01c3f3 100644 --- a/packages/insomnia/src/ui/analytics.ts +++ b/packages/insomnia/src/ui/analytics.ts @@ -72,7 +72,7 @@ interface SegmentEventProperties { action: string; /** - * a description of an error that occured as a result of the user action + * a description of an error that occurred as a result of the user action * */ error?: string; } diff --git a/packages/insomnia/src/ui/components/editors/body/graph-ql-editor.tsx b/packages/insomnia/src/ui/components/editors/body/graph-ql-editor.tsx index b109bf288e..1210fc612d 100644 --- a/packages/insomnia/src/ui/components/editors/body/graph-ql-editor.tsx +++ b/packages/insomnia/src/ui/components/editors/body/graph-ql-editor.tsx @@ -284,8 +284,8 @@ export const GraphQLEditor: FC = ({ const operationNameWasChanged = !operations.includes(state.body.operationName); if (operationsChanged && operationNameWasChanged) { // preserve selection during name change or fallback to first operation - const oldPostion = state.operations.indexOf(state.body.operationName); - operationName = operations[oldPostion] || operations[0] || ''; + const oldPosition = state.operations.indexOf(state.body.operationName); + operationName = operations[oldPosition] || operations[0] || ''; } } diff --git a/packages/insomnia/src/ui/components/modals/workspace-environments-edit-modal.tsx b/packages/insomnia/src/ui/components/modals/workspace-environments-edit-modal.tsx index cc1fea099c..cc371164ba 100644 --- a/packages/insomnia/src/ui/components/modals/workspace-environments-edit-modal.tsx +++ b/packages/insomnia/src/ui/components/modals/workspace-environments-edit-modal.tsx @@ -189,8 +189,8 @@ export const WorkspaceEnvironmentsEditModal = forwardRef !isAuthorizationHeader(h)); if (!authentication) { diff --git a/packages/openapi-2-kong/src/common.ts b/packages/openapi-2-kong/src/common.ts index 10f74491f3..5d74f980dc 100644 --- a/packages/openapi-2-kong/src/common.ts +++ b/packages/openapi-2-kong/src/common.ts @@ -114,7 +114,7 @@ export function getMethodAnnotationName(method: HttpMethodType) { const protocolToPort = (protocol: unknown) => protocol === 'https:' ? '443' : protocol === 'http:' ? '80' : ''; export function parseUrl(urlStr: string) { - // fallback to locahost: https://swagger.io/docs/specification/api-host-and-base-path/#relative-urls + // fallback to localhost: https://swagger.io/docs/specification/api-host-and-base-path/#relative-urls const { port, protocol, hostname, pathname } = new URL(urlStr, 'http://localhost'); // fallback to protocol derived port const updatedPort = port || protocolToPort(protocol); diff --git a/packages/openapi-2-kong/src/declarative-config/fixtures/httpbin.yaml b/packages/openapi-2-kong/src/declarative-config/fixtures/httpbin.yaml index 71ae5cd10a..ac38ac3eab 100644 --- a/packages/openapi-2-kong/src/declarative-config/fixtures/httpbin.yaml +++ b/packages/openapi-2-kong/src/declarative-config/fixtures/httpbin.yaml @@ -420,7 +420,7 @@ paths: $ref: '#/components/responses/200BasicAuth' '404': description: >- - Unautorized (the username and password used for Basic auth do not + Unauthorized (the username and password used for Basic auth do not match those in the URL path.) /bearer: @@ -581,7 +581,7 @@ paths: value: '*' responses: '200': - description: Neigher If-Modified-Since nor If-None-Match header is provided + description: Neither If-Modified-Since nor If-None-Match header is provided '304': description: If-Modified-Since or If-None-Match header is provided diff --git a/packages/openapi-2-kong/src/declarative-config/plugins.ts b/packages/openapi-2-kong/src/declarative-config/plugins.ts index 8e23f9e935..2da22b9676 100644 --- a/packages/openapi-2-kong/src/declarative-config/plugins.ts +++ b/packages/openapi-2-kong/src/declarative-config/plugins.ts @@ -190,12 +190,12 @@ function resolveRefSchemaRecursively( return Object.entries(source) .reduce>((acc, [key, value]: Entry>) => { if (typeof value === 'string') { - // the responsiblity of this function is only really concerning `$ref`s, so if the end value is not a `$ref` we can skip it + // the responsibility of this function is only really concerning `$ref`s, so if the end value is not a `$ref` we can skip it if (key !== '$ref') { return acc; } - // the accumulator alreadly having this `$ref` value indicates that we have already visited this ref, and as such we should exit early to prevent an infinite loop since circular `$ref`s are valid in OpenAPI. + // the accumulator already having this `$ref` value indicates that we have already visited this ref, and as such we should exit early to prevent an infinite loop since circular `$ref`s are valid in OpenAPI. if (acc.has(value)) { return acc; } @@ -239,7 +239,7 @@ function resolveRefSchemaRecursively( /** * Build components reference object with nested paths - * @param mapObject Map object that keeps all the ref keys and valuese to be transformed into the final object product with nested paths + * @param mapObject Map object that keeps all the ref keys and values to be transformed into the final object product with nested paths * @returns final object product with nested paths */ function buildComponentsObjectFromMap(mapObject: Map): Record {