diff --git a/.eslintrc.js b/.eslintrc.js index a790d60..cb42e16 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -295,6 +295,13 @@ module.exports = { '@microsoft/spfx/no-require-ensure': 2, } }, + { + // Файлы локализации SPFx (loc/*.js) — это AMD-модули: их подключает + // загрузчик страницы через define(), а не бандлер. Без объявления среды + // no-undef считает define необъявленной переменной. + files: ['**/loc/*.js'], + env: { amd: true } + }, { // For unit tests, we can be a little bit less strict. The settings below revise the // defaults specified in the extended configurations, as well as above. diff --git a/src/webparts/requestPortal/shared/approval/approvalList.service.ts b/src/webparts/requestPortal/shared/approval/approvalList.service.ts index 4c115f0..6f038b8 100644 --- a/src/webparts/requestPortal/shared/approval/approvalList.service.ts +++ b/src/webparts/requestPortal/shared/approval/approvalList.service.ts @@ -129,6 +129,7 @@ export class ApprovalListService { toWrite.forEach(({ a, order }, i) => { // void: промис от add() на batched-инстансе нарочно не ждём поштучно — // он разрешится вместе со всеми остальными после execute() ниже. + // eslint-disable-next-line no-void -- без void это «висячий» промис, а no-floating-promises здесь уровня error void batchedList.items.add({ Title: a.position || a.email, [`${FIELDS.approver}Id`]: approverIds[i],