From 9a8503f68e2cbd1901fcd88c334ebed515d0ede4 Mon Sep 17 00:00:00 2001 From: Bill Date: Sun, 3 Apr 2022 20:51:59 -0400 Subject: [PATCH] Eslint updates --- .eslintrc.json | 8 +++++++- src/common/layout/LayoutFurniIconImageView.tsx | 2 +- .../messenger-thread/FriendsMessengerThreadGroup.tsx | 2 +- src/components/navigator/NavigatorView.tsx | 2 +- .../views/search/NavigatorSearchResultItemView.tsx | 2 +- .../navigator/views/search/NavigatorSearchResultView.tsx | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index e3bb1ed8..1cd6d95c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,4 +1,5 @@ { + "root": true, "settings": { "react": { "pragma": "React", @@ -32,8 +33,13 @@ "@typescript-eslint/indent": [ "error", 4, { "SwitchCase": 1 } ], "array-bracket-spacing": [ "error", "always" ], "brace-style": [ "error", "allman" ], + "template-curly-spacing": [ "error", "always" ], + "no-multi-spaces": [ "error" ], "react/prop-types": [ "off" ], - "object-curly-spacing": [ "error", "always" ], + "jsx-quotes": [ "error" ], + "react/jsx-curly-spacing": [ "error", "always" ], + "react/jsx-equals-spacing": [ "error" ], + "@typescript-eslint/object-curly-spacing": [ "error", "always", { "arraysInObjects": true, "objectsInObjects": false } ], "@typescript-eslint/ban-types": [ "error", { diff --git a/src/common/layout/LayoutFurniIconImageView.tsx b/src/common/layout/LayoutFurniIconImageView.tsx index 0329d43f..21bb7601 100644 --- a/src/common/layout/LayoutFurniIconImageView.tsx +++ b/src/common/layout/LayoutFurniIconImageView.tsx @@ -30,5 +30,5 @@ export const LayoutFurniIconImageView: FC = props return imageUrl; } - return ; + return ; } diff --git a/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadGroup.tsx b/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadGroup.tsx index 2135ed10..9ff19499 100644 --- a/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadGroup.tsx +++ b/src/components/friends/views/messenger/messenger-thread/FriendsMessengerThreadGroup.tsx @@ -57,7 +57,7 @@ export const FriendsMessengerThreadGroup: FC<{ thread: MessengerThread, group: M } - + { isOwnChat && GetSessionDataManager().userName } { !isOwnChat && (groupChatData ? groupChatData.username : thread.participant.name) } diff --git a/src/components/navigator/NavigatorView.tsx b/src/components/navigator/NavigatorView.tsx index 3f57fecd..d54c885d 100644 --- a/src/components/navigator/NavigatorView.tsx +++ b/src/components/navigator/NavigatorView.tsx @@ -225,7 +225,7 @@ export const NavigatorView: FC<{}> = props => - + { isLoading && } { !isCreatorOpen && diff --git a/src/components/navigator/views/search/NavigatorSearchResultItemView.tsx b/src/components/navigator/views/search/NavigatorSearchResultItemView.tsx index eec33e81..790bc1c3 100644 --- a/src/components/navigator/views/search/NavigatorSearchResultItemView.tsx +++ b/src/components/navigator/views/search/NavigatorSearchResultItemView.tsx @@ -91,7 +91,7 @@ export const NavigatorSearchResultItemView: FC } - + {roomData.roomName} diff --git a/src/components/navigator/views/search/NavigatorSearchResultView.tsx b/src/components/navigator/views/search/NavigatorSearchResultView.tsx index e8563912..122d0a90 100644 --- a/src/components/navigator/views/search/NavigatorSearchResultView.tsx +++ b/src/components/navigator/views/search/NavigatorSearchResultView.tsx @@ -61,7 +61,7 @@ export const NavigatorSearchResultView: FC = pro { gridHasTwoColumns ? {searchResult.rooms.length > 0 && searchResult.rooms.map((room, index) => ) } - : + : { searchResult.rooms.length > 0 && searchResult.rooms.map((room, index) => ) } }