@jsse/eslint-config 0.1.0 → 0.1.2

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
@@ -5,7 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
8
  var __commonJS = (cb, mod) => function __require() {
10
9
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
10
  };
@@ -30,40 +29,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
29
  mod
31
30
  ));
32
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
- var __publicField = (obj, key, value) => {
34
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
35
- return value;
36
- };
37
- var __accessCheck = (obj, member, msg) => {
38
- if (!member.has(obj))
39
- throw TypeError("Cannot " + msg);
40
- };
41
- var __privateGet = (obj, member, getter) => {
42
- __accessCheck(obj, member, "read from private field");
43
- return getter ? getter.call(obj) : member.get(obj);
44
- };
45
- var __privateAdd = (obj, member, value) => {
46
- if (member.has(obj))
47
- throw TypeError("Cannot add the same private member more than once");
48
- member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
49
- };
50
- var __privateSet = (obj, member, value, setter) => {
51
- __accessCheck(obj, member, "write to private field");
52
- setter ? setter.call(obj, value) : member.set(obj, value);
53
- return value;
54
- };
55
- var __privateWrapper = (obj, member, setter, getter) => ({
56
- set _(value) {
57
- __privateSet(obj, member, value, setter);
58
- },
59
- get _() {
60
- return __privateGet(obj, member, getter);
61
- }
62
- });
63
32
 
64
33
  // node_modules/.pnpm/natural-compare@1.4.0/node_modules/natural-compare/index.js
