@mui/internal-code-infra 0.0.4-canary.10 → 0.0.4-canary.101

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.
Files changed (145) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +21 -7
  3. package/build/babel-config.d.mts +5 -1
  4. package/build/brokenLinksChecker/crawlWorker.d.mts +1 -0
  5. package/build/brokenLinksChecker/index.d.mts +192 -2
  6. package/build/changelog/fetchChangelogs.d.mts +3 -0
  7. package/build/changelog/types.d.ts +3 -1
  8. package/build/cli/cmdArgosPush.d.mts +8 -2
  9. package/build/cli/cmdBuild.d.mts +48 -2
  10. package/build/cli/cmdCopyFiles.d.mts +14 -2
  11. package/build/cli/cmdExtractErrorCodes.d.mts +2 -2
  12. package/build/cli/cmdGenerateChangelog.d.mts +17 -2
  13. package/build/cli/cmdGithubAuth.d.mts +2 -2
  14. package/build/cli/cmdListWorkspaces.d.mts +14 -2
  15. package/build/cli/cmdNetlifyIgnore.d.mts +12 -2
  16. package/build/cli/cmdPublish.d.mts +23 -4
  17. package/build/cli/cmdPublishCanary.d.mts +20 -2
  18. package/build/cli/cmdPublishNewPackage.d.mts +10 -2
  19. package/build/cli/cmdRenameScope.d.mts +18 -0
  20. package/build/cli/cmdSetVersionOverrides.d.mts +5 -2
  21. package/build/cli/cmdVale.d.mts +46 -0
  22. package/build/cli/cmdValidateBuiltTypes.d.mts +2 -2
  23. package/build/eslint/baseConfig.d.mts +3 -1
  24. package/build/eslint/mui/rules/disallow-react-api-in-server-components.d.mts +2 -2
  25. package/build/eslint/mui/rules/docgen-ignore-before-comment.d.mts +2 -2
  26. package/build/eslint/mui/rules/no-floating-cleanup.d.mts +5 -0
  27. package/build/eslint/mui/rules/no-guarded-throw.d.mts +31 -0
  28. package/build/eslint/mui/rules/no-presentation-role.d.mts +5 -0
  29. package/build/eslint/mui/rules/no-restricted-resolved-imports.d.mts +8 -2
  30. package/build/eslint/mui/rules/nodeEnvUtils.d.mts +18 -0
  31. package/build/remark/config.d.mts +43 -0
  32. package/build/remark/createLintTester.d.mts +10 -0
  33. package/build/remark/firstBlockHeading.d.mts +4 -0
  34. package/build/remark/gitDiff.d.mts +2 -0
  35. package/build/remark/noSpaceInLinks.d.mts +2 -0
  36. package/build/remark/straightQuotes.d.mts +2 -0
  37. package/build/remark/tableAlignment.d.mts +2 -0
  38. package/build/remark/terminalLanguage.d.mts +2 -0
  39. package/build/utils/babel.d.mts +7 -1
  40. package/build/utils/build.d.mts +59 -37
  41. package/build/utils/extractErrorCodes.d.mts +9 -0
  42. package/build/utils/git.d.mts +16 -0
  43. package/build/utils/github.d.mts +13 -1
  44. package/build/utils/pnpm.d.mts +226 -20
  45. package/build/utils/testUtils.d.mts +28 -0
  46. package/build/utils/typescript.d.mts +6 -16
  47. package/package.json +79 -53
  48. package/src/babel-config.mjs +3 -1
  49. package/src/brokenLinksChecker/crawlWorker.mjs +240 -0
  50. package/src/brokenLinksChecker/index.mjs +263 -188
  51. package/src/changelog/fetchChangelogs.mjs +8 -2
  52. package/src/changelog/renderChangelog.mjs +1 -1
  53. package/src/changelog/types.ts +3 -1
  54. package/src/cli/cmdBuild.mjs +53 -88
  55. package/src/cli/cmdListWorkspaces.mjs +7 -1
  56. package/src/cli/cmdNetlifyIgnore.mjs +30 -5
  57. package/src/cli/cmdPublish.mjs +79 -37
  58. package/src/cli/cmdPublishCanary.mjs +96 -24
  59. package/src/cli/cmdPublishNewPackage.mjs +31 -8
  60. package/src/cli/cmdRenameScope.mjs +76 -0
  61. package/src/cli/cmdSetVersionOverrides.mjs +40 -34
  62. package/src/cli/cmdVale.mjs +513 -0
  63. package/src/cli/index.mjs +4 -0
  64. package/src/cli/packageJson.d.ts +2 -3
  65. package/src/eslint/baseConfig.mjs +51 -19
  66. package/src/eslint/docsConfig.mjs +2 -1
  67. package/src/eslint/mui/config.mjs +24 -4
  68. package/src/eslint/mui/index.mjs +6 -0
  69. package/src/eslint/mui/rules/no-floating-cleanup.mjs +187 -0
  70. package/src/eslint/mui/rules/no-guarded-throw.mjs +115 -0
  71. package/src/eslint/mui/rules/no-presentation-role.mjs +60 -0
  72. package/src/eslint/mui/rules/nodeEnvUtils.mjs +52 -0
  73. package/src/eslint/mui/rules/require-dev-wrapper.mjs +25 -40
  74. package/src/estree-typescript.d.ts +1 -1
  75. package/src/remark/config.mjs +157 -0
  76. package/src/remark/createLintTester.mjs +19 -0
  77. package/src/remark/firstBlockHeading.mjs +87 -0
  78. package/src/remark/gitDiff.mjs +43 -0
  79. package/src/remark/noSpaceInLinks.mjs +42 -0
  80. package/src/remark/straightQuotes.mjs +31 -0
  81. package/src/remark/tableAlignment.mjs +23 -0
  82. package/src/remark/terminalLanguage.mjs +19 -0
  83. package/src/stylelint/index.mjs +2 -2
  84. package/src/untyped-plugins.d.ts +14 -14
  85. package/src/utils/build.mjs +604 -270
  86. package/src/utils/git.mjs +27 -7
  87. package/src/utils/pnpm.mjs +636 -60
  88. package/src/utils/testUtils.mjs +53 -0
  89. package/src/utils/typescript.mjs +23 -42
  90. package/vale/.vale.ini +1 -0
  91. package/vale/styles/MUI/CorrectReferenceAllCases.yml +42 -0
  92. package/vale/styles/MUI/CorrectRererenceCased.yml +14 -0
  93. package/vale/styles/MUI/GoogleLatin.yml +11 -0
  94. package/vale/styles/MUI/MuiBrandName.yml +22 -0
  95. package/vale/styles/MUI/NoBritish.yml +112 -0
  96. package/vale/styles/MUI/NoCompanyName.yml +17 -0
  97. package/build/markdownlint/duplicate-h1.d.mts +0 -56
  98. package/build/markdownlint/git-diff.d.mts +0 -11
  99. package/build/markdownlint/index.d.mts +0 -52
  100. package/build/markdownlint/straight-quotes.d.mts +0 -11
  101. package/build/markdownlint/table-alignment.d.mts +0 -11
  102. package/build/markdownlint/terminal-language.d.mts +0 -11
  103. package/src/brokenLinksChecker/__fixtures__/static-site/broken-links.html +0 -20
  104. package/src/brokenLinksChecker/__fixtures__/static-site/broken-targets.html +0 -22
  105. package/src/brokenLinksChecker/__fixtures__/static-site/example.md +0 -20
  106. package/src/brokenLinksChecker/__fixtures__/static-site/external-links.html +0 -21
  107. package/src/brokenLinksChecker/__fixtures__/static-site/ignored-page.html +0 -17
  108. package/src/brokenLinksChecker/__fixtures__/static-site/index.html +0 -28
  109. package/src/brokenLinksChecker/__fixtures__/static-site/known-targets.json +0 -5
  110. package/src/brokenLinksChecker/__fixtures__/static-site/nested/page.html +0 -21
  111. package/src/brokenLinksChecker/__fixtures__/static-site/orphaned-page.html +0 -20
  112. package/src/brokenLinksChecker/__fixtures__/static-site/page-with-api-links.html +0 -20
  113. package/src/brokenLinksChecker/__fixtures__/static-site/page-with-custom-targets.html +0 -24
  114. package/src/brokenLinksChecker/__fixtures__/static-site/page-with-ignored-content.html +0 -28
  115. package/src/brokenLinksChecker/__fixtures__/static-site/page-with-known-target-links.html +0 -19
  116. package/src/brokenLinksChecker/__fixtures__/static-site/unclosed-tags.html +0 -1
  117. package/src/brokenLinksChecker/__fixtures__/static-site/valid.html +0 -20
  118. package/src/brokenLinksChecker/__fixtures__/static-site/with-anchors.html +0 -31
  119. package/src/brokenLinksChecker/index.test.ts +0 -261
  120. package/src/changelog/categorizeCommits.test.ts +0 -319
  121. package/src/changelog/filterCommits.test.ts +0 -363
  122. package/src/changelog/parseCommitLabels.test.ts +0 -509
  123. package/src/changelog/renderChangelog.test.ts +0 -378
  124. package/src/changelog/sortSections.test.ts +0 -199
  125. package/src/eslint/mui/rules/add-undef-to-optional.test.mjs +0 -361
  126. package/src/eslint/mui/rules/consistent-production-guard.test.mjs +0 -162
  127. package/src/eslint/mui/rules/disallow-active-elements-as-key-event-target.test.mjs +0 -66
  128. package/src/eslint/mui/rules/disallow-react-api-in-server-components.test.mjs +0 -305
  129. package/src/eslint/mui/rules/docgen-ignore-before-comment.test.mjs +0 -52
  130. package/src/eslint/mui/rules/flatten-parentheses.test.mjs +0 -245
  131. package/src/eslint/mui/rules/mui-name-matches-component-name.test.mjs +0 -247
  132. package/src/eslint/mui/rules/no-empty-box.test.mjs +0 -40
  133. package/src/eslint/mui/rules/no-styled-box.test.mjs +0 -73
  134. package/src/eslint/mui/rules/require-dev-wrapper.test.mjs +0 -265
  135. package/src/eslint/mui/rules/rules-of-use-theme-variants.test.mjs +0 -149
  136. package/src/eslint/mui/rules/straight-quotes.test.mjs +0 -67
  137. package/src/markdownlint/duplicate-h1.mjs +0 -69
  138. package/src/markdownlint/git-diff.mjs +0 -31
  139. package/src/markdownlint/index.mjs +0 -62
  140. package/src/markdownlint/straight-quotes.mjs +0 -26
  141. package/src/markdownlint/table-alignment.mjs +0 -42
  142. package/src/markdownlint/terminal-language.mjs +0 -19
  143. package/src/utils/build.test.mjs +0 -705
  144. package/src/utils/template.test.mjs +0 -133
  145. package/src/utils/typescript.test.mjs +0 -380
