From f9bf2f5edbb7795d1cf9a956e3a1c9e63ffc5d34 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Mon, 17 Feb 2025 18:37:38 +0100 Subject: [PATCH] ESLint: Don't ignore specific appsec file (#5280) --- eslint.config.mjs | 1 - packages/dd-trace/src/appsec/blocked_templates.js | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 9060d303218..2ac7bbc98fc 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -45,7 +45,6 @@ export default [ 'integration-tests/debugger/target-app/source-map-support/typescript.js', // Generated 'integration-tests/esbuild/out.js', // Generated 'integration-tests/esbuild/aws-sdk-out.js', // Generated - 'packages/dd-trace/src/appsec/blocked_templates.js', // TODO Why is this ignored? 'packages/dd-trace/src/payload-tagging/jsonpath-plus.js' // Vendored ] }, diff --git a/packages/dd-trace/src/appsec/blocked_templates.js b/packages/dd-trace/src/appsec/blocked_templates.js index 3017d4de9db..6a90c034ee2 100644 --- a/packages/dd-trace/src/appsec/blocked_templates.js +++ b/packages/dd-trace/src/appsec/blocked_templates.js @@ -1,11 +1,11 @@ /* eslint-disable @stylistic/js/max-len */ 'use strict' -const html = `You've been blocked

Sorry, you cannot access this page. Please contact the customer service team.

` +const html = 'You\'ve been blocked

Sorry, you cannot access this page. Please contact the customer service team.

' -const json = `{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}]}` +const json = '{"errors":[{"title":"You\'ve been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}]}' -const graphqlJson = `{"errors":[{"message":"You've been blocked","extensions":{"detail":"Sorry, you cannot perform this operation. Please contact the customer service team. Security provided by Datadog."}}]}` +const graphqlJson = '{"errors":[{"message":"You\'ve been blocked","extensions":{"detail":"Sorry, you cannot perform this operation. Please contact the customer service team. Security provided by Datadog."}}]}' module.exports = { html,