@icebreakers/eslint-config 1.0.3 → 1.1.0

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.
package/dist/index.cjs CHANGED
@@ -9,8 +9,8 @@ var __esm = (fn, res) => function __init() {
9
9
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
10
  };
11
11
  var __export = (target, all) => {
12
- for (var name3 in all)
13
- __defProp(target, name3, { get: all[name3], enumerable: true });
12
+ for (var name in all)
13
+ __defProp(target, name, { get: all[name], enumerable: true });
14
14
  };
15
15
  var __copyProps = (to, from, except, desc) => {
16
16
  if (from && typeof from === "object" || typeof from === "function") {
@@ -31,16 +31,159 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
31
31
  ));
32
32
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
33
 
34
- // ../../node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.2_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js
34
+ // ../../node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.2_yaml@2.7.1/node_modules/tsup/assets/cjs_shims.js
35
35
  var getImportMetaUrl, importMetaUrl;
36
36
  var init_cjs_shims = __esm({
37
- "../../node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.2_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js"() {
37
+ "../../node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.2_yaml@2.7.1/node_modules/tsup/assets/cjs_shims.js"() {
38
38
  "use strict";
39
39
  getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
40
40
  importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
41
41
  }
42
42
  });
43
43
 
44
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/base.js
45
+ var base;
46
+ var init_base = __esm({
47
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/base.js"() {
48
+ "use strict";
49
+ init_cjs_shims();
50
+ base = {
51
+ parser: "eslint-mdx",
52
+ parserOptions: {
53
+ sourceType: "module",
54
+ ecmaVersion: "latest"
55
+ },
56
+ plugins: ["mdx"],
57
+ processor: "mdx/remark",
58
+ rules: {
59
+ "mdx/remark": "warn",
60
+ "no-unused-expressions": "error"
61
+ }
62
+ };
63
+ }
64
+ });
65
+
66
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/code-blocks.js
67
+ var codeBlocks;
68
+ var init_code_blocks = __esm({
69
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/code-blocks.js"() {
70
+ "use strict";
71
+ init_cjs_shims();
72
+ codeBlocks = {
73
+ parserOptions: {
74
+ ecmaFeatures: {
75
+ impliedStrict: true
76
+ }
77
+ },
78
+ rules: {
79
+ "eol-last": "off",
80
+ "no-undef": "off",
81
+ "no-unused-expressions": "off",
82
+ "no-unused-vars": "off",
83
+ "@typescript-eslint/no-unused-vars": "off",
84
+ "padded-blocks": "off",
85
+ strict: "off",
86
+ "unicode-bom": "off"
87
+ }
88
+ };
89
+ }
90
+ });
91
+
92
+ // ../../node_modules/.pnpm/eslint-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/helpers.js
93
+ var import_node_fs, import_node_module, import_node_path, last, arrayify, getPhysicalFilename, loadEsmModule, getPositionAtFactory, normalizePosition, prevCharOffsetFactory, nextCharOffsetFactory, cjsRequire;
94
+ var init_helpers = __esm({
95
+ "../../node_modules/.pnpm/eslint-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/helpers.js"() {
96
+ "use strict";
97
+ init_cjs_shims();
98
+ import_node_fs = __toESM(require("fs"), 1);
99
+ import_node_module = require("module");
100
+ import_node_path = __toESM(require("path"), 1);
101
+ last = (items) => items && items[items.length - 1];
102
+ arrayify = (...args) => args.reduce((arr, curr) => {
103
+ arr.push(...Array.isArray(curr) ? curr : curr == null ? [] : [curr]);
104
+ return arr;
105
+ }, []);
106
+ getPhysicalFilename = (filename, child) => {
107
+ try {
108
+ if (import_node_fs.default.statSync(filename).isDirectory()) {
109
+ return child || filename;
110
+ }
111
+ } catch (err) {
112
+ const { code } = err;
113
+ if (code === "ENOTDIR" || code === "ENOENT") {
114
+ return getPhysicalFilename(import_node_path.default.dirname(filename), filename);
115
+ }
116
+ }
117
+ return filename;
118
+ };
119
+ loadEsmModule = (modulePath) => new Function("modulePath", `return import(modulePath);`)(modulePath);
120
+ getPositionAtFactory = (text) => {
121
+ const lines = text.split("\n");
122
+ return (offset) => {
123
+ let currOffset = 0;
124
+ for (const [index, line_] of lines.entries()) {
125
+ const line = index + 1;
126
+ const nextOffset = currOffset + line_.length;
127
+ if (nextOffset >= offset) {
128
+ return {
129
+ line,
130
+ column: offset - currOffset
131
+ };
132
+ }
133
+ currOffset = nextOffset + 1;
134
+ }
135
+ };
136
+ };
137
+ normalizePosition = ({ start, end, text }) => {
138
+ const startOffset = start.offset;
139
+ const endOffset = end.offset;
140
+ const range = [startOffset, endOffset];
141
+ const getPositionAt = text == null ? null : getPositionAtFactory(text);
142
+ return {
143
+ start: startOffset,
144
+ end: endOffset,
145
+ loc: {
146
+ start: "line" in start ? start : getPositionAt(startOffset),
147
+ end: "line" in end ? end : getPositionAt(endOffset)
148
+ },
149
+ range
150
+ };
151
+ };
152
+ prevCharOffsetFactory = (text) => (offset) => {
153
+ for (let i = offset; i >= 0; i--) {
154
+ const char = text[i];
155
+ if (/^\S$/.test(char)) {
156
+ return i;
157
+ }
158
+ }
159
+ };
160
+ nextCharOffsetFactory = (text) => {
161
+ const total = text.length;
162
+ return (offset) => {
163
+ for (let i = offset; i <= total; i++) {
164
+ const char = text[i];
165
+ if (/^\S$/.test(char)) {
166
+ return i;
167
+ }
168
+ }
169
+ };
170
+ };
171
+ cjsRequire = typeof require === "undefined" ? (0, import_node_module.createRequire)(importMetaUrl) : require;
172
+ }
173
+ });
174
+
175
+ // ../../node_modules/.pnpm/eslint-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/meta.js
176
+ var pkg, meta;
177
+ var init_meta = __esm({
178
+ "../../node_modules/.pnpm/eslint-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/meta.js"() {
179
+ "use strict";
180
+ init_cjs_shims();
181
+ init_helpers();
182
+ pkg = cjsRequire("../package.json");
183
+ meta = { name: pkg.name, version: pkg.version };
184
+ }
185
+ });
186
+
44
187
  // ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
45
188
  function __rest(s, e) {
46
189
  var t = {};
@@ -60,42 +203,44 @@ var init_tslib_es6 = __esm({
60
203
  }
61
204
  });
62
205
 
