Add and apply eslint rule space-before-blocks
authorFrank Bessou <frank.bessou@logilab.fr>
Wed, 14 Jun 2017 13:53:14 +0200
changeset 232 f8c873a819d4
parent 231 f811f0442a5c
child 233 1c01a26ea4b8
Add and apply eslint rule space-before-blocks
.eslintrc.yml
src/components/Form.js
--- a/.eslintrc.yml	Wed Jun 14 11:06:21 2017 +0200
+++ b/.eslintrc.yml	Wed Jun 14 13:53:14 2017 +0200
@@ -43,6 +43,7 @@
   react/jsx-indent-props: [2, 4]
   react/no-multi-comp: off
   semi: ["error", "always"]
+  space-before-blocks: ["error", "always"]
   space-infix-ops: ["error"]
   space-before-function-paren: ["error", "never"]
 plugins:
--- a/src/components/Form.js	Wed Jun 14 11:06:21 2017 +0200
+++ b/src/components/Form.js	Wed Jun 14 13:53:14 2017 +0200
@@ -17,7 +17,7 @@
                 obj.enumNames = enumNames;
                 obj.enum = enumValues;
                 delete obj.oneOf;
-            } catch (error){
+            } catch (error) {
                 // Can't be resolved as enum
             }
         }