summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-10-18 16:58:20 -0700
committerDessalines <tyhou13@gmx.com>2019-10-18 17:00:26 -0700
commit82ea5ae9186e5a8e631c87a61077e16713eb87a4 (patch)
tree571d30edb6bdb237812c213e7d30299299bb7f89
parent412d447de2c5bcf55b4cf2d34714b8b43c28af31 (diff)
Adding prettier.
-rw-r--r--ui/.prettierrc.js4
-rw-r--r--ui/package.json15
-rw-r--r--ui/yarn.lock5
3 files changed, 20 insertions, 4 deletions
diff --git a/ui/.prettierrc.js b/ui/.prettierrc.js
new file mode 100644
index 00000000..5983e1a1
--- /dev/null
+++ b/ui/.prettierrc.js
@@ -0,0 +1,4 @@
+module.exports = Object.assign(require('eslint-plugin-jane/prettier-ts'), {
+ arrowParens: 'avoid',
+ semi: true,
+});
diff --git a/ui/package.json b/ui/package.json
index df5e0757..d64946b2 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -32,6 +32,7 @@
"markdown-it-container": "^2.0.0",
"markdown-it-emoji": "^1.4.0",
"moment": "^2.24.0",
+ "prettier": "^1.18.2",
"rxjs": "^6.4.0",
"terser": "^3.17.0",
"tributejs": "3.7.2",
@@ -58,18 +59,24 @@
"husky": {
"hooks": {
"pre-commit": "lint-staged",
- "pre-push": "npm run lint"
+ "pre-push": "yarn run lint"
}
},
"lint-staged": {
"*.js": [
- "npm run lint"
+ "prettier --write",
+ "yarn run lint",
+ "git add"
],
"*.ts": [
- "npm run lint"
+ "prettier --write",
+ "yarn run lint",
+ "git add"
],
"*.tsx": [
- "npm run lint"
+ "prettier --write",
+ "yarn run lint",
+ "git add"
],
"package.json": [
"sortpack",
diff --git a/ui/yarn.lock b/ui/yarn.lock
index 302dd402..23c79168 100644
--- a/ui/yarn.lock
+++ b/ui/yarn.lock
@@ -4177,6 +4177,11 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"
+prettier@^1.18.2:
+ version "1.18.2"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea"
+ integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==
+
pretty-time@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-0.2.0.tgz#7a3bdec4049c620cd7c42b7f342b74d56e73d74e"