@mui/internal-code-infra 0.0.3-canary.6 → 0.0.3-canary.61

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 (99) hide show
  1. package/README.md +55 -0
  2. package/build/babel-config.d.mts +40 -0
  3. package/build/brokenLinksChecker/index.d.mts +138 -0
  4. package/build/cli/cmdArgosPush.d.mts +13 -0
  5. package/build/cli/cmdBuild.d.mts +56 -0
  6. package/build/cli/cmdCopyFiles.d.mts +20 -0
  7. package/build/cli/cmdExtractErrorCodes.d.mts +3 -0
  8. package/build/cli/cmdGithubAuth.d.mts +6 -0
  9. package/build/cli/cmdListWorkspaces.d.mts +18 -0
  10. package/build/cli/cmdPublish.d.mts +27 -0
  11. package/build/cli/cmdPublishCanary.d.mts +30 -0
  12. package/build/cli/cmdPublishNewPackage.d.mts +8 -0
  13. package/build/cli/cmdSetVersionOverrides.d.mts +9 -0
  14. package/build/cli/cmdValidateBuiltTypes.d.mts +2 -0
  15. package/build/cli/index.d.mts +1 -0
  16. package/build/eslint/baseConfig.d.mts +10 -0
  17. package/build/eslint/docsConfig.d.mts +4 -0
  18. package/build/eslint/extensions.d.mts +8 -0
  19. package/build/eslint/index.d.mts +4 -0
  20. package/build/eslint/jsonConfig.d.mts +4 -0
  21. package/build/eslint/material-ui/config.d.mts +8 -0
  22. package/build/eslint/material-ui/index.d.mts +2 -0
  23. package/build/eslint/material-ui/rules/disallow-active-element-as-key-event-target.d.mts +5 -0
  24. package/build/eslint/material-ui/rules/disallow-react-api-in-server-components.d.mts +2 -0
  25. package/build/eslint/material-ui/rules/docgen-ignore-before-comment.d.mts +2 -0
  26. package/build/eslint/material-ui/rules/mui-name-matches-component-name.d.mts +5 -0
  27. package/build/eslint/material-ui/rules/no-empty-box.d.mts +5 -0
  28. package/build/eslint/material-ui/rules/no-restricted-resolved-imports.d.mts +12 -0
  29. package/build/eslint/material-ui/rules/no-styled-box.d.mts +5 -0
  30. package/build/eslint/material-ui/rules/rules-of-use-theme-variants.d.mts +9 -0
  31. package/build/eslint/material-ui/rules/straight-quotes.d.mts +5 -0
  32. package/build/eslint/testConfig.d.mts +14 -0
  33. package/build/markdownlint/duplicate-h1.d.mts +27 -0
  34. package/build/markdownlint/git-diff.d.mts +8 -0
  35. package/build/markdownlint/index.d.mts +56 -0
  36. package/build/markdownlint/straight-quotes.d.mts +8 -0
  37. package/build/markdownlint/table-alignment.d.mts +8 -0
  38. package/build/markdownlint/terminal-language.d.mts +8 -0
  39. package/build/prettier.d.mts +20 -0
  40. package/build/stylelint/index.d.mts +32 -0
  41. package/build/utils/babel.d.mts +71 -0
  42. package/build/utils/build.d.mts +50 -0
  43. package/build/utils/changelog.d.mts +64 -0
  44. package/build/utils/credentials.d.mts +17 -0
  45. package/build/utils/extractErrorCodes.d.mts +19 -0
  46. package/build/utils/git.d.mts +26 -0
  47. package/build/utils/github.d.mts +41 -0
  48. package/build/utils/pnpm.d.mts +238 -0
  49. package/build/utils/typescript.d.mts +35 -0
  50. package/package.json +92 -42
  51. package/src/babel-config.mjs +52 -8
  52. package/src/brokenLinksChecker/__fixtures__/static-site/broken-links.html +20 -0
  53. package/src/brokenLinksChecker/__fixtures__/static-site/broken-targets.html +22 -0
  54. package/src/brokenLinksChecker/__fixtures__/static-site/example.md +9 -0
  55. package/src/brokenLinksChecker/__fixtures__/static-site/external-links.html +21 -0
  56. package/src/brokenLinksChecker/__fixtures__/static-site/ignored-page.html +17 -0
  57. package/src/brokenLinksChecker/__fixtures__/static-site/index.html +26 -0
  58. package/src/brokenLinksChecker/__fixtures__/static-site/known-targets.json +5 -0
  59. package/src/brokenLinksChecker/__fixtures__/static-site/nested/page.html +19 -0
  60. package/src/brokenLinksChecker/__fixtures__/static-site/orphaned-page.html +20 -0
  61. package/src/brokenLinksChecker/__fixtures__/static-site/page-with-api-links.html +20 -0
  62. package/src/brokenLinksChecker/__fixtures__/static-site/page-with-custom-targets.html +24 -0
  63. package/src/brokenLinksChecker/__fixtures__/static-site/page-with-ignored-content.html +28 -0
  64. package/src/brokenLinksChecker/__fixtures__/static-site/page-with-known-target-links.html +19 -0
  65. package/src/brokenLinksChecker/__fixtures__/static-site/valid.html +20 -0
  66. package/src/brokenLinksChecker/__fixtures__/static-site/with-anchors.html +31 -0
  67. package/src/brokenLinksChecker/index.mjs +641 -0
  68. package/src/brokenLinksChecker/index.test.ts +178 -0
  69. package/src/cli/cmdArgosPush.mjs +13 -2
  70. package/src/cli/cmdBuild.mjs +228 -31
  71. package/src/cli/cmdGithubAuth.mjs +36 -0
  72. package/src/cli/cmdListWorkspaces.mjs +2 -2
  73. package/src/cli/cmdPublish.mjs +203 -49
  74. package/src/cli/cmdPublishCanary.mjs +404 -46
  75. package/src/cli/cmdPublishNewPackage.mjs +86 -0
  76. package/src/cli/cmdSetVersionOverrides.mjs +17 -1
  77. package/src/cli/cmdValidateBuiltTypes.mjs +49 -0
  78. package/src/cli/index.mjs +6 -2
  79. package/src/cli/packageJson.d.ts +729 -0
  80. package/src/eslint/baseConfig.mjs +96 -78
  81. package/src/eslint/docsConfig.mjs +26 -13
  82. package/src/eslint/extensions.mjs +8 -8
  83. package/src/eslint/jsonConfig.mjs +40 -0
  84. package/src/eslint/material-ui/config.mjs +8 -9
  85. package/src/eslint/material-ui/rules/mui-name-matches-component-name.mjs +4 -2
  86. package/src/eslint/material-ui/rules/rules-of-use-theme-variants.mjs +2 -1
  87. package/src/eslint/testConfig.mjs +72 -66
  88. package/src/stylelint/index.mjs +46 -0
  89. package/src/untyped-plugins.d.ts +13 -0
  90. package/src/{cli → utils}/babel.mjs +10 -3
  91. package/src/utils/build.mjs +27 -1
  92. package/src/utils/changelog.mjs +157 -0
  93. package/src/utils/credentials.mjs +71 -0
  94. package/src/utils/extractErrorCodes.mjs +2 -2
  95. package/src/utils/git.mjs +67 -0
  96. package/src/utils/github.mjs +263 -0
  97. package/src/{cli → utils}/pnpm.mjs +23 -13
  98. package/src/{cli → utils}/typescript.mjs +13 -7
  99. package/src/cli/cmdJsonLint.mjs +0 -69
