From a163f41352f08e72728a42d1a249fcda89f96ac0 Mon Sep 17 00:00:00 2001 From: Angel Mendez Date: Wed, 6 Dec 2023 12:48:05 -0600 Subject: [PATCH] refactor: enable and fix no-underscore-dangle related to #1891 --- .eslintrc.cjs | 1 - tests/integration/commands/deploy/deploy.test.js | 1 + tests/integration/commands/dev/dev-miscellaneous.test.js | 1 + tests/integration/commands/dev/dev.zisi.test.js | 1 + .../commands/functions-with-args/functions-with-args.test.js | 1 + tests/integration/frameworks/eleventy.test.js | 1 + tests/integration/utils/cli-path.js | 1 + 7 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 8d77d8d49f6..47edb8cf6fb 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -23,7 +23,6 @@ module.exports = { // TODO: remove, so those rules are enabled complexity: 0, 'no-inline-comments': 'off', - 'no-underscore-dangle': 'off', 'func-style': 'off', 'max-depth': 0, 'max-lines': 0, diff --git a/tests/integration/commands/deploy/deploy.test.js b/tests/integration/commands/deploy/deploy.test.js index 4460d6eef80..286c41a2105 100644 --- a/tests/integration/commands/deploy/deploy.test.js +++ b/tests/integration/commands/deploy/deploy.test.js @@ -10,6 +10,7 @@ import { callCli } from '../../utils/call-cli.js' import { createLiveTestSite, generateSiteName } from '../../utils/create-live-test-site.js' import { withSiteBuilder } from '../../utils/site-builder.ts' +// eslint-disable-next-line no-underscore-dangle const __dirname = path.dirname(fileURLToPath(import.meta.url)) const SITE_NAME = generateSiteName('netlify-test-deploy-') diff --git a/tests/integration/commands/dev/dev-miscellaneous.test.js b/tests/integration/commands/dev/dev-miscellaneous.test.js index 37d25b7fe70..56e2104346b 100644 --- a/tests/integration/commands/dev/dev-miscellaneous.test.js +++ b/tests/integration/commands/dev/dev-miscellaneous.test.js @@ -13,6 +13,7 @@ import { withMockApi } from '../../utils/mock-api.js' import { pause } from '../../utils/pause.js' import { withSiteBuilder } from '../../utils/site-builder.ts' +// eslint-disable-next-line no-underscore-dangle const __dirname = path.dirname(fileURLToPath(import.meta.url)) const JWT_EXPIRY = 1_893_456_000 diff --git a/tests/integration/commands/dev/dev.zisi.test.js b/tests/integration/commands/dev/dev.zisi.test.js index 7cbc9026548..16730639afa 100644 --- a/tests/integration/commands/dev/dev.zisi.test.js +++ b/tests/integration/commands/dev/dev.zisi.test.js @@ -14,6 +14,7 @@ import { withDevServer } from '../../utils/dev-server.ts' import { withMockApi } from '../../utils/mock-api.js' import { withSiteBuilder } from '../../utils/site-builder.ts' +// eslint-disable-next-line no-underscore-dangle const __dirname = path.dirname(fileURLToPath(import.meta.url)) const testMatrix = [{ args: [] }] diff --git a/tests/integration/commands/functions-with-args/functions-with-args.test.js b/tests/integration/commands/functions-with-args/functions-with-args.test.js index 84fed497917..634216ef029 100644 --- a/tests/integration/commands/functions-with-args/functions-with-args.test.js +++ b/tests/integration/commands/functions-with-args/functions-with-args.test.js @@ -9,6 +9,7 @@ import got from '../../utils/got.js' import { pause } from '../../utils/pause.js' import { withSiteBuilder } from '../../utils/site-builder.ts' +// eslint-disable-next-line no-underscore-dangle const __dirname = path.dirname(fileURLToPath(import.meta.url)) const testMatrix = [{ args: [] }, { args: ['esbuild'] }] diff --git a/tests/integration/frameworks/eleventy.test.js b/tests/integration/frameworks/eleventy.test.js index d596bd4f52b..f7a6325449e 100644 --- a/tests/integration/frameworks/eleventy.test.js +++ b/tests/integration/frameworks/eleventy.test.js @@ -8,6 +8,7 @@ import { afterAll, beforeAll, describe, test } from 'vitest' import { clientIP, originalIP } from '../../lib/local-ip.js' import { startDevServer } from '../utils/dev-server.ts' +// eslint-disable-next-line no-underscore-dangle const __dirname = path.dirname(fileURLToPath(import.meta.url)) const context = {} diff --git a/tests/integration/utils/cli-path.js b/tests/integration/utils/cli-path.js index ac6a5fa3c10..c627b3cd0ba 100644 --- a/tests/integration/utils/cli-path.js +++ b/tests/integration/utils/cli-path.js @@ -1,6 +1,7 @@ import path from 'path' import { fileURLToPath } from 'url' +// eslint-disable-next-line no-underscore-dangle const __dirname = path.dirname(fileURLToPath(import.meta.url)) export const cliPath = path.resolve(__dirname, '../../../bin/run.js')