From 4a48d0a52137bb13f2050bb9684a53abda9e2005 Mon Sep 17 00:00:00 2001 From: Igor Gassmann Date: Thu, 21 Dec 2017 12:17:33 -0300 Subject: [PATCH] Ajust Prettier and ESLint to respect Airbnb JavaScript formating rules --- .eslintrc.json | 2 +- .prettierrc.json | 5 +++-- package.json | 1 + yarn.lock | 15 +++++++++++++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index bc69f279c..2fbd88746 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,7 +6,7 @@ "airbnb", "plugin:import/electron", "plugin:flowtype/recommended", - "prettier" + "plugin:prettier/recommended" ], "settings": { "import/resolver": { diff --git a/.prettierrc.json b/.prettierrc.json index 5d5281c52..1d3fce725 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,4 +1,5 @@ { - "trailing-comma": "es5", - "printWidth": 100 + "trailingComma": "es5", + "printWidth": 100, + "singleQuote": true } \ No newline at end of file diff --git a/package.json b/package.json index 5c0a7acd9..178dc84df 100644 --- a/package.json +++ b/package.json @@ -85,6 +85,7 @@ "eslint-plugin-flowtype": "^2.40.1", "eslint-plugin-import": "^2.8.0", "eslint-plugin-jsx-a11y": "^6.0.3", + "eslint-plugin-prettier": "^2.4.0", "eslint-plugin-react": "^7.5.1", "flow-babel-webpack-plugin": "^1.1.0", "flow-bin": "^0.61.0", diff --git a/yarn.lock b/yarn.lock index 2a9d3095c..690ed20b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3209,6 +3209,13 @@ eslint-plugin-jsx-a11y@^6.0.3: emoji-regex "^6.1.0" jsx-ast-utils "^2.0.0" +eslint-plugin-prettier@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.4.0.tgz#85cab0775c6d5e3344ef01e78d960f166fb93aae" + dependencies: + fast-diff "^1.1.1" + jest-docblock "^21.0.0" + eslint-plugin-react@^7.5.1: version "7.5.1" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.5.1.tgz#52e56e8d80c810de158859ef07b880d2f56ee30b" @@ -3512,6 +3519,10 @@ fast-deep-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" +fast-diff@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154" + fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -4916,6 +4927,10 @@ jayson@^2.0.2: json-stringify-safe "5.0.1" lodash "3.6.0" +jest-docblock@^21.0.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" + jest-get-type@^21.2.0: version "21.2.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23"