Skip to content

Commit bd564ed

Browse files
Update dependency @vitest/eslint-plugin to v1.6.6 (#499)
* Update dependency @vitest/eslint-plugin to v1.6.6 * Fix ESLint errors --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
1 parent a7c712e commit bd564ed

4 files changed

Lines changed: 127 additions & 16 deletions

File tree

lib/buildtools/src/build/__tests__/all.test.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pathlib from 'path';
22
import { bundlesDir, tabsDir } from '@sourceacademy/modules-repotools/getGitRoot';
3-
import { afterEach, describe, expect, test, vi } from 'vitest';
3+
import { describe, expect, test, vi } from 'vitest';
44
import * as docs from '../../build/docs/index.js';
55
import * as modules from '../../build/modules/index.js';
66
import { getCommandRunner } from '../../commands/__tests__/testingUtils.js';
@@ -29,10 +29,6 @@ const mockedRunEslint = vi.spyOn(lint, 'runEslint').mockResolvedValue({
2929
describe('Test the buildAll command', () => {
3030
const runCommand = getCommandRunner(getBuildAllCommand);
3131

32-
afterEach(() => {
33-
expect(all.buildAll).toHaveBeenCalledTimes(1);
34-
});
35-
3632
describe('Test command with a bundle', () => {
3733
const bundlePath = pathlib.join(bundlesDir, 'test0');
3834

@@ -52,6 +48,7 @@ describe('Test the buildAll command', () => {
5248
});
5349

5450
await expect(runCommand(bundlePath)).commandSuccess();
51+
expect(all.buildAll).toHaveBeenCalledTimes(1);
5552
});
5653

5754
test('Regular execution for a bundle with --tsc', async () => {
@@ -71,6 +68,7 @@ describe('Test the buildAll command', () => {
7168

7269
await expect(runCommand(bundlePath, '--tsc')).commandSuccess();
7370
expect(tsc.runTsc).toHaveBeenCalledTimes(1);
71+
expect(all.buildAll).toHaveBeenCalledTimes(1);
7472
});
7573

7674
test('Regular execution for a bundle with --lint', async () => {
@@ -90,6 +88,7 @@ describe('Test the buildAll command', () => {
9088

9189
await expect(runCommand(bundlePath, '--lint')).commandSuccess();
9290
expect(lint.runEslint).toHaveBeenCalledTimes(1);
91+
expect(all.buildAll).toHaveBeenCalledTimes(1);
9392
});
9493

9594
test('Lint error should avoid building bundle and json', async () => {
@@ -104,6 +103,7 @@ describe('Test the buildAll command', () => {
104103
expect(lint.runEslint).toHaveBeenCalledTimes(1);
105104
expect(modules.buildBundle).not.toHaveBeenCalled();
106105
expect(docs.buildSingleBundleDocs).not.toHaveBeenCalled();
106+
expect(all.buildAll).toHaveBeenCalledTimes(1);
107107
});
108108

109109
test('Tsc error should avoid building bundle and json', async () => {
@@ -118,6 +118,7 @@ describe('Test the buildAll command', () => {
118118
expect(tsc.runTsc).toHaveBeenCalledTimes(1);
119119
expect(modules.buildBundle).not.toHaveBeenCalled();
120120
expect(docs.buildSingleBundleDocs).not.toHaveBeenCalled();
121+
expect(all.buildAll).toHaveBeenCalledTimes(1);
121122
});
122123

123124
test('Bundle error doesn\'t affect building json', async () => {
@@ -139,6 +140,7 @@ describe('Test the buildAll command', () => {
139140

140141
expect(modules.buildBundle).toHaveBeenCalledTimes(1);
141142
expect(docs.buildSingleBundleDocs).toHaveBeenCalledTimes(1);
143+
expect(all.buildAll).toHaveBeenCalledTimes(1);
142144
});
143145

144146
test('JSON error doesn\'t affect building bundle', async () => {
@@ -160,6 +162,7 @@ describe('Test the buildAll command', () => {
160162

161163
expect(modules.buildBundle).toHaveBeenCalledTimes(1);
162164
expect(docs.buildSingleBundleDocs).toHaveBeenCalledTimes(1);
165+
expect(all.buildAll).toHaveBeenCalledTimes(1);
163166
});
164167
});
165168

@@ -175,6 +178,7 @@ describe('Test the buildAll command', () => {
175178
});
176179

177180
await expect(runCommand(tabPath)).commandSuccess();
181+
expect(all.buildAll).toHaveBeenCalledTimes(1);
178182
});
179183

180184
test('Regular execution for a tab with --tsc', async () => {
@@ -187,6 +191,7 @@ describe('Test the buildAll command', () => {
187191

188192
await expect(runCommand(tabPath, '--tsc')).commandSuccess();
189193
expect(tsc.runTsc).toHaveBeenCalledTimes(1);
194+
expect(all.buildAll).toHaveBeenCalledTimes(1);
190195
});
191196

192197
test('Regular execution for a tab with --lint', async () => {
@@ -199,6 +204,7 @@ describe('Test the buildAll command', () => {
199204

200205
await expect(runCommand(tabPath, '--lint')).commandSuccess();
201206
expect(lint.runEslint).toHaveBeenCalledTimes(1);
207+
expect(all.buildAll).toHaveBeenCalledTimes(1);
202208
});
203209

204210
test('Lint error should avoid building tab', async () => {
@@ -212,6 +218,7 @@ describe('Test the buildAll command', () => {
212218

213219
expect(lint.runEslint).toHaveBeenCalledTimes(1);
214220
expect(modules.buildTab).not.toHaveBeenCalled();
221+
expect(all.buildAll).toHaveBeenCalledTimes(1);
215222
});
216223

217224
test('Tsc error should avoid building tab', async () => {
@@ -225,6 +232,7 @@ describe('Test the buildAll command', () => {
225232

226233
expect(tsc.runTsc).toHaveBeenCalledTimes(1);
227234
expect(modules.buildTab).not.toHaveBeenCalled();
235+
expect(all.buildAll).toHaveBeenCalledTimes(1);
228236
});
229237
});
230238
});

lib/lintplugin/src/configs.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ export const vitestConfig = defineConfig({
217217
name: 'SA Recommended Vitest Config',
218218
extends: [vitestPlugin.configs.recommended],
219219
plugins: {
220-
// @ts-expect-error Something weird going on with the type of the plugin
221220
vitest: vitestPlugin,
222221
},
223222
files: [

lib/modules-lib/src/tabs/__tests__/useAnimation.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ interface Fixtures {
1010

1111
const test = baseTest.extend<Fixtures>(
1212
{
13-
callback: ({}, use) => use(vi.fn()),
14-
canvas: ({}, use) => use(createElement('canvas') as unknown as HTMLCanvasElement)
13+
callback: ({ }, use) => use(vi.fn()),
14+
canvas: ({ }, use) => use(createElement('canvas') as unknown as HTMLCanvasElement)
1515
}
1616
);
1717

@@ -132,7 +132,7 @@ test('Animation should not auto start if autoStart is false', async ({ callback,
132132
expect(hook.current.isPlaying).toEqual(false);
133133
});
134134

135-
test('Test animation reset', async ({ callback, canvas }) => {
135+
test('animation reset', async ({ callback, canvas }) => {
136136
const { hook, act, advanceFrames } = await getAnimationHook({
137137
autoLoop: false,
138138
animationDuration: 1000,

yarn.lock

Lines changed: 111 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2561,6 +2561,17 @@ __metadata:
25612561
languageName: node
25622562
linkType: hard
25632563

2564+
"@eslint-community/eslint-utils@npm:^4.9.1":
2565+
version: 4.9.1
2566+
resolution: "@eslint-community/eslint-utils@npm:4.9.1"
2567+
dependencies:
2568+
eslint-visitor-keys: "npm:^3.4.3"
2569+
peerDependencies:
2570+
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
2571+
checksum: 10c0/dc4ab5e3e364ef27e33666b11f4b86e1a6c1d7cbf16f0c6ff87b1619b3562335e9201a3d6ce806221887ff780ec9d828962a290bb910759fd40a674686503f02
2572+
languageName: node
2573+
linkType: hard
2574+
25642575
"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.12.1":
25652576
version: 4.12.1
25662577
resolution: "@eslint-community/regexpp@npm:4.12.1"
@@ -5911,6 +5922,19 @@ __metadata:
59115922
languageName: node
59125923
linkType: hard
59135924

5925+
"@typescript-eslint/project-service@npm:8.52.0":
5926+
version: 8.52.0
5927+
resolution: "@typescript-eslint/project-service@npm:8.52.0"
5928+
dependencies:
5929+
"@typescript-eslint/tsconfig-utils": "npm:^8.52.0"
5930+
"@typescript-eslint/types": "npm:^8.52.0"
5931+
debug: "npm:^4.4.3"
5932+
peerDependencies:
5933+
typescript: ">=4.8.4 <6.0.0"
5934+
checksum: 10c0/2dc7379572b4b1340daff5923fbf7987ebd2de5a4203ece0ec9e8a9e85cf182cd4cd24c25bd7df62b981fb633c91dd35f27fed1341719c2f8a48eb80682b4658
5935+
languageName: node
5936+
linkType: hard
5937+
59145938
"@typescript-eslint/rule-tester@npm:^8.39.0":
59155939
version: 8.46.4
59165940
resolution: "@typescript-eslint/rule-tester@npm:8.46.4"
@@ -5938,6 +5962,16 @@ __metadata:
59385962
languageName: node
59395963
linkType: hard
59405964

5965+
"@typescript-eslint/scope-manager@npm:8.52.0, @typescript-eslint/scope-manager@npm:^8.51.0":
5966+
version: 8.52.0
5967+
resolution: "@typescript-eslint/scope-manager@npm:8.52.0"
5968+
dependencies:
5969+
"@typescript-eslint/types": "npm:8.52.0"
5970+
"@typescript-eslint/visitor-keys": "npm:8.52.0"
5971+
checksum: 10c0/385105ad1bb63eddcfc65039a7c13ec339aef4823c3021110cffe72c545b27c6b197e40ec55000b5b1bf278946a3e1a77eba19203f461c1a77ba3fe82d007f3e
5972+
languageName: node
5973+
linkType: hard
5974+
59415975
"@typescript-eslint/tsconfig-utils@npm:8.46.4, @typescript-eslint/tsconfig-utils@npm:^8.46.4":
59425976
version: 8.46.4
59435977
resolution: "@typescript-eslint/tsconfig-utils@npm:8.46.4"
@@ -5947,6 +5981,15 @@ __metadata:
59475981
languageName: node
59485982
linkType: hard
59495983

5984+
"@typescript-eslint/tsconfig-utils@npm:8.52.0, @typescript-eslint/tsconfig-utils@npm:^8.52.0":
5985+
version: 8.52.0
5986+
resolution: "@typescript-eslint/tsconfig-utils@npm:8.52.0"
5987+
peerDependencies:
5988+
typescript: ">=4.8.4 <6.0.0"
5989+
checksum: 10c0/a45f6c1453031c149b2dedaa4e8ace53aa71c751a5702b028cbd9a899928d46141cc4343d8de6260e3e27024f6645b12669d8759f66ebde4cbae2f703b859747
5990+
languageName: node
5991+
linkType: hard
5992+
59505993
"@typescript-eslint/type-utils@npm:8.46.4":
59515994
version: 8.46.4
59525995
resolution: "@typescript-eslint/type-utils@npm:8.46.4"
@@ -5970,6 +6013,13 @@ __metadata:
59706013
languageName: node
59716014
linkType: hard
59726015

6016+
"@typescript-eslint/types@npm:8.52.0, @typescript-eslint/types@npm:^8.52.0":
6017+
version: 8.52.0
6018+
resolution: "@typescript-eslint/types@npm:8.52.0"
6019+
checksum: 10c0/ad93803aa92570a96cc9f9a201735e68fecee9056a37563c9e5b70c16436927ac823ec38d9712881910d89dd7314b0a40100ef41ef1aca0d42674d3312d5ec8e
6020+
languageName: node
6021+
linkType: hard
6022+
59736023
"@typescript-eslint/types@npm:^8.34.1":
59746024
version: 8.35.0
59756025
resolution: "@typescript-eslint/types@npm:8.35.0"
@@ -5997,7 +6047,26 @@ __metadata:
59976047
languageName: node
59986048
linkType: hard
59996049

6000-
"@typescript-eslint/utils@npm:8.46.4, @typescript-eslint/utils@npm:^8.24.1, @typescript-eslint/utils@npm:^8.32.1, @typescript-eslint/utils@npm:^8.39.0":
6050+
"@typescript-eslint/typescript-estree@npm:8.52.0":
6051+
version: 8.52.0
6052+
resolution: "@typescript-eslint/typescript-estree@npm:8.52.0"
6053+
dependencies:
6054+
"@typescript-eslint/project-service": "npm:8.52.0"
6055+
"@typescript-eslint/tsconfig-utils": "npm:8.52.0"
6056+
"@typescript-eslint/types": "npm:8.52.0"
6057+
"@typescript-eslint/visitor-keys": "npm:8.52.0"
6058+
debug: "npm:^4.4.3"
6059+
minimatch: "npm:^9.0.5"
6060+
semver: "npm:^7.7.3"
6061+
tinyglobby: "npm:^0.2.15"
6062+
ts-api-utils: "npm:^2.4.0"
6063+
peerDependencies:
6064+
typescript: ">=4.8.4 <6.0.0"
6065+
checksum: 10c0/e4158a6364d3f009eac780947504ac1dad2ee3f1fdd4dfd99e4a7b48719ce0d342a769dc05fa5d4bc5de9de28175aa8e9ba612385f6b6f215039ff41e91f2de5
6066+
languageName: node
6067+
linkType: hard
6068+
6069+
"@typescript-eslint/utils@npm:8.46.4, @typescript-eslint/utils@npm:^8.32.1, @typescript-eslint/utils@npm:^8.39.0":
60016070
version: 8.46.4
60026071
resolution: "@typescript-eslint/utils@npm:8.46.4"
60036072
dependencies:
@@ -6012,6 +6081,21 @@ __metadata:
60126081
languageName: node
60136082
linkType: hard
60146083

6084+
"@typescript-eslint/utils@npm:^8.51.0":
6085+
version: 8.52.0
6086+
resolution: "@typescript-eslint/utils@npm:8.52.0"
6087+
dependencies:
6088+
"@eslint-community/eslint-utils": "npm:^4.9.1"
6089+
"@typescript-eslint/scope-manager": "npm:8.52.0"
6090+
"@typescript-eslint/types": "npm:8.52.0"
6091+
"@typescript-eslint/typescript-estree": "npm:8.52.0"
6092+
peerDependencies:
6093+
eslint: ^8.57.0 || ^9.0.0
6094+
typescript: ">=4.8.4 <6.0.0"
6095+
checksum: 10c0/67e501e8ef4c4a5510237e3bfcfee37512137075a18c24f615924559bcca64ce9903118e7e4288cd4f58361979243f457d43684cdafa6c193fa8963a7431d0f3
6096+
languageName: node
6097+
linkType: hard
6098+
60156099
"@typescript-eslint/visitor-keys@npm:8.46.4":
60166100
version: 8.46.4
60176101
resolution: "@typescript-eslint/visitor-keys@npm:8.46.4"
@@ -6022,6 +6106,16 @@ __metadata:
60226106
languageName: node
60236107
linkType: hard
60246108

6109+
"@typescript-eslint/visitor-keys@npm:8.52.0":
6110+
version: 8.52.0
6111+
resolution: "@typescript-eslint/visitor-keys@npm:8.52.0"
6112+
dependencies:
6113+
"@typescript-eslint/types": "npm:8.52.0"
6114+
eslint-visitor-keys: "npm:^4.2.1"
6115+
checksum: 10c0/7163735d872df0930301ecccd454602d241a65223b84ff3ef78ede02f27941c0cbb95d0c8b4fe51637d1fbd981e6558d454fc485a2488d7190e264e12a8a355f
6116+
languageName: node
6117+
linkType: hard
6118+
60256119
"@typescript/vfs@npm:^1.5.2":
60266120
version: 1.6.1
60276121
resolution: "@typescript/vfs@npm:1.6.1"
@@ -6156,20 +6250,21 @@ __metadata:
61566250
linkType: hard
61576251

61586252
"@vitest/eslint-plugin@npm:^1.3.4":
6159-
version: 1.3.4
6160-
resolution: "@vitest/eslint-plugin@npm:1.3.4"
6253+
version: 1.6.6
6254+
resolution: "@vitest/eslint-plugin@npm:1.6.6"
61616255
dependencies:
6162-
"@typescript-eslint/utils": "npm:^8.24.1"
6256+
"@typescript-eslint/scope-manager": "npm:^8.51.0"
6257+
"@typescript-eslint/utils": "npm:^8.51.0"
61636258
peerDependencies:
6164-
eslint: ">= 8.57.0"
6165-
typescript: ">= 5.0.0"
6259+
eslint: ">=8.57.0"
6260+
typescript: ">=5.0.0"
61666261
vitest: "*"
61676262
peerDependenciesMeta:
61686263
typescript:
61696264
optional: true
61706265
vitest:
61716266
optional: true
6172-
checksum: 10c0/26ee3fabfcbd37d55ccf4912bf0e12ee85320c362096ff9537f70dc094364419f25e626c62e7b94d93f758fb732d34811438c669ad58ea080c29d5a4ac459c05
6267+
checksum: 10c0/4b3a5ff3b27d6aab17f43a737f1f03bab0739b9d95c75e9c19d44003c605bdd0ce067f14f064def7fab7ab3251a2d23155849ea061a1a9d16569b3e990b11a62
61736268
languageName: node
61746269
linkType: hard
61756270

@@ -17338,6 +17433,15 @@ __metadata:
1733817433
languageName: node
1733917434
linkType: hard
1734017435

17436+
"ts-api-utils@npm:^2.4.0":
17437+
version: 2.4.0
17438+
resolution: "ts-api-utils@npm:2.4.0"
17439+
peerDependencies:
17440+
typescript: ">=4.8.4"
17441+
checksum: 10c0/ed185861aef4e7124366a3f6561113557a57504267d4d452a51e0ba516a9b6e713b56b4aeaab9fa13de9db9ab755c65c8c13a777dba9133c214632cb7b65c083
17442+
languageName: node
17443+
linkType: hard
17444+
1734117445
"ts-dedent@npm:^2.2.0":
1734217446
version: 2.2.0
1734317447
resolution: "ts-dedent@npm:2.2.0"

0 commit comments

Comments
 (0)