@@ -0,0 +1,53 @@
1
+ import * as fs from 'node:fs/promises';
2
+ import * as os from 'node:os';
3
+ import * as path from 'node:path';
4
+ import { onTestFinished } from 'vitest';
5
+
6
+ import { writePackageJson } from './pnpm.mjs';
7
+
8
+ /**
9
+ * Creates a temporary directory and registers an `onTestFinished` hook to
10
+ * remove it automatically when the current test ends — even if the test throws.
11
+ *
12
+ * @returns {Promise<string>} The path of the created temporary directory.
13
+ */
14
+ export async function makeTempDir() {
15
+ const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), 'code-infra-test-'));
16
+ onTestFinished(async () => {
17
+ await fs.rm(tmpDir, { recursive: true, force: true });
18
+ });
19
+ return tmpDir;
20
+ }
21
+
22
+ /**
23
+ * Write a package.json into a subdirectory of a temp workspace.
24
+ *
25
+ * @param {string} root - Workspace root
26
+ * @param {string} dir - Subdirectory to create
27
+ * @param {object} pkgJson - Manifest contents
28
+ * @returns {Promise<string>} The package directory
29
+ */
30
+ export async function writePackage(root, dir, pkgJson) {
31
+ const pkgDir = path.join(root, dir);
32
+ await fs.mkdir(pkgDir, { recursive: true });
33
+ await writePackageJson(pkgDir, pkgJson);
34
+ return pkgDir;
35
+ }
36
+
37
+ /**
38
+ * @param {string} name
39
+ * @param {string} pkgPath
40
+ * @returns {import('./pnpm.mjs').PublicPackage}
41
+ */
42
+ export function publicPkg(name, pkgPath) {
43
+ return { name, version: '1.0.0', path: pkgPath, isPrivate: false };
44
+ }
45
+
46
+ /**
47
+ * @param {string} name
48
+ * @param {string} pkgPath
49
+ * @returns {import('./pnpm.mjs').PrivatePackage}
50
+ */
51
+ export function privatePkg(name, pkgPath) {
52
+ return { name, version: '1.0.0', path: pkgPath, isPrivate: true };
53
+ }
@@ -111,30 +111,21 @@ export async function copyDeclarations(sourceDirectory, destinationDirectory, op
111
111
  * @param {Object} param0
112
112
  * @param {string} param0.inputDir
113
113
  * @param {string} param0.buildDir
114
- * @param {{type: import('../utils/build.mjs').BundleType, dir: string}[]} param0.bundles
115
- * @param {boolean} [param0.isFlat]
114
+ * @param {import('../utils/build.mjs').BundleType[]} param0.bundles
116
115
  * @param {'module' | 'commonjs'} [param0.packageType]
117
116
  * @returns
118
117
  */
119
- export async function moveAndTransformDeclarations({
120
- inputDir,
121
- buildDir,
122
- bundles,
123
- isFlat,
124
- packageType,
125
- }) {
126
- // Directly copy to the bundle directory if there's only one bundle, mainly for esm, since
127
- // the js files are inside 'esm' folder. resolve-imports plugin needs d.ts to be alongside js files to
128
- // resolve paths correctly.
129
- const toCopyDir = bundles.length === 1 ? path.join(buildDir, bundles[0].dir) : buildDir;
130
- await fs.cp(inputDir, toCopyDir, {
118
+ export async function moveAndTransformDeclarations({ inputDir, buildDir, bundles, packageType }) {
119
+ // d.ts files sit alongside the js files in the build root so the resolve-imports
120
+ // plugin can resolve paths correctly.
121
+ await fs.cp(inputDir, buildDir, {
131
122
  recursive: true,
132
123
  force: false,
133
124
  });
134
125
 
135
- const dtsFiles = await globby('**/*.d.ts', { absolute: true, cwd: toCopyDir });
126
+ const dtsFiles = await globby('**/*.d.ts', { absolute: true, cwd: buildDir });
136
127
  if (dtsFiles.length === 0) {
137
- console.log(`No d.ts files found in ${toCopyDir}. Skipping transformation.`);
128
+ console.log(`No d.ts files found in ${buildDir}. Skipping transformation.`);
138
129
  return;
139
130
  }
140
131
 
@@ -144,37 +135,30 @@ export async function moveAndTransformDeclarations({
144
135
  // Normalize to native separators to make path comparisons reliable on Windows
145
136
  const nativeDtsFile = path.normalize(dtsFile);
146
137
  const content = await fs.readFile(nativeDtsFile, 'utf8');
147
- const relativePath = path.relative(toCopyDir, nativeDtsFile);
138
+ const relativePath = path.relative(buildDir, nativeDtsFile);
148
139
 
149
- const writesToOriginalPath =
150
- isFlat &&
151
- bundles.some((bundle) => {
152
- const newFileExtension = getOutExtension(bundle.type, {
153
- isFlat,
154
- isType: true,
155
- packageType,
156
- });
157
- const outFileRelative = relativePath.replace(/\.d\.ts$/, newFileExtension);
158
- const outFilePath = path.join(buildDir, bundle.dir, outFileRelative);
159
- // Ensure both paths are normalized before comparison (fixes Windows posix vs win32 separators)
160
- return path.resolve(outFilePath) === path.resolve(nativeDtsFile);
140
+ const writesToOriginalPath = bundles.some((bundle) => {
141
+ const newFileExtension = getOutExtension(bundle, {
142
+ isType: true,
143
+ packageType,
161
144
  });
145
+ const outFileRelative = relativePath.replace(/\.d\.ts$/, newFileExtension);
146
+ const outFilePath = path.join(buildDir, outFileRelative);
147
+ // Ensure both paths are normalized before comparison (fixes Windows posix vs win32 separators)
148
+ return path.resolve(outFilePath) === path.resolve(nativeDtsFile);
149
+ });
162
150
 
163
151
  await Promise.all(
164
152
  bundles.map(async (bundle) => {
165
- const importExtension = getOutExtension(bundle.type, {
166
- isFlat,
153
+ const importExtension = getOutExtension(bundle, {
167
154
  packageType,
168
155
  });
169
- const newFileExtension = getOutExtension(bundle.type, {
170
- isFlat,
156
+ const newFileExtension = getOutExtension(bundle, {
171
157
  isType: true,
172
158
  packageType,
173
159
  });
174
- const outFileRelative = isFlat
175
- ? relativePath.replace(/\.d\.ts$/, newFileExtension)
176
- : relativePath;
177
- const outFilePath = path.join(buildDir, bundle.dir, outFileRelative);
160
+ const outFileRelative = relativePath.replace(/\.d\.ts$/, newFileExtension);
161
+ const outFilePath = path.join(buildDir, outFileRelative);
178
162
 
179
163
  const babelPlugins = [
180
164
  [pluginTypescriptSyntax, { dts: true }],
@@ -194,7 +178,7 @@ export async function moveAndTransformDeclarations({
194
178
  }
195
179
  }),
196
180
  );
197
- if (isFlat && !writesToOriginalPath) {
181
+ if (!writesToOriginalPath) {
198
182
  await fs.unlink(nativeDtsFile);
199
183
  }
200
184
  },
@@ -208,9 +192,8 @@ export async function moveAndTransformDeclarations({
208
192
  * After copying, babel transformations are applied to the copied files because they need to be alongside the actual js files for proper resolution.
209
193
  *
210
194
  * @param {Object} param0
211
- * @param {boolean} [param0.isFlat = false] - Whether to place generated declaration files in a flattened directory.
212
195
  * @param {boolean} [param0.verbose = false] - Whether to log additional information while generating and moving declaration files.
213
- * @param {{type: import('../utils/build.mjs').BundleType, dir: string}[]} param0.bundles - The bundles to create declarations for.
196
+ * @param {import('../utils/build.mjs').BundleType[]} param0.bundles - The bundles to create declarations for.
214
197
  * @param {string} param0.srcDir - The source directory.
215
198
  * @param {string} param0.buildDir - The build directory.
216
199
  * @param {string} param0.cwd - The current working directory.
@@ -225,7 +208,6 @@ export async function createTypes({
225
208
  cwd,
226
209
  skipTsc,
227
210
  useTsgo = false,
228
- isFlat = false,
229
211
  packageType,
230
212
  verbose,
231
213
  }) {
@@ -253,7 +235,6 @@ export async function createTypes({
253
235
  inputDir: tmpDir,
254
236
  buildDir,
255
237
  bundles,
256
- isFlat,
257
238
  packageType,
258
239
  });
259
240
  } finally {
package/vale/.vale.ini ADDED
@@ -0,0 +1 @@
1
+ StylesPath = styles
@@ -0,0 +1,42 @@
1
+ # Enforce a single way to write specific terms or phrases.
2
+ extends: substitution
3
+ message: Use '%s' instead of '%s'
4
+ level: error
5
+ ignorecase: true # There is only one correct way to spell those, so we want to match inputs regardless of case.
6
+ # swap maps tokens in form of bad: good
7
+ # for more information: https://vale.sh/docs/topics/styles/#substitution
8
+ swap:
9
+ ' api': ' API'
10
+ 'typescript ': 'TypeScript '
11
+ ' ts': ' TypeScript'
12
+ javascript: JavaScript
13
+ ' js': ' JavaScript'
14
+ ' css ': ' CSS '
15
+ ' html ': ' HTML '
16
+ NPM: npm # https://css-tricks.com/start-sentence-npm/
17
+ Github: GitHub
18
+ StackOverflow: Stack Overflow
19
+ Stack Overflow: Stack Overflow
20
+ CSS modules: CSS Modules
21
+ Tailwind CSS: Tailwind CSS
22
+ Heat map: Heatmap
23
+ Tree map: Treemap
24
+ Sparkline Chart: Sparkline chart
25
+ Gauge Chart: Gauge chart
26
+ Treemap Chart: Treemap chart
27
+ sub-component: subcomponent
28
+ sub-components: subcomponents
29
+ use-case: use case
30
+ usecase: use case
31
+ Material 3: Material Design 3
32
+ VSCode: VS Code
33
+ VS Code: VS Code
34
+ 'Codesandbox ': 'CodeSandbox '
35
+ code sandbox: CodeSandbox
36
+ Stackblitz: StackBlitz
37
+ Webpack: webpack # https://x.com/wSokra/status/855800490713649152
38
+ app router: App Router # Next.js
39
+ pages router: Pages Router # Next.js
40
+ page router: Pages Router # Next.js
41
+ eslint: ESLint
42
+ ES modules: ES modules
@@ -0,0 +1,14 @@
1
+ # Write things correctly, please no wrong references.
2
+ extends: substitution
3
+ message: Use '%s' instead of '%s'
4
+ level: error
5
+ ignorecase: false
6
+ # swap maps tokens in form of bad: good
7
+ # for more information: https://vale.sh/docs/topics/styles/#substitution
8
+ swap:
9
+ eg: e.g.
10
+ eg\.: e.g.
11
+ e\.g: e.g.
12
+ ie: i.e.
13
+ ie\.: i.e.
14
+ i\.e: i.e.
@@ -0,0 +1,11 @@
1
+ extends: substitution
2
+ message: Use '%s' instead of '%s'
3
+ link: https://developers.google.com/style/abbreviations
4
+ ignorecase: false
5
+ level: error
6
+ nonword: true
7
+ action:
8
+ name: replace
9
+ swap:
10
+ '\b(?:eg|e\.g\.)(?=[\s,;])': for example
11
+ '\b(?:ie|i\.e\.)(?=[\s,;])': that is
@@ -0,0 +1,22 @@
1
+ # Without a non-breaking space, brand names can be split in the middle
2
+ # with the start and end on two different lines.
3
+ # For example, Apple does this meticulously with their brand name: https://www.apple.com/macbook-air/.
4
+ # Also read https://www.chrisdpeters.com/blog/using-non-breaking-spaces-to-help-with-branding/ for why.
5
+ extends: substitution
6
+ message: Use a non-breaking space (option+space on Mac, Alt+0160 on Windows or AltGr+Space on Linux, instead of space) for brand name ('%s' instead of '%s')
7
+ level: error
8
+ ignorecase: true
9
+ # swap maps tokens in form of bad: good
10
+ # for more information: https://vale.sh/docs/topics/styles/#substitution
11
+ swap:
12
+ Material UI: Material UI
13
+ MUI X: MUI X
14
+ Base UI: Base UI
15
+ MUI Base: MUI Base
16
+ MUI System: MUI System
17
+ MUI Store: MUI Store
18
+ MUI Core: MUI Core
19
+ MUI Toolpad: Toolpad
20
+ MUI Toolpad: Toolpad
21
+ MUI Connect: MUI Connect
22
+ Pigment CSS: Pigment CSS
@@ -0,0 +1,112 @@
1
+ extends: substitution
2
+ message: Use the US spelling '%s' instead of the British '%s'
3
+ link: https://www.notion.so/mui-org/Writing-style-guide-2a957a4168a54d47b14bae026d06a24b?pvs=4#25755bff02764565b954631236ab183d
4
+ level: error
5
+ ignorecase: true
6
+ swap:
7
+ aeon: eon
8
+ aeroplane: airplane
9
+ ageing: aging
10
+ aluminium: aluminum
11
+ anaemia: anemia
12
+ anaesthesia: anesthesia
13
+ analyse: analyze
14
+ annexe: annex
15
+ apologise: apologize
16
+ authorisation: authorization
17
+ authorise: authorize
18
+ authorised: authorized
19
+ authorising: authorizing
20
+ behaviour: behavior
21
+ bellow: below
22
+ busses: buses
23
+ calibre: caliber
24
+ categorise: categorize
25
+ categorised: categorized
26
+ categorises: categorizes
27
+ categorising: categorizing
28
+ centre: center
29
+ cheque: check
30
+ civilisation: civilization
31
+ civilise: civilize
32
+ colour: color
33
+ cosy: cozy
34
+ cypher: cipher
35
+ defence: defense
36
+ dependant: dependent
37
+ distil: distill
38
+ draught: draft
39
+ encyclopaedia: encyclopedia
40
+ enquiry: inquiry
41
+ enrol: enroll
42
+ enrolment: enrollment
43
+ enthral: enthrall
44
+ favourite: favorite
45
+ fibre: fiber
46
+ fillet: filet
47
+ flavour: flavor
48
+ fulfil: fulfill
49
+ furore: furor
50
+ gaol: jail
51
+ grey: gray
52
+ honour: honor
53
+ humour: humor
54
+ initialled: initialed
55
+ initialling: initialing
56
+ instil: instill
57
+ jewellery: jewelry
58
+ labelled: labeled
59
+ labelling: labeling
60
+ labour: labor
61
+ libellous: libelous
62
+ licence: license
63
+ likeable: likable
64
+ liveable: livable
65
+ lustre: luster
66
+ manoeuvre: maneuver
67
+ marvellous: marvelous
68
+ meagre: meager
69
+ metre: meter
70
+ modelling: modeling
71
+ moustache: mustache
72
+ neighbour: neighbor
73
+ normalise: normalize
74
+ offence: offense
75
+ optimise: optimize
76
+ optimised: optimized
77
+ optimising: optimizing
78
+ organise: organize
79
+ orientated: oriented
80
+ paralyse: paralyze
81
+ plough: plow
82
+ pretence: pretense
83
+ programme: program
84
+ pyjamas: pajamas
85
+ rateable: ratable
86
+ realise: realize
87
+ recognise: recognize
88
+ reconnoitre: reconnoiter
89
+ rumour: rumor
90
+ sabre: saber
91
+ saleable: salable
92
+ saltpetre: saltpeter
93
+ sceptic: skeptic
94
+ sepulchre: sepulcher
95
+ signalling: signaling
96
+ sizeable: sizable
97
+ skilful: skillful
98
+ smoulder: smolder
99
+ sombre: somber
100
+ speciality: specialty
101
+ spectre: specter
102
+ splendour: splendor
103
+ standardise: standardize
104
+ standardised: standardized
105
+ sulphur: sulfur
106
+ theatre: theater
107
+ travelled: traveled
108
+ traveller: traveler
109
+ travelling: traveling
110
+ unshakeable: unshakable
111
+ wilful: willful
112
+ yoghurt: yogurt
@@ -0,0 +1,17 @@
1
+ extends: existence
2
+ message: We avoid referencing the company name '%s'. Instead you can reference a product or the team.
3
+ level: warning
4
+ ignorecase: false
5
+ tokens:
6
+ - 'MUI \w+'
7
+ exceptions:
8
+ - 'MUI X'
9
+ - 'MUI System'
10
+ - 'MUI Store'
11
+ - 'MUI Core'
12
+ - 'MUI Connect'
13
+ # valid use of a regular space
14
+ - 'MUI organization'
15
+ - 'MUI ecosystem'
16
+ - 'MUI products'
17
+ - 'MUI team'
@@ -1,56 +0,0 @@
1
- /**
2
- * @typedef {[string, string]} Attr
3
- */
4
- export type Attr = [string, string];
5
- export type Token = {
6
- type: string;
7
- info: string;
8
- tag: string;
9
- content: string;
10
- lineNumber: number;
11
- attrs: Attr[];
12
- };
13
- export type OnErrorObj = {
14
- lineNumber: number;
15
- detail?: string;
16
- };
17
- export type OnError = (err: OnErrorObj) => void;
18
- export type MdParams = {
19
- name: string;
20
- lines: string[];
21
- tokens: Token[];
22
- };
23
- /**
24
- * @typedef {Object} Token
25
- * @property {string} type
26
- * @property {string} info
27
- * @property {string} tag
28
- * @property {string} content
29
- * @property {number} lineNumber
30
- * @property {Attr[]} attrs
31
- */
32
- /**
33
- * @typedef {Object} OnErrorObj
34
- * @property {number} lineNumber
35
- * @property {string} [detail]
36
- */
37
- /**
38
- * @typedef {(err: OnErrorObj) => void} OnError
39
- */
40
- /**
41
- * @typedef {Object} MdParams
42
- * @property {string} name
43
- * @property {string[]} lines
44
- * @property {Token[]} tokens
45
- */
46
- declare const _default: {
47
- names: string[];
48
- description: string;
49
- tags: string[];
50
- /**
51
- * @param {import('./duplicate-h1.mjs').MdParams} params
52
- * @param {import('./duplicate-h1.mjs').OnError} onError
53
- */
54
- function: (params: MdParams, onError: OnError) => void;
55
- };
56
- export default _default;
@@ -1,11 +0,0 @@
1
- declare const _default: {
2
- names: string[];
3
- description: string;
4
- tags: string[];
5
- /**
6
- * @param {import('./duplicate-h1.mjs').MdParams} params
7
- * @param {import('./duplicate-h1.mjs').OnError} onError
8
- */
9
- function: (params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError) => void;
10
- };
11
- export default _default;
@@ -1,52 +0,0 @@
1
- import straightQuotes from './straight-quotes.mjs';
2
- /**
3
- * Create a base configuration for markdownlint.
4
- * @param {Object} options
5
- * @param {(typeof straightQuotes)[]} [options.rules] - An array of custom rules to include.
6
- * @param {string[]} [options.ignores] - An array of glob patterns to ignore.
7
- * @returns
8
- */
9
- export declare function createBaseConfig(options?: {
10
- rules?: (typeof straightQuotes)[];
11
- ignores?: string[];
12
- }): {
13
- config: {
14
- default: boolean;
15
- MD004: boolean;
16
- MD009: {
17
- br_spaces: number;
18
- strict: boolean;
19
- list_item_empty_lines: boolean;
20
- };
21
- MD013: boolean;
22
- MD014: boolean;
23
- MD024: {
24
- siblings_only: boolean;
25
- };
26
- MD025: {
27
- level: number;
28
- front_matter_title: string;
29
- };
30
- MD033: boolean;
31
- MD034: boolean;
32
- MD028: boolean;
33
- MD029: boolean;
34
- MD031: boolean;
35
- MD036: boolean;
36
- MD051: boolean;
37
- MD052: boolean;
38
- MD059: boolean;
39
- straightQuotes: boolean;
40
- gitDiff: boolean;
41
- tableAlignment: boolean;
42
- terminalLanguage: boolean;
43
- duplicateH1: boolean;
44
- };
45
- customRules: {
46
- names: string[];
47
- description: string;
48
- tags: string[];
49
- function: (params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError) => void;
50
- }[];
51
- ignores: string[];
52
- };
@@ -1,11 +0,0 @@
1
- declare const _default: {
2
- names: string[];
3
- description: string;
4
- tags: string[];
5
- /**
6
- * @param {import('./duplicate-h1.mjs').MdParams} params
7
- * @param {import('./duplicate-h1.mjs').OnError} onError
8
- */
9
- function: (params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError) => void;
10
- };
11
- export default _default;
@@ -1,11 +0,0 @@
1
- declare const _default: {
2
- names: string[];
3
- description: string;
4
- tags: string[];
5
- /**
6
- * @param {import('./duplicate-h1.mjs').MdParams} params
7
- * @param {import('./duplicate-h1.mjs').OnError} onError
8
- */
9
- function: (params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError) => void;
10
- };
11
- export default _default;
@@ -1,11 +0,0 @@
1
- declare const _default: {
2
- names: string[];
3
- description: string;
4
- tags: string[];
5
- /**
6
- * @param {import('./duplicate-h1.mjs').MdParams} params
7
- * @param {import('./duplicate-h1.mjs').OnError} onError
8
- */
9
- function: (params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError) => void;
10
- };
11
- export default _default;
@@ -1,20 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Page with Broken Links</title>
7
- </head>
8
- <body>
9
- <h1>Page with Broken Links</h1>
10
- <p>This page contains links to non-existent pages.</p>
11
- <nav>
12
- <ul>
13
- <li><a href="/">Home (valid)</a></li>
14
- <li><a href="/does-not-exist.html">This page does not exist</a></li>
15
- <li><a href="/another-missing-page.html">Another missing page</a></li>
16
- <li><a href="/valid.html">Valid link</a></li>
17
- </ul>
18
- </nav>
19
- </body>
20
- </html>
@@ -1,22 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Page with Broken Targets</title>
7
- </head>
8
- <body>
9
- <h1>Page with Broken Targets</h1>
10
- <p>This page contains links to valid pages but with invalid hash targets.</p>
11
- <nav>
12
- <ul>
13
- <li><a href="/">Home (valid)</a></li>
14
- <li><a href="/with-anchors.html#section1">Valid anchor</a></li>
15
- <li><a href="/with-anchors.html#nonexistent">Non-existent anchor</a></li>
16
- <li><a href="/valid.html#missing-target">Valid page, missing target</a></li>
17
- <li><a href="/with-anchors.html#section2">Another valid anchor</a></li>
18
- <li><a href="/with-anchors.html#also-missing">Also missing</a></li>
19
- </ul>
20
- </nav>
21
- </body>
22
- </html>
@@ -1,20 +0,0 @@
1
- # Example Markdown File
2
-
3
- This is a markdown file with links:
4
-
5
- - [Link to valid page](/valid.html)
6
- - [Link to page with anchors](/with-anchors.html#section1)
7
- - [Broken markdown link](/broken-from-markdown.html)
8
- - [Relative link to valid page](valid.html)
9
- - [Relative link with dot-slash](./with-anchors.html)
10
- - [Relative broken link](broken-relative.html)
11
-
12
- ## Markdown Section
13
-
14
- This section has an anchor target (`#markdown-section`) generated by rehype-slug.
15
-
16
- This is a code block with a link that should NOT be extracted:
17
-
18
- ```html
19
- <a href="/this-should-not-be-checked.html">Link in code block</a>
20
- ```
@@ -1,21 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Page with External Links</title>
7
- </head>
8
- <body>
9
- <h1>Page with External Links</h1>
10
- <p>This page contains external links that should be ignored.</p>
11
- <nav>
12
- <ul>
13
- <li><a href="/">Home (valid internal)</a></li>
14
- <li><a href="https://example.com">External link 1</a></li>
15
- <li><a href="https://github.com/mui">External link 2</a></li>
16
- <li><a href="http://localhost:9999/fake">External localhost</a></li>
17
- <li><a href="/valid.html">Valid internal link</a></li>
18
- </ul>
19
- </nav>
20
- </body>
21
- </html>
@@ -1,17 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Ignored Page</title>
7
- </head>
8
- <body>
9
- <h1>Ignored Page</h1>
10
- <p>This page should be ignored by the crawler.</p>
11
- <nav>
12
- <ul>
13
- <li><a href="/this-link-should-not-be-checked.html">Should not be checked</a></li>
14
- </ul>
15
- </nav>
16
- </body>
17
- </html>