@mui/internal-code-infra 0.0.3-canary.52 → 0.0.3-canary.54

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.52",
3
+ "version": "0.0.3-canary.54",
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",
@@ -103,8 +104,8 @@
103
104
  "typescript-eslint": "^8.46.3",
104
105
  "yargs": "^18.0.0",
105
106
  "@mui/internal-babel-plugin-display-name": "1.0.4-canary.8",
106
- "@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.11",
107
- "@mui/internal-babel-plugin-resolve-imports": "2.0.7-canary.28"
107
+ "@mui/internal-babel-plugin-resolve-imports": "2.0.7-canary.28",
108
+ "@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.12"
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": "34cb67a083eb058dd61fc7961dffbd32ef28e11a",
145
+ "gitSha": "dc84efdd91bfcc685b9d3a756a30bf108851b8f5",
145
146
  "scripts": {
146
147
  "build": "tsc -p tsconfig.build.json",
147
148
  "typescript": "tsc -p tsconfig.json",
@@ -44,9 +44,6 @@ const criticalAirbnbRules = {
44
44
  'no-restricted-globals': ['error', 'isFinite', 'isNaN'],
45
45
 
46
46
  // Styles
47
- // require or disallow an empty line between class members
48
- // https://eslint.org/docs/rules/lines-between-class-members
49
- 'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: false }],
50
47
  // require a capital letter for constructors
51
48
  'new-cap': [
52
49
  'error',
@@ -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
  {