@html-validate/eslint-config 5.4.10 → 5.4.14

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/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 David Sveningsson <ext@sidvind.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/dist/cli.js CHANGED
@@ -1,39 +1,11 @@
1
1
  #!/usr/bin/env node
2
+ "use strict";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
7
  var __getProtoOf = Object.getPrototypeOf;
10
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
- var __spreadValues = (a, b) => {
14
- for (var prop in b || (b = {}))
15
- if (__hasOwnProp.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- if (__getOwnPropSymbols)
18
- for (var prop of __getOwnPropSymbols(b)) {
19
- if (__propIsEnum.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- }
22
- return a;
23
- };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
- var __objRest = (source, exclude) => {
26
- var target = {};
27
- for (var prop in source)
28
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
- target[prop] = source[prop];
30
- if (source != null && __getOwnPropSymbols)
31
- for (var prop of __getOwnPropSymbols(source)) {
32
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
- target[prop] = source[prop];
34
- }
35
- return target;
36
- };
37
9
  var __commonJS = (cb, mod) => function __require() {
38
10
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
39
11
  };
@@ -265,12 +237,12 @@ var require_textwrap = __commonJS({
265
237
  }
266
238
  };
267
239
  function wrap(text, options = {}) {
268
- let _a = options, { width = 70 } = _a, kwargs = __objRest(_a, ["width"]);
240
+ let { width = 70, ...kwargs } = options;
269
241
  let w = new TextWrapper(Object.assign({ width }, kwargs));
270
242
  return w.wrap(text);
271
243
  }
272
244
  function fill(text, options = {}) {
273
- let _a = options, { width = 70 } = _a, kwargs = __objRest(_a, ["width"]);
245
+ let { width = 70, ...kwargs } = options;
274
246
  let w = new TextWrapper(Object.assign({ width }, kwargs));
275
247
  return w.fill(text);
276
248
  }
@@ -3051,10 +3023,11 @@ var require_p_locate = __commonJS({
3051
3023
  return false;
3052
3024
  };
3053
3025
  var pLocate = async (iterable, tester, options) => {
3054
- options = __spreadValues({
3026
+ options = {
3055
3027
  concurrency: Infinity,
3056
- preserveOrder: true
3057
- }, options);
3028
+ preserveOrder: true,
3029
+ ...options
3030
+ };
3058
3031
  const limit = pLimit(options.concurrency);
3059
3032
  const items = [...iterable].map((element) => [element, limit(testElement, element, tester)]);
3060
3033
  const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity);
@@ -3093,11 +3066,12 @@ var require_locate_path = __commonJS({
3093
3066
  }
3094
3067
  var matchType = (type, stat) => type === void 0 || stat[typeMappings[type]]();
3095
3068
  module2.exports = async (paths, options) => {
3096
- options = __spreadValues({
3069
+ options = {
3097
3070
  cwd: process.cwd(),
3098
3071
  type: "file",
3099
- allowSymlinks: true
3100
- }, options);
3072
+ allowSymlinks: true,
3073
+ ...options
3074
+ };
3101
3075
  checkType(options);
3102
3076
  const statFn = options.allowSymlinks ? fsStat : fsLStat;
3103
3077
  return pLocate(paths, async (path_) => {
@@ -3110,11 +3084,12 @@ var require_locate_path = __commonJS({
3110
3084
  }, options);
3111
3085
  };
3112
3086
  module2.exports.sync = (paths, options) => {
3113
- options = __spreadValues({
3087
+ options = {
3114
3088
  cwd: process.cwd(),
3115
3089
  allowSymlinks: true,
3116
- type: "file"
3117
- }, options);
3090
+ type: "file",
3091
+ ...options
3092
+ };
3118
3093
  checkType(options);
3119
3094
  const statFn = options.allowSymlinks ? fs3.statSync : fs3.lstatSync;
3120
3095
  for (const path_ of paths) {
@@ -3179,7 +3154,7 @@ var require_find_up = __commonJS({
3179
3154
  return foundPath;
3180
3155
  };
3181
3156
  while (true) {
3182
- const foundPath = await runMatcher(__spreadProps(__spreadValues({}, options), { cwd: directory }));
3157
+ const foundPath = await runMatcher({ ...options, cwd: directory });
3183
3158
  if (foundPath === stop) {
3184
3159
  return;
3185
3160
  }
@@ -3207,7 +3182,7 @@ var require_find_up = __commonJS({
3207
3182
  return foundPath;
3208
3183
  };
3209
3184
  while (true) {
3210
- const foundPath = runMatcher(__spreadProps(__spreadValues({}, options), { cwd: directory }));
3185
+ const foundPath = runMatcher({ ...options, cwd: directory });
3211
3186
  if (foundPath === stop) {
3212
3187
  return;
3213
3188
  }
@@ -8905,7 +8880,7 @@ var require_package = __commonJS({
8905
8880
  "package.json"(exports, module2) {
8906
8881
  module2.exports = {
8907
8882
  name: "@html-validate/eslint-config",
8908
- version: "5.4.9",
8883
+ version: "5.4.12",
8909
8884
  description: "Eslint sharable config used by the various HTML-validate packages",
8910
8885
  keywords: [
8911
8886
  "eslint"
@@ -8938,15 +8913,15 @@ var require_package = __commonJS({
8938
8913
  build: "esbuild src/cli.ts --bundle --sourcemap --platform=node --target=node12.22 --external:prettier --outdir=dist"
8939
8914
  },
8940
8915
  dependencies: {
8941
- "@rushstack/eslint-patch": "1.1.3",
8942
- eslint: "8.17.0",
8916
+ "@rushstack/eslint-patch": "1.1.4",
8917
+ eslint: "8.19.0",
8943
8918
  "eslint-config-prettier": "8.5.0",
8944
8919
  "eslint-config-sidvind": "1.3.2",
8945
8920
  "eslint-formatter-gitlab": "3.0.0",
8946
8921
  "eslint-plugin-array-func": "3.1.7",
8947
8922
  "eslint-plugin-import": "2.26.0",
8948
8923
  "eslint-plugin-node": "11.1.0",
8949
- "eslint-plugin-prettier": "4.0.0",
8924
+ "eslint-plugin-prettier": "4.2.1",
8950
8925
  "eslint-plugin-security": "1.5.0",
8951
8926
  "eslint-plugin-sonarjs": "0.13.0"
8952
8927
  },
@@ -8992,14 +8967,15 @@ async function renderNunjucks(src, dst, features) {
8992
8967
  rootDir: import_path.default.dirname(features.typeinfo),
8993
8968
  tsconfig: `./${import_path.default.basename(features.typeinfo)}`
8994
8969
  } : false;
8995
- const context = __spreadProps(__spreadValues({}, features), { overrides, typeinfo });
8970
+ const context = { ...features, overrides, typeinfo };
8996
8971
  const result = import_nunjucks.default.render(import_path.default.basename(src), context);
8997
8972
  const prettierConfig = await import_prettier.default.resolveConfig(dst, {
8998
8973
  editorconfig: true
8999
8974
  });
9000
- return import_prettier.default.format(result, __spreadProps(__spreadValues({}, prettierConfig), {
8975
+ return import_prettier.default.format(result, {
8976
+ ...prettierConfig,
9001
8977
  filepath: dst
9002
- }));
8978
+ });
9003
8979
  }
9004
8980
 
9005
8981
  // src/cli.ts
@@ -9172,7 +9148,7 @@ async function getFeatures(options, args2) {
9172
9148
  const dst = import_path2.default.join(options.rootDir, PACKAGE_JSON);
9173
9149
  const data = import_fs2.default.readFileSync(dst, "utf-8");
9174
9150
  const pkg2 = JSON.parse(data);
9175
- const deps = __spreadValues(__spreadValues({}, pkg2.dependencies), pkg2.devDependencies);
9151
+ const deps = { ...pkg2.dependencies, ...pkg2.devDependencies };
9176
9152
  return {
9177
9153
  angularjs: (_a = args2.angularjs) != null ? _a : Boolean(deps.angular),
9178
9154
  cypress: (_b = args2.cypress) != null ? _b : Boolean(deps.cypress),