Skip to content

Commit

Permalink
♻️ (eslint) disallow unnecessary curly braces (actualbudget#2111)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatissJanis authored Dec 22, 2023
1 parent 03e943f commit 73d281b
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ module.exports = {
// ],

'no-var': 'warn',
'react/jsx-curly-brace-presence': 'warn',
'object-shorthand': ['warn', 'properties'],

'import/extensions': [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type FiltersButtonProps = {

function FiltersButton({ onClick }: FiltersButtonProps) {
return (
<Button type="bare" onClick={onClick} title={'Filters'}>
<Button type="bare" onClick={onClick} title="Filters">
<SettingsSliderAlternate
style={{ width: 16, height: 16, marginRight: 5 }}
/>{' '}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ export default function ReportTableHeader({
minWidth: 85,
...styles.tnum,
}}
value={'Deposits'}
value="Deposits"
width="flex"
/>
<Cell
style={{
minWidth: 85,
...styles.tnum,
}}
value={'Payments'}
value="Payments"
width="flex"
/>
</>
Expand All @@ -91,15 +91,15 @@ export default function ReportTableHeader({
minWidth: 85,
...styles.tnum,
}}
value={'Totals'}
value="Totals"
width="flex"
/>
<Cell
style={{
minWidth: 85,
...styles.tnum,
}}
value={'Average'}
value="Average"
width="flex"
/>
{scrollWidth > 0 && <Cell width={scrollWidth} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function ReportTableTotals({
minWidth: 125,
...styles.tnum,
}}
value={'Totals'}
value="Totals"
width="flex"
/>
{mode === 'time'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function SaveReportMenuButton() {
flexShrink: 0,
}}
>
{'Unsaved Report'}&nbsp;
Unsaved Report&nbsp;
</Text>
<ExpandArrow width={8} height={8} style={{ marginRight: 5 }} />
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function BarGraph({
))}
</Bar>
{yAxis === 'date' && balanceTypeOp === 'totalTotals' && (
<Bar dataKey={'totalDebts'} stackId="a">
<Bar dataKey="totalDebts" stackId="a">
{data[splitData].map((entry, index) => (
<Cell
key={`cell-${index}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const CustomTooltip = ({ active, payload, label }: CustomTooltipProps) => {
);
})}
<AlignedText
left={'Total'}
left="Total"
right={amountToCurrency(sumTotals)}
style={{
fontWeight: 600,
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/2111.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [MatissJanis]
---

eslint: disallow unnecessary curly braces

0 comments on commit 73d281b

Please sign in to comment.