diff --git a/backend/.eslintrc.js b/backend/.eslintrc.js index 5b22df96..dc508bc8 100644 --- a/backend/.eslintrc.js +++ b/backend/.eslintrc.js @@ -17,7 +17,15 @@ module.exports = { 'linebreak-style': ['error', 'unix'], 'quotes': ['error', 'single'], 'semi': ['error', 'always'], - 'no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }], + // varsIgnorePattern + ignoreRestSiblings cover the "omit fields via rest + // spread" idiom (e.g. adminEvents/helpers.js pulling password hashes out + // of ...rest), which is intentional and would otherwise need a disable + // comment at every occurrence. + 'no-unused-vars': ['error', { + 'argsIgnorePattern': '^_', + 'varsIgnorePattern': '^_', + 'ignoreRestSiblings': true + }], 'no-console': ['warn', { allow: ['warn', 'error'] }] } }; diff --git a/backend/src/routes/adminEvents/helpers.js b/backend/src/routes/adminEvents/helpers.js index 83d2df14..be10a8cc 100644 --- a/backend/src/routes/adminEvents/helpers.js +++ b/backend/src/routes/adminEvents/helpers.js @@ -177,7 +177,6 @@ const mapEventForApi = (event) => { customer_email, customer_phone, // Bound only to exclude the secrets from `...rest` — never read. - // eslint-disable-next-line no-unused-vars -- rest-sibling omission password_hash: _ph, client_password_hash: _cph, ...rest } = event;