Skip to content

Commit 8566bcd

Browse files
committed
fix(certif): fix lint issues
1 parent 99b6564 commit 8566bcd

File tree

23 files changed

+1137
-396
lines changed

23 files changed

+1137
-396
lines changed

certif/app/components/issue-report-modal/add-issue-report-modal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export default class AddIssueReportModal extends Component {
194194
try {
195195
await issueReportToSave.save();
196196
this.args.closeModal();
197-
} catch (err) {
197+
} catch {
198198
issueReportToSave.rollbackAttributes();
199199
this.showIssueReportSubmitError = true;
200200
}

certif/app/components/issue-report-modal/issue-reports-modal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default class IssueReportsModal extends Component {
1010
this.showDeletionError = false;
1111
try {
1212
await this.args.onClickDeleteIssueReport(issueReport);
13-
} catch (err) {
13+
} catch {
1414
this.showDeletionError = true;
1515
}
1616
}

certif/app/components/members-list.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default class MembersList extends Component {
5959
});
6060
await this.session.waitBeforeInvalidation(5000);
6161
this.session.invalidate();
62-
} catch (error) {
62+
} catch {
6363
this.pixToast.sendErrorNotification({
6464
message: this.intl.t('pages.team.members.notifications.leave-certification-center.error'),
6565
});
@@ -78,7 +78,7 @@ export default class MembersList extends Component {
7878
memberLastName: this.removingMember.lastName,
7979
}),
8080
});
81-
} catch (e) {
81+
} catch {
8282
this.pixToast.sendErrorNotification({
8383
message: this.intl.t('pages.team.members.notifications.remove-membership.error'),
8484
});
@@ -96,7 +96,7 @@ export default class MembersList extends Component {
9696
message: this.intl.t('pages.team.members.notifications.change-member-role.success'),
9797
});
9898
this.isChangeMemberRoleModalOpen = false;
99-
} catch (_) {
99+
} catch {
100100
this.member.rollbackAttributes();
101101
this.pixToast.sendErrorNotification({
102102
message: this.intl.t('pages.team.members.notifications.change-member-role.error'),

certif/app/components/session-supervising/candidate-in-list.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export default class CandidateInList extends Component {
163163
await adapter.dismissLiveAlert(this.args.sessionId, this.args.candidate.userId);
164164
this.isLiveAlertValidated = false;
165165
this.displayedModal = Modals.HandledLiveAlertSuccess;
166-
} catch (error) {
166+
} catch {
167167
const errorMessage = this.intl.t(
168168
'pages.session-supervising.candidate-in-list.handle-live-alert-modal.error-handling.miscellaneous',
169169
);
@@ -209,7 +209,7 @@ export default class CandidateInList extends Component {
209209
htmlSafe: true,
210210
}),
211211
});
212-
} catch (error) {
212+
} catch {
213213
this.pixToast.sendErrorNotification({
214214
message: this.intl.t(
215215
'pages.session-supervising.candidate-in-list.handle-live-alert-modal.error-handling.miscellaneous',
@@ -265,7 +265,7 @@ export default class CandidateInList extends Component {
265265
lastName: this.args.candidate.lastName,
266266
}),
267267
});
268-
} catch (error) {
268+
} catch {
269269
this.pixToast.sendErrorNotification({
270270
message: this.intl.t('pages.session-supervising.candidate-in-list.test-end-modal.error', {
271271
firstName: this.args.candidate.firstName,

certif/app/components/sessions/session-details/enrolled-candidates/index.gjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export default class EnrolledCandidates extends Component {
139139
message: this.intl.t('pages.sessions.detail.candidates.edit-modal.notifications.success'),
140140
});
141141
this.closeEditCandidateModal();
142-
} catch (e) {
142+
} catch {
143143
this.pixToast.sendErrorNotification({
144144
message: this.intl.t('pages.sessions.detail.candidates.edit-modal.notifications.error'),
145145
});

certif/app/components/sessions/session-details/index.gjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default class SessionDetails extends Component {
2222
try {
2323
const token = this.session.data.authenticated.access_token;
2424
await this.fileSaver.save({ url: this.args.model.sessionManagement.urlToDownloadSupervisorKitPdf, token });
25-
} catch (err) {
25+
} catch {
2626
this.pixToast.sendErrorNotification({ message: this.intl.t('common.api-error-messages.internal-server-error') });
2727
}
2828
}
@@ -32,7 +32,7 @@ export default class SessionDetails extends Component {
3232
try {
3333
const token = this.session.data.authenticated.access_token;
3434
await this.fileSaver.save({ url: this.args.model.session.urlToDownloadAttendanceSheet, token });
35-
} catch (err) {
35+
} catch {
3636
this.pixToast.sendErrorNotification({ message: this.intl.t('common.api-error-messages.internal-server-error') });
3737
}
3838
}

certif/app/controllers/authenticated/sessions/details/certification-candidates.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default class CertificationCandidatesController extends Controller {
4242
try {
4343
const token = this.session.data.authenticated.access_token;
4444
await this.fileSaver.save({ url: this.model.session.urlToDownloadCandidatesImportTemplate, token });
45-
} catch (err) {
45+
} catch {
4646
this.pixToast.sendErrorNotification({ message: this.intl.t('common.api-error-messages.internal-server-error') });
4747
}
4848
}

certif/app/controllers/authenticated/sessions/import.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default class ImportController extends Controller {
107107
candidatesCount: this.candidatesCount,
108108
}),
109109
});
110-
} catch (error) {
110+
} catch {
111111
this.isImportStepOne = true;
112112
this.pixToast.sendErrorNotification({ message: this.intl.t('common.api-error-messages.internal-server-error') });
113113
}

