Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add react/jsx-curly-brace-presence rule to .eslintrc, run linter to enforce style #1887

Merged
merged 3 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"prettier/prettier": "error",
"testing-library/no-unnecessary-act": "off",
"testing-library/prefer-find-by": "off",
"curly": "error"
"curly": "error",
"react/jsx-curly-brace-presence": "error"
}
}
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/group/components/GroupList.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const GroupList = () => {
<Typography>First</Typography>
<Typography>
Prefix
<Link component={RouterLink} to={`/groups/new`}>
<Link component={RouterLink} to="/groups/new">
to add
</Link>
.
Expand Down
2 changes: 1 addition & 1 deletion src/landscape/components/LandscapeForm/AffiliationStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const YearSelect = props => {
labelId={`${id}-label`}
id={id}
>
<MenuItem value={''}>
<MenuItem value="">
{t('landscape.form_profile_partnership_year_placeholder')}
</MenuItem>
{_.range(PARTNERSHIP_START_YEAR, new Date().getFullYear() + 1)
Expand Down
2 changes: 1 addition & 1 deletion src/landscape/components/LandscapeForm/KeyInfoStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const CountrySelector = props => {
)
}
>
<MenuItem value={''}>{t('landscape.form_location_select')}</MenuItem>
<MenuItem value="">{t('landscape.form_location_select')}</MenuItem>
{countries.map((country, index) => (
<MenuItem key={index} value={country.code}>
{country.name}
Expand Down
2 changes: 1 addition & 1 deletion src/landscape/components/LandscapeForm/ProfileImageStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ const ProfileImageStep = props => {
onCancel={() => navigate(-1)}
updatedValues={updatedValues}
onNext={setUpdatedLandscape}
nextLabel={'landscape.form_save_label'}
nextLabel="landscape.form_save_label"
saveDisabled={!updatedValues?.profileImage?.result}
/>
</>
Expand Down
4 changes: 2 additions & 2 deletions src/landscape/components/LandscapeList.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const LandscapeList = () => {
<Trans i18nKey="landscape.list_map_help">
<Typography>
Prefix
<Link component={RouterLink} to={`/landscapes/new`}>
<Link component={RouterLink} to="/landscapes/new">
add link
</Link>
or
Expand All @@ -218,7 +218,7 @@ const LandscapeList = () => {
<Typography>First</Typography>
<Typography>
Prefix
<Link component={RouterLink} to={`/landscapes/new`}>
<Link component={RouterLink} to="/landscapes/new">
to add
</Link>
.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const ColumnSelect = props => {
)
}
>
<MenuItem sx={{ color: 'gray.mid2' }} value={''}>
<MenuItem sx={{ color: 'gray.mid2' }} value="">
{t(placeholder)}
</MenuItem>
{options.map((option, index) => (
Expand Down
Loading