@html-validate/eslint-config 5.2.1 → 5.3.3

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/eslint.js CHANGED
@@ -8,4 +8,7 @@ const binary = path.join(pkgPath, "bin/eslint");
8
8
 
9
9
  spawn("node", [binary, ...process.argv.slice(2)], {
10
10
  stdio: "inherit",
11
+ }).on("exit", (code) => {
12
+ /* eslint-disable-next-line no-process-exit */
13
+ process.exit(code);
11
14
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@html-validate/eslint-config",
3
- "version": "5.2.1",
3
+ "version": "5.3.3",
4
4
  "description": "Eslint sharable config used by the various HTML-validate packages",
5
5
  "keywords": [
6
6
  "eslint"
@@ -29,23 +29,26 @@
29
29
  "!*.spec.js"
30
30
  ],
31
31
  "scripts": {
32
- "build": "tsc"
32
+ "prebuild": "tsc",
33
+ "build": "esbuild src/cli.ts --bundle --sourcemap --platform=node --target=node12.22 --external:prettier --outdir=dist"
33
34
  },
34
35
  "dependencies": {
35
36
  "@rushstack/eslint-patch": "1.1.0",
36
- "argparse": "^2.0.0",
37
- "eslint": "8.3.0",
37
+ "eslint": "8.8.0",
38
38
  "eslint-config-prettier": "8.3.0",
39
39
  "eslint-config-sidvind": "1.3.2",
40
40
  "eslint-formatter-gitlab": "3.0.0",
41
41
  "eslint-plugin-array-func": "3.1.7",
42
- "eslint-plugin-import": "2.25.3",
42
+ "eslint-plugin-import": "2.25.4",
43
43
  "eslint-plugin-node": "11.1.0",
44
44
  "eslint-plugin-prettier": "4.0.0",
45
45
  "eslint-plugin-security": "1.4.0",
46
- "eslint-plugin-sonarjs": "0.11.0",
47
- "find-up": "^5.0.0",
48
- "nunjucks": "^3.2.0"
46
+ "eslint-plugin-sonarjs": "0.11.0"
47
+ },
48
+ "devDependencies": {
49
+ "argparse": "2.0.1",
50
+ "find-up": "5.0.0",
51
+ "nunjucks": "3.2.3"
49
52
  },
50
53
  "peerDependencies": {
51
54
  "prettier": ">= 2"
@@ -57,5 +60,5 @@
57
60
  "publishConfig": {
58
61
  "access": "public"
59
62
  },
60
- "gitHead": "104615bb13f5cfc7d567f3f12d5e906d47d7af26"
63
+ "gitHead": "669cc4b7646d9ce97418259107130a2cd6551d38"
61
64
  }
package/dist/render.js DELETED
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.renderNunjucks = exports.renderPassthru = void 0;
7
- const fs_1 = __importDefault(require("fs"));
8
- const path_1 = __importDefault(require("path"));
9
- const nunjucks_1 = __importDefault(require("nunjucks"));
10
- const prettier_1 = __importDefault(require("prettier"));
11
- async function renderPassthru(src) {
12
- /* eslint-disable-next-line security/detect-non-literal-fs-filename */
13
- return fs_1.default.readFileSync(src, "utf-8");
14
- }
15
- exports.renderPassthru = renderPassthru;
16
- /**
17
- * Render source template.
18
- *
19
- * @param src - Template filename
20
- * @param dst - Destination filename. Used to resolve prettier configuration.
21
- * @returns rendered template
22
- */
23
- async function renderNunjucks(src, dst, features) {
24
- nunjucks_1.default.configure(path_1.default.dirname(src), { trimBlocks: true });
25
- const overrides = Object.values(features).some(Boolean);
26
- const context = Object.assign(Object.assign({}, features), { overrides });
27
- const result = nunjucks_1.default.render(path_1.default.basename(src), context);
28
- const prettierConfig = await prettier_1.default.resolveConfig(dst, {
29
- editorconfig: true,
30
- });
31
- return prettier_1.default.format(result, Object.assign(Object.assign({}, prettierConfig), { filepath: dst }));
32
- }
33
- exports.renderNunjucks = renderNunjucks;
34
- //# sourceMappingURL=render.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,wDAAgC;AAChC,wDAAgC;AAazB,KAAK,UAAU,cAAc,CAAC,GAAW;IAC/C,sEAAsE;IACtE,OAAO,YAAE,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACtC,CAAC;AAHD,wCAGC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,cAAc,CACnC,GAAW,EACX,GAAW,EACX,QAAkB;IAElB,kBAAQ,CAAC,SAAS,CAAC,cAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxD,MAAM,OAAO,mCAAQ,QAAQ,KAAE,SAAS,GAAE,CAAC;IAC3C,MAAM,MAAM,GAAG,kBAAQ,CAAC,MAAM,CAAC,cAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;IAC5D,MAAM,cAAc,GAAG,MAAM,kBAAQ,CAAC,aAAa,CAAC,GAAG,EAAE;QACxD,YAAY,EAAE,IAAI;KAClB,CAAC,CAAC;IACH,OAAO,kBAAQ,CAAC,MAAM,CAAC,MAAM,kCACzB,cAAc,KACjB,QAAQ,EAAE,GAAG,IACZ,CAAC;AACJ,CAAC;AAhBD,wCAgBC"}