Skip to content

Commit bb765c0

Browse files
committed
Activate eslint no-extra-boolean-cast
Enables the eslint rule no-extra-boolean-cast.
1 parent 7efaffa commit bb765c0

30 files changed

Lines changed: 53 additions & 54 deletions

eslint.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export default [
1717
"indent": "off",
1818
"keyword-spacing": "off",
1919
"max-len": "off",
20-
"no-extra-boolean-cast": "off",
2120
"no-tabs": "off",
2221
"no-unused-expressions": "off",
2322
"object-curly-spacing": "off",

src/components/events/partials/EventActionCell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const EventActionCell = ({
5252
};
5353

5454
const onClickSeriesDetails = async () => {
55-
if (!!row.series) {
55+
if (row.series) {
5656
await dispatch(fetchSeriesDetailsMetadata(row.series.id));
5757
await dispatch(fetchSeriesDetailsAcls(row.series.id));
5858
await dispatch(fetchSeriesDetailsTheme(row.series.id));

src/components/events/partials/EventsDateCell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const EventsDateCell = ({
2525
// Filter with value of current cell
2626
const addFilter = async (date: string) => {
2727
let filter = filterMap.find(({ name }) => name === "startDate");
28-
if (!!filter) {
28+
if (filter) {
2929
let startDate = new Date(date);
3030
startDate.setHours(0);
3131
startDate.setMinutes(0);

src/components/events/partials/EventsLocationCell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const EventsLocationCell = ({
2222
// Filter with value of current cell
2323
const addFilter = (location: string) => {
2424
let filter = filterMap.find(({ name }) => name === "location");
25-
if (!!filter) {
25+
if (filter) {
2626
dispatch(editFilterValue({filterName: filter.name, value: location}));
2727
dispatch(fetchEvents());
2828
dispatch(loadEventsIntoTable());

src/components/events/partials/EventsPresentersCell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const EventsPresentersCell = ({
2424
let filter = filterMap.find(
2525
({ name }) => name === "presentersBibliographic"
2626
);
27-
if (!!filter) {
27+
if (filter) {
2828
await dispatch(editFilterValue({filterName: filter.name, value: presenter}));
2929
await dispatch(fetchEvents());
3030
dispatch(loadEventsIntoTable());

src/components/events/partials/EventsSeriesCell.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ const EventsSeriesCell = ({
2222
// Filter with value of current cell
2323
const addFilter = async (seriesId: string) => {
2424
let filter = filterMap.find(({ name }) => name === "series");
25-
if (!!filter) {
25+
if (filter) {
2626
await dispatch(editFilterValue({filterName: filter.name, value: seriesId}));
2727
await dispatch(fetchEvents());
2828
dispatch(loadEventsIntoTable());
2929
}
3030
};
3131

3232
return (
33-
!!row.series ? (
33+
row.series ? (
3434
// Link template for series of event
3535
<IconButton
3636
callback={() => row.series

src/components/events/partials/EventsTechnicalDateCell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const EventsTechnicalDateCell = ({
2525
// Filter with value of current cell
2626
const addFilter = async (date: string) => {
2727
let filter = filterMap.find(({ name }) => name === "technicalStart");
28-
if (!!filter) {
28+
if (filter) {
2929
await dispatch(editFilterValue({filterName: filter.name, value: date + "/" + date}));
3030
await dispatch(fetchEvents());
3131
dispatch(loadEventsIntoTable());

src/components/events/partials/ModalTabsAndPages/DetailsTobiraTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const DetailsTobiraTab = ({ kind, id }: DetailsTobiraTabProps) => {
115115
}
116116

117117
const openSubTab = async (tabType: TobiraTabHierarchy, currentPage?: TobiraPage) => {
118-
if (!!currentPage) {
118+
if (currentPage) {
119119
const breadcrumbs = getBreadcrumbs(currentPage);
120120
// Breadcrumbs always include at least the homepage, so the length is at least 1.
121121
const hostPage = breadcrumbs[breadcrumbs.length - 1];

src/components/events/partials/ModalTabsAndPages/EventDetailsAssetMediaDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const EventDetailsAssetMediaDetails = () => {
101101
}
102102
</td>
103103
<td>
104-
{!!media.duration
104+
{media.duration
105105
? formatDuration(media.duration)
106106
: null}
107107
</td>

src/components/events/partials/ModalTabsAndPages/EventDetailsPublicationTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const EventDetailsPublicationTab = ({
4949
<li key={key}>
5050
<div className="v-container">
5151
<span className="icon-container">
52-
{!!publication.icon ? (
52+
{publication.icon ? (
5353
<i
5454
className="custom-icon"
5555
style={{

0 commit comments

Comments
 (0)