Skip to content

Commit

Permalink
build: add and configure prettier formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
flauwekeul committed Jun 28, 2019
1 parent d8c36f3 commit 0ec4285
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 55 deletions.
18 changes: 15 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,36 @@
"es6": true,
"shared-node-browser": true
},
"extends": "eslint:recommended",
"extends": [
"plugin:prettier/recommended"
],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": "error",
"quotes": [
"error",
"single",
{ "allowTemplateLiterals": true }
{
"allowTemplateLiterals": true
}
],
"semi": [
"error",
"never"
],
"no-console": [
"error",
{ "allow": [ "warn" ] }
{
"allow": [
"warn"
]
}
],
"valid-jsdoc": [
"warn"
Expand Down
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 120,
"semi": false,
"singleQuote": true,
"trailingComma": "all"
}
152 changes: 111 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@
"chai": "4.2.0",
"cz-conventional-changelog": "2.1.0",
"documentation": "11.0.1",
"eslint": "5.16.0",
"eslint": "6.0.1",
"eslint-config-prettier": "6.0.0",
"eslint-plugin-prettier": "3.1.0",
"husky": "2.4.1",
"istanbul": "0.4.5",
"mocha": "6.1.4",
"nyc": "14.1.1",
"prettier": "1.18.2",
"rollup": "1.15.6",
"rollup-plugin-babel": "4.3.2",
"rollup-plugin-commonjs": "10.0.0",
Expand All @@ -48,6 +51,8 @@
"sinon-chai": "3.3.0",
"standard-version": "6.0.1",
"tslint": "5.17.0",
"tslint-config-prettier": "1.18.0",
"tslint-plugin-prettier": "2.0.1",
"typescript": "3.5.2"
},
"directories": {
Expand Down
Loading

0 comments on commit 0ec4285

Please sign in to comment.