diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..32ebab4 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "singleQuote": true, + "trailingComma": "none" +} diff --git a/Makefile b/Makefile index dafe1ae..bf1b9e9 100644 --- a/Makefile +++ b/Makefile @@ -20,4 +20,7 @@ test: publish: test clean dist yarn semantic-release -.PHONY: clean storybook test publish +format: + yarn prettier --write "**/*.{ts,js,json}" + +.PHONY: clean storybook test publish format diff --git a/package.json b/package.json index 7a6e094..fc8eb30 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "express": "^4.17.1", "handlebars-loader": "^1.7.1", "mocha": "6.2.2", + "prettier": "^2.6.2", "semantic-release": "^17.2.3", "ts-loader": "^6.2.1", "typescript": "^2.8.1", diff --git a/src/base.ts b/src/base.ts index 17e5c85..cbfe669 100644 --- a/src/base.ts +++ b/src/base.ts @@ -1,3 +1,5 @@ +import { SafeString } from 'handlebars'; + export interface Colors { primary: string; foreground: string; @@ -30,8 +32,8 @@ export interface EmojiRating { } export interface BaseTemplateOptions { - intro: string; - outro: string; + intro: string | SafeString; + outro: string | SafeString; question: string; colors: Colors; direction: string; diff --git a/src/partials/bot-honeypot-link.hbs b/src/partials/bot-honeypot-link.hbs index 940abf5..befa16c 100644 --- a/src/partials/bot-honeypot-link.hbs +++ b/src/partials/bot-honeypot-link.hbs @@ -4,7 +4,7 @@
-   +