From d82af50d37b608dd896182ca45bf4c3903f5835b Mon Sep 17 00:00:00 2001 From: Aarni Halinen Date: Fri, 5 Jul 2019 00:42:39 +0300 Subject: [PATCH] Tweak ESLint rules --- .eslintrc.json | 23 ++++++++++------------- src/pages/FrontPage/FrontPage.tsx | 4 ++-- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 34963e6..18d2876 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,7 +5,7 @@ "node": true }, "extends": [ - "airbnb" + "eslint:recommended" ], "globals": { "Atomics": "readonly", @@ -25,9 +25,7 @@ "@typescript-eslint" ], "rules": { - "arrow-body-style": "off", - "arrow-parens": "off", - "camelcase": "off", + "arrow-parens": ["off", "always"], "comma-dangle": [ "error", { @@ -39,19 +37,22 @@ } ], "consistent-return": "warn", - "dot-notation": "warn", "global-require": "warn", "linebreak-style": "off", "max-len": [ "off", 160 ], - "no-console": "off", + "no-console": "warn", "no-extra-boolean-cast": "warn", - "no-param-reassign": "warn", + "no-param-reassign": "error", "no-shadow": "warn", - "no-unused-vars": "off", + "no-unused-vars": "warn", "no-useless-constructor": "warn", + "object-curly-newline": "error", + "prefer-destructuring": "warn", + "prefer-template": "error", + "quote-props": ["error", "consistent"], "quotes": [ "error", "double" @@ -62,10 +63,6 @@ "import/no-extraneous-dependencies": "off", "import/newline-after-import": "off", "import/prefer-default-export": "off", - "prefer-destructuring": "off", - "prefer-template": "off", - "object-curly-newline": "off", - "quote-props": "off", "jsx-a11y/anchor-is-valid": "off", "jsx-a11y/alt-text": "off", "jsx-a11y/click-events-have-key-events": "off", @@ -87,4 +84,4 @@ "react/prefer-stateless-function": "off", "react/self-closing-comp": "off" } -} +} \ No newline at end of file diff --git a/src/pages/FrontPage/FrontPage.tsx b/src/pages/FrontPage/FrontPage.tsx index 0a88046..7efaaea 100644 --- a/src/pages/FrontPage/FrontPage.tsx +++ b/src/pages/FrontPage/FrontPage.tsx @@ -143,7 +143,7 @@ class FrontPage extends React.Component { title={event.title} start_time={event.start_time} text={event.description} - link={"/events/" + event.id} + link={`/events/${event.id}`} image={BeerImage} button={