@mui/internal-code-infra 0.0.3-canary.52 → 0.0.3-canary.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {Object} [options]
|
|
3
3
|
* @param {boolean} [options.useMocha]
|
|
4
|
+
* @param {boolean} [options.useVitest]
|
|
4
5
|
* @returns {import('eslint').Linter.Config[]}
|
|
5
6
|
*/
|
|
6
7
|
export function createTestConfig(options?: {
|
|
7
8
|
useMocha?: boolean | undefined;
|
|
9
|
+
useVitest?: boolean | undefined;
|
|
8
10
|
}): import("eslint").Linter.Config[];
|
|
9
11
|
/**
|
|
10
12
|
* @type {import('eslint').Linter.Config}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/internal-code-infra",
|
|
3
|
-
"version": "0.0.3-canary.
|
|
3
|
+
"version": "0.0.3-canary.53",
|
|
4
4
|
"description": "Infra scripts and configs to be used across MUI repos.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"@octokit/oauth-methods": "^6.0.2",
|
|
69
69
|
"@octokit/rest": "^22.0.1",
|
|
70
70
|
"@pnpm/find-workspace-dir": "^1000.1.3",
|
|
71
|
+
"@vitest/eslint-plugin": "^1.5.0",
|
|
71
72
|
"babel-plugin-optimize-clsx": "^2.6.2",
|
|
72
73
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
73
74
|
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
|
|
@@ -102,9 +103,9 @@
|
|
|
102
103
|
"stylelint-config-standard": "^39.0.1",
|
|
103
104
|
"typescript-eslint": "^8.46.3",
|
|
104
105
|
"yargs": "^18.0.0",
|
|
105
|
-
"@mui/internal-babel-plugin-
|
|
106
|
-
"@mui/internal-babel-plugin-
|
|
107
|
-
"@mui/internal-babel-plugin-
|
|
106
|
+
"@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.12",
|
|
107
|
+
"@mui/internal-babel-plugin-resolve-imports": "2.0.7-canary.28",
|
|
108
|
+
"@mui/internal-babel-plugin-display-name": "1.0.4-canary.8"
|
|
108
109
|
},
|
|
109
110
|
"peerDependencies": {
|
|
110
111
|
"@next/eslint-plugin-next": "*",
|
|
@@ -141,7 +142,7 @@
|
|
|
141
142
|
"publishConfig": {
|
|
142
143
|
"access": "public"
|
|
143
144
|
},
|
|
144
|
-
"gitSha": "
|
|
145
|
+
"gitSha": "9cc15ae47e8be0c5f9fe8c09553d5aeb238b9d8a",
|
|
145
146
|
"scripts": {
|
|
146
147
|
"build": "tsc -p tsconfig.build.json",
|
|
147
148
|
"typescript": "tsc -p tsconfig.json",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import mochaPlugin from 'eslint-plugin-mocha';
|
|
2
|
+
import vitestPlugin from '@vitest/eslint-plugin';
|
|
2
3
|
import testingLibrary from 'eslint-plugin-testing-library';
|
|
3
4
|
import { defineConfig } from 'eslint/config';
|
|
4
5
|
import globals from 'globals';
|
|
@@ -45,12 +46,14 @@ export const baseSpecRules = {
|
|
|
45
46
|
/**
|
|
46
47
|
* @param {Object} [options]
|
|
47
48
|
* @param {boolean} [options.useMocha]
|
|
49
|
+
* @param {boolean} [options.useVitest]
|
|
48
50
|
* @returns {import('eslint').Linter.Config[]}
|
|
49
51
|
*/
|
|
50
52
|
export function createTestConfig(options = {}) {
|
|
51
|
-
const { useMocha = true } = options;
|
|
53
|
+
const { useMocha = true, useVitest = false } = options;
|
|
52
54
|
return defineConfig(
|
|
53
55
|
useMocha ? mochaPlugin.configs.recommended : {},
|
|
56
|
+
useVitest ? vitestPlugin.configs.recommended : {},
|
|
54
57
|
testingLibrary.configs['flat/dom'],
|
|
55
58
|
testingLibrary.configs['flat/react'],
|
|
56
59
|
{
|