diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 1011b414bef..0a0378304b8 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -43,6 +43,8 @@ module.exports = { // TODO: harmonize with filename snake_case in other Netlify Dev projects 'unicorn/filename-case': [2, { case: 'kebabCase' }], 'max-params': 'off', + 'no-empty-function': 'off', + '@typescript-eslint/no-empty-function': 'off', }, overrides: [ ...overrides, @@ -137,6 +139,7 @@ module.exports = { rules: { '@typescript-eslint/no-non-null-assertion': 'off', '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-empty-function': 'off', }, }, ], diff --git a/src/commands/deploy/deploy.ts b/src/commands/deploy/deploy.ts index 7a69e10248b..c07919ff4b7 100644 --- a/src/commands/deploy/deploy.ts +++ b/src/commands/deploy/deploy.ts @@ -119,7 +119,9 @@ const validateDeployFolder = async (deployFolder: string) => { } catch (error_) { if (error_ && typeof error_ === 'object' && 'code' in error_) { if (error_.code === 'ENOENT') { - return error(`The deploy directory "${deployFolder}" has not been found. Did you forget to run 'netlify build'?`) + return error( + `The deploy directory "${deployFolder}" has not been found. Did you forget to run 'netlify build'?`, + ) } // Improve the message of permission errors @@ -361,7 +363,6 @@ const uploadDeployBlobs = async ({ silent: boolean siteId: string }) => { - // eslint-disable-next-line @typescript-eslint/no-empty-function const statusCb = silent ? () => {} : deployProgressCb() statusCb({ @@ -493,7 +494,7 @@ const runDeploy = async ({ config, fnDir: functionDirectories, functionsConfig, - // eslint-disable-next-line @typescript-eslint/no-empty-function + statusCb: silent ? () => {} : deployProgressCb(), deployTimeout, syncFileLimit: SYNC_FILE_LIMIT, @@ -575,7 +576,6 @@ const bundleEdgeFunctions = async (options, command: BaseCommand) => { // eslint-disable-next-line n/prefer-global/process, unicorn/prefer-set-has const argv = process.argv.slice(2) const statusCb = - // eslint-disable-next-line @typescript-eslint/no-empty-function options.silent || argv.includes('--json') || argv.includes('--silent') ? () => {} : deployProgressCb() statusCb({ diff --git a/tests/integration/commands/sites/sites.test.ts b/tests/integration/commands/sites/sites.test.ts index 1727e3f702b..f0dfbc0a605 100644 --- a/tests/integration/commands/sites/sites.test.ts +++ b/tests/integration/commands/sites/sites.test.ts @@ -13,7 +13,6 @@ import { getEnvironmentVariables, withMockApi } from '../../utils/mock-api.js' vi.mock('../../../../src/utils/command-helpers.js', async () => ({ ...(await vi.importActual('../../../../src/utils/command-helpers.js')), - // eslint-disable-next-line @typescript-eslint/no-empty-function log: () => {}, }))