From df38fc2a1c39e4108ad9c5519bbe7a9243054074 Mon Sep 17 00:00:00 2001 From: Hans Bergren Date: Wed, 25 Mar 2020 11:35:37 -0400 Subject: [PATCH] Add Prettier --- .prettierrc.js | 8 ++++++++ index.js | 4 ++-- package-lock.json | 11 ++++++++++- package.json | 3 +++ 4 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 .prettierrc.js diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..649cb0a --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,8 @@ +module.exports = { + tabWidth: 2, + printWidth: 80, + singleQuote: true, + semi: false, + trailingComma: 'all', + arrowParens: 'always', +} diff --git a/index.js b/index.js index e5ac7f0..ddd37f1 100644 --- a/index.js +++ b/index.js @@ -4,6 +4,6 @@ module.exports = { }, rules: { - semi: [2, "always"], + semi: [2, 'always'], }, -}; +} diff --git a/package-lock.json b/package-lock.json index 02e14cc..c106a5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,14 @@ { "name": "@xpring-eng/eslint-config-base", "version": "1.0.0", - "lockfileVersion": 1 + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "prettier": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.2.tgz", + "integrity": "sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg==", + "dev": true + } + } } diff --git a/package.json b/package.json index d2a9bd5..899f954 100644 --- a/package.json +++ b/package.json @@ -17,5 +17,8 @@ "license": "MIT", "peerDependencies": { "eslint": ">= 6" + }, + "devDependencies": { + "prettier": "^2.0.2" } }