Skip to content

Commit

Permalink
add prettier & husky
Browse files Browse the repository at this point in the history
  • Loading branch information
gfmio committed Oct 19, 2019
1 parent 431f9ac commit 5bc6f3d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .prettierrc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
arrowParens = "always"
bracketSpacing = true
insertPragma = false
jsxBracketSameLine = false
printWidth = 80
proseWrap = "always"
requirePragma = false
semi = true
singleQuote = false
tabWidth = 2
trailingComma = "all"

[[overrides]]
files = ["*.ts", "*.js"]
[overrides.options]
printWidth = 80

[[overrides]]
files = ["*.tsx", ".jsx"]
[overrides.options]
printWidth = 120

[[overrides]]
files = ["*.json", "*.json5"]
[overrides.options]
printWidth = 120

[[overrides]]
files = "*.md"
[overrides.options]
# proseWrap = "never"
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,22 @@
"concurrently": "^3.5.1",
"copy-webpack-plugin": "^4.5.1",
"hard-source-webpack-plugin": "^0.6.4",
"husky": "^3.0.9",
"lite-server": "^2.3.0",
"mocha": "^5.0.4",
"prettier": "^1.18.2",
"pretty-quick": "^2.0.0",
"source-map-loader": "^0.2.3",
"ts-node": "^5.0.1",
"tslint": "^5.9.1",
"typescript": "^2.7.2",
"webpack": "^3.11.0",
"xyz": "^3.0.0"
},
"dependencies": {}
"dependencies": {},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
}
}

0 comments on commit 5bc6f3d

Please sign in to comment.