Skip to content

Commit

Permalink
chore: lint jest functionality (#452)
Browse files Browse the repository at this point in the history
* chore: lint jest functionality

* chore: fix test

* chore: only lint on node 22
  • Loading branch information
jeswr authored Sep 21, 2024
1 parent 04d55c5 commit bdf0cb2
Show file tree
Hide file tree
Showing 6 changed files with 400 additions and 29 deletions.
11 changes: 11 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,22 @@
sourceType: "module",
},

plugins: [
'jest',
],

extends: [
'plugin:import/recommended',
'plugin:jest/recommended'
],

rules: {
"jest/no-standalone-expect": 0,
"jest/expect-expect": 0,
"jest/no-done-callback": 0,
"jest/no-identical-title": 0,
"jest/no-conditional-expect": 0,

// Possible Errors
comma-dangle: [2, "always-multiline"],
no-cond-assign: 0,
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,24 @@ jobs:
- uses: actions/checkout@v4
- run: npm ci --ignore-scripts
- run: npm run build
- run: npm run lint
- run: npm run test


lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [22.x]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v4
- run: npm ci --ignore-scripts
- run: npm run build
- run: npm run lint

spec:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -60,6 +75,7 @@ jobs:
- test
- spec
- docs
- lint
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
Expand Down
Loading

0 comments on commit bdf0cb2

Please sign in to comment.