65
34
  var require_natural_compare = __commonJS({
66
- "node_modules/.pnpm/natural-compare@1.4.0/node_modules/natural-compare/index.js"(exports, module2) {
35
+ "node_modules/.pnpm/natural-compare@1.4.0/node_modules/natural-compare/index.js"(exports2, module2) {
67
36
  "use strict";
68
37
  var naturalCompare = function(a, b) {
69
38
  var i, codeA, codeB = 1, posA = 0, posB = 0, alphabet = String.alphabet;
@@ -100,7 +69,7 @@ var require_natural_compare = __commonJS({
100
69
 
101
70
  // node_modules/.pnpm/eslint-plugin-sort-keys@2.3.5/node_modules/eslint-plugin-sort-keys/rules/sort-keys-fix.js
102
71
  var require_sort_keys_fix = __commonJS({
103
- "node_modules/.pnpm/eslint-plugin-sort-keys@2.3.5/node_modules/eslint-plugin-sort-keys/rules/sort-keys-fix.js"(exports, module2) {
72
+ "node_modules/.pnpm/eslint-plugin-sort-keys@2.3.5/node_modules/eslint-plugin-sort-keys/rules/sort-keys-fix.js"(exports2, module2) {
104
73
  "use strict";
105
74
  var naturalCompare = require_natural_compare();
106
75
  module2.exports = {
@@ -332,7 +301,7 @@ var require_sort_keys_fix = __commonJS({
332
301
 
333
302
  // node_modules/.pnpm/eslint-plugin-sort-keys@2.3.5/node_modules/eslint-plugin-sort-keys/index.js
334
303
  var require_eslint_plugin_sort_keys = __commonJS({
335
- "node_modules/.pnpm/eslint-plugin-sort-keys@2.3.5/node_modules/eslint-plugin-sort-keys/index.js"(exports, module2) {
304
+ "node_modules/.pnpm/eslint-plugin-sort-keys@2.3.5/node_modules/eslint-plugin-sort-keys/index.js"(exports2, module2) {
336
305
  "use strict";
337
306
  module2.exports.rules = {
338
307
  "sort-keys-fix": require_sort_keys_fix()
@@ -340,9 +309,9 @@ var require_eslint_plugin_sort_keys = __commonJS({
340
309
  }
341
310
  });
342
311
 
343
- // node_modules/.pnpm/globals@13.24.0/node_modules/globals/globals.json
312
+ // node_modules/.pnpm/globals@14.0.0/node_modules/globals/globals.json
344
313
  var require_globals = __commonJS({
345
- "node_modules/.pnpm/globals@13.24.0/node_modules/globals/globals.json"(exports, module2) {
314
+ "node_modules/.pnpm/globals@14.0.0/node_modules/globals/globals.json"(exports2, module2) {
346
315
  module2.exports = {
347
316
  builtin: {
348
317
  AggregateError: false,
@@ -2344,9 +2313,9 @@ var require_globals = __commonJS({
2344
2313
  }
2345
2314
  });
2346
2315
 
2347
- // node_modules/.pnpm/globals@13.24.0/node_modules/globals/index.js
2316
+ // node_modules/.pnpm/globals@14.0.0/node_modules/globals/index.js
2348
2317
  var require_globals2 = __commonJS({
2349
- "node_modules/.pnpm/globals@13.24.0/node_modules/globals/index.js"(exports, module2) {
2318
+ "node_modules/.pnpm/globals@14.0.0/node_modules/globals/index.js"(exports2, module2) {
2350
2319
  "use strict";
2351
2320
  module2.exports = require_globals();
2352
2321
  }
@@ -2381,6 +2350,7 @@ __export(src_exports, {
2381
2350
  eslintConfigPrettierRules: () => eslintConfigPrettierRules,
2382
2351
  ignores: () => ignores,
2383
2352
  imports: () => imports,
2353
+ interopDefault: () => interopDefault,
2384
2354
  isCI: () => isCI,
2385
2355
  isInEditor: () => isInEditor,
2386
2356
  javascript: () => javascript,
@@ -2398,8 +2368,8 @@ __export(src_exports, {
2398
2368
  pluginJsdoc: () => import_eslint_plugin_jsdoc.default,
2399
2369
  pluginJsonc: () => pluginJsonc,
2400
2370
  pluginMarkdown: () => import_eslint_plugin_markdown.default,
2371
+ pluginN: () => import_eslint_plugin_n.default,
2401
2372
  pluginNoOnlyTests: () => import_eslint_plugin_no_only_tests.default,
2402
- pluginNode: () => import_eslint_plugin_n.default,
2403
2373
  pluginPerfectionist: () => import_eslint_plugin_perfectionist.default,
2404
2374
  pluginReact: () => import_eslint_plugin_react.default,
2405
2375
  pluginReactHooks: () => import_eslint_plugin_react_hooks.default,
@@ -2829,8 +2799,7 @@ function javascript(options = {}) {
2829
2799
  }
2830
2800
 
2831
2801
  // src/configs/jsdoc.ts
2832
- function jsdoc(options = {}) {
2833
- const { stylistic: stylistic2 = true } = options;
2802
+ function jsdoc() {
2834
2803
  return [
2835
2804
  {
2836
2805
  name: "jsse:jsdoc",
@@ -2840,11 +2809,13 @@ function jsdoc(options = {}) {
2840
2809
  },
2841
2810
  rules: {
2842
2811
  "jsdoc/check-access": "warn",
2812
+ "jsdoc/check-alignment": "warn",
2843
2813
  "jsdoc/check-param-names": "warn",
2844
2814
  "jsdoc/check-property-names": "warn",
2845
2815
  "jsdoc/check-types": "warn",
2846
2816
  "jsdoc/empty-tags": "warn",
2847
2817
  "jsdoc/implements-on-classes": "warn",
2818
+ "jsdoc/multiline-blocks": "warn",
2848
2819
  "jsdoc/no-defaults": "warn",
2849
2820
  "jsdoc/no-multi-asterisks": "warn",
2850
2821
  "jsdoc/require-param-name": "warn",
@@ -2853,11 +2824,7 @@ function jsdoc(options = {}) {
2853
2824
  "jsdoc/require-property-name": "warn",
2854
2825
  "jsdoc/require-returns-check": "warn",
2855
2826
  "jsdoc/require-returns-description": "warn",
2856
- "jsdoc/require-yields-check": "warn",
2857
- ...stylistic2 ? {
2858
- "jsdoc/check-alignment": "warn",
2859
- "jsdoc/multiline-blocks": "warn"
2860
- } : {}
2827
+ "jsdoc/require-yields-check": "warn"
2861
2828
  }
2862
2829
  }
2863
2830
  ];
@@ -2935,11 +2902,11 @@ function jsonc(options = {}) {
2935
2902
  ];
2936
2903
  }
2937
2904
 
2938
- // src/configs/node.ts
2905
+ // src/configs/n.ts
2939
2906
  function node() {
2940
2907
  return [
2941
2908
  {
2942
- name: "jsse:node",
2909
+ name: "jsse:n",
2943
2910
  plugins: {
2944
2911
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
2945
2912
  node: import_eslint_plugin_n.default
@@ -3619,6 +3586,10 @@ function renameRules(rules, from, to) {
3619
3586
  })
3620
3587
  );
3621
3588
  }
3589
+ async function interopDefault(m) {
3590
+ const resolved = await m;
3591
+ return resolved.default || resolved;
3592
+ }
3622
3593
  function isCI() {
3623
3594
  return !!import_node_process2.default.env.CI;
3624
3595
  }
@@ -4086,7 +4057,7 @@ function typescriptRules(props) {
4086
4057
  }
4087
4058
 
4088
4059
  // src/configs/ts/typescript.ts
4089
- function typescript(options) {
4060
+ async function typescript(options) {
4090
4061
  const {
4091
4062
  componentExts = [],
4092
4063
  overrides = {},
@@ -4119,6 +4090,7 @@ function typescript(options) {
4119
4090
  [tsPrefixTo]: import_eslint_plugin2.default
4120
4091
  }
4121
4092
  },
4093
+ // ...tseslint.configs.recommended,
4122
4094
  {
4123
4095
  // use ts parser for js files as well!
4124
4096
  files: [GLOB_SRC, ...componentExts.map((ext) => `**/*.${ext}`)],
@@ -4966,12 +4938,12 @@ pp$9.isSimpleAssignTarget = function(expr) {
4966
4938
  };
4967
4939
  var pp$8 = Parser.prototype;
4968
4940
  pp$8.parseTopLevel = function(node2) {
4969
- var exports = /* @__PURE__ */ Object.create(null);
4941
+ var exports2 = /* @__PURE__ */ Object.create(null);
4970
4942
  if (!node2.body) {
4971
4943
  node2.body = [];
4972
4944
  }
4973
4945
  while (this.type !== types$1.eof) {
4974
- var stmt = this.parseStatement(null, true, exports);
4946
+ var stmt = this.parseStatement(null, true, exports2);
4975
4947
  node2.body.push(stmt);
4976
4948
  }
4977
4949
  if (this.inModule) {
@@ -5027,7 +4999,7 @@ pp$8.isAsyncFunction = function() {
5027
4999
  var next = this.pos + skip[0].length, after;
5028
5000
  return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
5029
5001
  };
5030
- pp$8.parseStatement = function(context, topLevel, exports) {
5002
+ pp$8.parseStatement = function(context, topLevel, exports2) {
5031
5003
  var starttype = this.type, node2 = this.startNode(), kind;
5032
5004
  if (this.isLet(context)) {
5033
5005
  starttype = types$1._var;
@@ -5096,7 +5068,7 @@ pp$8.parseStatement = function(context, topLevel, exports) {
5096
5068
  this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
5097
5069
  }
5098
5070
  }
5099
- return starttype === types$1._import ? this.parseImport(node2) : this.parseExport(node2, exports);
5071
+ return starttype === types$1._import ? this.parseImport(node2) : this.parseExport(node2, exports2);
5100
5072
  default:
5101
5073
  if (this.isAsyncFunction()) {
5102
5074
  if (context) {
@@ -5733,11 +5705,11 @@ function checkKeyName(node2, name) {
5733
5705
  var key = node2.key;
5734
5706
  return !computed && (key.type === "Identifier" && key.name === name || key.type === "Literal" && key.value === name);
5735
5707
  }
5736
- pp$8.parseExportAllDeclaration = function(node2, exports) {
5708
+ pp$8.parseExportAllDeclaration = function(node2, exports2) {
5737
5709
  if (this.options.ecmaVersion >= 11) {
5738
5710
  if (this.eatContextual("as")) {
5739
5711
  node2.exported = this.parseModuleExportName();
5740
- this.checkExport(exports, node2.exported, this.lastTokStart);
5712
+ this.checkExport(exports2, node2.exported, this.lastTokStart);
5741
5713
  } else {
5742
5714
  node2.exported = null;
5743
5715
  }
@@ -5750,28 +5722,28 @@ pp$8.parseExportAllDeclaration = function(node2, exports) {
5750
5722
  this.semicolon();
5751
5723
  return this.finishNode(node2, "ExportAllDeclaration");
5752
5724
  };
5753
- pp$8.parseExport = function(node2, exports) {
5725
+ pp$8.parseExport = function(node2, exports2) {
5754
5726
  this.next();
5755
5727
  if (this.eat(types$1.star)) {
5756
- return this.parseExportAllDeclaration(node2, exports);
5728
+ return this.parseExportAllDeclaration(node2, exports2);
5757
5729
  }
5758
5730
  if (this.eat(types$1._default)) {
5759
- this.checkExport(exports, "default", this.lastTokStart);
5731
+ this.checkExport(exports2, "default", this.lastTokStart);
5760
5732
  node2.declaration = this.parseExportDefaultDeclaration();
5761
5733
  return this.finishNode(node2, "ExportDefaultDeclaration");
5762
5734
  }
5763
5735
  if (this.shouldParseExportStatement()) {
5764
5736
  node2.declaration = this.parseExportDeclaration(node2);
5765
5737
  if (node2.declaration.type === "VariableDeclaration") {
5766
- this.checkVariableExport(exports, node2.declaration.declarations);
5738
+ this.checkVariableExport(exports2, node2.declaration.declarations);
5767
5739
  } else {
5768
- this.checkExport(exports, node2.declaration.id, node2.declaration.id.start);
5740
+ this.checkExport(exports2, node2.declaration.id, node2.declaration.id.start);
5769
5741
  }
5770
5742
  node2.specifiers = [];
5771
5743
  node2.source = null;
5772
5744
  } else {
5773
5745
  node2.declaration = null;
5774
- node2.specifiers = this.parseExportSpecifiers(exports);
5746
+ node2.specifiers = this.parseExportSpecifiers(exports2);
5775
5747
  if (this.eatContextual("from")) {
5776
5748
  if (this.type !== types$1.string) {
5777
5749
  this.unexpected();
@@ -5813,66 +5785,66 @@ pp$8.parseExportDefaultDeclaration = function() {
5813
5785
  return declaration;
5814
5786
  }
5815
5787
  };
5816
- pp$8.checkExport = function(exports, name, pos) {
5817
- if (!exports) {
5788
+ pp$8.checkExport = function(exports2, name, pos) {
5789
+ if (!exports2) {
5818
5790
  return;
5819
5791
  }
5820
5792
  if (typeof name !== "string") {
5821
5793
  name = name.type === "Identifier" ? name.name : name.value;
5822
5794
  }
5823
- if (hasOwn(exports, name)) {
5795
+ if (hasOwn(exports2, name)) {
5824
5796
  this.raiseRecoverable(pos, "Duplicate export '" + name + "'");
5825
5797
  }
5826
- exports[name] = true;
5798
+ exports2[name] = true;
5827
5799
  };
5828
- pp$8.checkPatternExport = function(exports, pat) {
5800
+ pp$8.checkPatternExport = function(exports2, pat) {
5829
5801
  var type = pat.type;
5830
5802
  if (type === "Identifier") {
5831
- this.checkExport(exports, pat, pat.start);
5803
+ this.checkExport(exports2, pat, pat.start);
5832
5804
  } else if (type === "ObjectPattern") {
5833
5805
  for (var i = 0, list = pat.properties; i < list.length; i += 1) {
5834
5806
  var prop = list[i];
5835
- this.checkPatternExport(exports, prop);
5807
+ this.checkPatternExport(exports2, prop);
5836
5808
  }
5837
5809
  } else if (type === "ArrayPattern") {
5838
5810
  for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
5839
5811
  var elt = list$1[i$1];
5840
5812
  if (elt) {
5841
- this.checkPatternExport(exports, elt);
5813
+ this.checkPatternExport(exports2, elt);
5842
5814
  }
5843
5815
  }
5844
5816
  } else if (type === "Property") {
5845
- this.checkPatternExport(exports, pat.value);
5817
+ this.checkPatternExport(exports2, pat.value);
5846
5818
  } else if (type === "AssignmentPattern") {
5847
- this.checkPatternExport(exports, pat.left);
5819
+ this.checkPatternExport(exports2, pat.left);
5848
5820
  } else if (type === "RestElement") {
5849
- this.checkPatternExport(exports, pat.argument);
5821
+ this.checkPatternExport(exports2, pat.argument);
5850
5822
  }
5851
5823
  };
5852
- pp$8.checkVariableExport = function(exports, decls) {
5853
- if (!exports) {
5824
+ pp$8.checkVariableExport = function(exports2, decls) {
5825
+ if (!exports2) {
5854
5826
  return;
5855
5827
  }
5856
5828
  for (var i = 0, list = decls; i < list.length; i += 1) {
5857
5829
  var decl = list[i];
5858
- this.checkPatternExport(exports, decl.id);
5830
+ this.checkPatternExport(exports2, decl.id);
5859
5831
  }
5860
5832
  };
5861
5833
  pp$8.shouldParseExportStatement = function() {
5862
5834
  return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
5863
5835
  };
5864
- pp$8.parseExportSpecifier = function(exports) {
5836
+ pp$8.parseExportSpecifier = function(exports2) {
5865
5837
  var node2 = this.startNode();
5866
5838
  node2.local = this.parseModuleExportName();
5867
5839
  node2.exported = this.eatContextual("as") ? this.parseModuleExportName() : node2.local;
5868
5840
  this.checkExport(
5869
- exports,
5841
+ exports2,
5870
5842
  node2.exported,
5871
5843
  node2.exported.start
5872
5844
  );
5873
5845
  return this.finishNode(node2, "ExportSpecifier");
5874
5846
  };
5875
- pp$8.parseExportSpecifiers = function(exports) {
5847
+ pp$8.parseExportSpecifiers = function(exports2) {
5876
5848
  var nodes = [], first = true;
5877
5849
  this.expect(types$1.braceL);
5878
5850
  while (!this.eat(types$1.braceR)) {
@@ -5884,7 +5856,7 @@ pp$8.parseExportSpecifiers = function(exports) {
5884
5856
  } else {
5885
5857
  first = false;
5886
5858
  }
5887
- nodes.push(this.parseExportSpecifier(exports));
5859
+ nodes.push(this.parseExportSpecifier(exports2));
5888
5860
  }
5889
5861
  return nodes;
5890
5862
  };
@@ -9630,14 +9602,15 @@ Parser.acorn = {
9630
9602
  nonASCIIwhitespace
9631
9603
  };
9632
9604
 
9633
- // node_modules/.pnpm/mlly@1.4.2/node_modules/mlly/dist/index.mjs
9605
+ // node_modules/.pnpm/mlly@1.5.0/node_modules/mlly/dist/index.mjs
9634
9606
  var import_node_module = require("module");
9635
9607
  var import_node_fs = __toESM(require("fs"), 1);
9636
9608
  var import_node_url = require("url");
9637
9609
 
9638
- // node_modules/.pnpm/ufo@1.3.2/node_modules/ufo/dist/index.mjs
9610
+ // node_modules/.pnpm/ufo@1.4.0/node_modules/ufo/dist/index.mjs
9639
9611
  var r = String.fromCharCode;
9640
9612
  var TRAILING_SLASH_RE = /\/$|\/\?|\/#/;
9613
+ var JOIN_LEADING_SLASH_RE = /^\.?\//;
9641
9614
  function hasTrailingSlash(input = "", respectQueryAndFragment) {
9642
9615
  if (!respectQueryAndFragment) {
9643
9616
  return input.endsWith("/");
@@ -9667,7 +9640,6 @@ function withTrailingSlash(input = "", respectQueryAndFragment) {
9667
9640
  function isNonEmptyURL(url) {
9668
9641
  return url && url !== "/";
9669
9642
  }
9670
- var JOIN_LEADING_SLASH_RE = /^\.?\//;
9671
9643
  function joinURL(base, ...input) {
9672
9644
  let url = base || "";
9673
9645
  for (const segment of input.filter((url2) => isNonEmptyURL(url2))) {
@@ -9680,6 +9652,7 @@ function joinURL(base, ...input) {
9680
9652
  }
9681
9653
  return url;
9682
9654
  }
9655
+ var protocolRelative = Symbol.for("ufo:protocolRelative");
9683
9656
 
9684
9657
  // node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.mjs
9685
9658
  var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
@@ -9687,7 +9660,7 @@ var isAbsolute = function(p) {
9687
9660
  return _IS_ABSOLUTE_RE.test(p);
9688
9661
  };
9689
9662
 
9690
- // node_modules/.pnpm/mlly@1.4.2/node_modules/mlly/dist/index.mjs
9663
+ // node_modules/.pnpm/mlly@1.5.0/node_modules/mlly/dist/index.mjs
9691
9664
  var import_node_assert = __toESM(require("assert"), 1);
9692
9665
  var import_node_process3 = __toESM(require("process"), 1);
9693
9666
  var import_node_path = __toESM(require("path"), 1);
@@ -9697,7 +9670,6 @@ var BUILTIN_MODULES = new Set(import_node_module.builtinModules);
9697
9670
  function normalizeSlash(string_) {
9698
9671
  return string_.replace(/\\/g, "/");
9699
9672
  }
9700
- var isWindows = import_node_process3.default.platform === "win32";
9701
9673
  var own$1 = {}.hasOwnProperty;
9702
9674
  var classRegExp = /^([A-Z][a-z\d]*)+$/;
9703
9675
  var kTypes = /* @__PURE__ */ new Set([
@@ -9843,10 +9815,10 @@ codes.ERR_MODULE_NOT_FOUND = createError(
9843
9815
  /**
9844
9816
  * @param {string} path
9845
9817
  * @param {string} base
9846
- * @param {string} [type]
9818
+ * @param {boolean} [exactUrl]
9847
9819
  */
9848
- (path4, base, type = "package") => {
9849
- return `Cannot find ${type} '${path4}' imported from ${base}`;
9820
+ (path4, base, exactUrl = false) => {
9821
+ return `Cannot find ${exactUrl ? "module" : "package"} '${path4}' imported from ${base}`;
9850
9822
  },
9851
9823
  Error
9852
9824
  );
@@ -9916,24 +9888,6 @@ codes.ERR_INVALID_ARG_VALUE = createError(
9916
9888
  // Note: extra classes have been shaken out.
9917
9889
  // , RangeError
9918
9890
  );
9919
- codes.ERR_UNSUPPORTED_ESM_URL_SCHEME = createError(
9920
- "ERR_UNSUPPORTED_ESM_URL_SCHEME",
9921
- /**
9922
- * @param {URL} url
9923
- * @param {Array<string>} supported
9924
- */
9925
- (url, supported) => {
9926
- let message = `Only URLs with a scheme in: ${formatList(
9927
- supported
9928
- )} are supported by the default ESM loader`;
9929
- if (isWindows && url.protocol.length === 2) {
9930
- message += ". On Windows, absolute paths must be valid file:// URLs";
9931
- }
9932
- message += `. Received protocol '${url.protocol}'`;
9933
- return message;
9934
- },
9935
- Error
9936
- );
9937
9891
  function createError(sym, value, def) {
9938
9892
  messages.set(sym, value);
9939
9893
  return makeNodeErrorWithCode(def, sym);
@@ -10051,96 +10005,98 @@ function determineSpecificType(value) {
10051
10005
  }
10052
10006
  return `type ${typeof value} (${inspected})`;
10053
10007
  }
10008
+ var hasOwnProperty$1 = {}.hasOwnProperty;
10009
+ var { ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 } = codes;
10010
+ var cache = /* @__PURE__ */ new Map();
10054
10011
  var reader = { read };
10055
10012
  var packageJsonReader = reader;
10056
- function read(jsonPath) {
10057
- try {
10058
- const string = import_node_fs.default.readFileSync(
10059
- import_node_path.default.toNamespacedPath(import_node_path.default.join(import_node_path.default.dirname(jsonPath), "package.json")),
10060
- "utf8"
10061
- );
10062
- return { string };
10063
- } catch (error) {
10064
- const exception = (
10065
- /** @type {ErrnoException} */
10066
- error
10067
- );
10068
- if (exception.code === "ENOENT") {
10069
- return { string: void 0 };
10070
- }
10071
- throw exception;
10072
- }
10073
- }
10074
- var { ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 } = codes;
10075
- var packageJsonCache = /* @__PURE__ */ new Map();
10076
- function getPackageConfig(path4, specifier, base) {
10077
- const existing = packageJsonCache.get(path4);
10078
- if (existing !== void 0) {
10013
+ function read(jsonPath, { base, specifier }) {
10014
+ const existing = cache.get(jsonPath);
10015
+ if (existing) {
10079
10016
  return existing;
10080
10017
  }
10081
- const source = packageJsonReader.read(path4).string;
10082
- if (source === void 0) {
10083
- const packageConfig2 = {
10084
- pjsonPath: path4,
10085
- exists: false,
10086
- main: void 0,
10087
- name: void 0,
10088
- type: "none",
10089
- exports: void 0,
10090
- imports: void 0
10091
- };
10092
- packageJsonCache.set(path4, packageConfig2);
10093
- return packageConfig2;
10094
- }
10095
- let packageJson;
10018
+ let string;
10096
10019
  try {
10097
- packageJson = JSON.parse(source);
10020
+ string = import_node_fs.default.readFileSync(import_node_path.default.toNamespacedPath(jsonPath), "utf8");
10098
10021
  } catch (error) {
10099
10022
  const exception = (
10100
10023
  /** @type {ErrnoException} */
10101
10024
  error
10102
10025
  );
10103
- throw new ERR_INVALID_PACKAGE_CONFIG$1(
10104
- path4,
10105
- (base ? `"${specifier}" from ` : "") + (0, import_node_url.fileURLToPath)(base || specifier),
10106
- exception.message
10107
- );
10026
+ if (exception.code !== "ENOENT") {
10027
+ throw exception;
10028
+ }
10108
10029
  }
10109
- const { exports, imports: imports2, main, name, type } = packageJson;
10110
- const packageConfig = {
10111
- pjsonPath: path4,
10112
- exists: true,
10113
- main: typeof main === "string" ? main : void 0,
10114
- name: typeof name === "string" ? name : void 0,
10115
- type: type === "module" || type === "commonjs" ? type : "none",
10116
- // @ts-expect-error Assume `Record<string, unknown>`.
10117
- exports,
10118
- // @ts-expect-error Assume `Record<string, unknown>`.
10119
- imports: imports2 && typeof imports2 === "object" ? imports2 : void 0
10030
+ const result = {
10031
+ exists: false,
10032
+ pjsonPath: jsonPath,
10033
+ main: void 0,
10034
+ name: void 0,
10035
+ type: "none",
10036
+ // Ignore unknown types for forwards compatibility
10037
+ exports: void 0,
10038
+ imports: void 0
10120
10039
  };
10121
- packageJsonCache.set(path4, packageConfig);
10122
- return packageConfig;
10040
+ if (string !== void 0) {
10041
+ let parsed;
10042
+ try {
10043
+ parsed = JSON.parse(string);
10044
+ } catch (error_) {
10045
+ const cause = (
10046
+ /** @type {ErrnoException} */
10047
+ error_
10048
+ );
10049
+ const error = new ERR_INVALID_PACKAGE_CONFIG$1(
10050
+ jsonPath,
10051
+ (base ? `"${specifier}" from ` : "") + (0, import_node_url.fileURLToPath)(base || specifier),
10052
+ cause.message
10053
+ );
10054
+ error.cause = cause;
10055
+ throw error;
10056
+ }
10057
+ result.exists = true;
10058
+ if (hasOwnProperty$1.call(parsed, "name") && typeof parsed.name === "string") {
10059
+ result.name = parsed.name;
10060
+ }
10061
+ if (hasOwnProperty$1.call(parsed, "main") && typeof parsed.main === "string") {
10062
+ result.main = parsed.main;
10063
+ }
10064
+ if (hasOwnProperty$1.call(parsed, "exports")) {
10065
+ result.exports = parsed.exports;
10066
+ }
10067
+ if (hasOwnProperty$1.call(parsed, "imports")) {
10068
+ result.imports = parsed.imports;
10069
+ }
10070
+ if (hasOwnProperty$1.call(parsed, "type") && (parsed.type === "commonjs" || parsed.type === "module")) {
10071
+ result.type = parsed.type;
10072
+ }
10073
+ }
10074
+ cache.set(jsonPath, result);
10075
+ return result;
10123
10076
  }
10124
10077
  function getPackageScopeConfig(resolved) {
10125
- let packageJsonUrl = new import_node_url.URL("package.json", resolved);
10078
+ let packageJSONUrl = new import_node_url.URL("package.json", resolved);
10126
10079
  while (true) {
10127
- const packageJsonPath2 = packageJsonUrl.pathname;
10128
- if (packageJsonPath2.endsWith("node_modules/package.json"))
10080
+ const packageJSONPath2 = packageJSONUrl.pathname;
10081
+ if (packageJSONPath2.endsWith("node_modules/package.json")) {
10129
10082
  break;
10130
- const packageConfig2 = getPackageConfig(
10131
- (0, import_node_url.fileURLToPath)(packageJsonUrl),
10132
- resolved
10083
+ }
10084
+ const packageConfig = packageJsonReader.read(
10085
+ (0, import_node_url.fileURLToPath)(packageJSONUrl),
10086
+ { specifier: resolved }
10133
10087
  );
10134
- if (packageConfig2.exists)
10135
- return packageConfig2;
10136
- const lastPackageJsonUrl = packageJsonUrl;
10137
- packageJsonUrl = new import_node_url.URL("../package.json", packageJsonUrl);
10138
- if (packageJsonUrl.pathname === lastPackageJsonUrl.pathname)
10088
+ if (packageConfig.exists) {
10089
+ return packageConfig;
10090
+ }
10091
+ const lastPackageJSONUrl = packageJSONUrl;
10092
+ packageJSONUrl = new import_node_url.URL("../package.json", packageJSONUrl);
10093
+ if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) {
10139
10094
  break;
10095
+ }
10140
10096
  }
10141
- const packageJsonPath = (0, import_node_url.fileURLToPath)(packageJsonUrl);
10142
- const packageConfig = {
10143
- pjsonPath: packageJsonPath,
10097
+ const packageJSONPath = (0, import_node_url.fileURLToPath)(packageJSONUrl);
10098
+ return {
10099
+ pjsonPath: packageJSONPath,
10144
10100
  exists: false,
10145
10101
  main: void 0,
10146
10102
  name: void 0,
@@ -10148,8 +10104,6 @@ function getPackageScopeConfig(resolved) {
10148
10104
  exports: void 0,
10149
10105
  imports: void 0
10150
10106
  };
10151
- packageJsonCache.set(packageJsonPath, packageConfig);
10152
- return packageConfig;
10153
10107
  }
10154
10108
  function getPackageType(url) {
10155
10109
  const packageConfig = getPackageScopeConfig(url);
@@ -10206,7 +10160,18 @@ function extname2(url) {
10206
10160
  function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
10207
10161
  const ext = extname2(url);
10208
10162
  if (ext === ".js") {
10209
- return getPackageType(url) === "module" ? "module" : "commonjs";
10163
+ const packageType = getPackageType(url);
10164
+ if (packageType !== "none") {
10165
+ return packageType;
10166
+ }
10167
+ return "commonjs";
10168
+ }
10169
+ if (ext === "") {
10170
+ const packageType = getPackageType(url);
10171
+ if (packageType === "none" || packageType === "commonjs") {
10172
+ return "commonjs";
10173
+ }
10174
+ return "module";
10210
10175
  }
10211
10176
  const format3 = extensionFormatMap[ext];
10212
10177
  if (format3)
@@ -10220,10 +10185,11 @@ function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
10220
10185
  function getHttpProtocolModuleFormat() {
10221
10186
  }
10222
10187
  function defaultGetFormatWithoutErrors(url, context) {
10223
- if (!hasOwnProperty2.call(protocolHandlers, url.protocol)) {
10188
+ const protocol = url.protocol;
10189
+ if (!hasOwnProperty2.call(protocolHandlers, protocol)) {
10224
10190
  return null;
10225
10191
  }
10226
- return protocolHandlers[url.protocol](url, context, true) || null;
10192
+ return protocolHandlers[protocol](url, context, true) || null;
10227
10193
  }
10228
10194
  var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];
10229
10195
  var {
@@ -10234,8 +10200,7 @@ var {
10234
10200
  ERR_MODULE_NOT_FOUND,
10235
10201
  ERR_PACKAGE_IMPORT_NOT_DEFINED,
10236
10202
  ERR_PACKAGE_PATH_NOT_EXPORTED,
10237
- ERR_UNSUPPORTED_DIR_IMPORT,
10238
- ERR_UNSUPPORTED_ESM_URL_SCHEME
10203
+ ERR_UNSUPPORTED_DIR_IMPORT
10239
10204
  } = codes;
10240
10205
  var own = {}.hasOwnProperty;
10241
10206
  var invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i;
@@ -10246,6 +10211,9 @@ var encodedSepRegEx = /%2f|%5c/i;
10246
10211
  var emittedPackageWarnings = /* @__PURE__ */ new Set();
10247
10212
  var doubleSlashRegEx = /[/\\]{2}/;
10248
10213
  function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) {
10214
+ if (import_node_process3.default.noDeprecation) {
10215
+ return;
10216
+ }
10249
10217
  const pjsonPath = (0, import_node_url.fileURLToPath)(packageJsonUrl);
10250
10218
  const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null;
10251
10219
  import_node_process3.default.emitWarning(
@@ -10255,30 +10223,34 @@ function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, i
10255
10223
  );
10256
10224
  }
10257
10225
  function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
10226
+ if (import_node_process3.default.noDeprecation) {
10227
+ return;
10228
+ }
10258
10229
  const format3 = defaultGetFormatWithoutErrors(url, { parentURL: base.href });
10259
10230
  if (format3 !== "module")
10260
10231
  return;
10261
- const path4 = (0, import_node_url.fileURLToPath)(url.href);
10232
+ const urlPath = (0, import_node_url.fileURLToPath)(url.href);
10262
10233
  const pkgPath = (0, import_node_url.fileURLToPath)(new import_node_url.URL(".", packageJsonUrl));
10263
10234
  const basePath = (0, import_node_url.fileURLToPath)(base);
10264
- if (main)
10235
+ if (!main) {
10265
10236
  import_node_process3.default.emitWarning(
10266
- `Package ${pkgPath} has a "main" field set to ${JSON.stringify(main)}, excluding the full filename and extension to the resolved file at "${path4.slice(
10237
+ `No "main" or "exports" field defined in the package.json for ${pkgPath} resolving the main entry point "${urlPath.slice(
10267
10238
  pkgPath.length
10268
10239
  )}", imported from ${basePath}.
10269
- Automatic extension resolution of the "main" field isdeprecated for ES modules.`,
10240
+ Default "index" lookups for the main are deprecated for ES modules.`,
10270
10241
  "DeprecationWarning",
10271
10242
  "DEP0151"
10272
10243
  );
10273
- else
10244
+ } else if (import_node_path.default.resolve(pkgPath, main) !== urlPath) {
10274
10245
  import_node_process3.default.emitWarning(
10275
- `No "main" or "exports" field defined in the package.json for ${pkgPath} resolving the main entry point "${path4.slice(
10246
+ `Package ${pkgPath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(
10276
10247
  pkgPath.length
10277
10248
  )}", imported from ${basePath}.
10278
- Default "index" lookups for the main are deprecated for ES modules.`,
10249
+ Automatic extension resolution of the "main" field is deprecated for ES modules.`,
10279
10250
  "DeprecationWarning",
10280
10251
  "DEP0151"
10281
10252
  );
10253
+ }
10282
10254
  }
10283
10255
  function tryStatSync(path4) {
10284
10256
  try {
@@ -10341,13 +10313,25 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
10341
10313
  );
10342
10314
  }
10343
10315
  function finalizeResolution(resolved, base, preserveSymlinks) {
10344
- if (encodedSepRegEx.exec(resolved.pathname) !== null)
10316
+ if (encodedSepRegEx.exec(resolved.pathname) !== null) {
10345
10317
  throw new ERR_INVALID_MODULE_SPECIFIER(
10346
10318
  resolved.pathname,
10347
10319
  'must not include encoded "/" or "\\" characters',
10348
10320
  (0, import_node_url.fileURLToPath)(base)
10349
10321
  );
10350
- const filePath = (0, import_node_url.fileURLToPath)(resolved);
10322
+ }
10323
+ let filePath;
10324
+ try {
10325
+ filePath = (0, import_node_url.fileURLToPath)(resolved);
10326
+ } catch (error) {
10327
+ const cause = (
10328
+ /** @type {ErrnoException} */
10329
+ error
10330
+ );
10331
+ Object.defineProperty(cause, "input", { value: String(resolved) });
10332
+ Object.defineProperty(cause, "module", { value: String(base) });
10333
+ throw cause;
10334
+ }
10351
10335
  const stats = tryStatSync(
10352
10336
  filePath.endsWith("/") ? filePath.slice(-1) : filePath
10353
10337
  );
@@ -10357,11 +10341,13 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
10357
10341
  throw error;
10358
10342
  }
10359
10343
  if (!stats.isFile()) {
10360
- throw new ERR_MODULE_NOT_FOUND(
10344
+ const error = new ERR_MODULE_NOT_FOUND(
10361
10345
  filePath || resolved.pathname,
10362
10346
  base && (0, import_node_url.fileURLToPath)(base),
10363
- "module"
10347
+ true
10364
10348
  );
10349
+ error.url = String(resolved);
10350
+ throw error;
10365
10351
  }
10366
10352
  if (!preserveSymlinks) {
10367
10353
  const real = (0, import_node_fs.realpathSync)(filePath);
@@ -10604,12 +10590,12 @@ function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, b
10604
10590
  base
10605
10591
  );
10606
10592
  }
10607
- function isConditionalExportsMainSugar(exports, packageJsonUrl, base) {
10608
- if (typeof exports === "string" || Array.isArray(exports))
10593
+ function isConditionalExportsMainSugar(exports2, packageJsonUrl, base) {
10594
+ if (typeof exports2 === "string" || Array.isArray(exports2))
10609
10595
  return true;
10610
- if (typeof exports !== "object" || exports === null)
10596
+ if (typeof exports2 !== "object" || exports2 === null)
10611
10597
  return false;
10612
- const keys = Object.getOwnPropertyNames(exports);
10598
+ const keys = Object.getOwnPropertyNames(exports2);
10613
10599
  let isConditionalSugar = false;
10614
10600
  let i = 0;
10615
10601
  let j = -1;
@@ -10629,6 +10615,9 @@ function isConditionalExportsMainSugar(exports, packageJsonUrl, base) {
10629
10615
  return isConditionalSugar;
10630
10616
  }
10631
10617
  function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
10618
+ if (import_node_process3.default.noDeprecation) {
10619
+ return;
10620
+ }
10632
10621
  const pjsonPath = (0, import_node_url.fileURLToPath)(pjsonUrl);
10633
10622
  if (emittedPackageWarnings.has(pjsonPath + "|" + match))
10634
10623
  return;
@@ -10640,12 +10629,12 @@ function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
10640
10629
  );
10641
10630
  }
10642
10631
  function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) {
10643
- let exports = packageConfig.exports;
10644
- if (isConditionalExportsMainSugar(exports, packageJsonUrl, base)) {
10645
- exports = { ".": exports };
10632
+ let exports2 = packageConfig.exports;
10633
+ if (isConditionalExportsMainSugar(exports2, packageJsonUrl, base)) {
10634
+ exports2 = { ".": exports2 };
10646
10635
  }
10647
- if (own.call(exports, packageSubpath) && !packageSubpath.includes("*") && !packageSubpath.endsWith("/")) {
10648
- const target = exports[packageSubpath];
10636
+ if (own.call(exports2, packageSubpath) && !packageSubpath.includes("*") && !packageSubpath.endsWith("/")) {
10637
+ const target = exports2[packageSubpath];
10649
10638
  const resolveResult = resolvePackageTarget(
10650
10639
  packageJsonUrl,
10651
10640
  target,
@@ -10664,7 +10653,7 @@ function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, ba
10664
10653
  }
10665
10654
  let bestMatch = "";
10666
10655
  let bestMatchSubpath = "";
10667
- const keys = Object.getOwnPropertyNames(exports);
10656
+ const keys = Object.getOwnPropertyNames(exports2);
10668
10657
  let i = -1;
10669
10658
  while (++i < keys.length) {
10670
10659
  const key = keys[i];
@@ -10690,7 +10679,7 @@ function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, ba
10690
10679
  if (bestMatch) {
10691
10680
  const target = (
10692
10681
  /** @type {unknown} */
10693
- exports[bestMatch]
10682
+ exports2[bestMatch]
10694
10683
  );
10695
10684
  const resolveResult = resolvePackageTarget(
10696
10685
  packageJsonUrl,
@@ -10860,7 +10849,10 @@ function packageResolve(specifier, base, conditions) {
10860
10849
  packageJsonPath = (0, import_node_url.fileURLToPath)(packageJsonUrl);
10861
10850
  continue;
10862
10851
  }
10863
- const packageConfig2 = getPackageConfig(packageJsonPath, specifier, base);
10852
+ const packageConfig2 = packageJsonReader.read(packageJsonPath, {
10853
+ base,
10854
+ specifier
10855
+ });
10864
10856
  if (packageConfig2.exports !== void 0 && packageConfig2.exports !== null) {
10865
10857
  return packageExportsResolve(
10866
10858
  packageJsonUrl,
@@ -10875,7 +10867,7 @@ function packageResolve(specifier, base, conditions) {
10875
10867
  }
10876
10868
  return new import_node_url.URL(packageSubpath, packageJsonUrl);
10877
10869
  } while (packageJsonPath.length !== lastPath.length);
10878
- throw new ERR_MODULE_NOT_FOUND(packageName, (0, import_node_url.fileURLToPath)(base));
10870
+ throw new ERR_MODULE_NOT_FOUND(packageName, (0, import_node_url.fileURLToPath)(base), false);
10879
10871
  }
10880
10872
  function isRelativeSpecifier(specifier) {
10881
10873
  if (specifier[0] === ".") {
@@ -11025,60 +11017,6 @@ function resolvePathSync(id, options) {
11025
11017
 
11026
11018
  // node_modules/.pnpm/local-pkg@0.5.0/node_modules/local-pkg/dist/index.mjs
11027
11019
  var import_node_url2 = require("url");
11028
- var Node3 = class {
11029
- constructor(value) {
11030
- __publicField(this, "value");
11031
- __publicField(this, "next");
11032
- this.value = value;
11033
- }
11034
- };
11035
- var _head, _tail, _size;
11036
- var Queue = class {
11037
- constructor() {
11038
- __privateAdd(this, _head, void 0);
11039
- __privateAdd(this, _tail, void 0);
11040
- __privateAdd(this, _size, void 0);
11041
- this.clear();
11042
- }
11043
- enqueue(value) {
11044
- const node2 = new Node3(value);
11045
- if (__privateGet(this, _head)) {
11046
- __privateGet(this, _tail).next = node2;
11047
- __privateSet(this, _tail, node2);
11048
- } else {
11049
- __privateSet(this, _head, node2);
11050
- __privateSet(this, _tail, node2);
11051
- }
11052
- __privateWrapper(this, _size)._++;
11053
- }
11054
- dequeue() {
11055
- const current2 = __privateGet(this, _head);
11056
- if (!current2) {
11057
- return;
11058
- }
11059
- __privateSet(this, _head, __privateGet(this, _head).next);
11060
- __privateWrapper(this, _size)._--;
11061
- return current2.value;
11062
- }
11063
- clear() {
11064
- __privateSet(this, _head, void 0);
11065
- __privateSet(this, _tail, void 0);
11066
- __privateSet(this, _size, 0);
11067
- }
11068
- get size() {
11069
- return __privateGet(this, _size);
11070
- }
11071
- *[Symbol.iterator]() {
11072
- let current2 = __privateGet(this, _head);
11073
- while (current2) {
11074
- yield current2.value;
11075
- current2 = current2.next;
11076
- }
11077
- }
11078
- };
11079
- _head = new WeakMap();
11080
- _tail = new WeakMap();
11081
- _size = new WeakMap();
11082
11020
  var findUpStop = Symbol("findUpStop");
11083
11021
  function _resolve2(path4, options = {}) {
11084
11022
  if (options.platform === "auto" || !options.platform)
@@ -11173,6 +11111,119 @@ var slowRules = [
11173
11111
  "@typescript-eslint/no-unsafe-return"
11174
11112
  ];
11175
11113
 
11114
+ // src/configs/md.ts
11115
+ function markdown(options = {}) {
11116
+ const { componentExts = [], overrides = {} } = options;
11117
+ const tsRulesOff = Object.fromEntries(
11118
+ // @ts-expect-error - undefined
11119
+ Object.keys(typescriptRulesTypeAware()).map((key) => [
11120
+ `@typescript-eslint/${key}`,
11121
+ "off"
11122
+ ])
11123
+ );
11124
+ return [
11125
+ {
11126
+ name: "jsse:markdown:setup",
11127
+ plugins: {
11128
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
11129
+ markdown: import_eslint_plugin_markdown.default
11130
+ }
11131
+ },
11132
+ {
11133
+ files: [GLOB_MARKDOWN],
11134
+ name: "jsse:markdown:processor",
11135
+ processor: "markdown/markdown"
11136
+ },
11137
+ {
11138
+ files: [
11139
+ GLOB_MARKDOWN_CODE,
11140
+ ...componentExts.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)
11141
+ ],
11142
+ languageOptions: {
11143
+ parserOptions: {
11144
+ ecmaFeatures: {
11145
+ impliedStrict: true
11146
+ }
11147
+ }
11148
+ },
11149
+ name: "jsse:markdown:rules",
11150
+ rules: {
11151
+ "@typescript-eslint/consistent-type-imports": "off",
11152
+ "@typescript-eslint/no-namespace": "off",
11153
+ "@typescript-eslint/no-redeclare": "off",
11154
+ "@typescript-eslint/no-require-imports": "off",
11155
+ "@typescript-eslint/no-unused-vars": "off",
11156
+ "@typescript-eslint/no-use-before-define": "off",
11157
+ "@typescript-eslint/no-var-requires": "off",
11158
+ "no-alert": "off",
11159
+ "no-console": "off",
11160
+ "no-undef": "off",
11161
+ "no-unused-expressions": "off",
11162
+ "no-unused-vars": "off",
11163
+ "node/prefer-global/process": "off",
11164
+ // Type aware rules
11165
+ "object-curly-newline": "off",
11166
+ "style/comma-dangle": "off",
11167
+ "style/eol-last": "off",
11168
+ "unicode-bom": "off",
11169
+ "unused-imports/no-unused-imports": "off",
11170
+ "unused-imports/no-unused-vars": "off",
11171
+ ...tsRulesOff,
11172
+ ...overrides
11173
+ }
11174
+ }
11175
+ ];
11176
+ }
11177
+
11178
+ // src/configs/yml.ts
11179
+ async function yml(options = {}) {
11180
+ const { files = [GLOB_YAML], overrides = {}, stylistic: stylistic2 = true } = options;
11181
+ const { indent = 2, quotes = "single" } = typeof stylistic2 === "boolean" ? {} : stylistic2;
11182
+ const [pluginYaml, parserYaml] = await Promise.all([
11183
+ interopDefault(import("eslint-plugin-yml")),
11184
+ interopDefault(import("yaml-eslint-parser"))
11185
+ ]);
11186
+ return [
11187
+ {
11188
+ name: "jsse:yaml:setup",
11189
+ plugins: {
11190
+ yaml: pluginYaml
11191
+ }
11192
+ },
11193
+ {
11194
+ files,
11195
+ languageOptions: {
11196
+ parser: parserYaml
11197
+ },
11198
+ name: "antfu:yaml:rules",
11199
+ rules: {
11200
+ "style/spaced-comment": "off",
11201
+ "yaml/block-mapping": "error",
11202
+ "yaml/block-sequence": "error",
11203
+ "yaml/no-empty-key": "error",
11204
+ "yaml/no-empty-sequence-entry": "error",
11205
+ "yaml/no-irregular-whitespace": "error",
11206
+ "yaml/plain-scalar": "error",
11207
+ "yaml/vue-custom-block/no-parsing-error": "error",
11208
+ ...stylistic2 ? {
11209
+ "yaml/block-mapping-question-indicator-newline": "error",
11210
+ "yaml/block-sequence-hyphen-indicator-newline": "error",
11211
+ "yaml/flow-mapping-curly-newline": "error",
11212
+ "yaml/flow-mapping-curly-spacing": "error",
11213
+ "yaml/flow-sequence-bracket-newline": "error",
11214
+ "yaml/flow-sequence-bracket-spacing": "error",
11215
+ "yaml/indent": ["error", indent === "tab" ? 2 : indent],
11216
+ "yaml/key-spacing": "error",
11217
+ "yaml/no-tab-indent": "error",
11218
+ "yaml/quotes": ["error", { avoidEscape: false, prefer: quotes }],
11219
+ "yaml/spaced-comment": "error"
11220
+ } : {},
11221
+ ...overrides
11222
+ }
11223
+ }
11224
+ ];
11225
+ }
11226
+
11176
11227
  // src/factory.ts
11177
11228
  var flatConfigProps = [
11178
11229
  "files",
@@ -11192,6 +11243,7 @@ function defaultOptions2() {
11192
11243
  gitignore: true,
11193
11244
  isInEditor: isInEditor(),
11194
11245
  jsonc: true,
11246
+ markdown: false,
11195
11247
  off: [],
11196
11248
  overrides: {},
11197
11249
  prettier: true,
@@ -11224,7 +11276,7 @@ function normalizeOptions(options = {}) {
11224
11276
  stylistic: stylisticOptions
11225
11277
  };
11226
11278
  }
11227
- function jsse(options = {}, ...userConfigs) {
11279
+ async function jsse(options = {}, ...userConfigs) {
11228
11280
  const normalizedOptions = normalizeOptions(options);
11229
11281
  const {
11230
11282
  componentExts,
@@ -11259,9 +11311,7 @@ function jsse(options = {}, ...userConfigs) {
11259
11311
  }),
11260
11312
  comments(),
11261
11313
  node(),
11262
- jsdoc({
11263
- stylistic: stylisticOptions
11264
- }),
11314
+ jsdoc(),
11265
11315
  imports({
11266
11316
  stylistic: stylisticOptions
11267
11317
  }),
@@ -11269,24 +11319,31 @@ function jsse(options = {}, ...userConfigs) {
11269
11319
  perfectionist()
11270
11320
  );
11271
11321
  if (enableTypeScript) {
11272
- configs.push(
11273
- typescript({
11274
- ...typeof enableTypeScript === "boolean" ? {} : enableTypeScript,
11275
- componentExts,
11276
- overrides: overrides.typescript,
11277
- prefix: {
11278
- from: "@typescript-eslint",
11279
- to: tsPrefix ?? "@typescript-eslint"
11280
- },
11281
- react: enableReact,
11282
- typeAware
11283
- })
11284
- );
11322
+ const tscfg = await typescript({
11323
+ ...typeof enableTypeScript === "boolean" ? {} : enableTypeScript,
11324
+ componentExts,
11325
+ overrides: overrides.typescript,
11326
+ prefix: {
11327
+ from: "@typescript-eslint",
11328
+ to: tsPrefix ?? "@typescript-eslint"
11329
+ },
11330
+ react: enableReact,
11331
+ typeAware
11332
+ });
11333
+ configs.push(tscfg);
11334
+ }
11335
+ if (normalizedOptions.markdown) {
11336
+ configs.push(markdown());
11337
+ }
11338
+ if (normalizedOptions.yaml) {
11339
+ const ymlConfig = await yml();
11340
+ configs.push(ymlConfig);
11285
11341
  }
11286
11342
  if (normalizedOptions.react) {
11287
11343
  configs.push(
11288
11344
  react({
11289
- reactRefresh: options.reactRefresh
11345
+ // use react refresh if not explicitly disabled w/ 'false'
11346
+ reactRefresh: normalizedOptions.reactRefresh !== false
11290
11347
  })
11291
11348
  );
11292
11349
  }
@@ -11382,6 +11439,7 @@ function jsseReact() {
11382
11439
  eslintConfigPrettierRules,
11383
11440
  ignores,
11384
11441
  imports,
11442
+ interopDefault,
11385
11443
  isCI,
11386
11444
  isInEditor,
11387
11445
  javascript,
@@ -11399,8 +11457,8 @@ function jsseReact() {
11399
11457
  pluginJsdoc,
11400
11458
  pluginJsonc,
11401
11459
  pluginMarkdown,
11460
+ pluginN,
11402
11461
  pluginNoOnlyTests,
11403
- pluginNode,
11404
11462
  pluginPerfectionist,
11405
11463
  pluginReact,
11406
11464
  pluginReactHooks,