Skip to content

Commit 0dd2b16

Browse files
committed
Adapt eslint config to vitest
1 parent 0500f2c commit 0dd2b16

File tree

2 files changed

+7
-86
lines changed

2 files changed

+7
-86
lines changed

.eslintrc.js

Lines changed: 0 additions & 70 deletions
This file was deleted.

eslint.config.js

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const eslint = require("@eslint/js");
22
const tseslint = require("typescript-eslint");
33
const tsdoc = require("eslint-plugin-tsdoc");
4-
const jest = require("eslint-plugin-jest");
4+
const vitest = require("@vitest/eslint-plugin");
55
const globals = require("globals");
66
const prettier = require("eslint-config-prettier");
77

@@ -59,25 +59,16 @@ module.exports = [
5959
"@typescript-eslint/ban-ts-ignore": "off",
6060
},
6161
})),
62-
// Jest linting for test files
62+
// Vitest linting for test files
6363
{
6464
files: ["tests/*.ts"],
65-
...jest.configs["flat/recommended"],
66-
// languageOptions: {
67-
// ...jest.configs['flat/recommended'].languageOptions,
68-
// globals: globals.jest,
69-
// },
65+
plugins: { vitest },
7066
rules: {
71-
...jest.configs["flat/recommended"].rules,
67+
...vitest.configs.recommended.rules,
7268
// @TODO: Remove all of these rules and adapt code!
73-
"jest/no-disabled-tests": "off",
74-
"jest/expect-expect": "off",
75-
"jest/no-conditional-expect": "off",
76-
"jest/valid-title": "off",
77-
"jest/no-jasmine-globals": "off",
78-
"jest/valid-expect-in-promise": "off",
79-
"jest/valid-expect": "off",
80-
"jest/no-alias-methods": "off",
69+
"vitest/expect-expect": "off",
70+
"vitest/valid-title": "off",
71+
"vitest/valid-expect": "off",
8172
},
8273
},
8374
prettier,

0 commit comments

Comments
 (0)