63
- // ../../node_modules/.pnpm/@pkgr+core@0.1.1/node_modules/@pkgr/core/lib/constants.js
64
- var import_node_module, CWD, cjsRequire, EXTENSIONS;
206
+ // ../../node_modules/.pnpm/@pkgr+core@0.2.0/node_modules/@pkgr/core/lib/constants.js
207
+ var import_node_module2, CWD, cjsRequire2, EXTENSIONS;
65
208
  var init_constants = __esm({
66
- "../../node_modules/.pnpm/@pkgr+core@0.1.1/node_modules/@pkgr/core/lib/constants.js"() {
209
+ "../../node_modules/.pnpm/@pkgr+core@0.2.0/node_modules/@pkgr/core/lib/constants.js"() {
67
210
  "use strict";
68
211
  init_cjs_shims();
69
- import_node_module = require("module");
212
+ import_node_module2 = require("module");
70
213
  CWD = process.cwd();
71
- cjsRequire = typeof require === "undefined" ? (0, import_node_module.createRequire)(importMetaUrl) : require;
72
- EXTENSIONS = [".ts", ".tsx", ...Object.keys(cjsRequire.extensions)];
214
+ cjsRequire2 = typeof require === "undefined" ? (0, import_node_module2.createRequire)(importMetaUrl) : require;
215
+ EXTENSIONS = [".ts", ".tsx", ...Object.keys(cjsRequire2.extensions)];
73
216
  }
74
217
  });
75
218
 
76
- // ../../node_modules/.pnpm/@pkgr+core@0.1.1/node_modules/@pkgr/core/lib/helpers.js
77
- var import_node_fs, import_node_path, tryPkg, isPkgAvailable, tryFile, tryExtensions, findUp;
78
- var init_helpers = __esm({
79
- "../../node_modules/.pnpm/@pkgr+core@0.1.1/node_modules/@pkgr/core/lib/helpers.js"() {
219
+ // ../../node_modules/.pnpm/@pkgr+core@0.2.0/node_modules/@pkgr/core/lib/helpers.js
220
+ var import_node_fs2, import_node_path2, tryPkg, isPkgAvailable, tryFile, tryExtensions, findUp;
221
+ var init_helpers2 = __esm({
222
+ "../../node_modules/.pnpm/@pkgr+core@0.2.0/node_modules/@pkgr/core/lib/helpers.js"() {
80
223
  "use strict";
81
224
  init_cjs_shims();
82
- import_node_fs = __toESM(require("fs"), 1);
83
- import_node_path = __toESM(require("path"), 1);
225
+ import_node_fs2 = __toESM(require("fs"), 1);
226
+ import_node_path2 = __toESM(require("path"), 1);
84
227
  init_constants();
85
- tryPkg = (pkg) => {
228
+ tryPkg = (pkg3) => {
86
229
  try {
87
- return cjsRequire.resolve(pkg);
88
- } catch (_a2) {
230
+ return cjsRequire2.resolve(pkg3);
231
+ } catch (_a) {
89
232
  }
90
233
  };
91
- isPkgAvailable = (pkg) => !!tryPkg(pkg);
92
- tryFile = (filePath, includeDir = false) => {
93
- if (typeof filePath === "string") {
94
- return import_node_fs.default.existsSync(filePath) && (includeDir || import_node_fs.default.statSync(filePath).isFile()) ? filePath : "";
234
+ isPkgAvailable = (pkg3) => !!tryPkg(pkg3);
235
+ tryFile = (filename, includeDir = false, base2 = CWD) => {
236
+ if (typeof filename === "string") {
237
+ const filepath = import_node_path2.default.resolve(base2, filename);
238
+ return import_node_fs2.default.existsSync(filepath) && (includeDir || import_node_fs2.default.statSync(filepath).isFile()) ? filepath : "";
95
239
  }
96
- for (const file of filePath !== null && filePath !== void 0 ? filePath : []) {
97
- if (tryFile(file, includeDir)) {
98
- return file;
240
+ for (const file of filename !== null && filename !== void 0 ? filename : []) {
241
+ const filepath = tryFile(file, includeDir, base2);
242
+ if (filepath) {
243
+ return filepath;
99
244
  }
100
245
  }
101
246
  return "";
@@ -105,63 +250,66 @@ var init_helpers = __esm({
105
250
  return ext == null ? "" : filepath + ext;
106
251
  };
107
252
  findUp = (searchEntry, searchFileOrIncludeDir, includeDir) => {
108
- console.assert(import_node_path.default.isAbsolute(searchEntry));
109
- if (!tryFile(searchEntry, true) || searchEntry !== CWD && !searchEntry.startsWith(CWD + import_node_path.default.sep)) {
253
+ console.assert(import_node_path2.default.isAbsolute(searchEntry));
254
+ if (!tryFile(searchEntry, true) || searchEntry !== CWD && !searchEntry.startsWith(CWD + import_node_path2.default.sep)) {
110
255
  return "";
111
256
  }
112
- searchEntry = import_node_path.default.resolve(import_node_fs.default.statSync(searchEntry).isDirectory() ? searchEntry : import_node_path.default.resolve(searchEntry, ".."));
257
+ searchEntry = import_node_path2.default.resolve(import_node_fs2.default.statSync(searchEntry).isDirectory() ? searchEntry : import_node_path2.default.resolve(searchEntry, ".."));
113
258
  const isSearchFile = typeof searchFileOrIncludeDir === "string";
114
259
  const searchFile = isSearchFile ? searchFileOrIncludeDir : "package.json";
115
260
  do {
116
- const searched = tryFile(import_node_path.default.resolve(searchEntry, searchFile), isSearchFile && includeDir);
261
+ const searched = tryFile(import_node_path2.default.resolve(searchEntry, searchFile), isSearchFile && includeDir);
117
262
  if (searched) {
118
263
  return searched;
119
264
  }
120
- searchEntry = import_node_path.default.resolve(searchEntry, "..");
121
- } while (searchEntry === CWD || searchEntry.startsWith(CWD + import_node_path.default.sep));
265
+ searchEntry = import_node_path2.default.resolve(searchEntry, "..");
266
+ } while (searchEntry === CWD || searchEntry.startsWith(CWD + import_node_path2.default.sep));
122
267
  return "";
123
268
  };
124
269
  }
125
270
  });
126
271
 
127
- // ../../node_modules/.pnpm/@pkgr+core@0.1.1/node_modules/@pkgr/core/lib/index.js
272
+ // ../../node_modules/.pnpm/@pkgr+core@0.2.0/node_modules/@pkgr/core/lib/index.js
128
273
  var init_lib = __esm({
129
- "../../node_modules/.pnpm/@pkgr+core@0.1.1/node_modules/@pkgr/core/lib/index.js"() {
274
+ "../../node_modules/.pnpm/@pkgr+core@0.2.0/node_modules/@pkgr/core/lib/index.js"() {
130
275
  "use strict";
131
276
  init_cjs_shims();
132
277
  init_constants();
133
- init_helpers();
278
+ init_helpers2();
134
279
  }
135
280
  });
136
281
 
137
- // ../../node_modules/.pnpm/synckit@0.9.2/node_modules/synckit/lib/types.js
282
+ // ../../node_modules/.pnpm/synckit@0.10.3/node_modules/synckit/lib/types.js
138
283
  var init_types = __esm({
139
- "../../node_modules/.pnpm/synckit@0.9.2/node_modules/synckit/lib/types.js"() {
284
+ "../../node_modules/.pnpm/synckit@0.10.3/node_modules/synckit/lib/types.js"() {
140
285
  "use strict";
141
286
  init_cjs_shims();
142
287
  }
143
288
  });
144
289
 
145
- // ../../node_modules/.pnpm/synckit@0.9.2/node_modules/synckit/lib/index.js
146
- function createSyncFn(workerPath2, timeoutOrOptions) {
290
+ // ../../node_modules/.pnpm/synckit@0.10.3/node_modules/synckit/lib/index.js
291
+ function createSyncFn(workerPath, timeoutOrOptions) {
147
292
  syncFnCache !== null && syncFnCache !== void 0 ? syncFnCache : syncFnCache = /* @__PURE__ */ new Map();
148
- const cachedSyncFn = syncFnCache.get(workerPath2);
293
+ if (typeof workerPath !== "string" || workerPath.startsWith("file://")) {
294
+ workerPath = (0, import_node_url.fileURLToPath)(workerPath);
295
+ }
296
+ const cachedSyncFn = syncFnCache.get(workerPath);
149
297
  if (cachedSyncFn) {
150
298
  return cachedSyncFn;
151
299
  }
152
- if (!import_node_path2.default.isAbsolute(workerPath2)) {
300
+ if (!import_node_path3.default.isAbsolute(workerPath)) {
153
301
  throw new Error("`workerPath` must be absolute");
154
302
  }
155
- const syncFn = startWorkerThread(workerPath2, typeof timeoutOrOptions === "number" ? { timeout: timeoutOrOptions } : timeoutOrOptions);
156
- syncFnCache.set(workerPath2, syncFn);
303
+ const syncFn = startWorkerThread(workerPath, typeof timeoutOrOptions === "number" ? { timeout: timeoutOrOptions } : timeoutOrOptions);
304
+ syncFnCache.set(workerPath, syncFn);
157
305
  return syncFn;
158
306
  }
159
- function startWorkerThread(workerPath2, { timeout = DEFAULT_TIMEOUT, execArgv = DEFAULT_EXEC_ARGV, tsRunner = DEFAULT_TS_RUNNER, transferList = [], globalShims = DEFAULT_GLOBAL_SHIMS } = {}) {
307
+ function startWorkerThread(workerPath, { timeout = DEFAULT_TIMEOUT, execArgv = DEFAULT_EXEC_ARGV, tsRunner = DEFAULT_TS_RUNNER, transferList = [], globalShims = DEFAULT_GLOBAL_SHIMS } = {}) {
160
308
  const { port1: mainPort, port2: workerPort } = new import_node_worker_threads.MessageChannel();
161
- const { isTs, ext, jsUseEsm, tsUseEsm, tsRunner: finalTsRunner, workerPath: finalWorkerPath, pnpLoaderPath, execArgv: finalExecArgv } = setupTsRunner(workerPath2, { execArgv, tsRunner });
309
+ const { isTs, ext, jsUseEsm, tsUseEsm, tsRunner: finalTsRunner, workerPath: finalWorkerPath, pnpLoaderPath, execArgv: finalExecArgv } = setupTsRunner(workerPath, { execArgv, tsRunner });
162
310
  const workerPathUrl = (0, import_node_url.pathToFileURL)(finalWorkerPath);
163
311
  if (/\.[cm]ts$/.test(finalWorkerPath)) {
164
- const isTsxSupported = !tsUseEsm || Number.parseFloat(process.versions.node) >= MTS_SUPPORTED_NODE_VERSION;
312
+ const isTsxSupported = !tsUseEsm || compareVersion(NODE_VERSION, MTS_SUPPORTED_NODE_VERSION) >= 0;
165
313
  if (!finalTsRunner) {
166
314
  throw new Error("No ts runner specified, ts worker path is not supported");
167
315
  } else if ([
@@ -179,7 +327,7 @@ function startWorkerThread(workerPath2, { timeout = DEFAULT_TIMEOUT, execArgv =
179
327
  const useEval = isTs ? !tsUseEsm : !jsUseEsm && useGlobals;
180
328
  const worker = new import_node_worker_threads.Worker(jsUseEsm && useGlobals || tsUseEsm && finalTsRunner === TsRunner.TsNode ? dataUrl(`${generateGlobals(finalWorkerPath, finalGlobalShims)};import '${String(workerPathUrl)}'`) : useEval ? `${generateGlobals(finalWorkerPath, finalGlobalShims, "require")};${encodeImportModule(finalWorkerPath, "require")}` : workerPathUrl, {
181
329
  eval: useEval,
182
- workerData: { sharedBuffer, workerPort, pnpLoaderPath },
330
+ workerData: { sharedBufferView, workerPort, pnpLoaderPath },
183
331
  transferList: [workerPort, ...transferList],
184
332
  execArgv: finalExecArgv
185
333
  });
@@ -196,7 +344,7 @@ function startWorkerThread(workerPath2, { timeout = DEFAULT_TIMEOUT, execArgv =
196
344
  port.postMessage(abortMsg);
197
345
  throw new Error("Internal error: Atomics.wait() failed: " + status);
198
346
  }
199
- const _a2 = (0, import_node_worker_threads.receiveMessageOnPort)(mainPort).message, { id } = _a2, message = __rest(_a2, ["id"]);
347
+ const _a = (0, import_node_worker_threads.receiveMessageOnPort)(mainPort).message, { id } = _a, message = __rest(_a, ["id"]);
200
348
  if (id < expectedId) {
201
349
  const waitingTime = Date.now() - start;
202
350
  return receiveMessageWithId(port, expectedId, waitingTimeout ? waitingTimeout - waitingTime : void 0);
@@ -210,7 +358,10 @@ function startWorkerThread(workerPath2, { timeout = DEFAULT_TIMEOUT, execArgv =
210
358
  const id = nextID++;
211
359
  const msg = { id, args };
212
360
  worker.postMessage(msg);
213
- const { result, error, properties } = receiveMessageWithId(mainPort, id, timeout);
361
+ const { result, error, properties, stdio } = receiveMessageWithId(mainPort, id, timeout);
362
+ for (const { type, chunk, encoding } of stdio) {
363
+ process[type].write(chunk, encoding);
364
+ }
214
365
  if (error) {
215
366
  throw Object.assign(error, properties);
216
367
  }
@@ -219,32 +370,63 @@ function startWorkerThread(workerPath2, { timeout = DEFAULT_TIMEOUT, execArgv =
219
370
  worker.unref();
220
371
  return syncFn;
221
372
  }
222
- var import_node_crypto, import_node_fs2, import_node_module2, import_node_path2, import_node_url, import_node_worker_threads, INT32_BYTES, TsRunner, NODE_OPTIONS, SYNCKIT_EXEC_ARGV, SYNCKIT_GLOBAL_SHIMS, SYNCKIT_TIMEOUT, SYNCKIT_TS_RUNNER, IS_NODE_20, DEFAULT_TIMEOUT, DEFAULT_EXEC_ARGV, DEFAULT_TS_RUNNER, DEFAULT_GLOBAL_SHIMS, DEFAULT_GLOBAL_SHIMS_PRESET, MTS_SUPPORTED_NODE_VERSION, syncFnCache, cjsRequire2, dataUrl, isFile, setupTsRunner, md5Hash, encodeImportModule, _generateGlobals, globalsCache, tmpdir, _dirname, sharedBuffer, sharedBufferView, generateGlobals;
373
+ var import_node_crypto, import_node_fs3, import_node_module3, import_node_path3, import_node_url, import_node_worker_threads, INT32_BYTES, TsRunner, NODE_OPTIONS_, SYNCKIT_EXEC_ARGV, SYNCKIT_GLOBAL_SHIMS, SYNCKIT_TIMEOUT, SYNCKIT_TS_RUNNER, MTS_SUPPORTED_NODE_VERSION, LOADER_SUPPORTED_NODE_VERSION, STRIP_TYPES_NODE_VERSION, TRANSFORM_TYPES_NODE_VERSION, FEATURE_TYPESCRIPT_NODE_VERSION, DEFAULT_TYPES_NODE_VERSION, STRIP_TYPES_FLAG, TRANSFORM_TYPES_FLAG, NO_STRIP_TYPES_FLAG, NODE_OPTIONS, hasFlag, parseVersion, compareVersion, NODE_VERSION, NO_STRIP_TYPES, DEFAULT_TIMEOUT, DEFAULT_EXEC_ARGV, DEFAULT_TS_RUNNER, DEFAULT_GLOBAL_SHIMS, DEFAULT_GLOBAL_SHIMS_PRESET, syncFnCache, dataUrl, isFile, setupTsRunner, md5Hash, encodeImportModule, _generateGlobals, globalsCache, tmpdir, _dirname, sharedBuffer, sharedBufferView, generateGlobals;
223
374
  var init_lib2 = __esm({
224
- "../../node_modules/.pnpm/synckit@0.9.2/node_modules/synckit/lib/index.js"() {
375
+ "../../node_modules/.pnpm/synckit@0.10.3/node_modules/synckit/lib/index.js"() {
225
376
  "use strict";
226
377
  init_cjs_shims();
227
378
  init_tslib_es6();
228
379
  import_node_crypto = require("crypto");
229
- import_node_fs2 = __toESM(require("fs"), 1);
230
- import_node_module2 = __toESM(require("module"), 1);
231
- import_node_path2 = __toESM(require("path"), 1);
380
+ import_node_fs3 = __toESM(require("fs"), 1);
381
+ import_node_module3 = __toESM(require("module"), 1);
382
+ import_node_path3 = __toESM(require("path"), 1);
232
383
  import_node_url = require("url");
233
384
  import_node_worker_threads = require("worker_threads");
234
385
  init_lib();
235
386
  init_types();
236
387
  INT32_BYTES = 4;
237
388
  TsRunner = {
389
+ Node: "node",
390
+ Bun: "bun",
238
391
  TsNode: "ts-node",
239
392
  EsbuildRegister: "esbuild-register",
240
393
  EsbuildRunner: "esbuild-runner",
241
394
  SWC: "swc",
242
395
  TSX: "tsx"
243
396
  };
244
- ({ NODE_OPTIONS, SYNCKIT_EXEC_ARGV, SYNCKIT_GLOBAL_SHIMS, SYNCKIT_TIMEOUT, SYNCKIT_TS_RUNNER } = process.env);
245
- IS_NODE_20 = Number(process.versions.node.split(".")[0]) >= 20;
397
+ ({ NODE_OPTIONS: NODE_OPTIONS_ = "", SYNCKIT_EXEC_ARGV = "", SYNCKIT_GLOBAL_SHIMS, SYNCKIT_TIMEOUT, SYNCKIT_TS_RUNNER } = process.env);
398
+ MTS_SUPPORTED_NODE_VERSION = "16";
399
+ LOADER_SUPPORTED_NODE_VERSION = "20";
400
+ STRIP_TYPES_NODE_VERSION = "22.6";
401
+ TRANSFORM_TYPES_NODE_VERSION = "22.7";
402
+ FEATURE_TYPESCRIPT_NODE_VERSION = "22.10";
403
+ DEFAULT_TYPES_NODE_VERSION = "23.6";
404
+ STRIP_TYPES_FLAG = "--experimental-strip-types";
405
+ TRANSFORM_TYPES_FLAG = "--experimental-transform-types";
406
+ NO_STRIP_TYPES_FLAG = "--no-experimental-strip-types";
407
+ NODE_OPTIONS = NODE_OPTIONS_.split(/\s+/);
408
+ hasFlag = (flag) => NODE_OPTIONS.includes(flag) || process.argv.includes(flag);
409
+ parseVersion = (version) => version.split(".").map(Number.parseFloat);
410
+ compareVersion = (version1, version2) => {
411
+ const versions1 = parseVersion(version1);
412
+ const versions2 = parseVersion(version2);
413
+ const length = Math.max(versions1.length, versions2.length);
414
+ for (let i = 0; i < length; i++) {
415
+ const v1 = versions1[i] || 0;
416
+ const v2 = versions2[i] || 0;
417
+ if (v1 > v2) {
418
+ return 1;
419
+ }
420
+ if (v1 < v2) {
421
+ return -1;
422
+ }
423
+ }
424
+ return 0;
425
+ };
426
+ NODE_VERSION = process.versions.node;
427
+ NO_STRIP_TYPES = compareVersion(NODE_VERSION, FEATURE_TYPESCRIPT_NODE_VERSION) >= 0 ? process.features.typescript === false : hasFlag(NO_STRIP_TYPES_FLAG) && !hasFlag(STRIP_TYPES_FLAG) && !hasFlag(TRANSFORM_TYPES_FLAG);
246
428
  DEFAULT_TIMEOUT = SYNCKIT_TIMEOUT ? +SYNCKIT_TIMEOUT : void 0;
247
- DEFAULT_EXEC_ARGV = (SYNCKIT_EXEC_ARGV === null || SYNCKIT_EXEC_ARGV === void 0 ? void 0 : SYNCKIT_EXEC_ARGV.split(",")) || [];
429
+ DEFAULT_EXEC_ARGV = SYNCKIT_EXEC_ARGV.split(",");
248
430
  DEFAULT_TS_RUNNER = SYNCKIT_TS_RUNNER;
249
431
  DEFAULT_GLOBAL_SHIMS = ["1", "true"].includes(SYNCKIT_GLOBAL_SHIMS);
250
432
  DEFAULT_GLOBAL_SHIMS_PRESET = [
@@ -258,21 +440,19 @@ var init_lib2 = __esm({
258
440
  named: "performance"
259
441
  }
260
442
  ];
261
- MTS_SUPPORTED_NODE_VERSION = 16;
262
- cjsRequire2 = typeof require === "undefined" ? import_node_module2.default.createRequire(importMetaUrl) : require;
263
443
  dataUrl = (code) => new URL(`data:text/javascript,${encodeURIComponent(code)}`);
264
- isFile = (path5) => {
265
- var _a2;
444
+ isFile = (path6) => {
445
+ var _a;
266
446
  try {
267
- return !!((_a2 = import_node_fs2.default.statSync(path5, { throwIfNoEntry: false })) === null || _a2 === void 0 ? void 0 : _a2.isFile());
447
+ return !!((_a = import_node_fs3.default.statSync(path6, { throwIfNoEntry: false })) === null || _a === void 0 ? void 0 : _a.isFile());
268
448
  } catch (_b) {
269
449
  return false;
270
450
  }
271
451
  };
272
- setupTsRunner = (workerPath2, { execArgv, tsRunner }) => {
273
- let ext = import_node_path2.default.extname(workerPath2);
274
- if (!/[/\\]node_modules[/\\]/.test(workerPath2) && (!ext || /^\.[cm]?js$/.test(ext))) {
275
- const workPathWithoutExt = ext ? workerPath2.slice(0, -ext.length) : workerPath2;
452
+ setupTsRunner = (workerPath, { execArgv, tsRunner }) => {
453
+ let ext = import_node_path3.default.extname(workerPath);
454
+ if (!/([/\\])node_modules\1/.test(workerPath) && (!ext || /^\.[cm]?js$/.test(ext))) {
455
+ const workPathWithoutExt = ext ? workerPath.slice(0, -ext.length) : workerPath;
276
456
  let extensions;
277
457
  switch (ext) {
278
458
  case ".cjs": {
@@ -291,26 +471,57 @@ var init_lib2 = __esm({
291
471
  const found = tryExtensions(workPathWithoutExt, extensions);
292
472
  let differentExt;
293
473
  if (found && (!ext || (differentExt = found !== workPathWithoutExt))) {
294
- workerPath2 = found;
474
+ workerPath = found;
295
475
  if (differentExt) {
296
- ext = import_node_path2.default.extname(workerPath2);
476
+ ext = import_node_path3.default.extname(workerPath);
297
477
  }
298
478
  }
299
479
  }
300
- const isTs = /\.[cm]?ts$/.test(workerPath2);
301
- let jsUseEsm = workerPath2.endsWith(".mjs");
302
- let tsUseEsm = workerPath2.endsWith(".mts");
480
+ const isTs = /\.[cm]?ts$/.test(workerPath);
481
+ let jsUseEsm = workerPath.endsWith(".mjs");
482
+ let tsUseEsm = workerPath.endsWith(".mts");
303
483
  if (isTs) {
304
484
  if (!tsUseEsm) {
305
- const pkg = findUp(workerPath2);
306
- if (pkg) {
307
- tsUseEsm = cjsRequire2(pkg).type === "module";
485
+ const pkg3 = findUp(workerPath);
486
+ if (pkg3) {
487
+ tsUseEsm = cjsRequire2(pkg3).type === "module";
308
488
  }
309
489
  }
310
- if (tsRunner == null && isPkgAvailable(TsRunner.TsNode)) {
311
- tsRunner = TsRunner.TsNode;
490
+ const stripTypesIndex = execArgv.indexOf(STRIP_TYPES_FLAG);
491
+ const transformTypesIndex = execArgv.indexOf(TRANSFORM_TYPES_FLAG);
492
+ const noStripTypesIndex = execArgv.indexOf(NO_STRIP_TYPES_FLAG);
493
+ const execArgvNoStripTypes = noStripTypesIndex > stripTypesIndex || noStripTypesIndex > transformTypesIndex;
494
+ const noStripTypes = execArgvNoStripTypes || stripTypesIndex === -1 && transformTypesIndex === -1 && NO_STRIP_TYPES;
495
+ if (tsRunner == null) {
496
+ if (process.versions.bun) {
497
+ tsRunner = TsRunner.Bun;
498
+ } else if (!noStripTypes && compareVersion(NODE_VERSION, STRIP_TYPES_NODE_VERSION) >= 0) {
499
+ tsRunner = TsRunner.Node;
500
+ } else if (isPkgAvailable(TsRunner.TsNode)) {
501
+ tsRunner = TsRunner.TsNode;
502
+ }
312
503
  }
313
504
  switch (tsRunner) {
505
+ case TsRunner.Bun: {
506
+ break;
507
+ }
508
+ case TsRunner.Node: {
509
+ if (compareVersion(NODE_VERSION, STRIP_TYPES_NODE_VERSION) < 0) {
510
+ throw new Error("type stripping is not supported in this node version");
511
+ }
512
+ if (noStripTypes) {
513
+ throw new Error("type stripping is disabled explicitly");
514
+ }
515
+ if (compareVersion(NODE_VERSION, DEFAULT_TYPES_NODE_VERSION) >= 0) {
516
+ break;
517
+ }
518
+ if (compareVersion(NODE_VERSION, TRANSFORM_TYPES_NODE_VERSION) >= 0 && !execArgv.includes(TRANSFORM_TYPES_FLAG)) {
519
+ execArgv = [TRANSFORM_TYPES_FLAG, ...execArgv];
520
+ } else if (compareVersion(NODE_VERSION, STRIP_TYPES_NODE_VERSION) >= 0 && !execArgv.includes(STRIP_TYPES_FLAG)) {
521
+ execArgv = [STRIP_TYPES_FLAG, ...execArgv];
522
+ }
523
+ break;
524
+ }
314
525
  case TsRunner.TsNode: {
315
526
  if (tsUseEsm) {
316
527
  if (!execArgv.includes("--loader")) {
@@ -350,25 +561,24 @@ var init_lib2 = __esm({
350
561
  }
351
562
  }
352
563
  } else if (!jsUseEsm) {
353
- const pkg = findUp(workerPath2);
354
- if (pkg) {
355
- jsUseEsm = cjsRequire2(pkg).type === "module";
564
+ const pkg3 = findUp(workerPath);
565
+ if (pkg3) {
566
+ jsUseEsm = cjsRequire2(pkg3).type === "module";
356
567
  }
357
568
  }
358
569
  let resolvedPnpLoaderPath;
359
570
  if (process.versions.pnp) {
360
- const nodeOptions = NODE_OPTIONS === null || NODE_OPTIONS === void 0 ? void 0 : NODE_OPTIONS.split(/\s+/);
361
571
  let pnpApiPath;
362
572
  try {
363
573
  pnpApiPath = cjsRequire2.resolve("pnpapi");
364
- } catch (_a2) {
574
+ } catch (_a) {
365
575
  }
366
- if (pnpApiPath && !(nodeOptions === null || nodeOptions === void 0 ? void 0 : nodeOptions.some((option, index) => ["-r", "--require"].includes(option) && pnpApiPath === cjsRequire2.resolve(nodeOptions[index + 1]))) && !execArgv.includes(pnpApiPath)) {
576
+ if (pnpApiPath && !NODE_OPTIONS.some((option, index) => ["-r", "--require"].includes(option) && pnpApiPath === cjsRequire2.resolve(NODE_OPTIONS[index + 1])) && !execArgv.includes(pnpApiPath)) {
367
577
  execArgv = ["-r", pnpApiPath, ...execArgv];
368
- const pnpLoaderPath = import_node_path2.default.resolve(pnpApiPath, "../.pnp.loader.mjs");
578
+ const pnpLoaderPath = import_node_path3.default.resolve(pnpApiPath, "../.pnp.loader.mjs");
369
579
  if (isFile(pnpLoaderPath)) {
370
580
  resolvedPnpLoaderPath = (0, import_node_url.pathToFileURL)(pnpLoaderPath).toString();
371
- if (!IS_NODE_20) {
581
+ if (compareVersion(NODE_VERSION, LOADER_SUPPORTED_NODE_VERSION) < 0) {
372
582
  execArgv = [
373
583
  "--experimental-loader",
374
584
  resolvedPnpLoaderPath,
@@ -384,7 +594,7 @@ var init_lib2 = __esm({
384
594
  jsUseEsm,
385
595
  tsRunner,
386
596
  tsUseEsm,
387
- workerPath: workerPath2,
597
+ workerPath,
388
598
  pnpLoaderPath: resolvedPnpLoaderPath,
389
599
  execArgv
390
600
  };
@@ -392,7 +602,7 @@ var init_lib2 = __esm({
392
602
  md5Hash = (text) => (0, import_node_crypto.createHash)("md5").update(text).digest("hex");
393
603
  encodeImportModule = (moduleNameOrGlobalShim, type = "import") => {
394
604
  const { moduleName, globalName, named, conditional } = typeof moduleNameOrGlobalShim === "string" ? { moduleName: moduleNameOrGlobalShim } : moduleNameOrGlobalShim;
395
- const importStatement = type === "import" ? `import${globalName ? " " + (named === null ? "* as " + globalName : (named === null || named === void 0 ? void 0 : named.trim()) ? `{${named}}` : globalName) + " from" : ""} '${import_node_path2.default.isAbsolute(moduleName) ? String((0, import_node_url.pathToFileURL)(moduleName)) : moduleName}'` : `${globalName ? "const " + ((named === null || named === void 0 ? void 0 : named.trim()) ? `{${named}}` : globalName) + "=" : ""}require('${moduleName.replace(/\\/g, "\\\\")}')`;
605
+ const importStatement = type === "import" ? `import${globalName ? " " + (named === null ? "* as " + globalName : (named === null || named === void 0 ? void 0 : named.trim()) ? `{${named}}` : globalName) + " from" : ""} '${import_node_path3.default.isAbsolute(moduleName) ? String((0, import_node_url.pathToFileURL)(moduleName)) : moduleName}'` : `${globalName ? "const " + ((named === null || named === void 0 ? void 0 : named.trim()) ? `{${named}}` : globalName) + "=" : ""}require('${moduleName.replace(/\\/g, "\\\\")}')`;
396
606
  if (!globalName) {
397
607
  return importStatement;
398
608
  }
@@ -400,10 +610,13 @@ var init_lib2 = __esm({
400
610
  return importStatement + (conditional === false ? `;${overrideStatement}` : `;if(!globalThis.${globalName})${overrideStatement}`);
401
611
  };
402
612
  _generateGlobals = (globalShims, type) => globalShims.reduce((acc, shim) => `${acc}${acc ? ";" : ""}${encodeImportModule(shim, type)}`, "");
403
- _dirname = typeof __dirname === "undefined" ? import_node_path2.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl)) : __dirname;
404
- generateGlobals = (workerPath2, globalShims, type = "import") => {
613
+ _dirname = typeof __dirname === "undefined" ? import_node_path3.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl)) : __dirname;
614
+ generateGlobals = (workerPath, globalShims, type = "import") => {
615
+ if (globalShims.length === 0) {
616
+ return "";
617
+ }
405
618
  globalsCache !== null && globalsCache !== void 0 ? globalsCache : globalsCache = /* @__PURE__ */ new Map();
406
- const cached = globalsCache.get(workerPath2);
619
+ const cached = globalsCache.get(workerPath);
407
620
  if (cached) {
408
621
  const [content2, filepath2] = cached;
409
622
  if (type === "require" && !filepath2 || type === "import" && filepath2 && isFile(filepath2)) {
@@ -415,162 +628,40 @@ var init_lib2 = __esm({
415
628
  let filepath;
416
629
  if (type === "import") {
417
630
  if (!tmpdir) {
418
- tmpdir = import_node_path2.default.resolve(findUp(_dirname), "../node_modules/.synckit");
631
+ tmpdir = import_node_path3.default.resolve(findUp(_dirname), "../node_modules/.synckit");
419
632
  }
420
- import_node_fs2.default.mkdirSync(tmpdir, { recursive: true });
421
- filepath = import_node_path2.default.resolve(tmpdir, md5Hash(workerPath2) + ".mjs");
633
+ import_node_fs3.default.mkdirSync(tmpdir, { recursive: true });
634
+ filepath = import_node_path3.default.resolve(tmpdir, md5Hash(workerPath) + ".mjs");
422
635
  content = encodeImportModule(filepath);
423
- import_node_fs2.default.writeFileSync(filepath, globals);
636
+ import_node_fs3.default.writeFileSync(filepath, globals);
424
637
  }
425
- globalsCache.set(workerPath2, [content, filepath]);
638
+ globalsCache.set(workerPath, [content, filepath]);
426
639
  return content;
427
640
  };
428
641
  }
429
642
  });
430
643
 
431
- // ../../node_modules/.pnpm/eslint-mdx@3.2.0_eslint@9.22.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/index.es2015.mjs
432
- var index_es2015_exports = {};
433
- __export(index_es2015_exports, {
434
- DEFAULT_EXTENSIONS: () => DEFAULT_EXTENSIONS,
435
- MARKDOWN_EXTENSIONS: () => MARKDOWN_EXTENSIONS,
436
- Parser: () => Parser,
437
- arrayify: () => arrayify,
438
- getPhysicalFilename: () => getPhysicalFilename,
439
- getPositionAtFactory: () => getPositionAtFactory,
440
- last: () => last,
441
- loadEsmModule: () => loadEsmModule,
442
- meta: () => meta,
443
- nextCharOffsetFactory: () => nextCharOffsetFactory,
444
- normalizePosition: () => normalizePosition,
445
- parse: () => parse,
446
- parseForESLint: () => parseForESLint,
447
- parser: () => parser,
448
- performSyncWork: () => performSyncWork,
449
- prevCharOffsetFactory: () => prevCharOffsetFactory
450
- });
451
- var import_node_fs3, import_node_path3, last, arrayify, getPhysicalFilename, loadEsmModule, getPositionAtFactory, normalizePosition, prevCharOffsetFactory, nextCharOffsetFactory, name, version, meta, workerPath, performSyncWork, __defProp2, __defProps, __getOwnPropDescs, __getOwnPropSymbols, __hasOwnProp2, __propIsEnum, __defNormalProp, __spreadValues, __spreadProps, DEFAULT_EXTENSIONS, MARKDOWN_EXTENSIONS, Parser, parser, parse, parseForESLint;
452
- var init_index_es2015 = __esm({
453
- "../../node_modules/.pnpm/eslint-mdx@3.2.0_eslint@9.22.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/index.es2015.mjs"() {
644
+ // ../../node_modules/.pnpm/eslint-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/sync.js
645
+ var performSyncWork;
646
+ var init_sync = __esm({
647
+ "../../node_modules/.pnpm/eslint-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/sync.js"() {
454
648
  "use strict";
455
649
  init_cjs_shims();
456
- import_node_fs3 = __toESM(require("fs"), 1);
457
- import_node_path3 = __toESM(require("path"), 1);
458
650
  init_lib2();
459
- last = (items) => (
460
- // eslint-disable-next-line unicorn/prefer-at -- FIXME: Node 16.6+ required
461
- items && items[items.length - 1]
462
- );
463
- arrayify = (...args) => args.reduce((arr, curr) => {
464
- arr.push(...Array.isArray(curr) ? curr : curr == null ? [] : [curr]);
465
- return arr;
466
- }, []);
467
- getPhysicalFilename = (filename, child) => {
468
- try {
469
- if (import_node_fs3.default.statSync(filename).isDirectory()) {
470
- return child || filename;
471
- }
472
- } catch (err) {
473
- const { code } = err;
474
- if (code === "ENOTDIR" || code === "ENOENT") {
475
- return getPhysicalFilename(import_node_path3.default.dirname(filename), filename);
476
- }
477
- }
478
- return filename;
479
- };
480
- loadEsmModule = (modulePath) => (
481
- // eslint-disable-next-line @typescript-eslint/no-implied-eval, no-new-func
482
- new Function("modulePath", `return import(modulePath);`)(
483
- modulePath
484
- )
485
- );
486
- getPositionAtFactory = (text) => {
487
- const lines = text.split("\n");
488
- return (offset) => {
489
- let currOffset = 0;
490
- for (const [index, line_] of lines.entries()) {
491
- const line = index + 1;
492
- const nextOffset = currOffset + line_.length;
493
- if (nextOffset >= offset) {
494
- return {
495
- line,
496
- column: offset - currOffset
497
- };
498
- }
499
- currOffset = nextOffset + 1;
500
- }
501
- };
502
- };
503
- normalizePosition = ({
504
- start,
505
- end,
506
- text
507
- }) => {
508
- const startOffset = start.offset;
509
- const endOffset = end.offset;
510
- const range = [startOffset, endOffset];
511
- const getPositionAt = text == null ? null : (
512
- /* istanbul ignore next -- used in worker */
513
- getPositionAtFactory(text)
514
- );
515
- return {
516
- start: startOffset,
517
- end: endOffset,
518
- loc: {
519
- start: (
520
- /* istanbul ignore next -- used in worker */
521
- "line" in start ? start : getPositionAt(startOffset)
522
- ),
523
- end: (
524
- /* istanbul ignore next -- used in worker */
525
- "line" in end ? end : getPositionAt(endOffset)
526
- )
527
- },
528
- range
529
- };
530
- };
531
- prevCharOffsetFactory = (text) => (offset) => {
532
- for (let i = offset; i >= 0; i--) {
533
- const char = text[i];
534
- if (/^\S$/.test(char)) {
535
- return i;
536
- }
537
- }
538
- };
539
- nextCharOffsetFactory = (text) => {
540
- const total = text.length;
541
- return (offset) => {
542
- for (let i = offset; i <= total; i++) {
543
- const char = text[i];
544
- if (/^\S$/.test(char)) {
545
- return i;
546
- }
547
- }
548
- };
549
- };
550
- name = "eslint-mdx";
551
- version = "3.2.0";
552
- meta = { name, version };
553
- workerPath = require.resolve("./worker");
554
- performSyncWork = createSyncFn(workerPath);
555
- __defProp2 = Object.defineProperty;
556
- __defProps = Object.defineProperties;
557
- __getOwnPropDescs = Object.getOwnPropertyDescriptors;
558
- __getOwnPropSymbols = Object.getOwnPropertySymbols;
559
- __hasOwnProp2 = Object.prototype.hasOwnProperty;
560
- __propIsEnum = Object.prototype.propertyIsEnumerable;
561
- __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
562
- __spreadValues = (a, b) => {
563
- for (var prop in b || (b = {}))
564
- if (__hasOwnProp2.call(b, prop))
565
- __defNormalProp(a, prop, b[prop]);
566
- if (__getOwnPropSymbols)
567
- for (var prop of __getOwnPropSymbols(b)) {
568
- if (__propIsEnum.call(b, prop))
569
- __defNormalProp(a, prop, b[prop]);
570
- }
571
- return a;
572
- };
573
- __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
651
+ init_helpers();
652
+ performSyncWork = createSyncFn(cjsRequire.resolve("./worker.js"));
653
+ }
654
+ });
655
+
656
+ // ../../node_modules/.pnpm/eslint-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/parser.js
657
+ var import_node_path4, DEFAULT_EXTENSIONS, MARKDOWN_EXTENSIONS, Parser, parser, parse, parseForESLint;
658
+ var init_parser = __esm({
659
+ "../../node_modules/.pnpm/eslint-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/parser.js"() {
660
+ "use strict";
661
+ init_cjs_shims();
662
+ import_node_path4 = __toESM(require("path"), 1);
663
+ init_helpers();
664
+ init_sync();
574
665
  DEFAULT_EXTENSIONS = [".mdx"];
575
666
  MARKDOWN_EXTENSIONS = [".md"];
576
667
  Parser = class {
@@ -581,25 +672,15 @@ var init_index_es2015 = __esm({
581
672
  parse(code, options) {
582
673
  return this.parseForESLint(code, options).ast;
583
674
  }
584
- parseForESLint(code, {
585
- filePath,
586
- sourceType,
587
- ignoreRemarkConfig,
588
- extensions,
589
- markdownExtensions
590
- }) {
591
- const extname = import_node_path3.default.extname(filePath);
592
- const isMdx = [...DEFAULT_EXTENSIONS, ...arrayify(extensions)].includes(
593
- extname
594
- );
675
+ parseForESLint(code, { filePath, sourceType, ignoreRemarkConfig, extensions, markdownExtensions }) {
676
+ const extname = import_node_path4.default.extname(filePath);
677
+ const isMdx = [...DEFAULT_EXTENSIONS, ...arrayify(extensions)].includes(extname);
595
678
  const isMarkdown = [
596
679
  ...MARKDOWN_EXTENSIONS,
597
680
  ...arrayify(markdownExtensions)
598
681
  ].includes(extname);
599
682
  if (!isMdx && !isMarkdown) {
600
- throw new Error(
601
- "Unsupported file extension, make sure setting the `extensions` or `markdownExtensions` option correctly."
602
- );
683
+ throw new Error("Unsupported file extension, make sure setting the `extensions` or `markdownExtensions` option correctly.");
603
684
  }
604
685
  const physicalFilename = getPhysicalFilename(filePath);
605
686
  let result;
@@ -619,29 +700,24 @@ var init_index_es2015 = __esm({
619
700
  }
620
701
  const { message, line, column, place } = err;
621
702
  const point = place && ("start" in place ? place.start : place);
622
- throw Object.assign(
623
- new SyntaxError(message, {
624
- cause: err
625
- }),
626
- {
627
- lineNumber: line,
628
- column,
629
- index: (
630
- /* istanbul ignore next */
631
- point == null ? void 0 : point.offset
632
- )
633
- }
634
- );
703
+ throw Object.assign(new SyntaxError(message, {
704
+ cause: err
705
+ }), {
706
+ lineNumber: line,
707
+ column,
708
+ index: point?.offset
709
+ });
635
710
  }
636
711
  const { root, body, comments, tokens } = result;
637
712
  return {
638
- ast: __spreadProps(__spreadValues({}, normalizePosition(root.position)), {
713
+ ast: {
714
+ ...normalizePosition(root.position),
639
715
  type: "Program",
640
716
  sourceType,
641
717
  body,
642
718
  comments,
643
719
  tokens
644
- })
720
+ }
645
721
  };
646
722
  }
647
723
  };
@@ -650,35 +726,260 @@ var init_index_es2015 = __esm({
650
726
  }
651
727
  });
652
728
 
653
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.2.0_eslint@9.22.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/index.es2015.mjs
654
- var index_es2015_exports2 = {};
655
- __export(index_es2015_exports2, {
656
- DEFAULT_LANGUAGE_MAPPER: () => DEFAULT_LANGUAGE_MAPPER,
657
- base: () => base,
658
- codeBlocks: () => codeBlocks,
659
- configs: () => configs,
660
- createRemarkProcessor: () => createRemarkProcessor,
661
- flat: () => flat,
662
- flatCodeBlocks: () => flatCodeBlocks,
663
- getGlobals: () => getGlobals,
664
- getShortLang: () => getShortLang,
665
- meta: () => meta2,
666
- overrides: () => overrides$1,
667
- processorOptions: () => processorOptions,
668
- processors: () => processors,
669
- recommended: () => recommended,
670
- remark: () => remark,
671
- rules: () => rules
729
+ // ../../node_modules/.pnpm/eslint-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/index.js
730
+ var lib_exports = {};
731
+ __export(lib_exports, {
732
+ DEFAULT_EXTENSIONS: () => DEFAULT_EXTENSIONS,
733
+ MARKDOWN_EXTENSIONS: () => MARKDOWN_EXTENSIONS,
734
+ Parser: () => Parser,
735
+ arrayify: () => arrayify,
736
+ cjsRequire: () => cjsRequire,
737
+ getPhysicalFilename: () => getPhysicalFilename,
738
+ getPositionAtFactory: () => getPositionAtFactory,
739
+ last: () => last,
740
+ loadEsmModule: () => loadEsmModule,
741
+ meta: () => meta,
742
+ nextCharOffsetFactory: () => nextCharOffsetFactory,
743
+ normalizePosition: () => normalizePosition,
744
+ parse: () => parse,
745
+ parseForESLint: () => parseForESLint,
746
+ parser: () => parser,
747
+ performSyncWork: () => performSyncWork,
748
+ prevCharOffsetFactory: () => prevCharOffsetFactory
749
+ });
750
+ var init_lib3 = __esm({
751
+ "../../node_modules/.pnpm/eslint-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/index.js"() {
752
+ "use strict";
753
+ init_cjs_shims();
754
+ init_helpers();
755
+ init_meta();
756
+ init_parser();
757
+ init_sync();
758
+ }
759
+ });
760
+
761
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/flat.js
762
+ var flat, parserOptions, restConfig, flatCodeBlocks;
763
+ var init_flat = __esm({
764
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/flat.js"() {
765
+ "use strict";
766
+ init_cjs_shims();
767
+ init_lib3();
768
+ init_lib4();
769
+ init_code_blocks();
770
+ flat = {
771
+ files: ["**/*.{md,mdx}"],
772
+ languageOptions: {
773
+ sourceType: "module",
774
+ ecmaVersion: "latest",
775
+ parser: lib_exports,
776
+ globals: {
777
+ React: false
778
+ }
779
+ },
780
+ plugins: {
781
+ mdx: lib_exports2
782
+ },
783
+ rules: {
784
+ "mdx/remark": "warn",
785
+ "no-unused-expressions": "error",
786
+ "react/react-in-jsx-scope": "off"
787
+ }
788
+ };
789
+ ({ parserOptions, ...restConfig } = codeBlocks);
790
+ flatCodeBlocks = {
791
+ files: ["**/*.{md,mdx}/**"],
792
+ languageOptions: {
793
+ parserOptions
794
+ },
795
+ ...restConfig
796
+ };
797
+ }
798
+ });
799
+
800
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/helpers.js
801
+ var import_node_module4, getGlobals, cjsRequire3;
802
+ var init_helpers3 = __esm({
803
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/helpers.js"() {
804
+ "use strict";
805
+ init_cjs_shims();
806
+ import_node_module4 = require("module");
807
+ getGlobals = (sources, initialGlobals = {}) => (Array.isArray(sources) ? sources : Object.keys(sources)).reduce((globals, source) => Object.assign(globals, {
808
+ [source]: false
809
+ }), initialGlobals);
810
+ cjsRequire3 = typeof require === "undefined" ? (0, import_node_module4.createRequire)(importMetaUrl) : require;
811
+ }
812
+ });
813
+
814
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/overrides.js
815
+ var isReactPluginAvailable, overrides;
816
+ var init_overrides = __esm({
817
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/overrides.js"() {
818
+ "use strict";
819
+ init_cjs_shims();
820
+ init_lib3();
821
+ init_helpers3();
822
+ init_base();
823
+ isReactPluginAvailable = false;
824
+ try {
825
+ cjsRequire3.resolve("eslint-plugin-react");
826
+ isReactPluginAvailable = true;
827
+ } catch {
828
+ }
829
+ overrides = {
830
+ ...base,
831
+ globals: {
832
+ React: false
833
+ },
834
+ plugins: arrayify(base.plugins, isReactPluginAvailable ? "react" : null),
835
+ rules: {
836
+ "react/jsx-no-undef": isReactPluginAvailable ? [
837
+ 2,
838
+ {
839
+ allowGlobals: true
840
+ }
841
+ ] : 0,
842
+ "react/react-in-jsx-scope": 0
843
+ }
844
+ };
845
+ }
846
+ });
847
+
848
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/recommended.js
849
+ var overrides2, recommended, addPrettierRules;
850
+ var init_recommended = __esm({
851
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/recommended.js"() {
852
+ "use strict";
853
+ init_cjs_shims();
854
+ init_helpers3();
855
+ init_base();
856
+ overrides2 = [
857
+ {
858
+ files: ["*.md", "*.mdx"],
859
+ extends: "plugin:mdx/overrides",
860
+ ...base
861
+ },
862
+ {
863
+ files: "**/*.{md,mdx}/**",
864
+ extends: "plugin:mdx/code-blocks"
865
+ }
866
+ ];
867
+ recommended = {
868
+ overrides: overrides2
869
+ };
870
+ addPrettierRules = () => {
871
+ try {
872
+ cjsRequire3.resolve("prettier");
873
+ const { meta: meta3 } = cjsRequire3("eslint-plugin-prettier");
874
+ const version = meta3?.version || "";
875
+ const [major, minor, patch] = version.split(".");
876
+ if (+major > 5 || +major === 5 && (+minor > 1 || +minor === 1 && Number.parseInt(patch) >= 2)) {
877
+ return;
878
+ }
879
+ overrides2.push({
880
+ files: "*.md",
881
+ rules: {
882
+ "prettier/prettier": [
883
+ "error",
884
+ {
885
+ parser: "markdown"
886
+ }
887
+ ]
888
+ }
889
+ }, {
890
+ files: "*.mdx",
891
+ rules: {
892
+ "prettier/prettier": [
893
+ "error",
894
+ {
895
+ parser: "mdx"
896
+ }
897
+ ]
898
+ }
899
+ });
900
+ } catch {
901
+ }
902
+ };
903
+ addPrettierRules();
904
+ }
905
+ });
906
+
907
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/index.js
908
+ var configs;
909
+ var init_configs = __esm({
910
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/index.js"() {
911
+ "use strict";
912
+ init_cjs_shims();
913
+ init_base();
914
+ init_code_blocks();
915
+ init_flat();
916
+ init_overrides();
917
+ init_recommended();
918
+ configs = {
919
+ base,
920
+ "code-blocks": codeBlocks,
921
+ codeBlocks,
922
+ flat,
923
+ flatCodeBlocks,
924
+ overrides,
925
+ recommended
926
+ };
927
+ }
672
928
  });
929
+
930
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/meta.js
931
+ var pkg2, meta2;
932
+ var init_meta2 = __esm({
933
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/meta.js"() {
934
+ "use strict";
935
+ init_cjs_shims();
936
+ init_helpers3();
937
+ pkg2 = cjsRequire3("../package.json");
938
+ meta2 = { name: pkg2.name, version: pkg2.version };
939
+ }
940
+ });
941
+
942
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/helpers.js
673
943
  function getShortLang(filename, languageMapper) {
674
944
  const language = last(filename.split("."));
675
945
  if (languageMapper === false) {
676
946
  return language;
677
947
  }
678
- languageMapper = __spreadValues$3(__spreadValues$3({}, DEFAULT_LANGUAGE_MAPPER), languageMapper);
948
+ languageMapper = { ...DEFAULT_LANGUAGE_MAPPER, ...languageMapper };
679
949
  const lang = language.toLowerCase();
680
950
  return languageMapper[language] || languageMapper[lang] || lang;
681
951
  }
952
+ var DEFAULT_LANGUAGE_MAPPER;
953
+ var init_helpers4 = __esm({
954
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/helpers.js"() {
955
+ "use strict";
956
+ init_cjs_shims();
957
+ init_lib3();
958
+ DEFAULT_LANGUAGE_MAPPER = {
959
+ javascript: "js",
960
+ javascriptreact: "jsx",
961
+ typescript: "ts",
962
+ typescriptreact: "tsx",
963
+ markdown: "md",
964
+ mdown: "md",
965
+ mkdn: "md"
966
+ };
967
+ }
968
+ });
969
+
970
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/from-markdown.js
971
+ var fromMarkdown;
972
+ var init_from_markdown = __esm({
973
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/from-markdown.js"() {
974
+ "use strict";
975
+ init_cjs_shims();
976
+ init_lib2();
977
+ init_helpers3();
978
+ fromMarkdown = createSyncFn(cjsRequire3.resolve("./worker.js"));
979
+ }
980
+ });
981
+
982
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/markdown.js
682
983
  function traverse(node, callbacks) {
683
984
  if (callbacks[node.type]) {
684
985
  callbacks[node.type](node);
@@ -709,19 +1010,14 @@ function getBeginningOfLineOffset(node) {
709
1010
  return node.position.start.offset - node.position.start.column + 1;
710
1011
  }
711
1012
  function getIndentText(text, node) {
712
- return leadingWhitespaceRegex.exec(
713
- text.slice(getBeginningOfLineOffset(node))
714
- )[0];
1013
+ return leadingWhitespaceRegex.exec(text.slice(getBeginningOfLineOffset(node)))[0];
715
1014
  }
716
1015
  function getBlockRangeMap(text, node, comments) {
717
1016
  const startOffset = getBeginningOfLineOffset(node);
718
1017
  const code = text.slice(startOffset, node.position.end.offset);
719
1018
  const lines = code.split("\n");
720
1019
  const baseIndent = getIndentText(text, node).length;
721
- const commentLength = comments.reduce(
722
- (len, comment) => len + comment.length + 1,
723
- 0
724
- );
1020
+ const commentLength = comments.reduce((len, comment) => len + comment.length + 1, 0);
725
1021
  const rangeMap = [
726
1022
  {
727
1023
  indent: baseIndent,
@@ -738,9 +1034,6 @@ function getBlockRangeMap(text, node, comments) {
738
1034
  rangeMap.push({
739
1035
  indent: trimLength,
740
1036
  js: jsOffset,
741
- // Advance `trimLength` character from the beginning of the Markdown
742
- // line to the beginning of the equivalent JS line, then compute the
743
- // delta.
744
1037
  md: mdOffset + trimLength - jsOffset
745
1038
  });
746
1039
  mdOffset += line.length + 1;
@@ -749,8 +1042,7 @@ function getBlockRangeMap(text, node, comments) {
749
1042
  return rangeMap;
750
1043
  }
751
1044
  function fileNameFromMeta(block) {
752
- var _a2, _b;
753
- return (_b = (_a2 = block.meta) == null ? void 0 : _a2.match(codeBlockFileNameRegex)) == null ? void 0 : _b.groups.filename.replaceAll(/\s+/gu, "_");
1045
+ return codeBlockFileNameRegex.exec(block.meta)?.groups.filename.replaceAll(/\s+/gu, "_");
754
1046
  }
755
1047
  function preprocess(sourceText, filename) {
756
1048
  const text = sourceText.startsWith(BOM) ? sourceText.slice(1) : sourceText;
@@ -762,11 +1054,6 @@ function preprocess(sourceText, filename) {
762
1054
  "*"() {
763
1055
  htmlComments = [];
764
1056
  },
765
- /**
766
- * Visit a code node.
767
- * @param {CodeNode} node The visited node.
768
- * @returns {void}
769
- */
770
1057
  code(node) {
771
1058
  if (node.lang) {
772
1059
  const comments = [];
@@ -778,18 +1065,14 @@ function preprocess(sourceText, filename) {
778
1065
  comments.push(`/*${comment}*/`);
779
1066
  }
780
1067
  htmlComments = [];
781
- blocks.push(__spreadProps$2(__spreadValues$2({}, node), {
1068
+ blocks.push({
1069
+ ...node,
782
1070
  baseIndentText: getIndentText(text, node),
783
1071
  comments,
784
1072
  rangeMap: getBlockRangeMap(text, node, comments)
785
- }));
1073
+ });
786
1074
  }
787
1075
  },
788
- /**
789
- * Visit an HTML node.
790
- * @param {HtmlNode} node The visited node.
791
- * @returns {void}
792
- */
793
1076
  html(node) {
794
1077
  const comment = getComment(node.value);
795
1078
  if (comment) {
@@ -800,11 +1083,10 @@ function preprocess(sourceText, filename) {
800
1083
  }
801
1084
  });
802
1085
  return blocks.map((block, index) => {
803
- var _a2;
804
1086
  const [language] = block.lang.trim().split(" ");
805
1087
  const fileExtension = Object.hasOwn(languageToFileExtension, language) ? languageToFileExtension[language] : language;
806
1088
  return {
807
- filename: (_a2 = fileNameFromMeta(block)) != null ? _a2 : `${index}.${fileExtension}`,
1089
+ filename: fileNameFromMeta(block) ?? `${index}.${fileExtension}`,
808
1090
  text: [...block.comments, block.value, ""].join("\n")
809
1091
  };
810
1092
  });
@@ -823,17 +1105,15 @@ ${block.baseIndentText}`)
823
1105
  };
824
1106
  }
825
1107
  function adjustBlock(block) {
826
- const leadingCommentLines = block.comments.reduce(
827
- (count, comment) => count + comment.split("\n").length,
828
- 0
829
- );
1108
+ const leadingCommentLines = block.comments.reduce((count, comment) => count + comment.split("\n").length, 0);
830
1109
  const blockStart = block.position.start.line;
831
1110
  return function adjustMessage(message) {
832
1111
  if (!Number.isInteger(message.line)) {
833
- return __spreadProps$2(__spreadValues$2({}, message), {
1112
+ return {
1113
+ ...message,
834
1114
  line: blockStart,
835
1115
  column: block.position.start.column
836
- });
1116
+ };
837
1117
  }
838
1118
  const lineInCode = message.line - leadingCommentLines;
839
1119
  if (lineInCode < 1 || lineInCode >= block.rangeMap.length) {
@@ -847,7 +1127,8 @@ function adjustBlock(block) {
847
1127
  out.endLine = message.endLine - leadingCommentLines + blockStart;
848
1128
  }
849
1129
  if (Array.isArray(message.suggestions)) {
850
- out.suggestions = message.suggestions.map((suggestion) => __spreadProps$2(__spreadValues$2({}, suggestion), {
1130
+ out.suggestions = message.suggestions.map((suggestion) => ({
1131
+ ...suggestion,
851
1132
  fix: adjustFix(block, suggestion.fix)
852
1133
  }));
853
1134
  }
@@ -855,7 +1136,7 @@ function adjustBlock(block) {
855
1136
  if (message.fix) {
856
1137
  adjustedFix.fix = adjustFix(block, message.fix);
857
1138
  }
858
- return __spreadValues$2(__spreadValues$2(__spreadValues$2({}, message), out), adjustedFix);
1139
+ return { ...message, ...out, ...adjustedFix };
859
1140
  };
860
1141
  }
861
1142
  function excludeUnsatisfiableRules(message) {
@@ -869,363 +1150,15 @@ function postprocess(messages, filename) {
869
1150
  return group.map(adjust).filter(excludeUnsatisfiableRules);
870
1151
  });
871
1152
  }
872
- var import_node_path4, import_node_module3, mdx, base, codeBlocks, __defProp$6, __getOwnPropSymbols$6, __hasOwnProp$6, __propIsEnum$6, __defNormalProp$6, __spreadValues$6, __objRest, flat, _a, parserOptions, restConfig, flatCodeBlocks, __defProp$5, __defProps$3, __getOwnPropDescs$3, __getOwnPropSymbols$5, __hasOwnProp$5, __propIsEnum$5, __defNormalProp$5, __spreadValues$5, __spreadProps$3, isReactPluginAvailable, overrides$1, __defProp$4, __getOwnPropSymbols$4, __hasOwnProp$4, __propIsEnum$4, __defNormalProp$4, __spreadValues$4, overrides, recommended, getImportMetaUrl2, cjsRequire3, addPrettierRules, configs, getGlobals, name2, version2, meta2, __defProp$3, __getOwnPropSymbols$3, __hasOwnProp$3, __propIsEnum$3, __defNormalProp$3, __spreadValues$3, DEFAULT_LANGUAGE_MAPPER, fromMarkdown, __defProp$2, __defProps$2, __getOwnPropDescs$2, __getOwnPropSymbols$2, __hasOwnProp$2, __propIsEnum$2, __defNormalProp$2, __spreadValues$2, __spreadProps$2, UNSATISFIABLE_RULES, SUPPORTS_AUTOFIX, BOM, blocksCache, leadingWhitespaceRegex, codeBlockFileNameRegex, languageToFileExtension, markdownProcessor, processorOptions, linterPath, ESLinter, verify, __defProp$1, __defProps$1, __getOwnPropDescs$1, __getOwnPropSymbols$1, __hasOwnProp$1, __propIsEnum$1, __defNormalProp$1, __spreadValues$1, __spreadProps$1, createRemarkProcessor, remark$1, processors, __defProp3, __defProps2, __getOwnPropDescs2, __getOwnPropSymbols2, __hasOwnProp3, __propIsEnum2, __defNormalProp2, __spreadValues2, __spreadProps2, remark, rules;
873
- var init_index_es20152 = __esm({
874
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.2.0_eslint@9.22.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/index.es2015.mjs"() {
1153
+ var UNSATISFIABLE_RULES, SUPPORTS_AUTOFIX, BOM, blocksCache, leadingWhitespaceRegex, codeBlockFileNameRegex, languageToFileExtension, markdownProcessor;
1154
+ var init_markdown = __esm({
1155
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/markdown.js"() {
875
1156
  "use strict";
876
1157
  init_cjs_shims();
877
- init_index_es2015();
878
- init_index_es2015();
879
- init_lib2();
880
- import_node_path4 = __toESM(require("path"), 1);
881
- import_node_module3 = require("module");
882
- mdx = /* @__PURE__ */ Object.freeze({
883
- __proto__: null,
884
- get DEFAULT_LANGUAGE_MAPPER() {
885
- return DEFAULT_LANGUAGE_MAPPER;
886
- },
887
- get base() {
888
- return base;
889
- },
890
- get codeBlocks() {
891
- return codeBlocks;
892
- },
893
- get configs() {
894
- return configs;
895
- },
896
- get createRemarkProcessor() {
897
- return createRemarkProcessor;
898
- },
899
- get flat() {
900
- return flat;
901
- },
902
- get flatCodeBlocks() {
903
- return flatCodeBlocks;
904
- },
905
- get getGlobals() {
906
- return getGlobals;
907
- },
908
- get getShortLang() {
909
- return getShortLang;
910
- },
911
- get meta() {
912
- return meta2;
913
- },
914
- get overrides() {
915
- return overrides$1;
916
- },
917
- get processorOptions() {
918
- return processorOptions;
919
- },
920
- get processors() {
921
- return processors;
922
- },
923
- get recommended() {
924
- return recommended;
925
- },
926
- get remark() {
927
- return remark;
928
- },
929
- get rules() {
930
- return rules;
931
- }
932
- });
933
- base = {
934
- parser: "eslint-mdx",
935
- parserOptions: {
936
- sourceType: "module",
937
- ecmaVersion: "latest"
938
- },
939
- plugins: ["mdx"],
940
- processor: "mdx/remark",
941
- rules: {
942
- "mdx/remark": "warn",
943
- "no-unused-expressions": "error"
944
- }
945
- };
946
- codeBlocks = {
947
- parserOptions: {
948
- ecmaFeatures: {
949
- // Adding a "use strict" directive at the top of
950
- // every code block is tedious and distracting, so
951
- // opt into strict mode parsing without the
952
- // directive.
953
- impliedStrict: true
954
- }
955
- },
956
- rules: {
957
- // The Markdown parser automatically trims trailing
958
- // newlines from code blocks.
959
- "eol-last": "off",
960
- // In code snippets and examples, these rules are often
961
- // counterproductive to clarity and brevity.
962
- "no-undef": "off",
963
- "no-unused-expressions": "off",
964
- "no-unused-vars": "off",
965
- "padded-blocks": "off",
966
- // Adding a "use strict" directive at the top of every
967
- // code block is tedious and distracting. The config
968
- // opts into strict mode parsing without the directive.
969
- strict: "off",
970
- // The processor will not receive a Unicode Byte Order
971
- // Mark from the Markdown parser.
972
- "unicode-bom": "off"
973
- }
974
- };
975
- __defProp$6 = Object.defineProperty;
976
- __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
977
- __hasOwnProp$6 = Object.prototype.hasOwnProperty;
978
- __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
979
- __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
980
- __spreadValues$6 = (a, b) => {
981
- for (var prop in b || (b = {}))
982
- if (__hasOwnProp$6.call(b, prop))
983
- __defNormalProp$6(a, prop, b[prop]);
984
- if (__getOwnPropSymbols$6)
985
- for (var prop of __getOwnPropSymbols$6(b)) {
986
- if (__propIsEnum$6.call(b, prop))
987
- __defNormalProp$6(a, prop, b[prop]);
988
- }
989
- return a;
990
- };
991
- __objRest = (source, exclude) => {
992
- var target = {};
993
- for (var prop in source)
994
- if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
995
- target[prop] = source[prop];
996
- if (source != null && __getOwnPropSymbols$6)
997
- for (var prop of __getOwnPropSymbols$6(source)) {
998
- if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
999
- target[prop] = source[prop];
1000
- }
1001
- return target;
1002
- };
1003
- flat = {
1004
- files: ["**/*.{md,mdx}"],
1005
- languageOptions: {
1006
- sourceType: "module",
1007
- ecmaVersion: "latest",
1008
- parser: index_es2015_exports,
1009
- globals: {
1010
- React: false
1011
- }
1012
- },
1013
- plugins: {
1014
- mdx
1015
- },
1016
- rules: {
1017
- "mdx/remark": "warn",
1018
- "no-unused-expressions": "error",
1019
- "react/react-in-jsx-scope": 0
1020
- }
1021
- };
1022
- _a = codeBlocks;
1023
- ({ parserOptions } = _a);
1024
- restConfig = __objRest(_a, ["parserOptions"]);
1025
- flatCodeBlocks = __spreadValues$6({
1026
- files: ["**/*.{md,mdx}/*"],
1027
- languageOptions: {
1028
- parserOptions
1029
- }
1030
- }, restConfig);
1031
- __defProp$5 = Object.defineProperty;
1032
- __defProps$3 = Object.defineProperties;
1033
- __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
1034
- __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
1035
- __hasOwnProp$5 = Object.prototype.hasOwnProperty;
1036
- __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
1037
- __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1038
- __spreadValues$5 = (a, b) => {
1039
- for (var prop in b || (b = {}))
1040
- if (__hasOwnProp$5.call(b, prop))
1041
- __defNormalProp$5(a, prop, b[prop]);
1042
- if (__getOwnPropSymbols$5)
1043
- for (var prop of __getOwnPropSymbols$5(b)) {
1044
- if (__propIsEnum$5.call(b, prop))
1045
- __defNormalProp$5(a, prop, b[prop]);
1046
- }
1047
- return a;
1048
- };
1049
- __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
1050
- isReactPluginAvailable = false;
1051
- try {
1052
- require.resolve("eslint-plugin-react");
1053
- isReactPluginAvailable = true;
1054
- } catch (e) {
1055
- }
1056
- overrides$1 = __spreadProps$3(__spreadValues$5({}, base), {
1057
- globals: {
1058
- React: false
1059
- },
1060
- plugins: arrayify(
1061
- base.plugins,
1062
- /* istanbul ignore next */
1063
- isReactPluginAvailable ? "react" : null
1064
- ),
1065
- rules: {
1066
- "react/jsx-no-undef": (
1067
- /* istanbul ignore next */
1068
- isReactPluginAvailable ? [
1069
- 2,
1070
- {
1071
- allowGlobals: true
1072
- }
1073
- ] : 0
1074
- ),
1075
- "react/react-in-jsx-scope": 0
1076
- }
1077
- });
1078
- __defProp$4 = Object.defineProperty;
1079
- __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1080
- __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1081
- __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1082
- __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1083
- __spreadValues$4 = (a, b) => {
1084
- for (var prop in b || (b = {}))
1085
- if (__hasOwnProp$4.call(b, prop))
1086
- __defNormalProp$4(a, prop, b[prop]);
1087
- if (__getOwnPropSymbols$4)
1088
- for (var prop of __getOwnPropSymbols$4(b)) {
1089
- if (__propIsEnum$4.call(b, prop))
1090
- __defNormalProp$4(a, prop, b[prop]);
1091
- }
1092
- return a;
1093
- };
1094
- overrides = [
1095
- __spreadValues$4({
1096
- files: ["*.md", "*.mdx"],
1097
- extends: "plugin:mdx/overrides"
1098
- }, base),
1099
- {
1100
- files: "**/*.{md,mdx}/**",
1101
- extends: "plugin:mdx/code-blocks"
1102
- }
1103
- ];
1104
- recommended = {
1105
- overrides
1106
- };
1107
- getImportMetaUrl2 = () => {
1108
- try {
1109
- return new Function("return import.meta.url")();
1110
- } catch (e) {
1111
- return import_node_path4.default.resolve(process.cwd(), "__test__.js");
1112
- }
1113
- };
1114
- cjsRequire3 = typeof require === "undefined" ? (0, import_node_module3.createRequire)(getImportMetaUrl2()) : require;
1115
- addPrettierRules = () => {
1116
- try {
1117
- cjsRequire3.resolve("prettier");
1118
- const { meta: meta3 } = cjsRequire3("eslint-plugin-prettier");
1119
- const version3 = (meta3 == null ? void 0 : meta3.version) || "";
1120
- const [major, minor, patch] = version3.split(".");
1121
- if (
1122
- /* istanbul ignore next */
1123
- +major > 5 || +major === 5 && (+minor > 1 || +minor === 1 && Number.parseInt(patch) >= 2)
1124
- ) {
1125
- return;
1126
- }
1127
- overrides.push(
1128
- {
1129
- files: "*.md",
1130
- rules: {
1131
- "prettier/prettier": [
1132
- "error",
1133
- {
1134
- parser: "markdown"
1135
- }
1136
- ]
1137
- }
1138
- },
1139
- {
1140
- files: "*.mdx",
1141
- rules: {
1142
- "prettier/prettier": [
1143
- "error",
1144
- {
1145
- parser: "mdx"
1146
- }
1147
- ]
1148
- }
1149
- }
1150
- );
1151
- } catch (e) {
1152
- }
1153
- };
1154
- addPrettierRules();
1155
- configs = {
1156
- base,
1157
- "code-blocks": codeBlocks,
1158
- codeBlocks,
1159
- flat,
1160
- flatCodeBlocks,
1161
- overrides: overrides$1,
1162
- recommended
1163
- };
1164
- getGlobals = (sources, initialGlobals = {}) => (Array.isArray(sources) ? (
1165
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
1166
- sources
1167
- ) : Object.keys(sources)).reduce(
1168
- (globals, source) => Object.assign(globals, {
1169
- [source]: false
1170
- }),
1171
- // eslint-disable-next-line @typescript-eslint/prefer-reduce-type-parameter
1172
- initialGlobals
1173
- );
1174
- name2 = "eslint-plugin-mdx";
1175
- version2 = "3.2.0";
1176
- meta2 = { name: name2, version: version2 };
1177
- __defProp$3 = Object.defineProperty;
1178
- __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
1179
- __hasOwnProp$3 = Object.prototype.hasOwnProperty;
1180
- __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
1181
- __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1182
- __spreadValues$3 = (a, b) => {
1183
- for (var prop in b || (b = {}))
1184
- if (__hasOwnProp$3.call(b, prop))
1185
- __defNormalProp$3(a, prop, b[prop]);
1186
- if (__getOwnPropSymbols$3)
1187
- for (var prop of __getOwnPropSymbols$3(b)) {
1188
- if (__propIsEnum$3.call(b, prop))
1189
- __defNormalProp$3(a, prop, b[prop]);
1190
- }
1191
- return a;
1192
- };
1193
- DEFAULT_LANGUAGE_MAPPER = {
1194
- javascript: "js",
1195
- javascriptreact: "jsx",
1196
- typescript: "ts",
1197
- typescriptreact: "tsx",
1198
- markdown: "md",
1199
- mdown: "md",
1200
- mkdn: "md"
1201
- };
1202
- fromMarkdown = createSyncFn(
1203
- require.resolve("./worker")
1204
- );
1205
- __defProp$2 = Object.defineProperty;
1206
- __defProps$2 = Object.defineProperties;
1207
- __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
1208
- __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
1209
- __hasOwnProp$2 = Object.prototype.hasOwnProperty;
1210
- __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
1211
- __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1212
- __spreadValues$2 = (a, b) => {
1213
- for (var prop in b || (b = {}))
1214
- if (__hasOwnProp$2.call(b, prop))
1215
- __defNormalProp$2(a, prop, b[prop]);
1216
- if (__getOwnPropSymbols$2)
1217
- for (var prop of __getOwnPropSymbols$2(b)) {
1218
- if (__propIsEnum$2.call(b, prop))
1219
- __defNormalProp$2(a, prop, b[prop]);
1220
- }
1221
- return a;
1222
- };
1223
- __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
1158
+ init_from_markdown();
1224
1159
  UNSATISFIABLE_RULES = /* @__PURE__ */ new Set([
1225
1160
  "eol-last",
1226
- // The Markdown parser strips trailing newlines in code fences
1227
1161
  "unicode-bom"
1228
- // Code blocks will begin in the middle of Markdown files
1229
1162
  ]);
1230
1163
  SUPPORTS_AUTOFIX = true;
1231
1164
  BOM = "\uFEFF";
@@ -1247,59 +1180,57 @@ var init_index_es20152 = __esm({
1247
1180
  postprocess,
1248
1181
  supportsAutofix: SUPPORTS_AUTOFIX
1249
1182
  };
1183
+ }
1184
+ });
1185
+
1186
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/options.js
1187
+ var processorOptions, linterPath, ESLinter, verify;
1188
+ var init_options = __esm({
1189
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/options.js"() {
1190
+ "use strict";
1191
+ init_cjs_shims();
1192
+ init_helpers3();
1250
1193
  processorOptions = {};
1251
- linterPath = Object.keys(require.cache).find(
1252
- (path5) => /([/\\])eslint\1lib(?:\1linter){2}\.js$/.test(path5)
1253
- );
1194
+ linterPath = Object.keys(cjsRequire3.cache).find((path6) => /([/\\])eslint\1lib(?:\1linter){2}\.js$/.test(path6));
1254
1195
  if (!linterPath) {
1255
1196
  throw new Error("Could not find ESLint Linter in require cache");
1256
1197
  }
1257
- ESLinter = require(linterPath).Linter;
1198
+ ESLinter = cjsRequire3(linterPath).Linter;
1258
1199
  ({ verify } = ESLinter.prototype);
1259
1200
  ESLinter.prototype.verify = function(code, config, options) {
1260
- const settings = config && (typeof config.extractConfig === "function" ? config.extractConfig(
1261
- /* istanbul ignore next */
1262
- // eslint-disable-next-line unicorn/no-typeof-undefined
1263
- typeof options === "undefined" || typeof options === "string" ? options : options.filename
1264
- ) : config).settings || {};
1201
+ const settings = (config.extractConfig?.(typeof options === "undefined" || typeof options === "string" ? options : options.filename) ?? config).settings ?? {};
1265
1202
  processorOptions.lintCodeBlocks = settings["mdx/code-blocks"] === true;
1266
1203
  processorOptions.languageMapper = settings["mdx/language-mapper"];
1267
1204
  return verify.call(this, code, config, options);
1268
1205
  };
1269
- __defProp$1 = Object.defineProperty;
1270
- __defProps$1 = Object.defineProperties;
1271
- __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
1272
- __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
1273
- __hasOwnProp$1 = Object.prototype.hasOwnProperty;
1274
- __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
1275
- __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1276
- __spreadValues$1 = (a, b) => {
1277
- for (var prop in b || (b = {}))
1278
- if (__hasOwnProp$1.call(b, prop))
1279
- __defNormalProp$1(a, prop, b[prop]);
1280
- if (__getOwnPropSymbols$1)
1281
- for (var prop of __getOwnPropSymbols$1(b)) {
1282
- if (__propIsEnum$1.call(b, prop))
1283
- __defNormalProp$1(a, prop, b[prop]);
1284
- }
1285
- return a;
1286
- };
1287
- __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
1288
- createRemarkProcessor = (processorOptions$1 = processorOptions) => ({
1206
+ }
1207
+ });
1208
+
1209
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/remark.js
1210
+ var createRemarkProcessor, remark;
1211
+ var init_remark = __esm({
1212
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/remark.js"() {
1213
+ "use strict";
1214
+ init_cjs_shims();
1215
+ init_meta2();
1216
+ init_helpers4();
1217
+ init_markdown();
1218
+ init_options();
1219
+ createRemarkProcessor = (processorOptions2 = processorOptions) => ({
1289
1220
  meta: {
1290
1221
  name: "mdx/remark",
1291
1222
  version: meta2.version
1292
1223
  },
1293
1224
  supportsAutofix: true,
1294
1225
  preprocess(text, filename) {
1295
- if (!processorOptions$1.lintCodeBlocks) {
1226
+ if (!processorOptions2.lintCodeBlocks) {
1296
1227
  return [text];
1297
1228
  }
1298
1229
  return [
1299
1230
  text,
1300
1231
  ...markdownProcessor.preprocess(text, filename).map(({ text: text2, filename: filename2 }) => ({
1301
1232
  text: text2,
1302
- filename: filename2.slice(0, filename2.lastIndexOf(".")) + "." + getShortLang(filename2, processorOptions$1.languageMapper)
1233
+ filename: filename2.slice(0, filename2.lastIndexOf(".")) + "." + getShortLang(filename2, processorOptions2.languageMapper)
1303
1234
  }))
1304
1235
  ];
1305
1236
  },
@@ -1308,47 +1239,47 @@ var init_index_es20152 = __esm({
1308
1239
  ...mdxMessages,
1309
1240
  ...markdownProcessor.postprocess(markdownMessages, filename)
1310
1241
  ].sort((a, b) => a.line - b.line || a.column - b.column).map((lintMessage) => {
1311
- const {
1312
- message,
1313
- ruleId: eslintRuleId,
1314
- severity: eslintSeverity
1315
- } = lintMessage;
1242
+ const { message, ruleId: eslintRuleId, severity: eslintSeverity } = lintMessage;
1316
1243
  if (eslintRuleId !== "mdx/remark") {
1317
1244
  return lintMessage;
1318
1245
  }
1319
- const { source, ruleId, reason, severity } = JSON.parse(
1320
- message
1321
- );
1322
- return __spreadProps$1(__spreadValues$1({}, lintMessage), {
1246
+ const { source, ruleId, reason, severity } = JSON.parse(message);
1247
+ return {
1248
+ ...lintMessage,
1323
1249
  ruleId: `${source}-${ruleId}`,
1324
1250
  message: reason,
1325
1251
  severity: Math.max(eslintSeverity, severity)
1326
- });
1252
+ };
1327
1253
  });
1328
1254
  }
1329
1255
  });
1330
- remark$1 = createRemarkProcessor();
1331
- processors = { remark: remark$1 };
1332
- __defProp3 = Object.defineProperty;
1333
- __defProps2 = Object.defineProperties;
1334
- __getOwnPropDescs2 = Object.getOwnPropertyDescriptors;
1335
- __getOwnPropSymbols2 = Object.getOwnPropertySymbols;
1336
- __hasOwnProp3 = Object.prototype.hasOwnProperty;
1337
- __propIsEnum2 = Object.prototype.propertyIsEnumerable;
1338
- __defNormalProp2 = (obj, key, value) => key in obj ? __defProp3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1339
- __spreadValues2 = (a, b) => {
1340
- for (var prop in b || (b = {}))
1341
- if (__hasOwnProp3.call(b, prop))
1342
- __defNormalProp2(a, prop, b[prop]);
1343
- if (__getOwnPropSymbols2)
1344
- for (var prop of __getOwnPropSymbols2(b)) {
1345
- if (__propIsEnum2.call(b, prop))
1346
- __defNormalProp2(a, prop, b[prop]);
1347
- }
1348
- return a;
1349
- };
1350
- __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
1351
- remark = {
1256
+ remark = createRemarkProcessor();
1257
+ }
1258
+ });
1259
+
1260
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/index.js
1261
+ var processors;
1262
+ var init_processors = __esm({
1263
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/index.js"() {
1264
+ "use strict";
1265
+ init_cjs_shims();
1266
+ init_remark();
1267
+ init_helpers4();
1268
+ init_options();
1269
+ init_remark();
1270
+ processors = { remark };
1271
+ }
1272
+ });
1273
+
1274
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/remark.js
1275
+ var import_node_path5, remark2;
1276
+ var init_remark2 = __esm({
1277
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/remark.js"() {
1278
+ "use strict";
1279
+ init_cjs_shims();
1280
+ import_node_path5 = __toESM(require("path"), 1);
1281
+ init_lib3();
1282
+ remark2 = {
1352
1283
  meta: {
1353
1284
  type: "layout",
1354
1285
  docs: {
@@ -1360,7 +1291,7 @@ var init_index_es20152 = __esm({
1360
1291
  },
1361
1292
  create(context) {
1362
1293
  const filename = context.getFilename();
1363
- const extname = import_node_path4.default.extname(filename);
1294
+ const extname = import_node_path5.default.extname(filename);
1364
1295
  const sourceCode = context.getSourceCode();
1365
1296
  const options = context.parserOptions;
1366
1297
  const isMdx = [
@@ -1372,7 +1303,6 @@ var init_index_es20152 = __esm({
1372
1303
  ...options.markdownExtensions || []
1373
1304
  ].includes(extname);
1374
1305
  return {
1375
- // eslint-disable-next-line sonarjs/cognitive-complexity
1376
1306
  Program(node) {
1377
1307
  if (!isMdx && !isMarkdown) {
1378
1308
  return;
@@ -1384,7 +1314,6 @@ var init_index_es20152 = __esm({
1384
1314
  fileOptions: {
1385
1315
  path: physicalFilename,
1386
1316
  value: sourceText,
1387
- // eslint-disable-next-line sonar/deprecation -- FIXME: ESLint 8.40+ required
1388
1317
  cwd: context.getCwd()
1389
1318
  },
1390
1319
  physicalFilename,
@@ -1393,15 +1322,7 @@ var init_index_es20152 = __esm({
1393
1322
  ignoreRemarkConfig
1394
1323
  });
1395
1324
  let fixed = 0;
1396
- for (const {
1397
- source,
1398
- reason,
1399
- ruleId,
1400
- fatal,
1401
- line,
1402
- column,
1403
- place
1404
- } of messages) {
1325
+ for (const { source, reason, ruleId, fatal, line, column, place } of messages) {
1405
1326
  const severity = fatal ? 2 : fatal == null ? 0 : 1;
1406
1327
  if (!severity) {
1407
1328
  continue;
@@ -1414,19 +1335,15 @@ var init_index_es20152 = __esm({
1414
1335
  };
1415
1336
  const point = {
1416
1337
  line,
1417
- // ! eslint ast column is 0-indexed, but unified is 1-indexed
1418
1338
  column: column - 1
1419
1339
  };
1420
1340
  context.report({
1421
- // related to https://github.com/eslint/eslint/issues/14198
1422
1341
  message: JSON.stringify(message),
1423
- loc: (
1424
- /* istanbul ignore next */
1425
- place && "start" in place ? __spreadProps2(__spreadValues2({}, point), {
1426
- start: __spreadProps2(__spreadValues2({}, place.start), { column: place.start.column - 1 }),
1427
- end: __spreadProps2(__spreadValues2({}, place.end), { column: place.end.column - 1 })
1428
- }) : point
1429
- ),
1342
+ loc: place && "start" in place ? {
1343
+ ...point,
1344
+ start: { ...place.start, column: place.start.column - 1 },
1345
+ end: { ...place.end, column: place.end.column - 1 }
1346
+ } : point,
1430
1347
  node,
1431
1348
  fix: fixedText === sourceText ? null : () => fixed++ ? null : {
1432
1349
  range: [0, sourceText.length],
@@ -1438,7 +1355,50 @@ var init_index_es20152 = __esm({
1438
1355
  };
1439
1356
  }
1440
1357
  };
1441
- rules = { remark };
1358
+ }
1359
+ });
1360
+
1361
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/index.js
1362
+ var rules;
1363
+ var init_rules = __esm({
1364
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/index.js"() {
1365
+ "use strict";
1366
+ init_cjs_shims();
1367
+ init_remark2();
1368
+ rules = { remark: remark2 };
1369
+ }
1370
+ });
1371
+
1372
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/index.js
1373
+ var lib_exports2 = {};
1374
+ __export(lib_exports2, {
1375
+ DEFAULT_LANGUAGE_MAPPER: () => DEFAULT_LANGUAGE_MAPPER,
1376
+ base: () => base,
1377
+ cjsRequire: () => cjsRequire3,
1378
+ codeBlocks: () => codeBlocks,
1379
+ configs: () => configs,
1380
+ createRemarkProcessor: () => createRemarkProcessor,
1381
+ flat: () => flat,
1382
+ flatCodeBlocks: () => flatCodeBlocks,
1383
+ getGlobals: () => getGlobals,
1384
+ getShortLang: () => getShortLang,
1385
+ meta: () => meta2,
1386
+ overrides: () => overrides,
1387
+ processorOptions: () => processorOptions,
1388
+ processors: () => processors,
1389
+ recommended: () => recommended,
1390
+ remark: () => remark2,
1391
+ rules: () => rules
1392
+ });
1393
+ var init_lib4 = __esm({
1394
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.3.1_eslint@9.23.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/index.js"() {
1395
+ "use strict";
1396
+ init_cjs_shims();
1397
+ init_configs();
1398
+ init_helpers3();
1399
+ init_meta2();
1400
+ init_processors();
1401
+ init_rules();
1442
1402
  }
1443
1403
  });
1444
1404
 
@@ -1535,7 +1495,7 @@ var defuArrayFn = createDefu((object, key, currentValue) => {
1535
1495
  // src/defaults.ts
1536
1496
  init_cjs_shims();
1537
1497
 
1538
- // ../../node_modules/.pnpm/eslint-plugin-vue@10.0.0_eslint@9.22.0_jiti@2.4.2__vue-eslint-parser@10.1.1_eslint@9.22.0_jiti@2.4.2__/node_modules/eslint-plugin-vue/lib/utils/inline-non-void-elements.json
1498
+ // ../../node_modules/.pnpm/eslint-plugin-vue@10.0.0_eslint@9.23.0_jiti@2.4.2__vue-eslint-parser@10.1.1_eslint@9.23.0_jiti@2.4.2__/node_modules/eslint-plugin-vue/lib/utils/inline-non-void-elements.json
1539
1499
  var inline_non_void_elements_default = [
1540
1500
  "a",
1541
1501
  "abbr",
@@ -1579,7 +1539,7 @@ var inline_non_void_elements_default = [
1579
1539
 
1580
1540
  // src/defaults.ts
1581
1541
  function getDefaultVueOptions(opts) {
1582
- const overrides2 = {
1542
+ const overrides3 = {
1583
1543
  "vue/attribute-hyphenation": "off",
1584
1544
  "vue/v-on-event-hyphenation": "off",
1585
1545
  "vue/custom-event-name-casing": "off",
@@ -1599,10 +1559,10 @@ function getDefaultVueOptions(opts) {
1599
1559
  "vue/no-unused-refs": "warn"
1600
1560
  };
1601
1561
  if (opts?.ionic) {
1602
- overrides2["vue/no-deprecated-slot-attribute"] = "off";
1562
+ overrides3["vue/no-deprecated-slot-attribute"] = "off";
1603
1563
  }
1604
1564
  if (opts?.weapp) {
1605
- overrides2["vue/singleline-html-element-content-newline"] = [
1565
+ overrides3["vue/singleline-html-element-content-newline"] = [
1606
1566
  "warn",
1607
1567
  {
1608
1568
  ignoreWhenNoAttributes: true,
@@ -1617,12 +1577,12 @@ function getDefaultVueOptions(opts) {
1617
1577
  ];
1618
1578
  }
1619
1579
  const vueOptions = {
1620
- overrides: overrides2
1580
+ overrides: overrides3
1621
1581
  };
1622
1582
  return vueOptions;
1623
1583
  }
1624
1584
  function getDefaultTypescriptOptions(opts) {
1625
- const overrides2 = {
1585
+ const overrides3 = {
1626
1586
  "ts/no-unused-vars": [
1627
1587
  "error",
1628
1588
  {
@@ -1647,7 +1607,7 @@ function getDefaultTypescriptOptions(opts) {
1647
1607
  ]
1648
1608
  };
1649
1609
  if (opts?.nest) {
1650
- Object.assign(overrides2, {
1610
+ Object.assign(overrides3, {
1651
1611
  "ts/interface-name-prefix": "off",
1652
1612
  "ts/explicit-function-return-type": "off",
1653
1613
  "ts/explicit-module-boundary-types": "off",
@@ -1656,7 +1616,7 @@ function getDefaultTypescriptOptions(opts) {
1656
1616
  });
1657
1617
  }
1658
1618
  const typescriptOptions = {
1659
- overrides: overrides2
1619
+ overrides: overrides3
1660
1620
  };
1661
1621
  return typescriptOptions;
1662
1622
  }
@@ -1711,16 +1671,16 @@ function getPresets(options, mode) {
1711
1671
  }
1712
1672
  if (enableVue) {
1713
1673
  if (typeof enableVue === "object") {
1714
- const overrides2 = enableVue.overrides;
1715
- if (overrides2) {
1674
+ const overrides3 = enableVue.overrides;
1675
+ if (overrides3) {
1716
1676
  if (enableVue.vueVersion === 2) {
1717
- Object.assign(overrides2, {
1677
+ Object.assign(overrides3, {
1718
1678
  "vue/no-v-for-template-key-on-child": "off",
1719
1679
  "vue/no-v-for-template-key": "error",
1720
1680
  "vue/no-deprecated-v-bind-sync": "off"
1721
1681
  });
1722
1682
  } else {
1723
- Object.assign(overrides2, {
1683
+ Object.assign(overrides3, {
1724
1684
  "vue/no-v-for-template-key-on-child": "error",
1725
1685
  "vue/no-v-for-template-key": "off"
1726
1686
  });
@@ -1749,19 +1709,19 @@ function getPresets(options, mode) {
1749
1709
  });
1750
1710
  }
1751
1711
  if (enableMDX) {
1752
- presets.push((0, antfu_exports.interopDefault)(Promise.resolve().then(() => (init_index_es20152(), index_es2015_exports2))).then((mdx2) => {
1712
+ presets.push((0, antfu_exports.interopDefault)(Promise.resolve().then(() => (init_lib4(), lib_exports2))).then((mdx) => {
1753
1713
  return [
1754
1714
  {
1755
- ...mdx2.flat,
1756
- processor: mdx2.createRemarkProcessor({
1715
+ ...mdx.flat,
1716
+ processor: mdx.createRemarkProcessor({
1757
1717
  lintCodeBlocks: true,
1758
1718
  languageMapper: {}
1759
1719
  })
1760
1720
  },
1761
1721
  {
1762
- ...mdx2.flatCodeBlocks,
1722
+ ...mdx.flatCodeBlocks,
1763
1723
  rules: {
1764
- ...mdx2.flatCodeBlocks.rules
1724
+ ...mdx.flatCodeBlocks.rules
1765
1725
  }
1766
1726
  }
1767
1727
  ];