@html-validate/eslint-config 5.3.9 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -22,7 +22,6 @@ var __spreadValues = (a, b) => {
22
22
  return a;
23
23
  };
24
24
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
26
25
  var __objRest = (source, exclude) => {
27
26
  var target = {};
28
27
  for (var prop in source)
@@ -38,17 +37,15 @@ var __objRest = (source, exclude) => {
38
37
  var __commonJS = (cb, mod) => function __require() {
39
38
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
40
39
  };
41
- var __reExport = (target, module2, copyDefault, desc) => {
42
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
43
- for (let key of __getOwnPropNames(module2))
44
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
45
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
40
+ var __copyProps = (to, from, except, desc) => {
41
+ if (from && typeof from === "object" || typeof from === "function") {
42
+ for (let key of __getOwnPropNames(from))
43
+ if (!__hasOwnProp.call(to, key) && key !== except)
44
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
45
  }
47
- return target;
48
- };
49
- var __toESM = (module2, isNodeMode) => {
50
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
46
+ return to;
51
47
  };
48
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
52
49
 
53
50
  // ../../node_modules/argparse/lib/sub.js
54
51
  var require_sub = __commonJS({
@@ -8908,7 +8905,7 @@ var require_package = __commonJS({
8908
8905
  "package.json"(exports, module2) {
8909
8906
  module2.exports = {
8910
8907
  name: "@html-validate/eslint-config",
8911
- version: "5.3.8",
8908
+ version: "5.3.12",
8912
8909
  description: "Eslint sharable config used by the various HTML-validate packages",
8913
8910
  keywords: [
8914
8911
  "eslint"
@@ -8941,8 +8938,8 @@ var require_package = __commonJS({
8941
8938
  build: "esbuild src/cli.ts --bundle --sourcemap --platform=node --target=node12.22 --external:prettier --outdir=dist"
8942
8939
  },
8943
8940
  dependencies: {
8944
- "@rushstack/eslint-patch": "1.1.0",
8945
- eslint: "8.10.0",
8941
+ "@rushstack/eslint-patch": "1.1.1",
8942
+ eslint: "8.11.0",
8946
8943
  "eslint-config-prettier": "8.5.0",
8947
8944
  "eslint-config-sidvind": "1.3.2",
8948
8945
  "eslint-formatter-gitlab": "3.0.0",
@@ -8991,7 +8988,11 @@ async function renderPassthru(src) {
8991
8988
  async function renderNunjucks(src, dst, features) {
8992
8989
  import_nunjucks.default.configure(import_path.default.dirname(src), { trimBlocks: true });
8993
8990
  const overrides = Object.values(features).some(Boolean);
8994
- const context = __spreadProps(__spreadValues({}, features), { overrides });
8991
+ const typeinfo = features.typeinfo ? {
8992
+ rootDir: import_path.default.dirname(features.typeinfo),
8993
+ tsconfig: `./${import_path.default.basename(features.typeinfo)}`
8994
+ } : false;
8995
+ const context = __spreadProps(__spreadValues({}, features), { overrides, typeinfo });
8995
8996
  const result = import_nunjucks.default.render(import_path.default.basename(src), context);
8996
8997
  const prettierConfig = await import_prettier.default.resolveConfig(dst, {
8997
8998
  editorconfig: true
@@ -9137,6 +9138,9 @@ async function writeConfig(options, features) {
9137
9138
  await ensurePkgScript("eslint:fix", "eslint --fix .", options);
9138
9139
  await ensureDependencyRemoved("eslint", options);
9139
9140
  await ensureDependencyExists("@html-validate/eslint-config", options);
9141
+ if (features.typeinfo) {
9142
+ await ensureDependencyExists("@html-validate/eslint-config-typescript-typeinfo", options);
9143
+ }
9140
9144
  if (features.typescript) {
9141
9145
  await ensureDependencyExists("@html-validate/eslint-config-typescript", options);
9142
9146
  }
@@ -9164,7 +9168,7 @@ async function writeConfig(options, features) {
9164
9168
  return options.changes === 0;
9165
9169
  }
9166
9170
  async function getFeatures(options, args2) {
9167
- var _a, _b, _c, _d, _e, _f;
9171
+ var _a, _b, _c, _d, _e, _f, _g;
9168
9172
  const dst = import_path2.default.join(options.rootDir, PACKAGE_JSON);
9169
9173
  const data = import_fs2.default.readFileSync(dst, "utf-8");
9170
9174
  const pkg2 = JSON.parse(data);
@@ -9174,8 +9178,9 @@ async function getFeatures(options, args2) {
9174
9178
  cypress: (_b = args2.cypress) != null ? _b : Boolean(deps.cypress),
9175
9179
  jest: (_c = args2.jest) != null ? _c : Boolean(deps.jest),
9176
9180
  protractor: (_d = args2.protractor) != null ? _d : Boolean(deps.protractor),
9177
- typescript: (_e = args2.typescript) != null ? _e : Boolean(deps.typescript),
9178
- vue: (_f = args2.vue) != null ? _f : Boolean(deps.vue)
9181
+ typeinfo: (_e = args2.typeinfo) != null ? _e : deps.typescript ? "./tsconfig.json" : false,
9182
+ typescript: (_f = args2.typescript) != null ? _f : Boolean(deps.typescript),
9183
+ vue: (_g = args2.vue) != null ? _g : Boolean(deps.vue)
9179
9184
  };
9180
9185
  }
9181
9186
  async function run(args2) {
@@ -9233,6 +9238,12 @@ parser.add_argument("--disable-typescript", {
9233
9238
  dest: "typescript",
9234
9239
  help: "Disable typescript support"
9235
9240
  });
9241
+ parser.add_argument("--disable-typeinfo", {
9242
+ action: "store_const",
9243
+ const: false,
9244
+ dest: "typeinfo",
9245
+ help: "Disable typescript typeinfo support"
9246
+ });
9236
9247
  parser.add_argument("--disable-angularjs", {
9237
9248
  action: "store_const",
9238
9249
  const: false,
@@ -9269,6 +9280,13 @@ parser.add_argument("--enable-typescript", {
9269
9280
  dest: "typescript",
9270
9281
  help: "Enable typescript support"
9271
9282
  });
9283
+ parser.add_argument("--enable-typeinfo", {
9284
+ nargs: "?",
9285
+ dest: "typeinfo",
9286
+ const: "tsconfig.json",
9287
+ metavar: "TSCONFIG",
9288
+ help: "Enable typescript typeinfo support"
9289
+ });
9272
9290
  parser.add_argument("--enable-angularjs", {
9273
9291
  action: "store_const",
9274
9292
  const: true,