package/README.md CHANGED
@@ -1,3 +1,58 @@
1
1
  # @mui/internal-code-infra
2
2
 
3
3
  Scripts and configs to be used across MUI repos.
4
+
5
+ ## Documentation
6
+
7
+ This is stored in the `docs` top-level directory.
8
+
9
+ [Read in Markdown](../../docs/app/code-infra/page.mdx)
10
+
11
+ [Read in Browser](https://infra.mui.com/code-infra)
12
+
13
+ ## Publishing packages
14
+
15
+ 1. Go to the publish action -
16
+
17
+ - [Base UI](https://github.com/mui/base-ui/actions/workflows/publish.yml)
18
+ - [Core](https://github.com/mui/material-ui/actions/workflows/publish.yml)
19
+ - [MUI X](https://github.com/mui/mui-x/actions/workflows/publish.yml)
20
+
21
+ 2. Choose "Run workflow" dropdown
22
+
23
+ > - **Branch:** master
24
+ > - **Commit SHA to release from:** the commit that contains the merged release on master. This commit is linked to the GitHub release.
25
+ > - **Run in dry-run mode:** Used for debugging.
26
+ > - **Create GitHub release:** Keep selected if you want a GitHub release to be automatically created from the changelog.
27
+ > - **npm dist tag to publish to** Use to publish legacy or canary versions.
28
+
29
+ 3. Click "Run workflow"
30
+ 4. Refresh the page to see the newly created workflow, and click it.
31
+ 5. The next screen shows "@username requested your review to deploy to npm-publish", click "Review deployments" and authorize your workflow run. **Never approve workflow runs you didn't initiaite.**
32
+
33
+ > [!IMPORTANT]
34
+ > Go through the below steps if there is an error that says `The following packages are new and need to be published manually first` in the publish flow.
35
+
36
+ ### Adding and publishing new packages
37
+
38
+ Whenever news packages are added to the repo (that will get published to npm) or a private package is turned into a public one, follow the below steps before invoking the publish workflow of the previous section.
39
+
40
+ 1. Goto your repo's code base on your system, open terminal and run:
41
+
42
+ ```bash
43
+ pnpm code-infra publish-new-package
44
+ ```
45
+
46
+ This command detects the new public packages in the repo and asks for your confirmation before publishing them to the npm registry. Add the `--dryRun` flag to skip the actual publishing.
47
+
48
+ 2. Goto the settings link for each packages, ie, https://www.npmjs.com/package/<pkg-name>/access , and setup `Trusted Publisher`.
49
+ 3. In `Select your publisher` step in the above link, click on the `Github Actions` button to configure Github actions based trusted publishing.
50
+ 4. Fill in the details of the repo -
51
+ 1. `Organization or user` as `mui`,
52
+ 2. `Repository` as per the new package
53
+ 3. `Workflow filename*` should be `publish.yml`
54
+ 4. `Environment name` should be `npm-publish`
55
+ 5. In the `Publishing access` section, toggle the recommended option of `Require two-factor authentication and disallow tokens`.
56
+ 6. Finally, save the changes by clicking on `Update Package Settings` button.
57
+
58
+ After following these steps, the `Publish` workflow can be invoked again.
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @param {Object} param0
3
+ * @param {boolean} [param0.debug]
4
+ * @param {boolean} [param0.optimizeClsx]
5
+ * @param {boolean} [param0.removePropTypes]
6
+ * @param {boolean} [param0.noResolveImports]
7
+ * @param {'cjs' | 'esm'} param0.bundle
8
+ * @param {string | null} param0.outExtension - Specify the output file extension.
9
+ * @param {string} param0.runtimeVersion
10
+ * @param {string} [param0.reactCompilerReactVersion]
11
+ * @param {string} [param0.reactCompilerMode]
12
+ * @returns {import('@babel/core').TransformOptions} The base Babel configuration.
13
+ */
14
+ export function getBaseConfig({ debug, optimizeClsx, removePropTypes, noResolveImports, bundle, runtimeVersion, outExtension, reactCompilerReactVersion, reactCompilerMode, }: {
15
+ debug?: boolean | undefined;
16
+ optimizeClsx?: boolean | undefined;
17
+ removePropTypes?: boolean | undefined;
18
+ noResolveImports?: boolean | undefined;
19
+ bundle: "cjs" | "esm";
20
+ outExtension: string | null;
21
+ runtimeVersion: string;
22
+ reactCompilerReactVersion?: string | undefined;
23
+ reactCompilerMode?: string | undefined;
24
+ }): import("@babel/core").TransformOptions;
25
+ /**
26
+ * @typedef {Object} Options
27
+ * @prop {'esm' | 'cjs'} [Options.bundle]
28
+ * @prop {boolean} [Options.noResolveImports]
29
+ * @prop {undefined} [options.env]
30
+ */
31
+ /**
32
+ * @param {import('@babel/core').ConfigAPI | Options} api
33
+ * @returns {import('@babel/core').TransformOptions}
34
+ */
35
+ export default function getBabelConfig(api: import("@babel/core").ConfigAPI | Options): import("@babel/core").TransformOptions;
36
+ export type Options = {
37
+ bundle?: "cjs" | "esm" | undefined;
38
+ noResolveImports?: boolean | undefined;
39
+ env?: undefined;
40
+ };
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Crawls a website starting from seed URLs, discovering all internal links and checking for broken links/targets.
3
+ * @param {CrawlOptions} rawOptions - Configuration options for the crawl
4
+ * @returns {Promise<CrawlResult>} Crawl results including all links, pages, and issues found
5
+ */
6
+ export function crawl(rawOptions: CrawlOptions): Promise<CrawlResult>;
7
+ /**
8
+ * Maps page URLs to sets of known target IDs (anchors) on that page.
9
+ * Used to track which link targets (e.g., #section-id) exist on each page.
10
+ */
11
+ export type LinkStructure = Map<string, Set<string>>;
12
+ /**
13
+ * Serialized representation of LinkStructure for JSON storage.
14
+ * Converts Maps and Sets to plain objects and arrays for file persistence.
15
+ */
16
+ export type SerializedLinkStructure = {
17
+ /**
18
+ * - Object mapping page URLs to arrays of target IDs
19
+ */
20
+ targets: Record<string, string[]>;
21
+ };
22
+ /**
23
+ * Data about a crawled page including its URL, HTTP status, and available link targets.
24
+ */
25
+ export type PageData = {
26
+ /**
27
+ * - The normalized page URL (without trailing slash unless root)
28
+ */
29
+ url: string;
30
+ /**
31
+ * - HTTP status code from the response (e.g., 200, 404, 500)
32
+ */
33
+ status: number;
34
+ /**
35
+ * - Set of available anchor targets on the page, keyed by hash (e.g., '#intro')
36
+ */
37
+ targets: Set<string>;
38
+ };
39
+ /**
40
+ * Represents a hyperlink found during crawling.
41
+ */
42
+ export type Link = {
43
+ /**
44
+ * - URL of the page where this link was found, or null for seed URLs
45
+ */
46
+ src: string | null;
47
+ /**
48
+ * - Accessible name/text content of the link element, or null for seed URLs
49
+ */
50
+ text: string | null;
51
+ /**
52
+ * - The href attribute value (may be relative or absolute, with or without hash)
53
+ */
54
+ href: string;
55
+ };
56
+ /**
57
+ * Configuration options for the broken links crawler.
58
+ */
59
+ export type CrawlOptions = {
60
+ /**
61
+ * - Shell command to start the dev server (e.g., 'npm run dev'). If null, assumes server is already running
62
+ */
63
+ startCommand?: string | null | undefined;
64
+ /**
65
+ * - Base URL of the site to crawl (e.g., 'http://localhost:3000')
66
+ */
67
+ host: string;
68
+ /**
69
+ * - File path to write discovered link targets to. If null, targets are not persisted
70
+ */
71
+ outPath?: string | null | undefined;
72
+ /**
73
+ * - Array of regex patterns to exclude from crawling (e.g., [/^\/api\//] to skip /api/* routes)
74
+ */
75
+ ignoredPaths?: RegExp[] | undefined;
76
+ /**
77
+ * - CSS selectors for elements whose nested links should be ignored (e.g., ['.sidebar', 'footer'])
78
+ */
79
+ ignoredContent?: string[] | undefined;
80
+ /**
81
+ * - Set of element IDs to ignore as link targets (defaults to '__next', '__NEXT_DATA__')
82
+ */
83
+ ignoredTargets?: Set<string> | undefined;
84
+ /**
85
+ * - Pre-populated map of known valid targets to skip crawling (useful for external pages)
86
+ */
87
+ knownTargets?: Map<string, Set<string>> | undefined;
88
+ /**
89
+ * - URLs to fetch known targets from (fetched JSON will be merged with knownTargets)
90
+ */
91
+ knownTargetsDownloadUrl?: string[] | undefined;
92
+ /**
93
+ * - Number of concurrent page fetches (defaults to 4)
94
+ */
95
+ concurrency?: number | undefined;
96
+ /**
97
+ * - Starting URLs for the crawl (defaults to ['/'])
98
+ */
99
+ seedUrls?: string[] | undefined;
100
+ };
101
+ /**
102
+ * Fully resolved configuration with all optional fields filled with defaults.
103
+ */
104
+ export type ResolvedCrawlOptions = Required<CrawlOptions>;
105
+ /**
106
+ * Represents a broken link or broken link target discovered during crawling.
107
+ */
108
+ export type Issue = {
109
+ /**
110
+ * - Type of issue: 'broken-link' for 404 pages, 'broken-target' for missing anchors
111
+ */
112
+ type: "broken-link" | "broken-target";
113
+ /**
114
+ * - Human-readable description of the issue (e.g., 'Target not found', 'Page returned error 404')
115
+ */
116
+ message: string;
117
+ /**
118
+ * - The link object that has the issue
119
+ */
120
+ link: Link;
121
+ };
122
+ /**
123
+ * Results from a complete crawl operation.
124
+ */
125
+ export type CrawlResult = {
126
+ /**
127
+ * - All links discovered during the crawl
128
+ */
129
+ links: Set<Link>;
130
+ /**
131
+ * - All pages crawled, keyed by normalized URL
132
+ */
133
+ pages: Map<string, PageData>;
134
+ /**
135
+ * - All broken links and broken targets found
136
+ */
137
+ issues: Issue[];
138
+ };
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ declare const _default: import("yargs").CommandModule<{}, Args>;
3
+ export default _default;
4
+ export type Args = {
5
+ /**
6
+ * - Run with verbose logging
7
+ */
8
+ verbose?: boolean | undefined;
9
+ /**
10
+ * - Screenshots folder path
11
+ */
12
+ folder: string;
13
+ };
@@ -0,0 +1,56 @@
1
+ declare const _default: import("yargs").CommandModule<{}, Args>;
2
+ export default _default;
3
+ export type Args = {
4
+ /**
5
+ * - The bundles to build.
6
+ */
7
+ bundle: import("../utils/build.mjs").BundleType[];
8
+ /**
9
+ * - The large files to build.
10
+ */
11
+ hasLargeFiles: boolean;
12
+ /**
13
+ * - Whether to skip generating a package.json file in the /esm folder.
14
+ */
15
+ skipBundlePackageJson: boolean;
16
+ /**
17
+ * - The directory to copy the cjs files to.
18
+ */
19
+ cjsOutDir: string;
20
+ /**
21
+ * - Whether to enable verbose logging.
22
+ */
23
+ verbose: boolean;
24
+ /**
25
+ * - Whether to build types for the package.
26
+ */
27
+ buildTypes: boolean;
28
+ /**
29
+ * - Whether to build types for the package.
30
+ */
31
+ skipTsc: boolean;
32
+ /**
33
+ * - Whether to skip checking for Babel runtime dependencies in the package.
34
+ */
35
+ skipBabelRuntimeCheck: boolean;
36
+ /**
37
+ * - Whether to skip generating the package.json file in the bundle output.
38
+ */
39
+ skipPackageJson: boolean;
40
+ /**
41
+ * - Whether to skip checking for main field in package.json.
42
+ */
43
+ skipMainCheck: boolean;
44
+ /**
45
+ * - Globs to be ignored by Babel.
46
+ */
47
+ ignore: string[];
48
+ /**
49
+ * - Files/Directories to be copied. Can be a glob pattern.
50
+ */
51
+ copy?: string[] | undefined;
52
+ /**
53
+ * - Whether to use the React compiler.
54
+ */
55
+ enableReactCompiler?: boolean | undefined;
56
+ };
@@ -0,0 +1,20 @@
1
+ declare const _default: import("yargs").CommandModule<{}, Args>;
2
+ export default _default;
3
+ export type Args = {
4
+ /**
5
+ * Run in silent mode without logging
6
+ */
7
+ silent?: boolean | undefined;
8
+ /**
9
+ * Exclude default files from the copy operation
10
+ */
11
+ excludeDefaults?: boolean | undefined;
12
+ /**
13
+ * Glob patterns to copy
14
+ */
15
+ glob?: string[] | undefined;
16
+ /**
17
+ * Extra files to copy
18
+ */
19
+ files?: string[] | undefined;
20
+ };
@@ -0,0 +1,3 @@
1
+ declare const _default: import("yargs").CommandModule<{}, Args>;
2
+ export default _default;
3
+ export type Args = import("../utils/extractErrorCodes.mjs").Args;
@@ -0,0 +1,6 @@
1
+ declare const _default: import("yargs").CommandModule<{}, Args>;
2
+ export default _default;
3
+ export type Args = {
4
+ authorize: boolean;
5
+ clear: boolean;
6
+ };
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ declare const _default: import("yargs").CommandModule<{}, Args>;
3
+ export default _default;
4
+ export type PublicPackage = import("../utils/pnpm.mjs").PublicPackage;
5
+ export type Args = {
6
+ /**
7
+ * - Whether to filter to only public packages
8
+ */
9
+ publicOnly?: boolean | undefined;
10
+ /**
11
+ * - Output format (name, path, or json)
12
+ */
13
+ output?: "name" | "path" | "json" | "publish-dir" | undefined;
14
+ /**
15
+ * - Git reference to filter changes since
16
+ */
17
+ sinceRef?: string | undefined;
18
+ };
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ declare const _default: import("yargs").CommandModule<{}, Args>;
3
+ export default _default;
4
+ export type Args = {
5
+ /**
6
+ * Run in dry-run mode without publishing
7
+ */
8
+ "dry-run": boolean;
9
+ /**
10
+ * Create a GitHub draft release after publishing
11
+ */
12
+ "github-release": boolean;
13
+ /**
14
+ * NPM dist tag to publish to
15
+ */
16
+ tag: string;
17
+ /**
18
+ * Runs in CI environment
19
+ */
20
+ ci: boolean;
21
+ /**
22
+ * Git SHA to use for the GitHub release workflow (local only)
23
+ */
24
+ sha?: string | undefined;
25
+ };
26
+ export type PublicPackage = import("../utils/pnpm.mjs").PublicPackage;
27
+ export type PublishOptions = import("../utils/pnpm.mjs").PublishOptions;
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ declare const _default: import("yargs").CommandModule<{}, Args>;
3
+ export default _default;
4
+ export type Commit = {
5
+ /**
6
+ * - Commit SHA
7
+ */
8
+ sha: string;
9
+ /**
10
+ * - Commit message
11
+ */
12
+ message: string;
13
+ /**
14
+ * - Commit author
15
+ */
16
+ author: string;
17
+ };
18
+ export type PublicPackage = import("../utils/pnpm.mjs").PublicPackage;
19
+ export type VersionInfo = import("../utils/pnpm.mjs").VersionInfo;
20
+ export type PublishOptions = import("../utils/pnpm.mjs").PublishOptions;
21
+ export type Args = {
22
+ /**
23
+ * - Whether to run in dry-run mode
24
+ */
25
+ dryRun?: boolean | undefined;
26
+ /**
27
+ * - Whether to create GitHub releases for canary packages
28
+ */
29
+ githubRelease?: boolean | undefined;
30
+ };
@@ -0,0 +1,8 @@
1
+ declare const _default: import("yargs").CommandModule<{}, Args>;
2
+ export default _default;
3
+ export type Args = {
4
+ /**
5
+ * If true, will only log the commands without executing them
6
+ */
7
+ dryRun?: boolean | undefined;
8
+ };
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ declare const _default: import("yargs").CommandModule<{}, Args>;
3
+ export default _default;
4
+ export type Args = {
5
+ /**
6
+ * - Package version specifiers in format 'package@version'
7
+ */
8
+ pkg?: string[] | undefined;
9
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("yargs").CommandModule<{}, {}>;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @param {Object} [params]
3
+ * @param {boolean} [params.enableReactCompiler] - Whether the config is for spec files.
4
+ * @param {string} [params.baseDirectory] - The base directory for the configuration.
5
+ * @returns {import('eslint').Linter.Config[]}
6
+ */
7
+ export function createBaseConfig({ enableReactCompiler, baseDirectory, }?: {
8
+ enableReactCompiler?: boolean | undefined;
9
+ baseDirectory?: string | undefined;
10
+ }): import("eslint").Linter.Config[];
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @returns {import('eslint').Linter.Config[]}
3
+ */
4
+ export function createDocsConfig(): import("eslint").Linter.Config[];
@@ -0,0 +1,8 @@
1
+ export const EXTENSION_JS: ".?(c|m)js?(x)";
2
+ export const EXTENSION_JS_NO_MODULE: ".js?(x)";
3
+ export const EXTENSION_TS: ".?(c|m)[jt]s?(x)";
4
+ export const EXTENSION_TS_NO_MODULE: ".[jt]s?(x)";
5
+ export const EXTENSION_TS_ONLY: ".?(c|m)ts?(x)";
6
+ export const EXTENSION_TS_ONLY_NO_MODULE: ".ts?(x)";
7
+ export const EXTENSION_DTS: ".d.?(c|m)ts?(x)";
8
+ export const EXTENSION_TEST_FILE: ".test.?(c|m)[jt]s?(x)";
@@ -0,0 +1,4 @@
1
+ export * from "./baseConfig.mjs";
2
+ export * from "./docsConfig.mjs";
3
+ export * from "./testConfig.mjs";
4
+ export * from "./extensions.mjs";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @returns {import('eslint').Linter.Config[]}
3
+ */
4
+ export function createJsonConfig(): import("eslint").Linter.Config[];
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @param {Object} [options]
3
+ * @param {boolean} [options.enableReactCompiler] - Whether the config is for spec files.
4
+ * @returns {import('eslint').Linter.Config[]}
5
+ */
6
+ export function createCoreConfig(options?: {
7
+ enableReactCompiler?: boolean | undefined;
8
+ }): import("eslint").Linter.Config[];
@@ -0,0 +1,2 @@
1
+ declare const _default: import("eslint").ESLint.Plugin;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export default rule;
2
+ /**
3
+ * @type {import('eslint').Rule.RuleModule}
4
+ */
5
+ declare const rule: import("eslint").Rule.RuleModule;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("eslint").Rule.RuleModule;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("eslint").Rule.RuleModule;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export default rule;
2
+ /**
3
+ * @type {import('eslint').Rule.RuleModule}
4
+ */
5
+ declare const rule: import("eslint").Rule.RuleModule;
@@ -0,0 +1,5 @@
1
+ export default rule;
2
+ /**
3
+ * @type {import('eslint').Rule.RuleModule}
4
+ */
5
+ declare const rule: import("eslint").Rule.RuleModule;
@@ -0,0 +1,12 @@
1
+ declare const _default: import("eslint").Rule.RuleModule;
2
+ export default _default;
3
+ export type PatternConfig = {
4
+ /**
5
+ * - The pattern to match against resolved imports
6
+ */
7
+ pattern: string;
8
+ /**
9
+ * - Custom message to show when the pattern matches
10
+ */
11
+ message?: string | undefined;
12
+ };
@@ -0,0 +1,5 @@
1
+ export default rule;
2
+ /**
3
+ * @type {import('eslint').Rule.RuleModule}
4
+ */
5
+ declare const rule: import("eslint").Rule.RuleModule;
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ meta: {
3
+ type: "problem";
4
+ };
5
+ create(context: import("eslint").Rule.RuleContext): {
6
+ CallExpression(node: import("estree").SimpleCallExpression & import("eslint").Rule.NodeParentExtension): void;
7
+ };
8
+ };
9
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export default rule;
2
+ /**
3
+ * @type {import('eslint').Rule.RuleModule}
4
+ */
5
+ declare const rule: import("eslint").Rule.RuleModule;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @param {Object} [options]
3
+ * @param {boolean} [options.useMocha]
4
+ * @param {boolean} [options.useVitest]
5
+ * @returns {import('eslint').Linter.Config[]}
6
+ */
7
+ export function createTestConfig(options?: {
8
+ useMocha?: boolean | undefined;
9
+ useVitest?: boolean | undefined;
10
+ }): import("eslint").Linter.Config[];
11
+ /**
12
+ * @type {import('eslint').Linter.Config}
13
+ */
14
+ export const baseSpecRules: import("eslint").Linter.Config;
@@ -0,0 +1,27 @@
1
+ declare namespace _default {
2
+ export let names: string[];
3
+ export let description: string;
4
+ export let tags: string[];
5
+ export function _function(params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError): void;
6
+ export { _function as function };
7
+ }
8
+ export default _default;
9
+ export type Attr = [string, string];
10
+ export type Token = {
11
+ type: string;
12
+ info: string;
13
+ tag: string;
14
+ content: string;
15
+ lineNumber: number;
16
+ attrs: Attr[];
17
+ };
18
+ export type OnErrorObj = {
19
+ lineNumber: number;
20
+ detail?: string | undefined;
21
+ };
22
+ export type OnError = (err: OnErrorObj) => void;
23
+ export type MdParams = {
24
+ name: string;
25
+ lines: string[];
26
+ tokens: Token[];
27
+ };
@@ -0,0 +1,8 @@
1
+ declare namespace _default {
2
+ export let names: string[];
3
+ export let description: string;
4
+ export let tags: string[];
5
+ export function _function(params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError): void;
6
+ export { _function as function };
7
+ }
8
+ export default _default;