orig. formatting

This commit is contained in:
_Bastler
2022-02-27 13:59:05 +01:00
parent 03ee2eb49a
commit 2622041740
2 changed files with 41 additions and 40 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
// import sanitizeHtml from 'sanitize-html';
export class HtmlUtils { export class HtmlUtils {
public static getElementByIdOrFail<T extends HTMLElement>(id: string): T { public static getElementByIdOrFail<T extends HTMLElement>(id: string): T {
@@ -41,7 +41,7 @@ export class HtmlUtils {
public static sanitize(html: string | number | boolean | undefined): string { public static sanitize(html: string | number | boolean | undefined): string {
if (typeof html === "string") { if (typeof html === "string") {
return html; return html;
/* TODO: fix sanitizer, sanitizeHtml seems not to work with vite /* TODO: fix sanitizer, sanitizeHtml seems not to work with vite
return sanitizeHtml(html, { return sanitizeHtml(html, {
allowedAttributes: { allowedAttributes: {
span: ["style"], span: ["style"],
@@ -53,7 +53,7 @@ export class HtmlUtils {
}, },
}, },
}); });
*/ */
} }
return ""; return "";
} }
+38 -37
View File
@@ -1,38 +1,39 @@
{ {
// "include": ["src/**/*"], // "include": ["src/**/*"],
"extends": "@tsconfig/svelte/tsconfig.json", "extends": "@tsconfig/svelte/tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "./dist/", "outDir": "./dist/",
"sourceMap": true, "sourceMap": true,
"moduleResolution": "node", "moduleResolution": "node",
//"module": "CommonJS", //"module": "CommonJS",
"module": "ESNext", "module": "ESNext",
"target": "ES2017", "target": "ES2017",
"declaration": false, "declaration": false,
"downlevelIteration": true, "downlevelIteration": true,
"jsx": "react", "jsx": "react",
"allowJs": true, "allowJs": true,
"esModuleInterop": true, "esModuleInterop": true,
"importsNotUsedAsValues": "remove", "importsNotUsedAsValues": "remove",
"strict": true, /* Enable all strict type-checking options. */ "strict": true, /* Enable all strict type-checking options. */
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
"strictNullChecks": true, /* Enable strict null checks. */ "strictNullChecks": true, /* Enable strict null checks. */
"strictFunctionTypes": true, /* Enable strict checking of function types. */ "strictFunctionTypes": true, /* Enable strict checking of function types. */
"strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
"strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
"alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */ "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */
}, },
"exclude": [ "exclude": [
"node_modules", "node_modules",
"dist", "dist",
"public/iframe_api.js", "public/iframe_api.js",
"packages/iframe-api-typings" "packages/iframe-api-typings"
] ]
} }