Skip to content

Commit 45d6498

Browse files
Merge pull request #37 from oliviacarlisle/dev
Add linting
2 parents c98edf6 + ad75bf4 commit 45d6498

File tree

9 files changed

+1267
-25
lines changed

9 files changed

+1267
-25
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ jobs:
2525

2626
- name: Run tests
2727
run: npm test
28+
29+
- name: Run lint check
30+
run: npm run lint
31+
32+
- name: Run format check
33+
run: npm run format:check

.github/workflows/codecov.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
node-version: 22.x
2121

2222
- name: Install dependencies
23-
run: npm install
23+
run: npm ci
2424

2525
- name: Run tests
26-
run: npx jest --coverage
26+
run: npm run test:coverage
2727

2828
- name: Upload results to Codecov
2929
uses: codecov/codecov-action@v4

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
registry-url: 'https://registry.npmjs.org'
2020
- run: npm ci
2121
- run: npm test
22+
- run: npm run lint && npm run format:check
2223
- name: Check if package version matches release
2324
run: |
2425
PACKAGE_VERSION=$(node -p "require('./package.json').version")

bench/Queue.bench.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Bench } from 'tinybench';
22
import { Queue } from '../src/index.js';
33

4-
type BenchmarkType = Record<string, any>;
4+
type BenchmarkType = Record<string, number>;
55

66
// Set up
77
let q = new Queue<BenchmarkType>();

eslint.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// @ts-check
2+
3+
import eslint from '@eslint/js';
4+
import tseslint from 'typescript-eslint';
5+
6+
export default tseslint.config(
7+
{
8+
ignores: ['dist/**'],
9+
},
10+
eslint.configs.recommended,
11+
...tseslint.configs.recommended,
12+
);

0 commit comments

Comments
 (0)