diff --git a/.eslintrc.js b/.eslintrc.js index 007fe31..0a8048c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -56,8 +56,12 @@ module.exports = { "beforeClosing": "never" }], "react/jsx-boolean-value": ["error", "never"], - "react/jsx-curly-spacing": ["error", "never"], + "react/jsx-curly-spacing": ["error", { "when": "never", "children": true }], + "react/jsx-equals-spacing": ["error", "never"], + "react/jsx-indent-props": ["error", 2], + "react/jsx-curly-brace-presence": ["error", "never"], "react/jsx-key": ["error", { "checkFragmentShorthand": true }], + "react/jsx-indent": ["error", 2, { checkAttributes: true, indentLogicalExpressions: true }], "quotes": "off", "@typescript-eslint/quotes": ["error", "single", { "allowTemplateLiterals": true, "avoidEscape": true }], diff --git a/src/Journals/ImportDialog.tsx b/src/Journals/ImportDialog.tsx index 03a6f2d..e8c0f86 100644 --- a/src/Journals/ImportDialog.tsx +++ b/src/Journals/ImportDialog.tsx @@ -70,7 +70,7 @@ class ImportDialog extends React.Component { > Import entries from file? - { loading ? + {loading ? : { return ( - { isOwner && + {isOwner && <> { - { currentTab === 0 && + {currentTab === 0 && {itemsView} } - { currentTab === 1 && + {currentTab === 1 && diff --git a/src/Journals/JournalMemberAddDialog.tsx b/src/Journals/JournalMemberAddDialog.tsx index 19edb5e..4c56542 100644 --- a/src/Journals/JournalMemberAddDialog.tsx +++ b/src/Journals/JournalMemberAddDialog.tsx @@ -85,7 +85,7 @@ class JournalMemberAddDialog extends React.PureComponent { onOk={this.onAddRequest} onCancel={onClose} > - { userChosen ? + {userChosen ? : { <> - { members ? + {members ? } onClick={() => this.setState({ addMemberOpen: true })}> Add member @@ -86,7 +86,7 @@ class JournalMembers extends React.PureComponent { Please be advised that a malicious user would potentially be able to retain access to encryption keys. Please refer to the FAQ for more information. - { addMemberOpen && + {addMemberOpen && (sharingAllowed ?

Encryption Password

- { (isNewUser) ? + {(isNewUser) ?

Welcome to EteSync!

diff --git a/src/Pim/PimMain.tsx b/src/Pim/PimMain.tsx index 9338f24..8a4fa8d 100644 --- a/src/Pim/PimMain.tsx +++ b/src/Pim/PimMain.tsx @@ -130,17 +130,17 @@ class PimMain extends React.PureComponent { - { tab === 0 && + {tab === 0 && } - { tab === 1 && + {tab === 1 && } - { tab === 2 && + {tab === 2 && { ) => ( - props.onChange(props.name, event.target.value, props.value.value) - ) - } + onChange={(event: React.ChangeEvent) => ( + props.onChange(props.name, event.target.value, props.value.value) + )} /> ); diff --git a/src/components/Task.tsx b/src/components/Task.tsx index 762cbce..f05eca5 100644 --- a/src/components/Task.tsx +++ b/src/components/Task.tsx @@ -29,10 +29,10 @@ class Task extends React.PureComponent { return ( - { item.startDate && + {item.startDate &&

Start: {formatDate(item.startDate)} {timezone && ({timezone})}
} - { item.dueDate && + {item.dueDate &&
Due: {formatDate(item.dueDate)} {timezone && ({timezone})}
}