From ae2980b072b5a8608a38a52e71608f3a8e158513 Mon Sep 17 00:00:00 2001 From: Justus Perlwitz Date: Sat, 28 Jul 2018 02:55:24 +0900 Subject: [PATCH] Add EditorConfig (#1119) * Add EditorConfig file. This allows users with a wide variety of editors to easily code in OpenZeppelin's preferred 2 space indentation code style. See https://editorconfig.org for more information. * Eslint: Always disallow trailing space * Eslint: Error on missing EOL at file end --- .editorconfig | 12 ++++++++++++ .eslintrc | 4 ++-- test/Bounty.test.js | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..b45ed774d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.eslintrc b/.eslintrc index 6ec76ed7d..e88e8355d 100644 --- a/.eslintrc +++ b/.eslintrc @@ -28,7 +28,7 @@ "comma-dangle": ["warn", "always-multiline"], "comma-spacing": ["error", {"before": false, "after": true}], "dot-notation": ["error", {"allowKeywords": true, "allowPattern": ""}], - "eol-last": "warn", + "eol-last": ["error", "always"], "eqeqeq": ["error", "smart"], "generator-star-spacing": ["error", "before"], "indent": ["error", 2], @@ -38,7 +38,7 @@ "no-dupe-keys": "error", "no-mixed-spaces-and-tabs": ["error", "smart-tabs"], "no-redeclare": ["error", {"builtinGlobals": true}], - "no-trailing-spaces": ["error", { "skipBlankLines": true }], + "no-trailing-spaces": ["error", { "skipBlankLines": false }], "no-undef": "error", "no-use-before-define": "off", "no-var": "error", diff --git a/test/Bounty.test.js b/test/Bounty.test.js index 9be57582a..8417e17d1 100644 --- a/test/Bounty.test.js +++ b/test/Bounty.test.js @@ -25,7 +25,7 @@ contract('Bounty', function ([_, owner, researcher]) { it('can set reward', async function () { await sendReward(owner, this.bounty.address, reward); - + const balance = await ethGetBalance(this.bounty.address); balance.should.be.bignumber.eq(reward); });