From 11962fd5ecf9f8b3f22701b1a2ea99474c05849e Mon Sep 17 00:00:00 2001 From: Evyatar Date: Sun, 1 Oct 2023 00:13:21 -0600 Subject: [PATCH] chore: cleanups --- .eslintrc.js | 8 +++++++- .github/workflows/integration.yml | 15 ++++++++------- .yarnrc.yml | 4 +--- .../vest/src/core/isolate/IsolateReconciler.ts | 2 +- .../isolate/IsolateTest/IsolateTestReconciler.ts | 2 +- packages/vest/src/testUtils/partition.ts | 3 +-- packages/vest/src/testUtils/suiteDummy.ts | 4 ++-- vx/scripts/release/steps/push_to_latest_branch.sh | 3 +++ 8 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index d7034cf70..5e966ce44 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -46,7 +46,13 @@ module.exports = { rules: { '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-unused-vars': 'warn', + '@typescript-eslint/no-unused-vars': [ + 1, + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + }, + ], }, }, { diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 340209288..6dd03899f 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -28,19 +28,19 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Setup .yarnrc.yml + run: | + yarn config set npmAuthToken $NPM_PUBLISH_TOKEN || echo "No NPM_PUBLISH_TOKEN found" + yarn config set npmAlwaysAuth true + echo //registry.npmjs.org/:_authToken=$NPM_PUBLISH_TOKEN > ~/.npmrc || echo "No NPM_PUBLISH_TOKEN found" + env: + NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} - name: Install run: yarn install --immutable - name: Test run: yarn test - name: Lint run: yarn lint - - name: Setup .yarnrc.yml - run: | - yarn config set npmAuthToken $NPM_TOKEN - yarn config set npmAlwaysAuth true - echo //registry.npmjs.org/:_authToken=$NPM_TOKEN > ~/.npmrc - env: - NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} - name: Release run: yarn release env: @@ -54,4 +54,5 @@ jobs: PUBLIC_REPO_TOKEN: ${{secrets.PUBLIC_REPO_TOKEN}} EMAIL_ADDRESS: ${{secrets.EMAIL_ADDRESS}} GIT_NAME: ${{secrets.GIT_NAME}} + NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} npmAuthToken: ${{secrets.NPM_PUBLISH_TOKEN}} diff --git a/.yarnrc.yml b/.yarnrc.yml index 4697e9028..38a48ff23 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -4,10 +4,8 @@ nodeLinker: node-modules npmAlwaysAuth: true -npmAuthToken: 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 - plugins: - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs - spec: "@yarnpkg/plugin-interactive-tools" + spec: '@yarnpkg/plugin-interactive-tools' yarnPath: .yarn/releases/yarn-3.5.1.cjs diff --git a/packages/vest/src/core/isolate/IsolateReconciler.ts b/packages/vest/src/core/isolate/IsolateReconciler.ts index 0c538995b..5096bf338 100644 --- a/packages/vest/src/core/isolate/IsolateReconciler.ts +++ b/packages/vest/src/core/isolate/IsolateReconciler.ts @@ -1,7 +1,7 @@ import { TIsolate } from 'vestjs-runtime'; export abstract class IsolateReconciler { - static match(currentNode: TIsolate, historyNode: TIsolate): boolean { + static match(_currentNode: TIsolate, _historyNode: TIsolate): boolean { return false; } diff --git a/packages/vest/src/core/isolate/IsolateTest/IsolateTestReconciler.ts b/packages/vest/src/core/isolate/IsolateTest/IsolateTestReconciler.ts index 1569ca9b0..d0c510632 100644 --- a/packages/vest/src/core/isolate/IsolateTest/IsolateTestReconciler.ts +++ b/packages/vest/src/core/isolate/IsolateTest/IsolateTestReconciler.ts @@ -1,9 +1,9 @@ -import { IsolateReconciler } from 'IsolateReconciler'; import { Maybe, deferThrow, text } from 'vest-utils'; import { IsolateInspector, Reconciler } from 'vestjs-runtime'; import type { TIsolate } from 'vestjs-runtime'; import { ErrorStrings } from 'ErrorStrings'; +import { IsolateReconciler } from 'IsolateReconciler'; import type { TIsolateTest } from 'IsolateTest'; import { VestTest } from 'VestTest'; import cancelOverriddenPendingTest from 'cancelOverriddenPendingTest'; diff --git a/packages/vest/src/testUtils/partition.ts b/packages/vest/src/testUtils/partition.ts index 93999eba2..8af8050db 100644 --- a/packages/vest/src/testUtils/partition.ts +++ b/packages/vest/src/testUtils/partition.ts @@ -1,7 +1,6 @@ export default function partition( array: T[], - // eslint-disable-next-line no-unused-vars - predicate: (value: T, index: number, array: T[]) => boolean + predicate: (value: T, _index: number, array: T[]) => boolean ): [T[], T[]] { return array.reduce( (partitions: [T[], T[]], value, number) => { diff --git a/packages/vest/src/testUtils/suiteDummy.ts b/packages/vest/src/testUtils/suiteDummy.ts index 1548d5eb6..59917a1d4 100644 --- a/packages/vest/src/testUtils/suiteDummy.ts +++ b/packages/vest/src/testUtils/suiteDummy.ts @@ -90,14 +90,14 @@ export function untested(fields?: OneOrMoreOf) { function createSuiteRunResult( fieldNames: Maybe, - callback: (fieldName?: string) => void // eslint-disable-line no-unused-vars + callback: (_fieldName?: string) => void ) { return createSuite(fieldNames, callback)(); } function createSuite( fieldNames: Maybe = 'field_1', - callback: (fieldName?: string) => void // eslint-disable-line no-unused-vars + callback: (_fieldName?: string) => void ) { return create(() => { asArray(fieldNames).forEach(fieldName => callback(fieldName)); diff --git a/vx/scripts/release/steps/push_to_latest_branch.sh b/vx/scripts/release/steps/push_to_latest_branch.sh index ce357e57f..6d4e1289c 100644 --- a/vx/scripts/release/steps/push_to_latest_branch.sh +++ b/vx/scripts/release/steps/push_to_latest_branch.sh @@ -21,6 +21,9 @@ git checkout -b $STABLE_BRANCH echo "Rebuilding yarn.lock" yarn +echo "Cleaning up auth token" +yarn config unset npmAuthToken + echo "Commiting" git add -A git commit -m "$1" -m "$2"