Skip to content

Commit 72ac58b

Browse files
committed
chore: lint .js and .mjs files (in addition to the existing .ts file linting)
In open-telemetry#2567 support was added to eslint.config.js for linting .js and .mjs files -- before it only supported .ts files. Originally this was added to support linting examples/... which includes many .js files. This change enables linting of .js and .mjs files in the rest of the repo. Refs: open-telemetry#2891
1 parent 74ddb1e commit 72ac58b

File tree

67 files changed

+134
-134
lines changed

Some content is hidden

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

67 files changed

+134
-134
lines changed

incubator/opentelemetry-sampler-aws-xray/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
"scripts": {
3131
"setup:dev": "nx run-many -t compile -p @opentelemetry/sampler-aws-xray",
3232
"compile": "tsc -p .",
33-
"lint": "eslint . --ext .ts",
34-
"lint:fix": "eslint . --ext .ts --fix",
33+
"lint": "eslint . --ext=ts,js,mjs",
34+
"lint:fix": "eslint . --ext=ts,js,mjs --fix",
3535
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
3636
"prepublishOnly": "npm run compile",
3737
"tdd": "npm run test -- --watch-extensions ts --watch",

packages/auto-configuration-propagators/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"clean": "rimraf build/*",
2323
"setup:dev": "nx run-many -t compile -p @opentelemetry/auto-configuration-propagators",
2424
"compile": "tsc -p .",
25-
"lint": "eslint . --ext .ts",
26-
"lint:fix": "eslint . --ext .ts --fix",
25+
"lint": "eslint . --ext=ts,js,mjs",
26+
"lint:fix": "eslint . --ext=ts,js,mjs --fix",
2727
"prepublishOnly": "npm run compile",
2828
"tdd": "npm run test -- --watch-extensions ts --watch",
2929
"test": "nyc mocha 'test/**/*.ts'",

packages/auto-instrumentations-node/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"clean": "rimraf build/*",
2727
"setup:dev": "nx run-many -t compile -p @opentelemetry/auto-instrumentations-node",
2828
"compile": "tsc -p .",
29-
"lint": "eslint . --ext .ts",
30-
"lint:fix": "eslint . --ext .ts --fix",
29+
"lint": "eslint . --ext=ts,js,mjs",
30+
"lint:fix": "eslint . --ext=ts,js,mjs --fix",
3131
"prepublishOnly": "npm run compile",
3232
"tdd": "yarn test -- --watch-extensions ts --watch",
3333
"test": "nyc mocha 'test/**/*.ts'",

packages/auto-instrumentations-web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
2525
"setup:dev": "nx run-many -t compile -p @opentelemetry/auto-instrumentations-web",
2626
"compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
27-
"lint": "eslint . --ext .ts",
28-
"lint:fix": "eslint . --ext .ts --fix",
27+
"lint": "eslint . --ext=ts,js,mjs",
28+
"lint:fix": "eslint . --ext=ts,js,mjs --fix",
2929
"prepublishOnly": "npm run compile",
3030
"test:browser": "nyc karma start --single-run",
3131
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json"

packages/baggage-log-record-processor/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"clean": "rimraf build/*",
1414
"setup:dev": "nx run-many -t compile -p @opentelemetry/baggage-log-record-processor",
1515
"compile": "tsc -p .",
16-
"lint": "eslint . --ext .ts",
17-
"lint:fix": "eslint . --ext .ts --fix",
16+
"lint": "eslint . --ext=ts,js,mjs",
17+
"lint:fix": "eslint . --ext=ts,js,mjs --fix",
1818
"prewatch": "npm run precompile",
1919
"prepublishOnly": "npm run compile",
2020
"tdd": "npm run test -- --watch-extensions ts --watch",

packages/baggage-span-processor/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"clean": "rimraf build/*",
1414
"setup:dev": "nx run-many -t compile -p @opentelemetry/baggage-span-processor",
1515
"compile": "tsc -p .",
16-
"lint": "eslint . --ext .ts",
17-
"lint:fix": "eslint . --ext .ts --fix",
16+
"lint": "eslint . --ext=ts,js,mjs",
17+
"lint:fix": "eslint . --ext=ts,js,mjs --fix",
1818
"prepublishOnly": "npm run compile",
1919
"tdd": "npm run test -- --watch-extensions ts --watch",
2020
"test": "nyc mocha test/**/*.test.ts",

packages/contrib-test-utils/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"access": "public"
99
},
1010
"scripts": {
11-
"lint": "eslint . --ext .ts",
12-
"lint:fix": "eslint . --ext .ts --fix",
11+
"lint": "eslint . --ext=ts,js,mjs",
12+
"lint:fix": "eslint . --ext=ts,js,mjs --fix",
1313
"setup:dev": "nx run-many -t compile -p @opentelemetry/contrib-test-utils",
1414
"compile": "tsc -p .",
1515
"prepublishOnly": "npm run compile",

packages/host-metrics/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"clean": "rimraf build/*",
1414
"setup:dev": "nx run-many -t compile -p @opentelemetry/host-metrics",
1515
"compile": "tsc -p .",
16-
"lint": "eslint . --ext .ts",
17-
"lint:fix": "eslint . --ext .ts --fix",
16+
"lint": "eslint . --ext=ts,js,mjs",
17+
"lint:fix": "eslint . --ext=ts,js,mjs --fix",
1818
"prepublishOnly": "npm run compile",
1919
"tdd": "npm run test -- --watch-extensions ts --watch",
2020
"test": "nyc mocha test/**/*.test.ts",

packages/id-generator-aws-xray/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
2525
"test": "nyc mocha test/**/*.test.ts",
2626
"test:browser": "nyc karma start --single-run",
27-
"lint": "eslint . --ext .ts",
28-
"lint:fix": "eslint . --ext .ts --fix",
27+
"lint": "eslint . --ext=ts,js,mjs",
28+
"lint:fix": "eslint . --ext=ts,js,mjs --fix",
2929
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json",
3030
"prepublishOnly": "npm run compile"
3131
},

packages/instrumentation-amqplib/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"clean": "rimraf build/*",
3434
"setup:dev": "nx run-many -t compile -p @opentelemetry/instrumentation-amqplib",
3535
"compile": "tsc -p .",
36-
"lint": "eslint . --ext .ts",
37-
"lint:fix": "eslint . --ext .ts --fix",
36+
"lint": "eslint . --ext=ts,js,mjs",
37+
"lint:fix": "eslint . --ext=ts,js,mjs --fix",
3838
"lint:readme": "node ../../scripts/lint-readme.js",
3939
"prepublishOnly": "npm run compile",
4040
"tdd": "npm run test -- --watch-extensions ts --watch",

0 commit comments

Comments
 (0)