Skip to content

Commit

Permalink
chore: fix linting errors and disable rules globally
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasholzer committed Mar 13, 2024
1 parent 20392ec commit 8692793
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.cjs
Expand Up @@ -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,
Expand Down Expand Up @@ -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',
},
},
],
Expand Down
8 changes: 4 additions & 4 deletions src/commands/deploy/deploy.ts
Expand Up @@ -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
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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({
Expand Down
1 change: 0 additions & 1 deletion tests/integration/commands/sites/sites.test.ts
Expand Up @@ -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: () => {},
}))

Expand Down

0 comments on commit 8692793

Please sign in to comment.