certif/app/controllers/authenticated/team/list.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default class AuthenticatedTeamListController extends Controller {
5959
this.shouldShowRefererSelectionModal = !this.shouldShowRefererSelectionModal;
6060
this.send('refreshModel');
6161
this.pixToast.sendSuccessNotification({ message: this.intl.t('pages.team.notifications.success') });
62-
} catch (responseError) {
62+
} catch {
6363
this.pixToast.sendErrorNotification({
6464
message: this.intl.t('common.api-error-messages.internal-server-error'),
6565
});

certif/app/controllers/authenticated/team/list/invitations.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default class AuthenticatedTeamListInvitationsController extends Controll
1414
this.pixToast.sendSuccessNotification({
1515
message: this.intl.t('pages.team-invitations.notifications.success.invitation-cancelled'),
1616
});
17-
} catch (error) {
17+
} catch {
1818
this.pixToast.sendErrorNotification({ message: this.intl.t('common.api-error-messages.internal-server-error') });
1919
}
2020
}
@@ -30,7 +30,7 @@ export default class AuthenticatedTeamListInvitationsController extends Controll
3030
this.pixToast.sendSuccessNotification({
3131
message: this.intl.t('pages.team-invitations.notifications.success.invitation-resent'),
3232
});
33-
} catch (error) {
33+
} catch {
3434
this.pixToast.sendErrorNotification({ message: this.intl.t('common.api-error-messages.internal-server-error') });
3535
} finally {
3636
setTimeout(

certif/app/controllers/session-supervising.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default class SessionSupervisingController extends Controller {
3030

3131
try {
3232
await this.fileSaver.save({ url, token });
33-
} catch (error) {
33+
} catch {
3434
this.pixToast.sendErrorNotification({ message: this.intl.t('common.api-error-messages.internal-server-error') });
3535
}
3636
}

certif/app/controllers/terms-of-service.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default class TermsOfServiceController extends Controller {
1919
});
2020
this.currentUser.certificationPointOfContact.pixCertifTermsOfServiceAccepted = true;
2121
this.router.transitionTo('authenticated.sessions');
22-
} catch (errorResponse) {
22+
} catch {
2323
this.pixToast.sendErrorNotification({ message: this.intl.t('common.api-error-messages.internal-server-error') });
2424
}
2525
}

certif/app/models/subscription.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ export default class SubscriptionModel extends Model {
2525
const matchingHabilitation = centerHabilitations.find(
2626
(habilitation) => habilitation.id === this.complementaryCertificationId,
2727
);
28-
return matchingHabilitation?.key === COMPLEMENTARY_KEYS.CLEA ?? false;
28+
return matchingHabilitation?.key === COMPLEMENTARY_KEYS.CLEA;
2929
}
3030
}

certif/app/routes/authenticated/sessions/finalize.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default class SessionsFinalizeRoute extends Route {
2020
await session.certificationReports;
2121

2222
return session;
23-
} catch (responseError) {
23+
} catch {
2424
this.pixToast.sendErrorNotification({ message: this.intl.t('common.api-error-messages.internal-server-error') });
2525
this.router.transitionTo('authenticated.sessions.details', session_id);
2626
}

certif/app/services/current-user.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default class CurrentUserService extends Service {
2525
);
2626
await this._updateCurrentUserAccessToCertificationCenter();
2727
this.isAdminOfCurrentCertificationCenter = this.currentCertificationCenterMembership?.isAdmin;
28-
} catch (error) {
28+
} catch {
2929
this.certificationPointOfContact = null;
3030
this.currentAllowedCertificationCenterAccess = null;
3131
this.currentCertificationCenterMembership = null;

certif/config/environment.js

-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ module.exports = function (environment) {
137137
// Warn for unknown feature toggles
138138
_.each(process.env, (value, key) => {
139139
if (key.startsWith('FT_') && _.indexOf(ACTIVE_FEATURE_TOGGLES, key) === -1) {
140-
// eslint-disable-next-line no-console
141140
console.warn(`Unknown feature toggle ${key}. Please remove it from your environment variables.`);
142141
}
143142
});

certif/eslint.config.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export default [
5050
globals: {
5151
...globals.browser,
5252
...globals.node,
53+
server: true,
5354
},
5455
parser: babelParser,
5556
parserOptions: {

0 commit comments

Comments
 (0)