Skip to content

Commit b0bec89

Browse files
committed
ESLint: Require 'use strict' header
1 parent cc489e5 commit b0bec89

File tree

343 files changed

+649
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

343 files changed

+649
-14
lines changed

benchmark/e2e/express-helloworld-manyroutes/app.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const crypto = require('crypto')
24
const app = require('express')()
35

benchmark/sirun/appsec-iast/insecure-bank.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const http = require('http')
24
const app = require('/opt/insecure-bank-js/app') // eslint-disable-line import/no-absolute-path
35

benchmark/sirun/appsec/insecure-bank.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const http = require('http')
24
const app = require('/opt/insecure-bank-js/app') // eslint-disable-line import/no-absolute-path
35

benchmark/sirun/encoding/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const {
24
ENCODER_VERSION
35
} = process.env

benchmark/sirun/gc.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { createHistogram, PerformanceObserver } = require('perf_hooks')
24
if (createHistogram) {
35
const StatsD = require('./statsd')

benchmark/sirun/scope/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const {
24
DD_TRACE_SCOPE,
35
COUNT

benchmark/sirun/spans/spans.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const tracer = require('../../..').init()
24

35
tracer._tracer._processor.process = function process (span) {

benchmark/sirun/strip-unwanted-results.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env node
2+
'use strict'
23

34
const fs = require('fs')
45
const path = require('path')

ci/cypress/after-run.js

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
'use strict'
2+
13
module.exports = require('../../packages/datadog-plugin-cypress/src/after-run')

ci/cypress/after-spec.js

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
'use strict'
2+
13
module.exports = require('../../packages/datadog-plugin-cypress/src/after-spec')

ci/cypress/plugin.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
require('../init')
24

35
module.exports = require('../../packages/datadog-plugin-cypress/src/plugin')

ci/cypress/support.js

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
'use strict'
2+
13
require('../../packages/datadog-plugin-cypress/src/support')

ci/init.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
/* eslint-disable no-console */
24
const tracer = require('../packages/dd-trace')
35
const { isTrue, isFalse } = require('../packages/dd-trace/src/util')

eslint.config.mjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ export default [
107107
'no-prototype-builtins': 'off', // Override (turned on by @eslint/js/recommnded)
108108
'no-unused-expressions': 'off', // Override (turned on by standard)
109109
'no-var': 'error', // Override (set to warn in standard)
110-
'require-await': 'error'
110+
'require-await': 'error',
111+
strict: 'error'
111112
}
112113
},
113114
{

integration-tests/appsec/esm-app/custom-noop-hooks.mjs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict'
2-
31
function dummyOperation (a) {
42
return a + 'should have ' + 'dummy operation to be rewritten' + ' without crashing'
53
}

integration-tests/appsec/esm-app/index.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict'
21
/* eslint n/no-unsupported-features/node-builtins: ['error', { ignores: ['module.register'] }] */
32

43
import childProcess from 'node:child_process'

integration-tests/appsec/esm-app/worker-dep.mjs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict'
2-
31
function dummyOperation (a) {
42
return a + 'dummy operation with concat in worker-dep'
53
}

integration-tests/appsec/multer.spec.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict'
2+
23
/* eslint n/no-unsupported-features/node-builtins: ['error', { allowExperimental: true }] */
34

45
const { assert } = require('chai')

integration-tests/ci-visibility-intake.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const express = require('express')
24
const bodyParser = require('body-parser')
35
const msgpack = require('@msgpack/msgpack')

integration-tests/ci-visibility/automatic-log-submission-cucumber/support/logger.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { createLogger, format, transports } = require('winston')
24

35
module.exports = createLogger({

integration-tests/ci-visibility/automatic-log-submission-cucumber/support/steps.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { expect } = require('chai')
24
const { When, Then } = require('@cucumber/cucumber')
35

integration-tests/ci-visibility/automatic-log-submission-cucumber/support/sum.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const logger = require('./logger')
24

35
module.exports = function (a, b) {

integration-tests/ci-visibility/automatic-log-submission/automatic-log-submission-test.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { expect } = require('chai')
24

35
const logger = require('./logger')

integration-tests/ci-visibility/automatic-log-submission/config-jest.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
module.exports = {
24
projects: [],
35
testPathIgnorePatterns: ['/node_modules/'],

integration-tests/ci-visibility/automatic-log-submission/logger.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { createLogger, format, transports } = require('winston')
24

35
module.exports = createLogger({

integration-tests/ci-visibility/automatic-log-submission/sum.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const logger = require('./logger')
24

35
module.exports = function (a, b) {

integration-tests/ci-visibility/dynamic-instrumentation/dependency.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
module.exports = function (a, b) {
24
const localVariable = 2
35
if (a > 10) {

integration-tests/ci-visibility/dynamic-instrumentation/test-hit-breakpoint.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const sum = require('./dependency')
24
const { expect } = require('chai')
35

integration-tests/ci-visibility/dynamic-instrumentation/test-not-hit-breakpoint.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const sum = require('./dependency')
24
const { expect } = require('chai')
35

integration-tests/ci-visibility/features-di/support/steps.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const assert = require('assert')
24
const { When, Then } = require('@cucumber/cucumber')
35
const sum = require('./sum')

integration-tests/ci-visibility/features-di/support/sum.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
function funSum (a, b) {
24
const localVariable = 2
35
if (a > 10) {

integration-tests/ci-visibility/features-flaky/support/steps.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const assert = require('assert')
24
const { When, Then } = require('@cucumber/cucumber')
35

integration-tests/ci-visibility/features-retry/support/steps.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const assert = require('assert')
24
const { When, Then } = require('@cucumber/cucumber')
35

integration-tests/ci-visibility/features-selenium/support/steps.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { expect } = require('chai')
24
const { By, Builder } = require('selenium-webdriver')
35
const chrome = require('selenium-webdriver/chrome')

integration-tests/ci-visibility/features/support/steps.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const assert = require('assert')
24
const { When, Then, Before } = require('@cucumber/cucumber')
35
class Greeter {

integration-tests/ci-visibility/jest-custom-test-sequencer.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const Sequencer = require('@jest/test-sequencer').default
24

35
// From example in https://jestjs.io/docs/configuration#testsequencer-string

integration-tests/ci-visibility/jest-flaky/flaky-fails.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
describe('test-flaky-test-retries', () => {
24
it('can retry failed tests', () => {
35
expect(1).toEqual(2)

integration-tests/ci-visibility/jest-flaky/flaky-passes.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
let counter = 0
24

35
describe('test-flaky-test-retries', () => {

integration-tests/ci-visibility/jestEnvironmentBadInit.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
require('dd-trace').init({
24
service: 'dd-trace-bad-init'
35
})

integration-tests/ci-visibility/office-addin-mock/dependency.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
require('office-addin-mock')
24

35
function sum (a, b) {

integration-tests/ci-visibility/office-addin-mock/test.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const sum = require('./dependency')
24
const { expect } = require('chai')
35

integration-tests/ci-visibility/playwright-tests-automatic-retry/automatic-retry-test.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { test, expect } = require('@playwright/test')
24

35
test.beforeEach(async ({ page }) => {

integration-tests/ci-visibility/playwright-tests-error/before-all-timeout-test.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { test, expect } = require('@playwright/test')
24

35
test.beforeEach(async ({ page }) => {

integration-tests/ci-visibility/playwright-tests-max-failures/failing-test-and-another-test.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { test, expect } = require('@playwright/test')
24

35
test.beforeEach(async ({ page }) => {

integration-tests/ci-visibility/playwright-tests/landing-page-test.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { test, expect } = require('@playwright/test')
24

35
test.beforeEach(async ({ page }) => {

integration-tests/ci-visibility/playwright-tests/skipped-suite-test.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { test, expect } = require('@playwright/test')
24

35
test.beforeEach(async ({ page }) => {

integration-tests/ci-visibility/playwright-tests/todo-list-page-test.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { test, expect } = require('@playwright/test')
24

35
test.beforeEach(async ({ page }) => {

integration-tests/ci-visibility/run-jest-bad-init.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const jest = require('jest')
24

35
const options = {

integration-tests/ci-visibility/run-jest.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const jest = require('jest')
24

35
const options = {

integration-tests/ci-visibility/run-mocha.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const Mocha = require('mocha')
24

35
const mocha = new Mocha({

integration-tests/ci-visibility/run-workerpool.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const workerpool = require('workerpool')
24
const pool = workerpool.pool({ workerType: 'process' })
35

integration-tests/ci-visibility/sharding-test/sharding-test-1.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { expect } = require('chai')
24

35
describe('sharding test 1', () => {

integration-tests/ci-visibility/sharding-test/sharding-test-2.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { expect } = require('chai')
24

35
describe('sharding test 2', () => {

integration-tests/ci-visibility/sharding-test/sharding-test-3.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { expect } = require('chai')
24

35
describe('sharding test 3', () => {

integration-tests/ci-visibility/sharding-test/sharding-test-4.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { expect } = require('chai')
24

35
describe('sharding test 4', () => {

integration-tests/ci-visibility/sharding-test/sharding-test-5.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { expect } = require('chai')
24

35
describe('sharding test 5', () => {

integration-tests/ci-visibility/subproject/cypress.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
module.exports = {
24
defaultCommandTimeout: 100,
35
e2e: {
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
'use strict'
2+
13
module.exports = require('dd-trace/ci/cypress/plugin')
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
'use strict'
2+
13
require('dd-trace/ci/cypress/support')
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
module.exports = function (a, b) {
24
return a + b
35
}

integration-tests/ci-visibility/subproject/features/support/steps.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const assert = require('assert')
24
const { When, Then } = require('@cucumber/cucumber')
35
class Greeter {

integration-tests/ci-visibility/subproject/playwright-tests/landing-page-test.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { test, expect } = require('@playwright/test')
24

35
test.beforeEach(async ({ page }) => {

integration-tests/ci-visibility/subproject/playwright.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
// Playwright config file for integration tests
24
const { devices } = require('@playwright/test')
35

integration-tests/ci-visibility/subproject/subproject-test.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const dependency = require('./dependency')
24

35
describe('subproject-test', () => {

integration-tests/ci-visibility/test-early-flake-detection/jest-snapshot.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
describe('test', () => {
24
it('can do snapshot', () => {
35
expect(1 + 2).toMatchSnapshot()

integration-tests/ci-visibility/test-early-flake-detection/mocha-parameterized.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { expect } = require('chai')
24
const forEach = require('mocha-each')
35

integration-tests/ci-visibility/test-early-flake-detection/occasionally-failing-test.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const { expect } = require('chai')
24

35
let globalCounter = 0

0 commit comments

Comments
 (0)