diff --git a/.github/workflows/label-feature-request.yml b/.github/workflows/label-feature-request.yml index fe74a7043..1be864343 100644 --- a/.github/workflows/label-feature-request.yml +++ b/.github/workflows/label-feature-request.yml @@ -16,7 +16,7 @@ jobs: issue-number: ${{ github.event.issue.number }} body: | Thank you for taking the time to created this request! - + We added it to our backlog but need to discuss design/architecture before we can accept a PR. - + Please let us know if you would be interested in sending a PR once we approve the design. diff --git a/.github/workflows/label-support.yml b/.github/workflows/label-support.yml index 8b39ec65a..eb0b05c92 100644 --- a/.github/workflows/label-support.yml +++ b/.github/workflows/label-support.yml @@ -16,9 +16,9 @@ jobs: issue-number: ${{ github.event.issue.number }} comment: | Thank you so much for filing this issue. - + We do try to keep issues in this repository focused on the vercel command line and related code. - + At this point we think that this issue is best handled by our friendly Vercel support team. They can be found by contacting them at: https://vercel.com/help#issues - + If you think closing of this is a mistake, then please re-open this issue and we'll take another look :bow: diff --git a/.github/workflows/label-triaged.yml b/.github/workflows/label-triaged.yml index 910e047c0..8f3bebe74 100644 --- a/.github/workflows/label-triaged.yml +++ b/.github/workflows/label-triaged.yml @@ -16,9 +16,9 @@ jobs: issue-number: ${{ github.event.issue.number }} body: | Thank you for taking the time to file this issue! - + We have confirmed this is a bug and added it to our backlog. - + We don't have a timeline for when this issue will be fixed, but we will accept a Pull Request with a fix and a test. - + See the [contributing guidelines](https://github.com/vercel/vercel/blob/main/.github/CONTRIBUTING.md) for more info. diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 200d26f7f..f9b0562ca 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,9 +3,9 @@ name: Publish on: push: branches: - - main + - main tags: - - '!*' + - '!*' env: TURBO_REMOTE_ONLY: 'true' @@ -17,50 +17,50 @@ jobs: name: Publish runs-on: ubuntu-latest permissions: - contents: write - id-token: write + contents: write + id-token: write steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Check Release - id: check-release - run: | - tag="$(git describe --tags --exact-match 2> /dev/null || :)" - if [[ -z "$tag" ]]; - then - echo "IS_RELEASE=false" >> $GITHUB_OUTPUT - else - echo "IS_RELEASE=true" >> $GITHUB_OUTPUT - fi - - name: Setup Go - if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }} - uses: actions/setup-go@v3 - with: - go-version: '1.13.15' - - name: Setup Node - if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }} - uses: actions/setup-node@v3 - with: - node-version: 16 - - name: install npm@9 - run: npm i -g npm@9 - - name: install pnpm@7.24.2 - run: npm i -g pnpm@7.24.2 - - name: Install - if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }} - run: pnpm install - - name: Build - if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }} - run: pnpm build - env: - GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }} - SENTRY_DSN: ${{ secrets.SENTRY_DSN }} - - name: Publish - if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }} - run: pnpm publish-from-github - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }} - GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }} - SENTRY_DSN: ${{ secrets.SENTRY_DSN }} + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Check Release + id: check-release + run: | + tag="$(git describe --tags --exact-match 2> /dev/null || :)" + if [[ -z "$tag" ]]; + then + echo "IS_RELEASE=false" >> $GITHUB_OUTPUT + else + echo "IS_RELEASE=true" >> $GITHUB_OUTPUT + fi + - name: Setup Go + if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }} + uses: actions/setup-go@v3 + with: + go-version: '1.13.15' + - name: Setup Node + if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }} + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: install npm@9 + run: npm i -g npm@9 + - name: install pnpm@7.24.2 + run: npm i -g pnpm@7.24.2 + - name: Install + if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }} + run: pnpm install + - name: Build + if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }} + run: pnpm build + env: + GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }} + SENTRY_DSN: ${{ secrets.SENTRY_DSN }} + - name: Publish + if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }} + run: pnpm publish-from-github + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }} + GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }} + SENTRY_DSN: ${{ secrets.SENTRY_DSN }} diff --git a/.github/workflows/test-integration-cli.yml b/.github/workflows/test-integration-cli.yml index af6ba42ce..5945d3117 100644 --- a/.github/workflows/test-integration-cli.yml +++ b/.github/workflows/test-integration-cli.yml @@ -3,9 +3,9 @@ name: CLI on: push: branches: - - main + - main tags: - - '!*' + - '!*' pull_request: env: diff --git a/.github/workflows/test-lint.yml b/.github/workflows/test-lint.yml index 69c35c5b3..d2256534e 100644 --- a/.github/workflows/test-lint.yml +++ b/.github/workflows/test-lint.yml @@ -3,9 +3,9 @@ name: Lint on: push: branches: - - main + - main tags: - - '!*' + - '!*' pull_request: env: @@ -32,3 +32,4 @@ jobs: run: npm i -g pnpm@7.24.2 - run: pnpm install - run: pnpm run lint + - run: pnpm run prettier-check diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ddf055ed3..bb7a61947 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,9 +3,9 @@ name: Tests on: push: branches: - - main + - main tags: - - '!*' + - '!*' pull_request: env: diff --git a/.github/workflows/update-remix-run-dev.yml b/.github/workflows/update-remix-run-dev.yml index a8a698fee..964f14762 100644 --- a/.github/workflows/update-remix-run-dev.yml +++ b/.github/workflows/update-remix-run-dev.yml @@ -5,7 +5,7 @@ on: inputs: new-version: type: string - description: "Optional version to update @remix-run/dev to inside of @vercel/remix" + description: 'Optional version to update @remix-run/dev to inside of @vercel/remix' jobs: update-remix-run-dev: diff --git a/.prettierignore b/.prettierignore index aacab4525..43beab5c9 100644 --- a/.prettierignore +++ b/.prettierignore @@ -7,3 +7,28 @@ examples/sveltekit-1 # gatsby-plugin-vercel-analytics packages/gatsby-plugin-vercel-analytics + +# ignore directories that are not source code +node_modules +dist +pnpm-lock.yaml +.vscode +.DS_Store +.next +.vercel +.turbo +.eslintcache +.output +.vercel_build_output +.vercel +coverage +turbo-cache-key.json +/examples +/public +packages/*/dist +packages/*/node_modules +packages/**/test/fixtures +packages/**/test/dev/fixtures +packages/**/test/build-fixtures +packages/**/test/cache-fixtures + diff --git a/DEVELOPING_A_RUNTIME.md b/DEVELOPING_A_RUNTIME.md index de3fa60da..03d57a589 100644 --- a/DEVELOPING_A_RUNTIME.md +++ b/DEVELOPING_A_RUNTIME.md @@ -87,7 +87,10 @@ future builds. import { relative } from 'path'; import { glob, PrepareCache } from '@vercel/build-utils'; -export const prepareCache: PrepareCache = async ({ workPath, repoRootPath }) => { +export const prepareCache: PrepareCache = async ({ + workPath, + repoRootPath, +}) => { // Create a mapping of file names and `File` object instances to cache here… const rootDirectory = relative(repoRootPath, workPath); const cache = await glob(`${rootDirectory}/some/dir/**`, repoRootPath); diff --git a/api/_lib/examples/github-repo-info.ts b/api/_lib/examples/github-repo-info.ts index 8df06625e..51181b89d 100644 --- a/api/_lib/examples/github-repo-info.ts +++ b/api/_lib/examples/github-repo-info.ts @@ -51,8 +51,11 @@ export async function getGitHubRepoInfo(repo: Repo) { data.subdir = repo.path.slice(subdirPath.length).split('/'); } - if (data.id === 'vercel/vercel' && data.subdir && data.subdir[0] === 'examples') { - + if ( + data.id === 'vercel/vercel' && + data.subdir && + data.subdir[0] === 'examples' + ) { // from our examples, add `homepage` and `description` fields const example = data.subdir[1]; const exampleList = await getExampleList(); diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index 7d32abf8a..000000000 --- a/codecov.yml +++ /dev/null @@ -1,10 +0,0 @@ -codecov: - require_ci_to_pass: yes - -coverage: - status: - project: off - patch: off - -fixes: - - "::packages/cli/" # move root e.g., "path/" => "after/path/" diff --git a/package.json b/package.json index 27302e87c..e8508fce0 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "test-e2e": "node utils/gen.js && turbo run test-e2e", "test-dev": "node utils/gen.js && turbo run test-dev", "lint": "eslint . --cache --ext .ts,.js", + "prettier-check": "prettier --check .", "prepare": "husky install", "pack": "cd utils && node -r ts-eager/register ./pack.ts" }, diff --git a/packages/cli/scripts/compile-templates.js b/packages/cli/scripts/compile-templates.js index 823d07d0e..545069f3e 100644 --- a/packages/cli/scripts/compile-templates.js +++ b/packages/cli/scripts/compile-templates.js @@ -36,9 +36,7 @@ async function main() { const def = await readFile(fnPath.replace(/\.js$/, '.tsdef'), 'utf8'); const interfaceName = def.match(/interface (\w+)/)[1]; - const lines = require(fnPath) - .toString() - .split('\n'); + const lines = require(fnPath).toString().split('\n'); let errorHtmlStart = -1; let errorHtmlEnd = -1; for (let i = 0; i < lines.length; i++) { diff --git a/packages/cli/src/commands/env/add.ts b/packages/cli/src/commands/env/add.ts index 0ff520ed3..eae0ea410 100644 --- a/packages/cli/src/commands/env/add.ts +++ b/packages/cli/src/commands/env/add.ts @@ -1,5 +1,9 @@ import chalk from 'chalk'; -import { ProjectEnvTarget, Project, ProjectEnvType } from '@vercel-internals/types'; +import { + ProjectEnvTarget, + Project, + ProjectEnvType, +} from '@vercel-internals/types'; import { Output } from '../../util/output'; import Client from '../../util/client'; import stamp from '../../util/output/stamp'; diff --git a/packages/cli/src/commands/env/ls.ts b/packages/cli/src/commands/env/ls.ts index 6bd0b7351..4d7c76f4a 100644 --- a/packages/cli/src/commands/env/ls.ts +++ b/packages/cli/src/commands/env/ls.ts @@ -1,7 +1,11 @@ import chalk from 'chalk'; import ms from 'ms'; import { Output } from '../../util/output'; -import { Project, ProjectEnvVariable, ProjectEnvType } from '@vercel-internals/types'; +import { + Project, + ProjectEnvVariable, + ProjectEnvType, +} from '@vercel-internals/types'; import Client from '../../util/client'; import formatTable from '../../util/format-table'; import getEnvRecords from '../../util/env/get-env-records'; diff --git a/packages/cli/src/util/certs/get-wildcard-cns-for-alias.ts b/packages/cli/src/util/certs/get-wildcard-cns-for-alias.ts index aa9841606..f824f34f9 100644 --- a/packages/cli/src/util/certs/get-wildcard-cns-for-alias.ts +++ b/packages/cli/src/util/certs/get-wildcard-cns-for-alias.ts @@ -20,10 +20,7 @@ export default function getWildcardCNSForAlias(alias: string) { const secondLevel = subdomain && subdomain.includes('.') - ? subdomain - .split('.') - .slice(1) - .join('.') + ? subdomain.split('.').slice(1).join('.') : null; const root = secondLevel ? `${secondLevel}.${domain}` : domain; diff --git a/packages/cli/src/util/create-polling-fn.ts b/packages/cli/src/util/create-polling-fn.ts index ae9eb9c17..d5c0c7994 100644 --- a/packages/cli/src/util/create-polling-fn.ts +++ b/packages/cli/src/util/create-polling-fn.ts @@ -4,7 +4,7 @@ export default function createPollingFn( future: (...args: any[]) => Promise, sleepTime: number ) { - return async function*(...args: any[]) { + return async function* (...args: any[]) { while (true) { yield await future(...args); await sleep(sleepTime); diff --git a/packages/cli/src/util/dns/delete-dns-record-by-id.ts b/packages/cli/src/util/dns/delete-dns-record-by-id.ts index 948383b7d..8933fc0c4 100644 --- a/packages/cli/src/util/dns/delete-dns-record-by-id.ts +++ b/packages/cli/src/util/dns/delete-dns-record-by-id.ts @@ -8,7 +8,7 @@ export default async function deleteDNSRecordById( return client.fetch( `/v3/domains/${encodeURIComponent(domain)}/records/${recordId}`, { - method: 'DELETE' + method: 'DELETE', } ); } diff --git a/packages/cli/src/util/dns/parse-add-dns-record-args.ts b/packages/cli/src/util/dns/parse-add-dns-record-args.ts index 9d8e73614..b935855db 100644 --- a/packages/cli/src/util/dns/parse-add-dns-record-args.ts +++ b/packages/cli/src/util/dns/parse-add-dns-record-args.ts @@ -11,7 +11,7 @@ export default function parseAddArgs( if (domain && rest.length === 0) { return { domain, - data: null + data: null, }; } @@ -26,7 +26,7 @@ export default function parseAddArgs( if (type === 'MX' && args.length === 5) { return { domain, - data: { name, type, value, mxPriority: Number(args[4]) } + data: { name, type, value, mxPriority: Number(args[4]) }, }; } @@ -40,9 +40,9 @@ export default function parseAddArgs( priority: Number(value), weight: Number(args[4]), port: Number(args[5]), - target: args[6] - } - } + target: args[6], + }, + }, }; } @@ -52,8 +52,8 @@ export default function parseAddArgs( data: { name, type, - value - } + value, + }, }; } diff --git a/packages/cli/src/util/domains/get-auth-code.ts b/packages/cli/src/util/domains/get-auth-code.ts index 4145664f6..ef93c97f0 100644 --- a/packages/cli/src/util/domains/get-auth-code.ts +++ b/packages/cli/src/util/domains/get-auth-code.ts @@ -6,7 +6,7 @@ export default async function getAuthCode(code?: string) { } return textInput({ label: `- Transfer auth code: `, - validateValue: isValidAuthCode + validateValue: isValidAuthCode, }); } diff --git a/packages/cli/src/util/format-dns-table.ts b/packages/cli/src/util/format-dns-table.ts index 5513ca76b..2bc36e7e4 100644 --- a/packages/cli/src/util/format-dns-table.ts +++ b/packages/cli/src/util/format-dns-table.ts @@ -11,6 +11,6 @@ export default function formatDNSTable( return table([HEADER, ...rows], { align: ['l', 'l', 'l'], hsep: ' '.repeat(8), - stringLength: strlen + stringLength: strlen, }).replace(/^(.*)/gm, `${extraSpace}$1`); } diff --git a/packages/cli/src/util/format-ns-table.ts b/packages/cli/src/util/format-ns-table.ts index 59284f66b..4c241d554 100644 --- a/packages/cli/src/util/format-ns-table.ts +++ b/packages/cli/src/util/format-ns-table.ts @@ -22,19 +22,23 @@ export default function formatNSTable( sortedCurrent[i] || chalk.gray('-'), sortedIntended[i] === sortedCurrent[i] ? chalk.green(chars.tick) - : chalk.red(chars.cross) + : chalk.red(chars.cross), ]); } return table( [ - [chalk.gray('Intended Nameservers'), chalk.gray('Current Nameservers'), ''], - ...rows + [ + chalk.gray('Intended Nameservers'), + chalk.gray('Current Nameservers'), + '', + ], + ...rows, ], { align: ['l', 'l', 'l', 'l'], hsep: ' '.repeat(4), - stringLength: strlen + stringLength: strlen, } ).replace(/^(.*)/gm, `${extraSpace}$1`); } diff --git a/packages/cli/src/util/get-dist-tag.ts b/packages/cli/src/util/get-dist-tag.ts index f4ad619f4..a30d7e279 100644 --- a/packages/cli/src/util/get-dist-tag.ts +++ b/packages/cli/src/util/get-dist-tag.ts @@ -7,4 +7,3 @@ export function getDistTag(version: string): string { } return 'latest'; } - diff --git a/packages/cli/src/util/get-pagination-opts.ts b/packages/cli/src/util/get-pagination-opts.ts index 83ef93502..441f3ca36 100644 --- a/packages/cli/src/util/get-pagination-opts.ts +++ b/packages/cli/src/util/get-pagination-opts.ts @@ -14,7 +14,9 @@ export function getPaginationOpts(opts: PaginationOptions) { typeof limit === 'number' && (!Number.isInteger(limit) || limit > 100 || limit < 1) ) { - throw new Error('Please provide an integer from 1 to 100 for option --limit'); + throw new Error( + 'Please provide an integer from 1 to 100 for option --limit' + ); } return [nextTimestamp, limit]; diff --git a/packages/cli/src/util/get-subcommand.ts b/packages/cli/src/util/get-subcommand.ts index 9033df461..6c370be4d 100644 --- a/packages/cli/src/util/get-subcommand.ts +++ b/packages/cli/src/util/get-subcommand.ts @@ -14,6 +14,6 @@ export default function getSubcommand( } return { subcommand: config.default, - args: cliArgs + args: cliArgs, }; } diff --git a/packages/cli/src/util/init/did-you-mean.ts b/packages/cli/src/util/init/did-you-mean.ts index 105087808..dac989eaa 100644 --- a/packages/cli/src/util/init/did-you-mean.ts +++ b/packages/cli/src/util/init/did-you-mean.ts @@ -11,7 +11,7 @@ function didYouMean(input: string, list: string[], threshold: number = 0.5) { const found = rated.filter(item => item[0] > threshold); if (found.length) { const highestRated = found.reduce((accu, curr) => { - return accu[0] > curr[0] ? accu : curr + return accu[0] > curr[0] ? accu : curr; }); return highestRated[1]; } @@ -23,6 +23,7 @@ function didYouMean(input: string, list: string[], threshold: number = 0.5) { function dashAwareDistance(word: string, dashWord: string) { const fullDistance = distance(word, dashWord); const distances = dashWord.split('-').map(w => distance(w, word)); - const meanDistance = distances.reduce((accu, curr) => accu + curr) / distances.length; + const meanDistance = + distances.reduce((accu, curr) => accu + curr) / distances.length; return fullDistance > meanDistance ? fullDistance : meanDistance; } diff --git a/packages/cli/src/util/now-error.ts b/packages/cli/src/util/now-error.ts index e87c54817..e00c630b6 100644 --- a/packages/cli/src/util/now-error.ts +++ b/packages/cli/src/util/now-error.ts @@ -5,7 +5,7 @@ export class NowError extends Error { constructor({ code, message, - meta + meta, }: { code: C; message: string; diff --git a/packages/cli/src/util/output/highlight.ts b/packages/cli/src/util/output/highlight.ts index 902209d18..fb712f09c 100644 --- a/packages/cli/src/util/output/highlight.ts +++ b/packages/cli/src/util/output/highlight.ts @@ -2,4 +2,4 @@ import chalk from 'chalk'; export default function highlight(text: string): string { return chalk.bold.underline(text); -} \ No newline at end of file +} diff --git a/packages/cli/src/util/output/success.ts b/packages/cli/src/util/output/success.ts index e49973660..b5a98f929 100644 --- a/packages/cli/src/util/output/success.ts +++ b/packages/cli/src/util/output/success.ts @@ -1,5 +1,5 @@ import chalk from 'chalk'; -export default function success (msg: string): string { +export default function success(msg: string): string { return `${chalk.cyan('> Success!')} ${msg}`; } diff --git a/packages/cli/src/util/race-async-generators.ts b/packages/cli/src/util/race-async-generators.ts index 2093340fd..5c0f1d794 100644 --- a/packages/cli/src/util/race-async-generators.ts +++ b/packages/cli/src/util/race-async-generators.ts @@ -6,7 +6,7 @@ export default async function* raceAsyncGenerators(...args: any[]) { yield new Promise(resolve => { let resolved = false; nextPromises.forEach((nextPromise, idx) => { - nextPromise.then(({ value, done }: { value: any, done: boolean }) => { + nextPromise.then(({ value, done }: { value: any; done: boolean }) => { if (!resolved) { resolved = true; resolve(value); @@ -15,7 +15,7 @@ export default async function* raceAsyncGenerators(...args: any[]) { } else { nextPromises = [ ...nextPromises.slice(0, idx), - ...nextPromises.slice(idx + 1) + ...nextPromises.slice(idx + 1), ]; } } diff --git a/packages/client/tests/types.ts b/packages/client/tests/types.ts index d78fe8c39..8d411c419 100644 --- a/packages/client/tests/types.ts +++ b/packages/client/tests/types.ts @@ -30,19 +30,19 @@ export interface Deployment { public: boolean; ownerId: string; readyState: - | 'INITIALIZING' - | 'ANALYZING' - | 'BUILDING' - | 'DEPLOYING' - | 'READY' - | 'ERROR'; + | 'INITIALIZING' + | 'ANALYZING' + | 'BUILDING' + | 'DEPLOYING' + | 'READY' + | 'ERROR'; state?: - | 'INITIALIZING' - | 'ANALYZING' - | 'BUILDING' - | 'DEPLOYING' - | 'READY' - | 'ERROR'; + | 'INITIALIZING' + | 'ANALYZING' + | 'BUILDING' + | 'DEPLOYING' + | 'READY' + | 'ERROR'; createdAt: string; createdIn: string; env: { diff --git a/packages/frameworks/src/read-config-file.ts b/packages/frameworks/src/read-config-file.ts index 10c5bdd84..00022b87d 100644 --- a/packages/frameworks/src/read-config-file.ts +++ b/packages/frameworks/src/read-config-file.ts @@ -30,7 +30,7 @@ export async function readConfigFile( if (name.endsWith('.json')) { return JSON.parse(str) as T; } else if (name.endsWith('.toml')) { - return (toml.parse(str) as unknown) as T; + return toml.parse(str) as unknown as T; } else if (name.endsWith('.yaml') || name.endsWith('.yml')) { return yaml.safeLoad(str, { filename: name }) as T; } diff --git a/packages/next/test/unit/fixtures/02-edge-function-basepath/pages/index.tsx b/packages/next/test/unit/fixtures/02-edge-function-basepath/pages/index.tsx index fe6224b0c..0ace4df88 100644 --- a/packages/next/test/unit/fixtures/02-edge-function-basepath/pages/index.tsx +++ b/packages/next/test/unit/fixtures/02-edge-function-basepath/pages/index.tsx @@ -1,16 +1,11 @@ -import type { NextPage } from 'next' +import type { NextPage } from 'next'; const Home: NextPage = () => { - return ( -
- Home -
- ) -} - -export default Home + return
Home
; +}; +export default Home; export const config = { runtime: 'experimental-edge', -} \ No newline at end of file +}; diff --git a/packages/node/src/babel.ts b/packages/node/src/babel.ts index 1d69000d8..5a0fc3a92 100644 --- a/packages/node/src/babel.ts +++ b/packages/node/src/babel.ts @@ -1,4 +1,4 @@ -const babel = require('@babel/core'); // eslint-disable-line @typescript-eslint/no-var-requires +const babel = require('@babel/core'); // eslint-disable-line @typescript-eslint/no-var-requires // eslint-disable-next-line @typescript-eslint/no-var-requires const pluginTransformModulesCommonJs = require('@babel/plugin-transform-modules-commonjs'); diff --git a/packages/routing-utils/src/merge.ts b/packages/routing-utils/src/merge.ts index 778f6a6e3..86c6ba758 100644 --- a/packages/routing-utils/src/merge.ts +++ b/packages/routing-utils/src/merge.ts @@ -22,9 +22,11 @@ function getBuilderRoutesMapping(builds: Build[]) { return builderRoutes; } -function getCheckAndContinue( - routes: Route[] -): { checks: Route[]; continues: Route[]; others: Route[] } { +function getCheckAndContinue(routes: Route[]): { + checks: Route[]; + continues: Route[]; + others: Route[]; +} { const checks: Route[] = []; const continues: Route[] = []; const others: Route[] = []; diff --git a/packages/static-config/src/validation.ts b/packages/static-config/src/validation.ts index 8937127f8..4bc6d0f0a 100644 --- a/packages/static-config/src/validation.ts +++ b/packages/static-config/src/validation.ts @@ -3,7 +3,10 @@ import { FromSchema, JSONSchema } from 'json-schema-to-ts'; const ajv = new Ajv(); -export function validate(schema: T, data: any): FromSchema { +export function validate( + schema: T, + data: any +): FromSchema { const isValid = ajv.compile(schema); if (!isValid(data)) { // TODO: better error message diff --git a/test/lib/deployment/retry-bail-by-default.js b/test/lib/deployment/retry-bail-by-default.js index 3e5e1523e..44830d0f6 100644 --- a/test/lib/deployment/retry-bail-by-default.js +++ b/test/lib/deployment/retry-bail-by-default.js @@ -1,11 +1,11 @@ const retry = require('async-retry'); -function canRetry (error) { +function canRetry(error) { error.dontBail = true; return error; } -async function retryBailByDefault (fn, opts) { +async function retryBailByDefault(fn, opts) { return await retry(async () => { try { return await fn(canRetry);