diff --git a/examples/index.js b/examples/index.js index 9d1e994..8e6ef2e 100644 --- a/examples/index.js +++ b/examples/index.js @@ -8,6 +8,7 @@ export const examples = { isTrue // TODO: Replace this with added example. } +// prettier-ignore const envVars = [ 'LOG_LEVEL', 'LOG_FILTER', diff --git a/package.json b/package.json index 082f30f..a24c4cb 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,9 @@ "example:inspect": "babel-node --inspect examples", "example:inspect:watch": "nodemon --exec babel-node --inspect examples", "watch": "gulp watch", - "format": "standard --fix", + "pretty": "prettier --write **/*.js **/*.json **/*.graphql", + "format": "npm-run-all --serial pretty format:*", + "format:js": "npm-run-all --serial", "report": "nyc report" }, "babel": { @@ -93,6 +95,13 @@ "tmp/" ] }, + "prettier": { + "semi": false, + "singleQuote": true, + "jsxSingleQuote": true, + "trailingComma": "none", + "endOfLine": "lf" + }, "engines": { "node": ">=10.13.0" }, @@ -115,6 +124,7 @@ "nodemon": "^2.0.1", "npm-run-all": "^4.1.2", "nyc": "^14.0.0", + "prettier": "^1.19.1", "standard": "^14.0.2" } } diff --git a/yarn.lock b/yarn.lock index a03137d..e827635 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5644,6 +5644,11 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= +prettier@^1.19.1: + version "1.19.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== + pretty-hrtime@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"