From 1f02ab5c692801709221d4e27f3001a40cb4e8ae Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Sun, 17 Jan 2021 02:41:24 +0300 Subject: Updates Switch Statement Indent Changes the switch statement indentation level to 1 in the eslint config, and updates files accordingly. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- .eslintrc.json | 5 ++- src/components/InputTypes/index.tsx | 48 ++++++++++++++-------------- src/components/Question.tsx | 64 ++++++++++++++++++------------------- src/pages/FormPage.tsx | 4 +-- 4 files changed, 62 insertions(+), 59 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 5c7c77a..7785702 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -23,7 +23,10 @@ "rules": { "indent": [ "error", - 4 + 4, + { + "SwitchCase": 1 + } ], "linebreak-style": [ "error", diff --git a/src/components/InputTypes/index.tsx b/src/components/InputTypes/index.tsx index d75fbdc..5154f9c 100644 --- a/src/components/InputTypes/index.tsx +++ b/src/components/InputTypes/index.tsx @@ -33,37 +33,37 @@ export default function create_input({ question, public_state }: QuestionProp, h /* eslint-disable react/react-in-jsx-scope */ switch (question.type) { - case QuestionType.TextArea: - result =