Skip to content

Commit c27070a

Browse files
committed
Fix lint to work with Vitest
1 parent ca97411 commit c27070a

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.eslintrc.cjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ module.exports = {
3333
next: 'multiline-block-like',
3434
},
3535
],
36+
3637
// It's common for scripts to access `process.env`
3738
'node/no-process-env': 'off',
3839
},
@@ -46,6 +47,18 @@ module.exports = {
4647
{
4748
files: ['*.test.ts'],
4849
extends: ['@metamask/eslint-config-jest'],
50+
51+
settings: {
52+
jest: {
53+
// This package uses Vitest, but `@metamask/eslint-config-vitest` is
54+
// only available for ESLint 9+. The Jest rules are similar enough,
55+
// but we need to explicitly set the Jest version since we're not
56+
// using the `jest` package directly.
57+
// TODO: Remove this when migrating to
58+
// `@metamask/eslint-config-vitest`.
59+
version: 29,
60+
},
61+
},
4962
},
5063
],
5164

src/functional.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import { withMonorepoProjectEnvironment } from '../tests/functional/helpers/with
22
import { buildChangelog } from '../tests/helpers.js';
33

44
describe(
5+
// This is valid with Vitest.
6+
// TODO: Remove this when migrating to `@metamask/eslint-config-vitest`.
7+
// eslint-disable-next-line jest/valid-describe-callback
58
'create-release-branch (functional)',
69
{
710
timeout: 10_000,

0 commit comments

Comments
 (0)