@html-validate/eslint-config 5.28.1 → 6.0.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.
@@ -1,11 +1,18 @@
1
- "use strict";
1
+ import { createRequire } from "node:module";
2
+ const require = createRequire(import.meta.url);
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __getProtoOf = Object.getPrototypeOf;
7
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJS = (cb, mod) => function __require() {
9
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
10
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
11
+ }) : x)(function(x) {
12
+ if (typeof require !== "undefined") return require.apply(this, arguments);
13
+ throw Error('Dynamic require of "' + x + '" is not supported');
14
+ });
15
+ var __commonJS = (cb, mod) => function __require2() {
9
16
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
17
  };
11
18
  var __copyProps = (to, from, except, desc) => {
@@ -27,10 +34,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
34
 
28
35
  // ../../node_modules/argparse/lib/sub.js
29
36
  var require_sub = __commonJS({
30
- "../../node_modules/argparse/lib/sub.js"(exports2, module2) {
37
+ "../../node_modules/argparse/lib/sub.js"(exports, module) {
31
38
  "use strict";
32
- var { inspect } = require("util");
33
- module2.exports = function sub(pattern, ...values) {
39
+ var { inspect } = __require("util");
40
+ module.exports = function sub(pattern, ...values) {
34
41
  let regex = /%(?:(%)|(-)?(\*)?(?:\((\w+)\))?([A-Za-z]))/g;
35
42
  let result = pattern.replace(regex, function(_, is_literal, is_left_align, is_padded, name, format) {
36
43
  if (is_literal) return "%";
@@ -86,7 +93,7 @@ var require_sub = __commonJS({
86
93
 
87
94
  // ../../node_modules/argparse/lib/textwrap.js
88
95
  var require_textwrap = __commonJS({
89
- "../../node_modules/argparse/lib/textwrap.js"(exports2, module2) {
96
+ "../../node_modules/argparse/lib/textwrap.js"(exports, module) {
90
97
  "use strict";
91
98
  var wordsep_simple_re = /([\t\n\x0b\x0c\r ]+)/;
92
99
  var TextWrapper = class {
@@ -323,13 +330,13 @@ var require_textwrap = __commonJS({
323
330
  }
324
331
  return text;
325
332
  }
326
- module2.exports = { wrap, fill, dedent };
333
+ module.exports = { wrap, fill, dedent };
327
334
  }
328
335
  });
329
336
 
330
337
  // ../../node_modules/argparse/argparse.js
331
338
  var require_argparse = __commonJS({
332
- "../../node_modules/argparse/argparse.js"(exports2, module2) {
339
+ "../../node_modules/argparse/argparse.js"(exports, module) {
333
340
  "use strict";
334
341
  var SUPPRESS = "==SUPPRESS==";
335
342
  var OPTIONAL = "?";
@@ -338,11 +345,11 @@ var require_argparse = __commonJS({
338
345
  var PARSER = "A...";
339
346
  var REMAINDER = "...";
340
347
  var _UNRECOGNIZED_ARGS_ATTR = "_unrecognized_args";
341
- var assert = require("assert");
342
- var util = require("util");
343
- var fs4 = require("fs");
348
+ var assert = __require("assert");
349
+ var util = __require("util");
350
+ var fs3 = __require("fs");
344
351
  var sub = require_sub();
345
- var path5 = require("path");
352
+ var path5 = __require("path");
346
353
  var repr = util.inspect;
347
354
  function get_argv() {
348
355
  return process.argv.slice(1);
@@ -1829,7 +1836,7 @@ var require_argparse = __commonJS({
1829
1836
  start,
1830
1837
  end,
1831
1838
  highWaterMark,
1832
- fs5
1839
+ fs4
1833
1840
  ] = _parse_opts(arguments, {
1834
1841
  flags: "r",
1835
1842
  encoding: void 0,
@@ -1862,7 +1869,7 @@ var require_argparse = __commonJS({
1862
1869
  if (start !== void 0) this._options.start = start;
1863
1870
  if (end !== void 0) this._options.end = end;
1864
1871
  if (highWaterMark !== void 0) this._options.highWaterMark = highWaterMark;
1865
- if (fs5 !== void 0) this._options.fs = fs5;
1872
+ if (fs4 !== void 0) this._options.fs = fs4;
1866
1873
  }
1867
1874
  call(string) {
1868
1875
  if (string === "-") {
@@ -1877,7 +1884,7 @@ var require_argparse = __commonJS({
1877
1884
  }
1878
1885
  let fd;
1879
1886
  try {
1880
- fd = fs4.openSync(string, this._flags, this._options.mode);
1887
+ fd = fs3.openSync(string, this._flags, this._options.mode);
1881
1888
  } catch (e) {
1882
1889
  let args2 = { filename: string, error: e.message };
1883
1890
  let message = "can't open '%(filename)s': %(error)s";
@@ -1885,9 +1892,9 @@ var require_argparse = __commonJS({
1885
1892
  }
1886
1893
  let options = Object.assign({ fd, flags: this._flags }, this._options);
1887
1894
  if (this._flags.includes("r")) {
1888
- return fs4.createReadStream(void 0, options);
1895
+ return fs3.createReadStream(void 0, options);
1889
1896
  } else if (this._flags.includes("w")) {
1890
- return fs4.createWriteStream(void 0, options);
1897
+ return fs3.createWriteStream(void 0, options);
1891
1898
  } else {
1892
1899
  let msg = sub('argument "%s" with mode %r', string, this._flags);
1893
1900
  throw new TypeError(msg);
@@ -2746,7 +2753,7 @@ var require_argparse = __commonJS({
2746
2753
  new_arg_strings.push(arg_string);
2747
2754
  } else {
2748
2755
  try {
2749
- let args_file = fs4.readFileSync(arg_string.slice(1), "utf8");
2756
+ let args_file = fs3.readFileSync(arg_string.slice(1), "utf8");
2750
2757
  let arg_strings2 = [];
2751
2758
  for (let arg_line of splitlines(args_file)) {
2752
2759
  for (let arg of this.convert_arg_line_to_args(arg_line)) {
@@ -3145,7 +3152,7 @@ var require_argparse = __commonJS({
3145
3152
  this.exit(2, sub("%(prog)s: error: %(message)s\n", args2));
3146
3153
  }
3147
3154
  }));
3148
- module2.exports = {
3155
+ module.exports = {
3149
3156
  ArgumentParser: ArgumentParser2,
3150
3157
  ArgumentError,
3151
3158
  ArgumentTypeError,
@@ -3165,7 +3172,7 @@ var require_argparse = __commonJS({
3165
3172
  SUPPRESS,
3166
3173
  ZERO_OR_MORE
3167
3174
  };
3168
- Object.defineProperty(module2.exports, "Const", {
3175
+ Object.defineProperty(module.exports, "Const", {
3169
3176
  get() {
3170
3177
  let result = {};
3171
3178
  Object.entries({ ONE_OR_MORE, OPTIONAL, PARSER, REMAINDER, SUPPRESS, ZERO_OR_MORE }).forEach(([n, v]) => {
@@ -3193,7 +3200,7 @@ var require_argparse = __commonJS({
3193
3200
 
3194
3201
  // ../../node_modules/nunjucks/src/lib.js
3195
3202
  var require_lib = __commonJS({
3196
- "../../node_modules/nunjucks/src/lib.js"(exports2, module2) {
3203
+ "../../node_modules/nunjucks/src/lib.js"(exports, module) {
3197
3204
  "use strict";
3198
3205
  var ArrayProto = Array.prototype;
3199
3206
  var ObjProto = Object.prototype;
@@ -3206,7 +3213,7 @@ var require_lib = __commonJS({
3206
3213
  "\\": "\"
3207
3214
  };
3208
3215
  var escapeRegex = /[&"'<>\\]/g;
3209
- var _exports = module2.exports = {};
3216
+ var _exports = module.exports = {};
3210
3217
  function hasOwnProp(obj, k) {
3211
3218
  return ObjProto.hasOwnProperty.call(obj, k);
3212
3219
  }
@@ -3502,11 +3509,11 @@ var require_lib = __commonJS({
3502
3509
 
3503
3510
  // ../../node_modules/asap/raw.js
3504
3511
  var require_raw = __commonJS({
3505
- "../../node_modules/asap/raw.js"(exports2, module2) {
3512
+ "../../node_modules/asap/raw.js"(exports, module) {
3506
3513
  "use strict";
3507
3514
  var domain;
3508
3515
  var hasSetImmediate = typeof setImmediate === "function";
3509
- module2.exports = rawAsap;
3516
+ module.exports = rawAsap;
3510
3517
  function rawAsap(task) {
3511
3518
  if (!queue.length) {
3512
3519
  requestFlush();
@@ -3540,7 +3547,7 @@ var require_raw = __commonJS({
3540
3547
  var parentDomain = process.domain;
3541
3548
  if (parentDomain) {
3542
3549
  if (!domain) {
3543
- domain = require("domain");
3550
+ domain = __require("domain");
3544
3551
  }
3545
3552
  domain.active = process.domain = null;
3546
3553
  }
@@ -3558,11 +3565,11 @@ var require_raw = __commonJS({
3558
3565
 
3559
3566
  // ../../node_modules/asap/asap.js
3560
3567
  var require_asap = __commonJS({
3561
- "../../node_modules/asap/asap.js"(exports2, module2) {
3568
+ "../../node_modules/asap/asap.js"(exports, module) {
3562
3569
  "use strict";
3563
3570
  var rawAsap = require_raw();
3564
3571
  var freeTasks = [];
3565
- module2.exports = asap;
3572
+ module.exports = asap;
3566
3573
  function asap(task) {
3567
3574
  var rawTask;
3568
3575
  if (freeTasks.length) {
@@ -3603,7 +3610,7 @@ var require_asap = __commonJS({
3603
3610
 
3604
3611
  // ../../node_modules/a-sync-waterfall/index.js
3605
3612
  var require_a_sync_waterfall = __commonJS({
3606
- "../../node_modules/a-sync-waterfall/index.js"(exports2, module2) {
3613
+ "../../node_modules/a-sync-waterfall/index.js"(exports, module) {
3607
3614
  (function(globals) {
3608
3615
  "use strict";
3609
3616
  var executeSync = function() {
@@ -3676,18 +3683,18 @@ var require_a_sync_waterfall = __commonJS({
3676
3683
  define([], function() {
3677
3684
  return waterfall;
3678
3685
  });
3679
- } else if (typeof module2 !== "undefined" && module2.exports) {
3680
- module2.exports = waterfall;
3686
+ } else if (typeof module !== "undefined" && module.exports) {
3687
+ module.exports = waterfall;
3681
3688
  } else {
3682
3689
  globals.waterfall = waterfall;
3683
3690
  }
3684
- })(exports2);
3691
+ })(exports);
3685
3692
  }
3686
3693
  });
3687
3694
 
3688
3695
  // ../../node_modules/nunjucks/src/lexer.js
3689
3696
  var require_lexer = __commonJS({
3690
- "../../node_modules/nunjucks/src/lexer.js"(exports2, module2) {
3697
+ "../../node_modules/nunjucks/src/lexer.js"(exports, module) {
3691
3698
  "use strict";
3692
3699
  var lib = require_lib();
3693
3700
  var whitespaceChars = " \n \r\xA0";
@@ -4061,7 +4068,7 @@ var require_lexer = __commonJS({
4061
4068
  };
4062
4069
  return Tokenizer2;
4063
4070
  }();
4064
- module2.exports = {
4071
+ module.exports = {
4065
4072
  lex: function lex(src, opts) {
4066
4073
  return new Tokenizer(src, opts);
4067
4074
  },
@@ -4097,7 +4104,7 @@ var require_lexer = __commonJS({
4097
4104
 
4098
4105
  // ../../node_modules/nunjucks/src/object.js
4099
4106
  var require_object = __commonJS({
4100
- "../../node_modules/nunjucks/src/object.js"(exports2, module2) {
4107
+ "../../node_modules/nunjucks/src/object.js"(exports, module) {
4101
4108
  "use strict";
4102
4109
  function _defineProperties(target, props) {
4103
4110
  for (var i = 0; i < props.length; i++) {
@@ -4140,7 +4147,7 @@ var require_object = __commonJS({
4140
4147
  };
4141
4148
  return _setPrototypeOf(o, p);
4142
4149
  }
4143
- var EventEmitter = require("events");
4150
+ var EventEmitter = __require("events");
4144
4151
  var lib = require_lib();
4145
4152
  function parentWrap(parent, prop) {
4146
4153
  if (typeof parent !== "function" || typeof prop !== "function") {
@@ -4224,7 +4231,7 @@ var require_object = __commonJS({
4224
4231
  }]);
4225
4232
  return EmitterObj2;
4226
4233
  }(EventEmitter);
4227
- module2.exports = {
4234
+ module.exports = {
4228
4235
  Obj,
4229
4236
  EmitterObj
4230
4237
  };
@@ -4233,7 +4240,7 @@ var require_object = __commonJS({
4233
4240
 
4234
4241
  // ../../node_modules/nunjucks/src/nodes.js
4235
4242
  var require_nodes = __commonJS({
4236
- "../../node_modules/nunjucks/src/nodes.js"(exports2, module2) {
4243
+ "../../node_modules/nunjucks/src/nodes.js"(exports, module) {
4237
4244
  "use strict";
4238
4245
  function _defineProperties(target, props) {
4239
4246
  for (var i = 0; i < props.length; i++) {
@@ -4550,7 +4557,7 @@ var require_nodes = __commonJS({
4550
4557
  });
4551
4558
  }
4552
4559
  }
4553
- module2.exports = {
4560
+ module.exports = {
4554
4561
  Node: Node2,
4555
4562
  Root,
4556
4563
  NodeList,
@@ -4613,7 +4620,7 @@ var require_nodes = __commonJS({
4613
4620
 
4614
4621
  // ../../node_modules/nunjucks/src/parser.js
4615
4622
  var require_parser = __commonJS({
4616
- "../../node_modules/nunjucks/src/parser.js"(exports2, module2) {
4623
+ "../../node_modules/nunjucks/src/parser.js"(exports, module) {
4617
4624
  "use strict";
4618
4625
  function _inheritsLoose(subClass, superClass) {
4619
4626
  subClass.prototype = Object.create(superClass.prototype);
@@ -5536,7 +5543,7 @@ var require_parser = __commonJS({
5536
5543
  };
5537
5544
  return Parser2;
5538
5545
  }(Obj);
5539
- module2.exports = {
5546
+ module.exports = {
5540
5547
  parse: function parse(src, extensions, opts) {
5541
5548
  var p = new Parser(lexer.lex(src, opts));
5542
5549
  if (extensions !== void 0) {
@@ -5551,7 +5558,7 @@ var require_parser = __commonJS({
5551
5558
 
5552
5559
  // ../../node_modules/nunjucks/src/transformer.js
5553
5560
  var require_transformer = __commonJS({
5554
- "../../node_modules/nunjucks/src/transformer.js"(exports2, module2) {
5561
+ "../../node_modules/nunjucks/src/transformer.js"(exports, module) {
5555
5562
  "use strict";
5556
5563
  var nodes = require_nodes();
5557
5564
  var lib = require_lib();
@@ -5704,7 +5711,7 @@ var require_transformer = __commonJS({
5704
5711
  function transform(ast, asyncFilters) {
5705
5712
  return cps(ast, asyncFilters || []);
5706
5713
  }
5707
- module2.exports = {
5714
+ module.exports = {
5708
5715
  transform
5709
5716
  };
5710
5717
  }
@@ -5712,7 +5719,7 @@ var require_transformer = __commonJS({
5712
5719
 
5713
5720
  // ../../node_modules/nunjucks/src/runtime.js
5714
5721
  var require_runtime = __commonJS({
5715
- "../../node_modules/nunjucks/src/runtime.js"(exports2, module2) {
5722
+ "../../node_modules/nunjucks/src/runtime.js"(exports, module) {
5716
5723
  "use strict";
5717
5724
  var lib = require_lib();
5718
5725
  var arrayFrom = Array.from;
@@ -6005,7 +6012,7 @@ var require_runtime = __commonJS({
6005
6012
  return arr;
6006
6013
  }
6007
6014
  }
6008
- module2.exports = {
6015
+ module.exports = {
6009
6016
  Frame,
6010
6017
  makeMacro,
6011
6018
  makeKeywordArgs,
@@ -6031,7 +6038,7 @@ var require_runtime = __commonJS({
6031
6038
 
6032
6039
  // ../../node_modules/nunjucks/src/compiler.js
6033
6040
  var require_compiler = __commonJS({
6034
- "../../node_modules/nunjucks/src/compiler.js"(exports2, module2) {
6041
+ "../../node_modules/nunjucks/src/compiler.js"(exports, module) {
6035
6042
  "use strict";
6036
6043
  function _inheritsLoose(subClass, superClass) {
6037
6044
  subClass.prototype = Object.create(superClass.prototype);
@@ -6953,7 +6960,7 @@ var require_compiler = __commonJS({
6953
6960
  };
6954
6961
  return Compiler2;
6955
6962
  }(Obj);
6956
- module2.exports = {
6963
+ module.exports = {
6957
6964
  compile: function compile(src, asyncFilters, extensions, name, opts) {
6958
6965
  if (opts === void 0) {
6959
6966
  opts = {};
@@ -6977,11 +6984,11 @@ var require_compiler = __commonJS({
6977
6984
 
6978
6985
  // ../../node_modules/nunjucks/src/filters.js
6979
6986
  var require_filters = __commonJS({
6980
- "../../node_modules/nunjucks/src/filters.js"(exports2, module2) {
6987
+ "../../node_modules/nunjucks/src/filters.js"(exports, module) {
6981
6988
  "use strict";
6982
6989
  var lib = require_lib();
6983
6990
  var r = require_runtime();
6984
- var _exports = module2.exports = {};
6991
+ var _exports = module.exports = {};
6985
6992
  function normalize(value, defaultValue) {
6986
6993
  if (value === null || value === void 0 || value === false) {
6987
6994
  return defaultValue;
@@ -7466,7 +7473,7 @@ var require_filters = __commonJS({
7466
7473
 
7467
7474
  // ../../node_modules/nunjucks/src/loader.js
7468
7475
  var require_loader = __commonJS({
7469
- "../../node_modules/nunjucks/src/loader.js"(exports2, module2) {
7476
+ "../../node_modules/nunjucks/src/loader.js"(exports, module) {
7470
7477
  "use strict";
7471
7478
  function _inheritsLoose(subClass, superClass) {
7472
7479
  subClass.prototype = Object.create(superClass.prototype);
@@ -7480,10 +7487,10 @@ var require_loader = __commonJS({
7480
7487
  };
7481
7488
  return _setPrototypeOf(o, p);
7482
7489
  }
7483
- var path5 = require("path");
7490
+ var path5 = __require("path");
7484
7491
  var _require = require_object();
7485
7492
  var EmitterObj = _require.EmitterObj;
7486
- module2.exports = /* @__PURE__ */ function(_EmitterObj) {
7493
+ module.exports = /* @__PURE__ */ function(_EmitterObj) {
7487
7494
  _inheritsLoose(Loader, _EmitterObj);
7488
7495
  function Loader() {
7489
7496
  return _EmitterObj.apply(this, arguments) || this;
@@ -7502,7 +7509,7 @@ var require_loader = __commonJS({
7502
7509
 
7503
7510
  // ../../node_modules/nunjucks/src/precompiled-loader.js
7504
7511
  var require_precompiled_loader = __commonJS({
7505
- "../../node_modules/nunjucks/src/precompiled-loader.js"(exports2, module2) {
7512
+ "../../node_modules/nunjucks/src/precompiled-loader.js"(exports, module) {
7506
7513
  "use strict";
7507
7514
  function _inheritsLoose(subClass, superClass) {
7508
7515
  subClass.prototype = Object.create(superClass.prototype);
@@ -7540,7 +7547,7 @@ var require_precompiled_loader = __commonJS({
7540
7547
  };
7541
7548
  return PrecompiledLoader2;
7542
7549
  }(Loader);
7543
- module2.exports = {
7550
+ module.exports = {
7544
7551
  PrecompiledLoader
7545
7552
  };
7546
7553
  }
@@ -7548,7 +7555,7 @@ var require_precompiled_loader = __commonJS({
7548
7555
 
7549
7556
  // ../../node_modules/nunjucks/src/node-loaders.js
7550
7557
  var require_node_loaders = __commonJS({
7551
- "../../node_modules/nunjucks/src/node-loaders.js"(exports2, module2) {
7558
+ "../../node_modules/nunjucks/src/node-loaders.js"(exports, module) {
7552
7559
  "use strict";
7553
7560
  function _inheritsLoose(subClass, superClass) {
7554
7561
  subClass.prototype = Object.create(superClass.prototype);
@@ -7562,8 +7569,8 @@ var require_node_loaders = __commonJS({
7562
7569
  };
7563
7570
  return _setPrototypeOf(o, p);
7564
7571
  }
7565
- var fs4 = require("fs");
7566
- var path5 = require("path");
7572
+ var fs3 = __require("fs");
7573
+ var path5 = __require("path");
7567
7574
  var Loader = require_loader();
7568
7575
  var _require = require_precompiled_loader();
7569
7576
  var PrecompiledLoader = _require.PrecompiledLoader;
@@ -7587,11 +7594,11 @@ var require_node_loaders = __commonJS({
7587
7594
  }
7588
7595
  if (opts.watch) {
7589
7596
  try {
7590
- chokidar = require("chokidar");
7597
+ chokidar = __require("chokidar");
7591
7598
  } catch (e) {
7592
7599
  throw new Error("watch requires chokidar to be installed");
7593
7600
  }
7594
- var paths = _this.searchPaths.filter(fs4.existsSync);
7601
+ var paths = _this.searchPaths.filter(fs3.existsSync);
7595
7602
  var watcher = chokidar.watch(paths);
7596
7603
  watcher.on("all", function(event, fullname) {
7597
7604
  fullname = path5.resolve(fullname);
@@ -7612,7 +7619,7 @@ var require_node_loaders = __commonJS({
7612
7619
  for (var i = 0; i < paths.length; i++) {
7613
7620
  var basePath = path5.resolve(paths[i]);
7614
7621
  var p = path5.resolve(paths[i], name);
7615
- if (p.indexOf(basePath) === 0 && fs4.existsSync(p)) {
7622
+ if (p.indexOf(basePath) === 0 && fs3.existsSync(p)) {
7616
7623
  fullpath = p;
7617
7624
  break;
7618
7625
  }
@@ -7622,7 +7629,7 @@ var require_node_loaders = __commonJS({
7622
7629
  }
7623
7630
  this.pathsToNames[fullpath] = name;
7624
7631
  var source = {
7625
- src: fs4.readFileSync(fullpath, "utf-8"),
7632
+ src: fs3.readFileSync(fullpath, "utf-8"),
7626
7633
  path: fullpath,
7627
7634
  noCache: this.noCache
7628
7635
  };
@@ -7641,7 +7648,7 @@ var require_node_loaders = __commonJS({
7641
7648
  _this2.noCache = !!opts.noCache;
7642
7649
  if (opts.watch) {
7643
7650
  try {
7644
- chokidar = require("chokidar");
7651
+ chokidar = __require("chokidar");
7645
7652
  } catch (e) {
7646
7653
  throw new Error("watch requires chokidar to be installed");
7647
7654
  }
@@ -7668,13 +7675,13 @@ var require_node_loaders = __commonJS({
7668
7675
  }
7669
7676
  var fullpath;
7670
7677
  try {
7671
- fullpath = require.resolve(name);
7678
+ fullpath = __require.resolve(name);
7672
7679
  } catch (e) {
7673
7680
  return null;
7674
7681
  }
7675
7682
  this.pathsToNames[fullpath] = name;
7676
7683
  var source = {
7677
- src: fs4.readFileSync(fullpath, "utf-8"),
7684
+ src: fs3.readFileSync(fullpath, "utf-8"),
7678
7685
  path: fullpath,
7679
7686
  noCache: this.noCache
7680
7687
  };
@@ -7683,7 +7690,7 @@ var require_node_loaders = __commonJS({
7683
7690
  };
7684
7691
  return NodeResolveLoader2;
7685
7692
  }(Loader);
7686
- module2.exports = {
7693
+ module.exports = {
7687
7694
  FileSystemLoader,
7688
7695
  PrecompiledLoader,
7689
7696
  NodeResolveLoader
@@ -7693,101 +7700,101 @@ var require_node_loaders = __commonJS({
7693
7700
 
7694
7701
  // ../../node_modules/nunjucks/src/loaders.js
7695
7702
  var require_loaders = __commonJS({
7696
- "../../node_modules/nunjucks/src/loaders.js"(exports2, module2) {
7703
+ "../../node_modules/nunjucks/src/loaders.js"(exports, module) {
7697
7704
  "use strict";
7698
- module2.exports = require_node_loaders();
7705
+ module.exports = require_node_loaders();
7699
7706
  }
7700
7707
  });
7701
7708
 
7702
7709
  // ../../node_modules/nunjucks/src/tests.js
7703
7710
  var require_tests = __commonJS({
7704
- "../../node_modules/nunjucks/src/tests.js"(exports2) {
7711
+ "../../node_modules/nunjucks/src/tests.js"(exports) {
7705
7712
  "use strict";
7706
7713
  var SafeString = require_runtime().SafeString;
7707
7714
  function callable(value) {
7708
7715
  return typeof value === "function";
7709
7716
  }
7710
- exports2.callable = callable;
7717
+ exports.callable = callable;
7711
7718
  function defined(value) {
7712
7719
  return value !== void 0;
7713
7720
  }
7714
- exports2.defined = defined;
7721
+ exports.defined = defined;
7715
7722
  function divisibleby(one, two) {
7716
7723
  return one % two === 0;
7717
7724
  }
7718
- exports2.divisibleby = divisibleby;
7725
+ exports.divisibleby = divisibleby;
7719
7726
  function escaped(value) {
7720
7727
  return value instanceof SafeString;
7721
7728
  }
7722
- exports2.escaped = escaped;
7729
+ exports.escaped = escaped;
7723
7730
  function equalto(one, two) {
7724
7731
  return one === two;
7725
7732
  }
7726
- exports2.equalto = equalto;
7727
- exports2.eq = exports2.equalto;
7728
- exports2.sameas = exports2.equalto;
7733
+ exports.equalto = equalto;
7734
+ exports.eq = exports.equalto;
7735
+ exports.sameas = exports.equalto;
7729
7736
  function even(value) {
7730
7737
  return value % 2 === 0;
7731
7738
  }
7732
- exports2.even = even;
7739
+ exports.even = even;
7733
7740
  function falsy(value) {
7734
7741
  return !value;
7735
7742
  }
7736
- exports2.falsy = falsy;
7743
+ exports.falsy = falsy;
7737
7744
  function ge(one, two) {
7738
7745
  return one >= two;
7739
7746
  }
7740
- exports2.ge = ge;
7747
+ exports.ge = ge;
7741
7748
  function greaterthan(one, two) {
7742
7749
  return one > two;
7743
7750
  }
7744
- exports2.greaterthan = greaterthan;
7745
- exports2.gt = exports2.greaterthan;
7751
+ exports.greaterthan = greaterthan;
7752
+ exports.gt = exports.greaterthan;
7746
7753
  function le(one, two) {
7747
7754
  return one <= two;
7748
7755
  }
7749
- exports2.le = le;
7756
+ exports.le = le;
7750
7757
  function lessthan(one, two) {
7751
7758
  return one < two;
7752
7759
  }
7753
- exports2.lessthan = lessthan;
7754
- exports2.lt = exports2.lessthan;
7760
+ exports.lessthan = lessthan;
7761
+ exports.lt = exports.lessthan;
7755
7762
  function lower(value) {
7756
7763
  return value.toLowerCase() === value;
7757
7764
  }
7758
- exports2.lower = lower;
7765
+ exports.lower = lower;
7759
7766
  function ne(one, two) {
7760
7767
  return one !== two;
7761
7768
  }
7762
- exports2.ne = ne;
7769
+ exports.ne = ne;
7763
7770
  function nullTest(value) {
7764
7771
  return value === null;
7765
7772
  }
7766
- exports2.null = nullTest;
7773
+ exports.null = nullTest;
7767
7774
  function number(value) {
7768
7775
  return typeof value === "number";
7769
7776
  }
7770
- exports2.number = number;
7777
+ exports.number = number;
7771
7778
  function odd(value) {
7772
7779
  return value % 2 === 1;
7773
7780
  }
7774
- exports2.odd = odd;
7781
+ exports.odd = odd;
7775
7782
  function string(value) {
7776
7783
  return typeof value === "string";
7777
7784
  }
7778
- exports2.string = string;
7785
+ exports.string = string;
7779
7786
  function truthy(value) {
7780
7787
  return !!value;
7781
7788
  }
7782
- exports2.truthy = truthy;
7789
+ exports.truthy = truthy;
7783
7790
  function undefinedTest(value) {
7784
7791
  return value === void 0;
7785
7792
  }
7786
- exports2.undefined = undefinedTest;
7793
+ exports.undefined = undefinedTest;
7787
7794
  function upper(value) {
7788
7795
  return value.toUpperCase() === value;
7789
7796
  }
7790
- exports2.upper = upper;
7797
+ exports.upper = upper;
7791
7798
  function iterable(value) {
7792
7799
  if (typeof Symbol !== "undefined") {
7793
7800
  return !!value[Symbol.iterator];
@@ -7795,7 +7802,7 @@ var require_tests = __commonJS({
7795
7802
  return Array.isArray(value) || typeof value === "string";
7796
7803
  }
7797
7804
  }
7798
- exports2.iterable = iterable;
7805
+ exports.iterable = iterable;
7799
7806
  function mapping(value) {
7800
7807
  var bool = value !== null && value !== void 0 && typeof value === "object" && !Array.isArray(value);
7801
7808
  if (Set) {
@@ -7804,13 +7811,13 @@ var require_tests = __commonJS({
7804
7811
  return bool;
7805
7812
  }
7806
7813
  }
7807
- exports2.mapping = mapping;
7814
+ exports.mapping = mapping;
7808
7815
  }
7809
7816
  });
7810
7817
 
7811
7818
  // ../../node_modules/nunjucks/src/globals.js
7812
7819
  var require_globals = __commonJS({
7813
- "../../node_modules/nunjucks/src/globals.js"(exports2, module2) {
7820
+ "../../node_modules/nunjucks/src/globals.js"(exports, module) {
7814
7821
  "use strict";
7815
7822
  function _cycler(items) {
7816
7823
  var index = -1;
@@ -7869,16 +7876,16 @@ var require_globals = __commonJS({
7869
7876
  }
7870
7877
  };
7871
7878
  }
7872
- module2.exports = globals;
7879
+ module.exports = globals;
7873
7880
  }
7874
7881
  });
7875
7882
 
7876
7883
  // ../../node_modules/nunjucks/src/express-app.js
7877
7884
  var require_express_app = __commonJS({
7878
- "../../node_modules/nunjucks/src/express-app.js"(exports2, module2) {
7885
+ "../../node_modules/nunjucks/src/express-app.js"(exports, module) {
7879
7886
  "use strict";
7880
- var path5 = require("path");
7881
- module2.exports = function express(env, app) {
7887
+ var path5 = __require("path");
7888
+ module.exports = function express(env, app) {
7882
7889
  function NunjucksView(name, opts) {
7883
7890
  this.name = name;
7884
7891
  this.path = name;
@@ -7903,7 +7910,7 @@ var require_express_app = __commonJS({
7903
7910
 
7904
7911
  // ../../node_modules/nunjucks/src/environment.js
7905
7912
  var require_environment = __commonJS({
7906
- "../../node_modules/nunjucks/src/environment.js"(exports2, module2) {
7913
+ "../../node_modules/nunjucks/src/environment.js"(exports, module) {
7907
7914
  "use strict";
7908
7915
  function _inheritsLoose(subClass, superClass) {
7909
7916
  subClass.prototype = Object.create(superClass.prototype);
@@ -8398,7 +8405,7 @@ var require_environment = __commonJS({
8398
8405
  };
8399
8406
  return Template2;
8400
8407
  }(Obj);
8401
- module2.exports = {
8408
+ module.exports = {
8402
8409
  Environment,
8403
8410
  Template
8404
8411
  };
@@ -8407,7 +8414,7 @@ var require_environment = __commonJS({
8407
8414
 
8408
8415
  // ../../node_modules/nunjucks/src/precompile-global.js
8409
8416
  var require_precompile_global = __commonJS({
8410
- "../../node_modules/nunjucks/src/precompile-global.js"(exports2, module2) {
8417
+ "../../node_modules/nunjucks/src/precompile-global.js"(exports, module) {
8411
8418
  "use strict";
8412
8419
  function precompileGlobal(templates, opts) {
8413
8420
  var out = "";
@@ -8423,16 +8430,16 @@ var require_precompile_global = __commonJS({
8423
8430
  }
8424
8431
  return out;
8425
8432
  }
8426
- module2.exports = precompileGlobal;
8433
+ module.exports = precompileGlobal;
8427
8434
  }
8428
8435
  });
8429
8436
 
8430
8437
  // ../../node_modules/nunjucks/src/precompile.js
8431
8438
  var require_precompile = __commonJS({
8432
- "../../node_modules/nunjucks/src/precompile.js"(exports2, module2) {
8439
+ "../../node_modules/nunjucks/src/precompile.js"(exports, module) {
8433
8440
  "use strict";
8434
- var fs4 = require("fs");
8435
- var path5 = require("path");
8441
+ var fs3 = __require("fs");
8442
+ var path5 = __require("path");
8436
8443
  var _require = require_lib();
8437
8444
  var _prettifyError = _require._prettifyError;
8438
8445
  var compiler = require_compiler();
@@ -8464,14 +8471,14 @@ var require_precompile = __commonJS({
8464
8471
  if (opts.isString) {
8465
8472
  return precompileString(input, opts);
8466
8473
  }
8467
- var pathStats = fs4.existsSync(input) && fs4.statSync(input);
8474
+ var pathStats = fs3.existsSync(input) && fs3.statSync(input);
8468
8475
  var precompiled = [];
8469
8476
  var templates = [];
8470
8477
  function addTemplates(dir) {
8471
- fs4.readdirSync(dir).forEach(function(file) {
8478
+ fs3.readdirSync(dir).forEach(function(file) {
8472
8479
  var filepath = path5.join(dir, file);
8473
8480
  var subpath = filepath.substr(path5.join(input, "/").length);
8474
- var stat = fs4.statSync(filepath);
8481
+ var stat = fs3.statSync(filepath);
8475
8482
  if (stat && stat.isDirectory()) {
8476
8483
  subpath += "/";
8477
8484
  if (!match(subpath, opts.exclude)) {
@@ -8483,13 +8490,13 @@ var require_precompile = __commonJS({
8483
8490
  });
8484
8491
  }
8485
8492
  if (pathStats.isFile()) {
8486
- precompiled.push(_precompile(fs4.readFileSync(input, "utf-8"), opts.name || input, env));
8493
+ precompiled.push(_precompile(fs3.readFileSync(input, "utf-8"), opts.name || input, env));
8487
8494
  } else if (pathStats.isDirectory()) {
8488
8495
  addTemplates(input);
8489
8496
  for (var i = 0; i < templates.length; i++) {
8490
8497
  var name = templates[i].replace(path5.join(input, "/"), "");
8491
8498
  try {
8492
- precompiled.push(_precompile(fs4.readFileSync(templates[i], "utf-8"), name, env));
8499
+ precompiled.push(_precompile(fs3.readFileSync(templates[i], "utf-8"), name, env));
8493
8500
  } catch (e) {
8494
8501
  if (opts.force) {
8495
8502
  console.error(e);
@@ -8517,7 +8524,7 @@ var require_precompile = __commonJS({
8517
8524
  template
8518
8525
  };
8519
8526
  }
8520
- module2.exports = {
8527
+ module.exports = {
8521
8528
  precompile,
8522
8529
  precompileString
8523
8530
  };
@@ -8526,7 +8533,7 @@ var require_precompile = __commonJS({
8526
8533
 
8527
8534
  // ../../node_modules/nunjucks/src/jinja-compat.js
8528
8535
  var require_jinja_compat = __commonJS({
8529
- "../../node_modules/nunjucks/src/jinja-compat.js"(exports2, module2) {
8536
+ "../../node_modules/nunjucks/src/jinja-compat.js"(exports, module) {
8530
8537
  "use strict";
8531
8538
  function installCompat() {
8532
8539
  "use strict";
@@ -8801,13 +8808,13 @@ var require_jinja_compat = __commonJS({
8801
8808
  };
8802
8809
  return uninstall;
8803
8810
  }
8804
- module2.exports = installCompat;
8811
+ module.exports = installCompat;
8805
8812
  }
8806
8813
  });
8807
8814
 
8808
8815
  // ../../node_modules/nunjucks/index.js
8809
8816
  var require_nunjucks = __commonJS({
8810
- "../../node_modules/nunjucks/index.js"(exports2, module2) {
8817
+ "../../node_modules/nunjucks/index.js"(exports, module) {
8811
8818
  "use strict";
8812
8819
  var lib = require_lib();
8813
8820
  var _require = require_environment();
@@ -8847,7 +8854,7 @@ var require_nunjucks = __commonJS({
8847
8854
  }
8848
8855
  return e;
8849
8856
  }
8850
- module2.exports = {
8857
+ module.exports = {
8851
8858
  Environment,
8852
8859
  Template,
8853
8860
  Loader,
@@ -8892,10 +8899,10 @@ var require_nunjucks = __commonJS({
8892
8899
 
8893
8900
  // package.json
8894
8901
  var require_package = __commonJS({
8895
- "package.json"(exports2, module2) {
8896
- module2.exports = {
8902
+ "package.json"(exports, module) {
8903
+ module.exports = {
8897
8904
  name: "@html-validate/eslint-config",
8898
- version: "5.28.0",
8905
+ version: "5.29.0",
8899
8906
  description: "Eslint sharable config used by the various HTML-validate packages",
8900
8907
  keywords: [
8901
8908
  "eslint"
@@ -8911,53 +8918,50 @@ var require_package = __commonJS({
8911
8918
  },
8912
8919
  license: "MIT",
8913
8920
  author: "David Sveningsson <ext@sidvind.com>",
8921
+ type: "module",
8914
8922
  main: "index.mjs",
8915
8923
  bin: {
8916
- eslint: "eslint.js",
8917
- "eslint-config": "cli.js"
8924
+ eslint: "eslint.mjs",
8925
+ "eslint-config": "./cli.mjs"
8918
8926
  },
8919
8927
  files: [
8920
8928
  "dist",
8921
- "patch",
8922
8929
  "template",
8923
- "*.js",
8924
- "*.cjs",
8925
- "*.mjs",
8926
- "!*.spec.js"
8930
+ "eslint.mjs",
8931
+ "cli.mjs"
8927
8932
  ],
8928
8933
  scripts: {
8929
8934
  prebuild: "tsc",
8930
- build: "esbuild src/cli.ts --bundle --sourcemap --platform=node --target=node18 --external:prettier --outdir=dist",
8935
+ build: "node build.mjs",
8931
8936
  prepack: "release-prepack --retain-scripts",
8932
8937
  postpack: "release-postpack",
8933
8938
  prepublishOnly: "release-prepublish --retain-scripts"
8934
8939
  },
8935
8940
  dependencies: {
8936
- "@eslint/eslintrc": "3.3.0",
8937
- "@eslint/js": "9.21.0",
8938
- "@rushstack/eslint-patch": "1.10.5",
8939
- eslint: "8.57.1",
8941
+ "@eslint/js": "9.22.0",
8942
+ argparse: "2.0.1",
8943
+ eslint: "9.22.0",
8940
8944
  "eslint-config-prettier": "10.1.1",
8941
- "eslint-config-sidvind": "1.3.2",
8942
8945
  "eslint-formatter-gitlab": "5.1.0",
8943
8946
  "eslint-import-resolver-node": "0.3.9",
8944
- "eslint-import-resolver-typescript": "3.8.4",
8945
- "eslint-plugin-array-func": "4.0.0",
8947
+ "eslint-import-resolver-typescript": "3.9.0",
8948
+ "eslint-plugin-array-func": "5.0.2",
8946
8949
  "eslint-plugin-eslint-comments": "3.2.0",
8947
8950
  "eslint-plugin-import": "2.31.0",
8948
8951
  "eslint-plugin-n": "17.16.2",
8949
8952
  "eslint-plugin-prettier": "5.2.3",
8950
8953
  "eslint-plugin-security": "3.0.1",
8951
- "eslint-plugin-sonarjs": "3.0.2"
8952
- },
8953
- devDependencies: {
8954
- argparse: "2.0.1",
8954
+ "eslint-plugin-sonarjs": "3.0.2",
8955
8955
  "find-up": "7.0.0",
8956
- "internal-prettier": "5.28.0",
8956
+ globals: "16.0.0",
8957
8957
  nunjucks: "3.2.4"
8958
8958
  },
8959
+ devDependencies: {
8960
+ esbuild: "0.25.1",
8961
+ "internal-prettier": "5.29.0"
8962
+ },
8959
8963
  peerDependencies: {
8960
- prettier: "^3"
8964
+ prettier: "^3.0.0"
8961
8965
  },
8962
8966
  engines: {
8963
8967
  node: ">= 20.9.0",
@@ -8971,20 +8975,21 @@ var require_package = __commonJS({
8971
8975
  });
8972
8976
 
8973
8977
  // src/cli.ts
8974
- var import_fs2 = __toESM(require("fs"));
8975
- var import_child_process = __toESM(require("child_process"));
8976
- var import_util = require("util");
8977
- var import_path2 = __toESM(require("path"));
8978
- var import_argparse = __toESM(require_argparse());
8978
+ var import_argparse = __toESM(require_argparse(), 1);
8979
+ import fs2 from "node:fs";
8980
+ import path4 from "node:path";
8981
+ import child_process from "node:child_process";
8982
+ import { promisify } from "node:util";
8983
+ import { fileURLToPath as fileURLToPath3 } from "node:url";
8979
8984
 
8980
8985
  // node_modules/find-up/index.js
8981
- var import_node_path2 = __toESM(require("node:path"), 1);
8986
+ import path2 from "node:path";
8982
8987
 
8983
8988
  // node_modules/locate-path/index.js
8984
- var import_node_process = __toESM(require("node:process"), 1);
8985
- var import_node_path = __toESM(require("node:path"), 1);
8986
- var import_node_fs = __toESM(require("node:fs"), 1);
8987
- var import_node_url = require("node:url");
8989
+ import process2 from "node:process";
8990
+ import path from "node:path";
8991
+ import fs, { promises as fsPromises } from "node:fs";
8992
+ import { fileURLToPath } from "node:url";
8988
8993
 
8989
8994
  // node_modules/yocto-queue/index.js
8990
8995
  var Node = class {
@@ -9145,9 +9150,9 @@ function checkType(type) {
9145
9150
  throw new Error(`Invalid type specified: ${type}`);
9146
9151
  }
9147
9152
  var matchType = (type, stat) => stat[typeMappings[type]]();
9148
- var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
9153
+ var toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
9149
9154
  async function locatePath(paths, {
9150
- cwd = import_node_process.default.cwd(),
9155
+ cwd = process2.cwd(),
9151
9156
  type = "file",
9152
9157
  allowSymlinks = true,
9153
9158
  concurrency,
@@ -9155,10 +9160,10 @@ async function locatePath(paths, {
9155
9160
  } = {}) {
9156
9161
  checkType(type);
9157
9162
  cwd = toPath(cwd);
9158
- const statFunction = allowSymlinks ? import_node_fs.promises.stat : import_node_fs.promises.lstat;
9163
+ const statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;
9159
9164
  return pLocate(paths, async (path_) => {
9160
9165
  try {
9161
- const stat = await statFunction(import_node_path.default.resolve(cwd, path_));
9166
+ const stat = await statFunction(path.resolve(cwd, path_));
9162
9167
  return matchType(type, stat);
9163
9168
  } catch {
9164
9169
  return false;
@@ -9167,17 +9172,17 @@ async function locatePath(paths, {
9167
9172
  }
9168
9173
 
9169
9174
  // ../../node_modules/unicorn-magic/node.js
9170
- var import_node_url2 = require("node:url");
9175
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
9171
9176
  function toPath2(urlOrPath) {
9172
- return urlOrPath instanceof URL ? (0, import_node_url2.fileURLToPath)(urlOrPath) : urlOrPath;
9177
+ return urlOrPath instanceof URL ? fileURLToPath2(urlOrPath) : urlOrPath;
9173
9178
  }
9174
9179
 
9175
9180
  // node_modules/find-up/index.js
9176
9181
  var findUpStop = Symbol("findUpStop");
9177
9182
  async function findUpMultiple(name, options = {}) {
9178
- let directory = import_node_path2.default.resolve(toPath2(options.cwd) ?? "");
9179
- const { root } = import_node_path2.default.parse(directory);
9180
- const stopAt = import_node_path2.default.resolve(directory, toPath2(options.stopAt ?? root));
9183
+ let directory = path2.resolve(toPath2(options.cwd) ?? "");
9184
+ const { root } = path2.parse(directory);
9185
+ const stopAt = path2.resolve(directory, toPath2(options.stopAt ?? root));
9181
9186
  const limit = options.limit ?? Number.POSITIVE_INFINITY;
9182
9187
  const paths = [name].flat();
9183
9188
  const runMatcher = async (locateOptions) => {
@@ -9197,12 +9202,12 @@ async function findUpMultiple(name, options = {}) {
9197
9202
  break;
9198
9203
  }
9199
9204
  if (foundPath) {
9200
- matches.push(import_node_path2.default.resolve(directory, foundPath));
9205
+ matches.push(path2.resolve(directory, foundPath));
9201
9206
  }
9202
9207
  if (directory === stopAt || matches.length >= limit) {
9203
9208
  break;
9204
9209
  }
9205
- directory = import_node_path2.default.dirname(directory);
9210
+ directory = path2.dirname(directory);
9206
9211
  }
9207
9212
  return matches;
9208
9213
  }
@@ -9212,25 +9217,21 @@ async function findUp(name, options = {}) {
9212
9217
  }
9213
9218
 
9214
9219
  // src/render.ts
9215
- var import_fs = __toESM(require("fs"));
9216
- var import_path = __toESM(require("path"));
9217
- var import_nunjucks = __toESM(require_nunjucks());
9218
- var import_prettier = __toESM(require("prettier"));
9219
- async function renderPassthru(src) {
9220
- return import_fs.default.readFileSync(src, "utf-8");
9221
- }
9220
+ var import_nunjucks = __toESM(require_nunjucks(), 1);
9221
+ import path3 from "path";
9222
+ import prettier from "prettier";
9222
9223
  async function renderNunjucks(src, dst, features) {
9223
- import_nunjucks.default.configure(import_path.default.dirname(src), { trimBlocks: true });
9224
+ import_nunjucks.default.configure(path3.dirname(src), { trimBlocks: true });
9224
9225
  const typeinfo = features.typeinfo ? {
9225
- rootDir: import_path.default.dirname(features.typeinfo),
9226
- tsconfig: `./${import_path.default.basename(features.typeinfo)}`
9226
+ rootDir: path3.dirname(features.typeinfo),
9227
+ tsconfig: `./${path3.basename(features.typeinfo)}`
9227
9228
  } : false;
9228
9229
  const context = { ...features, typeinfo };
9229
- const result = import_nunjucks.default.render(import_path.default.basename(src), context);
9230
- const prettierConfig = await import_prettier.default.resolveConfig(dst, {
9230
+ const result = import_nunjucks.default.render(path3.basename(src), context);
9231
+ const prettierConfig = await prettier.resolveConfig(dst, {
9231
9232
  editorconfig: true
9232
9233
  });
9233
- return import_prettier.default.format(result, {
9234
+ return prettier.format(result, {
9234
9235
  ...prettierConfig,
9235
9236
  filepath: dst
9236
9237
  });
@@ -9238,8 +9239,10 @@ async function renderNunjucks(src, dst, features) {
9238
9239
 
9239
9240
  // src/cli.ts
9240
9241
  var pkg = require_package();
9241
- var exec = (0, import_util.promisify)(import_child_process.default.exec);
9242
- var templateDir = import_path2.default.join(__dirname, "../template");
9242
+ var __filename = fileURLToPath3(import.meta.url);
9243
+ var __dirname = path4.dirname(__filename);
9244
+ var exec = promisify(child_process.exec);
9245
+ var templateDir = path4.join(__dirname, "../template");
9243
9246
  var PACKAGE_JSON = "package.json";
9244
9247
  async function getRootDir() {
9245
9248
  const pkgFile = await findUp(PACKAGE_JSON);
@@ -9247,38 +9250,33 @@ async function getRootDir() {
9247
9250
  console.error("Failed to locate project root");
9248
9251
  process.exit(1);
9249
9252
  }
9250
- return import_path2.default.dirname(pkgFile);
9253
+ return path4.dirname(pkgFile);
9251
9254
  }
9252
- function resolveTemplate(originalFilename) {
9253
- const filename = originalFilename.replace(/^\./, "").replace(/\.cjs$/, ".js");
9254
- const literal = import_path2.default.join(templateDir, filename);
9255
- if (import_fs2.default.existsSync(literal)) {
9256
- return [literal, renderPassthru];
9257
- }
9258
- const njk = import_path2.default.join(templateDir, `${filename}.njk`);
9259
- if (import_fs2.default.existsSync(njk)) {
9255
+ function resolveTemplate(filename) {
9256
+ const njk = path4.join(templateDir, `${filename}.njk`);
9257
+ if (fs2.existsSync(njk)) {
9260
9258
  return [njk, renderNunjucks];
9261
9259
  }
9262
- throw new Error(`Failed to locate template "${originalFilename}" in "${templateDir}"`);
9260
+ throw new Error(`Failed to locate template "${filename}" in "${templateDir}"`);
9263
9261
  }
9264
9262
  async function ensureFileRemoved(filename, options) {
9265
- if (!import_fs2.default.existsSync(filename)) {
9263
+ if (!fs2.existsSync(filename)) {
9266
9264
  return;
9267
9265
  }
9268
9266
  options.changes++;
9269
9267
  if (options.dryRun) {
9270
9268
  console.log(`${filename} needs removal`);
9271
9269
  } else {
9272
- import_fs2.default.unlinkSync(filename);
9270
+ fs2.unlinkSync(filename);
9273
9271
  console.log(`${filename} removed`);
9274
9272
  }
9275
9273
  }
9276
9274
  async function ensureFileExists(filename, options, features) {
9277
9275
  const [src, renderer] = resolveTemplate(filename);
9278
- const dst = import_path2.default.join(options.rootDir, filename);
9276
+ const dst = path4.join(options.rootDir, filename);
9279
9277
  const expected = await renderer(src, dst, features);
9280
- if (import_fs2.default.existsSync(dst)) {
9281
- const actual = import_fs2.default.readFileSync(dst, "utf-8");
9278
+ if (fs2.existsSync(dst)) {
9279
+ const actual = fs2.readFileSync(dst, "utf-8");
9282
9280
  if (actual === expected) {
9283
9281
  return;
9284
9282
  }
@@ -9287,13 +9285,13 @@ async function ensureFileExists(filename, options, features) {
9287
9285
  if (options.dryRun) {
9288
9286
  console.log(`${filename} - needs update`);
9289
9287
  } else {
9290
- import_fs2.default.writeFileSync(dst, expected);
9288
+ fs2.writeFileSync(dst, expected);
9291
9289
  console.log(`${filename} written`);
9292
9290
  }
9293
9291
  }
9294
9292
  async function ensureDependencyRemoved(name, options) {
9295
- const dst = import_path2.default.join(options.rootDir, PACKAGE_JSON);
9296
- const data = import_fs2.default.readFileSync(dst, "utf-8");
9293
+ const dst = path4.join(options.rootDir, PACKAGE_JSON);
9294
+ const data = fs2.readFileSync(dst, "utf-8");
9297
9295
  const pkg2 = JSON.parse(data);
9298
9296
  const dependencies = /* @__PURE__ */ new Set([
9299
9297
  ...Object.keys(pkg2.dependencies || {}),
@@ -9317,8 +9315,8 @@ async function ensureDependencyRemoved(name, options) {
9317
9315
  }
9318
9316
  }
9319
9317
  async function ensureDependencyExists(name, options) {
9320
- const dst = import_path2.default.join(options.rootDir, PACKAGE_JSON);
9321
- const data = import_fs2.default.readFileSync(dst, "utf-8");
9318
+ const dst = path4.join(options.rootDir, PACKAGE_JSON);
9319
+ const data = fs2.readFileSync(dst, "utf-8");
9322
9320
  const pkg2 = JSON.parse(data);
9323
9321
  const dependencies = /* @__PURE__ */ new Set([
9324
9322
  ...Object.keys(pkg2.dependencies || {}),
@@ -9342,8 +9340,8 @@ async function ensureDependencyExists(name, options) {
9342
9340
  }
9343
9341
  }
9344
9342
  async function ensurePkgScript(script, command, options) {
9345
- const dst = import_path2.default.join(options.rootDir, PACKAGE_JSON);
9346
- const data = import_fs2.default.readFileSync(dst, "utf-8");
9343
+ const dst = path4.join(options.rootDir, PACKAGE_JSON);
9344
+ const data = fs2.readFileSync(dst, "utf-8");
9347
9345
  const pkg2 = JSON.parse(data);
9348
9346
  if (pkg2.scripts && pkg2.scripts[script] && pkg2.scripts[script] === command) {
9349
9347
  return;
@@ -9357,29 +9355,17 @@ async function ensurePkgScript(script, command, options) {
9357
9355
  }
9358
9356
  pkg2.scripts[script] = command;
9359
9357
  const output = JSON.stringify(pkg2, null, 2);
9360
- import_fs2.default.writeFileSync(dst, `${output}
9358
+ fs2.writeFileSync(dst, `${output}
9361
9359
  `);
9362
9360
  console.log(`package.json "${script}" script updated`);
9363
9361
  }
9364
9362
  }
9365
9363
  async function writeConfig(options, features) {
9366
9364
  await ensureFileRemoved(".eslintrc.json", options);
9367
- if (options.flat) {
9368
- await ensureFileRemoved(".eslintrc.js", options);
9369
- await ensureFileRemoved(".eslintrc.cjs", options);
9370
- await ensureFileRemoved(".eslintignore", options);
9371
- await ensureFileExists("eslint.config.mjs", options, features);
9372
- } else {
9373
- await ensureFileRemoved("eslint.config.js", options);
9374
- await ensureFileRemoved("eslint.config.mjs", options);
9375
- if (import_fs2.default.existsSync(import_path2.default.join(options.rootDir, ".eslintrc.js"))) {
9376
- console.log(`Deprecated: project uses ".eslintrc.js" instead of ".eslintrc.cjs".`);
9377
- await ensureFileExists(".eslintrc.js", options, features);
9378
- } else {
9379
- await ensureFileExists(".eslintrc.cjs", options, features);
9380
- }
9381
- await ensureFileExists(".eslintignore", options, features);
9382
- }
9365
+ await ensureFileRemoved(".eslintrc.js", options);
9366
+ await ensureFileRemoved(".eslintrc.cjs", options);
9367
+ await ensureFileRemoved(".eslintignore", options);
9368
+ await ensureFileExists("eslint.config.mjs", options, features);
9383
9369
  await ensurePkgScript("eslint", "eslint --cache .", options);
9384
9370
  await ensurePkgScript("eslint:fix", "eslint --cache --fix .", options);
9385
9371
  await ensureDependencyRemoved("eslint", options);
@@ -9414,8 +9400,8 @@ async function writeConfig(options, features) {
9414
9400
  return options.changes === 0;
9415
9401
  }
9416
9402
  async function getFeatures(options, args2) {
9417
- const dst = import_path2.default.join(options.rootDir, PACKAGE_JSON);
9418
- const data = import_fs2.default.readFileSync(dst, "utf-8");
9403
+ const dst = path4.join(options.rootDir, PACKAGE_JSON);
9404
+ const data = fs2.readFileSync(dst, "utf-8");
9419
9405
  const pkg2 = JSON.parse(data);
9420
9406
  const deps = { ...pkg2.dependencies, ...pkg2.devDependencies };
9421
9407
  return {
@@ -9432,7 +9418,6 @@ async function run(args2) {
9432
9418
  const rootDir = await getRootDir();
9433
9419
  const options = {
9434
9420
  rootDir,
9435
- flat: args2.flat,
9436
9421
  dryRun: args2.mode === "check",
9437
9422
  changes: 0
9438
9423
  };
@@ -9460,11 +9445,6 @@ parser.add_argument("-c", "--check", {
9460
9445
  dest: "mode",
9461
9446
  help: "Check if configuration is up-to-date"
9462
9447
  });
9463
- parser.add_argument("--flat-config", {
9464
- action: "store_true",
9465
- dest: "flat",
9466
- help: "Enable experimental support for ESLint flat configuration"
9467
- });
9468
9448
  parser.add_argument("--disable-cypress", {
9469
9449
  action: "store_const",
9470
9450
  const: false,
@@ -9556,4 +9536,4 @@ if (!args.mode) {
9556
9536
  process.exit(1);
9557
9537
  }
9558
9538
  run(args);
9559
- //# sourceMappingURL=cli.js.map
9539
+ //# sourceMappingURL=cli.mjs.map