Skip to content

Commit

Permalink
[BUMP] Update dependency eslint to v9 (admin)
Browse files Browse the repository at this point in the history
  • Loading branch information
pix-service-auto-merge authored Jan 28, 2025
2 parents d36a5cd + d93661b commit fe99e5f
Show file tree
Hide file tree
Showing 44 changed files with 463 additions and 451 deletions.
30 changes: 0 additions & 30 deletions admin/.eslintignore

This file was deleted.

66 changes: 0 additions & 66 deletions admin/.eslintrc.cjs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class ActionsOnUsersRoleInOrganization extends Component {
this.args.organizationMembership.organizationRole = this.selectedNewRole;
await this.args.organizationMembership.save();
this.pixToast.sendSuccessNotification({ message: 'Le rôle du membre a été mis à jour avec succès.' });
} catch (e) {
} catch {
this.pixToast.sendErrorNotification({
message: 'Une erreur est survenue lors de la mise à jour du rôle du membre.',
});
Expand Down Expand Up @@ -69,7 +69,7 @@ export default class ActionsOnUsersRoleInOrganization extends Component {
try {
await this.args.organizationMembership.destroyRecord({ adapterOptions: { disable: true } });
this.pixToast.sendSuccessNotification({ message: 'Le membre a été désactivé avec succès.' });
} catch (e) {
} catch {
this.pixToast.sendErrorNotification({ message: 'Une erreur est survenue lors de la désactivation du membre.' });
} finally {
this.displayConfirm = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default class AnonymizeGarImport extends Component {
}

this.errorResponseHandler.notify(await response.json());
} catch (error) {
} catch {
this.pixToast.sendErrorNotification({ message: this.intl.t('common.notifications.generic-error') });
} finally {
this.isLoading = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class OidcProvidersImport extends Component {
jsonResponse.errors.forEach((error) => {
this.pixToast.sendErrorNotification({ message: error.detail });
});
} catch (error) {
} catch {
this.pixToast.sendErrorNotification({ message: this.intl.t('common.notifications.generic-error') });
} finally {
this.isLoading = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class CertificationScoringConfiguration extends Component {
try {
await adapter.updateCertificationScoringConfiguration(this.certificationScoringConfiguration);
this.pixToast.sendSuccessNotification({ message: 'Configuration enregistrée' });
} catch (_) {
} catch {
this.pixToast.sendErrorNotification({ message: "La config n'a pas pu être ajoutée" });
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class CompetenceScoringConfiguration extends Component {
try {
await adapter.updateCompetenceScoringConfiguration(this.competenceScoringConfiguration);
this.pixToast.sendSuccessNotification({ message: 'Configuration enregistrée' });
} catch (_) {
} catch {
this.pixToast.sendErrorNotification({ message: "La config n'a pas pu être ajoutée" });
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class FlashAlgorithmConfiguration extends Component {
try {
await adapter.createRecord(this.form);
this.pixToast.sendSuccessNotification({ message: 'La configuration a été créée' });
} catch (errorResponse) {
} catch {
this.pixToast.sendErrorNotification({ message: "La configuration n'a pu être créée" });
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class ScoWhitelistConfiguration extends Component {
message: this.intl.t(`pages.administration.certification.sco-whitelist.import.${errorKey}`),
});
}
} catch (error) {
} catch {
this.pixToast.sendErrorNotification({
message: this.intl.t('pages.administration.certification.sco-whitelist.import.error'),
});
Expand All @@ -60,7 +60,7 @@ export default class ScoWhitelistConfiguration extends Component {
const fileName = 'sco-whitelist.csv';
const token = this.session.data.authenticated.access_token;
await this.fileSaver.save({ url, fileName, token });
} catch (error) {
} catch {
this.pixToast.sendErrorNotification({
message: this.intl.t('pages.administration.certification.sco-whitelist.export.error'),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class AddOrganizationFeaturesInBatch extends Component {
} else {
this.errorResponseHandler.notify(await response.json());
}
} catch (error) {
} catch {
this.pixToast.sendErrorNotification({ message: this.intl.t('common.notifications.generic-error') });
} finally {
this.isLoading = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default class LearningContent extends Component {
this.pixToast.sendSuccessNotification({
message: 'La demande de rechargement du cache a bien été prise en compte.',
});
} catch (_) {
} catch {
const genericErrorMessage = this.intl.t('common.notifications.generic-error');
this.pixToast.sendErrorNotification({ message: genericErrorMessage });
}
Expand All @@ -31,7 +31,7 @@ export default class LearningContent extends Component {
this.pixToast.sendSuccessNotification({
message: 'La création de la version du référentiel et le rechargement du cache a bien été prise en compte.',
});
} catch (_) {
} catch {
this.pixToast.sendErrorNotification({ message: 'Une erreur est survenue.' });
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class OrganizationTagsImport extends Component {

this.errorResponseHandler.notify(json);
}
} catch (error) {
} catch {
this.pixToast.sendErrorNotification({ message: this.intl.t('common.notifications.generic-error') });
} finally {
this.isLoading = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default class UpdateOrganizationsInBatch extends Component {
}

this.errorResponseHandler.notify(await response.json());
} catch (error) {
} catch {
this.pixToast.sendErrorNotification({ message: this.intl.t('common.notifications.generic-error') });
} finally {
this.isLoading = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default class CandidateEditModal extends Component {
try {
await this.args.onFormSubmit();
this._initForm();
} catch (_) {
} catch {
this.args.candidate.updateInformation(informationBeforeUpdate);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default class TargetProfileSelectorComponent extends Component {
label: `${attachableTargetProfile.id} - ${attachableTargetProfile.name}`,
value: attachableTargetProfile,
}));
} catch (e) {
} catch {
this.args.onError('Une erreur est survenue lors de la recherche de profils cibles.');
} finally {
this.isAttachableTargetProfilesLoading = false;
Expand Down
2 changes: 1 addition & 1 deletion admin/app/components/organizations/places/delete-modal.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class DeleteModal extends Component {
message: `Le lot de place ${this.args.organizationPlacesLot.reference} a été supprimé.`,
});
this.args.refreshModel();
} catch (error) {
} catch {
this.pixToast.sendErrorNotification({
message: `Le lot de place ${this.args.organizationPlacesLot.reference} n'a pas été supprimé.`,
});
Expand Down
2 changes: 1 addition & 1 deletion admin/app/components/target-profiles/target-profile.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default class TargetProfile extends Component {
await this.args.model.save({ adapterOptions: { markTargetProfileAsSimplifiedAccess: true } });

this.pixToast.sendSuccessNotification({ message: 'Ce profil cible a bien été marqué comme accès simplifié.' });
} catch (responseError) {
} catch {
const genericErrorMessage = this.intl.t('common.notifications.generic-error');
this.pixToast.sendErrorNotification({ message: genericErrorMessage });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class UserDetailPersonalInformationComponent extends Component {
try {
await this.organizationLearnerToDissociate.destroyRecord();
this.pixToast.sendSuccessNotification({ message: DISSOCIATE_SUCCESS_NOTIFICATION_MESSAGE });
} catch (response) {
} catch {
const errorMessage = 'Une erreur est survenue !';
this.pixToast.sendErrorNotification({ message: errorMessage });
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default class CampaignParticipationsController extends Controller {
try {
await campaignParticipation.save();
this.pixToast.sendSuccessNotification({ message: "L'id externe du participant été mis à jour avec succès." });
} catch (_) {
} catch {
this.pixToast.sendErrorNotification({
message: "Une erreur est survenue lors de la mise à jour de l'id externe du participant.",
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default class AuthenticatedCertificationCentersGetInvitationsController e
},
});
this.pixToast.sendSuccessNotification({ message: 'Cette invitation a bien été annulée.' });
} catch (error) {
} catch {
this.pixToast.sendErrorNotification({ message: 'Une erreur s’est produite, veuillez réessayer.' });
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class AuthenticatedCertificationCentersGetTeamController extends
certificationCenterMembership.deleteRecord();
await certificationCenterMembership.save();
this.pixToast.sendSuccessNotification({ message: 'Le membre a correctement été désactivé.' });
} catch (_) {
} catch {
this.pixToast.sendErrorNotification({ message: "Une erreur est survenue, le membre n'a pas été désactivé." });
}
}
Expand All @@ -79,7 +79,7 @@ export default class AuthenticatedCertificationCentersGetTeamController extends
'pages.certification-centers.notifications.success.update-certification-center-membership-role',
),
});
} catch (_) {
} catch {
certificationCenterMembership.rollbackAttributes();
this.pixToast.sendErrorNotification({
message: this.intl.t(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class NewController extends Controller {
await certificationCenter.save();
this.pixToast.sendSuccessNotification({ message: 'Le centre de certification a été créé avec succès.' });
this.router.transitionTo('authenticated.certification-centers.get', certificationCenter.id);
} catch (error) {
} catch {
this.pixToast.sendErrorNotification({ message: 'Une erreur est survenue.' });
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export default class CertificationInformationsController extends Controller {
try {
await this.certification.save({ adapterOptions: { isCertificationCancel: true } });
await this.certification.reload();
} catch (error) {
} catch {
this.pixToast.sendErrorNotification({ message: 'Une erreur est survenue.' });
}

Expand All @@ -174,7 +174,7 @@ export default class CertificationInformationsController extends Controller {
try {
await this.certification.save({ adapterOptions: { isCertificationUncancel: true } });
await this.certification.reload();
} catch (error) {
} catch {
this.pixToast.sendErrorNotification({ message: 'Une erreur est survenue.' });
}

Expand All @@ -186,7 +186,7 @@ export default class CertificationInformationsController extends Controller {
try {
await this.certification.save({ adapterOptions: { isCertificationReject: true } });
await this.certification.reload();
} catch (error) {
} catch {
this.pixToast.sendErrorNotification({ message: 'Une erreur est survenue.' });
}

Expand All @@ -198,7 +198,7 @@ export default class CertificationInformationsController extends Controller {
try {
await this.certification.save({ adapterOptions: { isCertificationUnreject: true } });
await this.certification.reload();
} catch (error) {
} catch {
this.pixToast.sendErrorNotification({ message: 'Une erreur est survenue.' });
}

Expand Down Expand Up @@ -229,7 +229,7 @@ export default class CertificationInformationsController extends Controller {
await this.saveAssessmentResult(commentByJury);
this.pixToast.sendSuccessNotification({ message: 'Le commentaire du jury a bien été enregistré.' });
return true;
} catch (_) {
} catch {
this.pixToast.sendErrorNotification({ message: "Le commentaire du jury n'a pas pu être enregistré." });
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class NeutralizationController extends Controller {
return this.pixToast.sendSuccessNotification({
message: `La question n°${questionIndex} a été neutralisée avec succès.`,
});
} catch (_) {
} catch {
return this.pixToast.sendErrorNotification({
message: `Une erreur est survenue lors de la neutralisation de la question n°${questionIndex}.`,
});
Expand All @@ -44,7 +44,7 @@ export default class NeutralizationController extends Controller {
return this.pixToast.sendSuccessNotification({
message: `La question n°${questionIndex} a été dé-neutralisée avec succès.`,
});
} catch (_) {
} catch {
return this.pixToast.sendErrorNotification({
message: `Une erreur est survenue lors de la dé-neutralisation de la question n°${questionIndex}.`,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default class InvitationsController extends Controller {
},
});
this.pixToast.sendSuccessNotification({ message: `Cette invitation a bien été annulée.` });
} catch (error) {
} catch {
this.pixToast.sendErrorNotification({ message: 'Une erreur s’est produite, veuillez réessayer.' });
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class New extends Controller {
try {
this.model.setProperties(attributes);
await this.model.save({ adapterOptions: { organizationId: this.model.organizationId } });
} catch (errorResponse) {
} catch {
this.pixToast.sendErrorNotification({ message: 'Erreur lors de la création du lot de place.' });
this.errors = this.model.errors;
}
Expand Down
Loading

0 comments on commit fe99e5f

Please sign in to comment.