From 9586ac89334f656957fb4f7ec5304c2eaa85e7df Mon Sep 17 00:00:00 2001 From: Honza Pokorny Date: Fri, 14 Jul 2017 13:11:41 -0300 Subject: [PATCH] Use eslint-plugin-prettier when linting Instead of using the hacky `prettier` command, add a new rule to eslintrc to accomplish the same thing. This improves error reporting. Change-Id: If37f39b45bf4e4246fa73c3b4f130f5a10fb86d9 --- .eslintrc | 2 ++ bin/run_lint.sh | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index 57d67cf1..80aaa1f8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -9,6 +9,7 @@ "no-unneeded-ternary": 1, "no-unused-vars": [1, {"vars": "local", "args": "none"}], "radix": 0, + "prettier/prettier": ["error", {"singleQuote": true}], "react/jsx-boolean-value": [1, "never"], "react/jsx-no-duplicate-props": 1, "react/jsx-no-undef": 1, @@ -45,6 +46,7 @@ "experimentalObjectRestSpread": true }, "plugins": [ + "prettier", "react" ], "parser": "babel-eslint" diff --git a/bin/run_lint.sh b/bin/run_lint.sh index 37bd96df..2171bf27 100755 --- a/bin/run_lint.sh +++ b/bin/run_lint.sh @@ -17,5 +17,4 @@ set -e eslint --max-warnings 0 src -prettier --single-quote --list-different 'src/**/*.js' ./bin/verify-languages.js