From 2f42b0921d93e1c11579b1451d51033da3bb8dc1 Mon Sep 17 00:00:00 2001 From: Graham McGregor Date: Wed, 2 Aug 2017 17:18:16 -0400 Subject: [PATCH] Configure prettier A highly consistent auto-formatter that works by parsing the AST and the pretty printing it. See: https://prettier.io/ --- .eslintrc | 28 +++++++++++++++------------- package.json | 2 ++ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.eslintrc b/.eslintrc index 1b8173a..431b1a7 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,30 +1,32 @@ { "parser": "babel-eslint", - "plugins": ["babel"], + "plugins": [ + "babel", + "prettier" + ], "env": { "browser": true, "es6": true }, - "ecmaFeatures": { - "experimentalObjectRestSpread": true, - "modules": true + "parserOptions": { + "ecmaFeatures": { + "experimentalObjectRestSpread": true, + "modules": true + } }, "root": true, "rules": { - "babel/arrow-parens": [2, "always"], "no-underscore-dangle": 0, "strict": [2, "global"], "eqeqeq": [2, "smart"], "no-undef": 2, "no-console": 1, "no-nested-ternary": 2, - "indent": [2, 2], - "quotes": [2, "single"], - "brace-style": [2, "1tbs", { "allowSingleLine": true }], - "object-curly-spacing": [2, "always"], - "eol-last": 2, - "padded-blocks": [2, "never"], - "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }], - "space-before-blocks": [2, "always"] + "prettier/prettier": [ + "error", + { + "singleQuote": true + } + ] } } diff --git a/package.json b/package.json index 7c15d7e..b2b281c 100644 --- a/package.json +++ b/package.json @@ -39,9 +39,11 @@ "coveralls": "^2.11.12", "eslint": "^4.3.0", "eslint-plugin-babel": "^4.1.2", + "eslint-plugin-prettier": "^2.1.2", "isomorphic-fetch": "^2.1.1", "nock": "^8.0.0", "normalizr": "^2.2.1", + "prettier": "^1.5.3", "rimraf": "^2.5.4", "tap-spec": "^4.1.1 ", "tape": "^4.6.0"