style: run prettier on pre-commit hook

This commit is contained in:
Stefan Rotsch
2023-06-01 16:43:09 +02:00
committed by Stefan Rotsch
parent b82d5a9da9
commit 9948712690
15 changed files with 50 additions and 45 deletions

View File

@@ -41,8 +41,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
var fs_1 = require("fs");
var xml_sitemap_1 = __importDefault(require("xml-sitemap"));
var jsdom_1 = require("jsdom");
var xml_sitemap_1 = __importDefault(require("xml-sitemap"));
var config_1 = require("../src/config");
var radar_1 = require("./generateJson/radar");
// Do this as the first thing so that any code reading it knows the right env.

View File

@@ -89,10 +89,10 @@ var fs_extra_1 = require("fs-extra");
var highlight_js_1 = __importDefault(require("highlight.js"));
var marked_1 = require("marked");
var path = __importStar(require("path"));
var config_1 = require("../../src/config");
var model_1 = require("../../src/model");
var paths_1 = require("../paths");
var file_1 = require("./file");
var config_1 = require("../../src/config");
marked_1.marked.setOptions({
highlight: function (code) { return highlight_js_1.default.highlightAuto(code).value; },
});
@@ -200,7 +200,7 @@ var addRevisionToItem = function (item, revision) {
body: "",
info: "",
angleFraction: Math.random(),
radiusFraction: Math.random()
radiusFraction: Math.random(),
}; }
var newItem = __assign(__assign(__assign({}, item), revision), { body: ignoreEmptyRevisionBody(revision, item) });
if (revisionCreatesNewHistoryEntry(revision, item)) {

View File

@@ -17,7 +17,7 @@ function isMobileViewport() {
return width < 1200;
}
exports.isMobileViewport = isMobileViewport;
exports.publicUrl = (process.env.PUBLIC_URL || "").replace(/\/$/, '') + "/";
exports.publicUrl = (process.env.PUBLIC_URL || "").replace(/\/$/, "") + "/";
function assetUrl(file) {
return exports.publicUrl + file;
}

View File

@@ -92,9 +92,11 @@ var filteredOnly = function (items, tags) {
};
exports.filteredOnly = filteredOnly;
var getTags = function (items) {
var tags = items.reduce(function (acc, item) {
var tags = items
.reduce(function (acc, item) {
return !item.tags ? acc : acc.concat(item.tags);
}, []).sort();
}, [])
.sort();
return Array.from(new Set(tags));
};
exports.getTags = getTags;