From 29fc5b0747f0843709b145f7cab950997fd67ce5 Mon Sep 17 00:00:00 2001 From: JounQin Date: Sat, 14 Oct 2023 15:14:56 +0800 Subject: [PATCH] ci: try to reorder plugins and env --- .github/workflows/ci.yml | 3 ++- .github/workflows/release.yml | 2 +- patches/eslint-config-kentcdodds+20.5.0.patch | 22 +++++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 patches/eslint-config-kentcdodds+20.5.0.patch diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36751fc..79e00a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,9 +15,10 @@ jobs: - 14 - 16 - 18 + - 20 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d3559b2..7ec9fe3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits fetch-depth: 0 diff --git a/patches/eslint-config-kentcdodds+20.5.0.patch b/patches/eslint-config-kentcdodds+20.5.0.patch new file mode 100644 index 0000000..11082e1 --- /dev/null +++ b/patches/eslint-config-kentcdodds+20.5.0.patch @@ -0,0 +1,22 @@ +diff --git a/node_modules/eslint-config-kentcdodds/jest.js b/node_modules/eslint-config-kentcdodds/jest.js +index bffd2c1..fd5e6b5 100644 +--- a/node_modules/eslint-config-kentcdodds/jest.js ++++ b/node_modules/eslint-config-kentcdodds/jest.js +@@ -29,14 +29,14 @@ try { + } + + module.exports = { +- env: { +- 'jest/globals': true, +- }, + plugins: [ + 'jest', + hasJestDom ? 'jest-dom' : null, + hasTestingLibrary ? 'testing-library' : null, + ].filter(Boolean), ++ env: { ++ 'jest/globals': true, ++ }, + rules: {}, + overrides: [ + {