diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0c28532..0481631 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Base Setup uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 @@ -24,17 +24,6 @@ jobs: - name: Install dependencies run: python -m pip install -U "jupyterlab>=4.0.0,<5" - - name: Lint the extension - run: | - set -eux - jlpm - jlpm run lint:check - - - name: Test the extension - run: | - set -eux - jlpm run test - - name: Build the extension run: | set -eux @@ -53,7 +42,7 @@ jobs: pip uninstall -y "jupytercad_gather" jupyterlab - name: Upload extension packages - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: extension-artifacts path: dist/jupytercad_gather* @@ -65,11 +54,11 @@ jobs: steps: - name: Install Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v4 with: python-version: '3.9' architecture: 'x64' - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v3 with: name: extension-artifacts - name: Install and Test @@ -96,13 +85,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Base Setup uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - name: Download extension package - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: extension-artifacts @@ -119,7 +108,7 @@ jobs: run: jlpm install - name: Set up browser cache - uses: actions/cache@v4 + uses: actions/cache@v3 with: path: | ${{ github.workspace }}/pw-browsers @@ -136,7 +125,7 @@ jobs: - name: Upload Playwright Test report if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: jupytercad_gather-playwright-tests path: | @@ -148,6 +137,6 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index a65ffe7..5610527 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Base Setup uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - name: Check Release @@ -23,7 +23,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Upload Distributions - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: jupytercad_gather-releaser-dist-${{ github.run_number }} path: .jupyter_releaser_checkout/dist diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7385014..86bde8a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,8 @@ +ci: + # pre-commit.ci will open PRs updating our hooks once a month + autoupdate_schedule: monthly + # skip any check that needs internet access + autofix_prs: true repos: # Autoformat and linting, misc. details - repo: https://github.com/pre-commit/pre-commit-hooks @@ -32,3 +37,17 @@ repos: rev: v4.0.0-alpha.8 hooks: - id: prettier + args: ['--no-error-on-unmatched-pattern'] + + - repo: https://github.com/pre-commit/mirrors-eslint + rev: v9.4.0 + hooks: + - id: eslint + files: \.tsx?$ + types: [file] + additional_dependencies: + - 'eslint@8.36.0' + - '@typescript-eslint/eslint-plugin@5.55.0' + - '@typescript-eslint/parser@5.55.0' + - 'eslint-plugin-prettier@5.0.1' + - 'eslint-config-prettier@8.7.0' diff --git a/src/command.ts b/src/command.ts index 8825b6e..2ad3c09 100644 --- a/src/command.ts +++ b/src/command.ts @@ -43,7 +43,7 @@ namespace Private { return { Name: newName('GLTF', model), //@ts-expect-error wip - Object: selected.length > 0 ? selected[0] : objects[0].name ?? '', + Object: selected.length > 0 ? selected[0] : (objects[0].name ?? ''), Enabled: true }; },