diff --git a/eslint.config.js b/eslint.config.js index 0cde1b40db..a85da46290 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -88,6 +88,12 @@ module.exports = { parserOptions: { sourceType: 'module', } + }, + { + files: ["test/**/*.js", "test/**/*.mjs"], + rules: { + "no-unused-vars": "off", + } } ] }; diff --git a/incubator/opentelemetry-sampler-aws-xray/package.json b/incubator/opentelemetry-sampler-aws-xray/package.json index 70b9409204..9d7d6c06d9 100644 --- a/incubator/opentelemetry-sampler-aws-xray/package.json +++ b/incubator/opentelemetry-sampler-aws-xray/package.json @@ -31,8 +31,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/sampler-aws-xray", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc mocha 'test/**/*.test.ts'", diff --git a/packages/auto-configuration-propagators/package.json b/packages/auto-configuration-propagators/package.json index 372c6b1f95..7fbf1764fe 100644 --- a/packages/auto-configuration-propagators/package.json +++ b/packages/auto-configuration-propagators/package.json @@ -22,8 +22,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/auto-configuration-propagators", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc mocha 'test/**/*.ts'", diff --git a/packages/auto-instrumentations-node/package.json b/packages/auto-instrumentations-node/package.json index b9852ddfec..f592495fb4 100644 --- a/packages/auto-instrumentations-node/package.json +++ b/packages/auto-instrumentations-node/package.json @@ -26,8 +26,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/auto-instrumentations-node", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "tdd": "yarn test -- --watch-extensions ts --watch", "test": "nyc mocha 'test/**/*.ts'", diff --git a/packages/auto-instrumentations-node/test/test-app/app.js b/packages/auto-instrumentations-node/test/test-app/app.js index 1057acbce3..7a5ea6bf23 100644 --- a/packages/auto-instrumentations-node/test/test-app/app.js +++ b/packages/auto-instrumentations-node/test/test-app/app.js @@ -21,7 +21,7 @@ const options = { hostname: 'example.com', port: 80, path: '/', - method: 'GET' + method: 'GET', }; const req = http.request(options); diff --git a/packages/auto-instrumentations-web/karma.conf.js b/packages/auto-instrumentations-web/karma.conf.js index edcd9f055f..25e450db5d 100644 --- a/packages/auto-instrumentations-web/karma.conf.js +++ b/packages/auto-instrumentations-web/karma.conf.js @@ -1,11 +1,11 @@ -/*! - * Copyright 2020, OpenTelemetry Authors +/* + * Copyright The OpenTelemetry Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,8 +17,10 @@ const karmaWebpackConfig = require('../../karma.webpack'); const karmaBaseConfig = require('../../karma.base'); -module.exports = (config) => { - config.set(Object.assign({}, karmaBaseConfig, { - webpack: karmaWebpackConfig - })) +module.exports = config => { + config.set( + Object.assign({}, karmaBaseConfig, { + webpack: karmaWebpackConfig, + }) + ); }; diff --git a/packages/auto-instrumentations-web/package.json b/packages/auto-instrumentations-web/package.json index 4d514615c8..05c68ef523 100644 --- a/packages/auto-instrumentations-web/package.json +++ b/packages/auto-instrumentations-web/package.json @@ -24,8 +24,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/auto-instrumentations-web", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "test:browser": "nyc karma start --single-run", "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json" diff --git a/packages/baggage-log-record-processor/.eslintrc.js b/packages/baggage-log-record-processor/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/baggage-log-record-processor/.eslintrc.js +++ b/packages/baggage-log-record-processor/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/baggage-log-record-processor/package.json b/packages/baggage-log-record-processor/package.json index 935a02f2b7..2dcf965709 100644 --- a/packages/baggage-log-record-processor/package.json +++ b/packages/baggage-log-record-processor/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/baggage-log-record-processor", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/baggage-span-processor/.eslintrc.js b/packages/baggage-span-processor/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/baggage-span-processor/.eslintrc.js +++ b/packages/baggage-span-processor/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/baggage-span-processor/package.json b/packages/baggage-span-processor/package.json index 1185085b76..3e0caa8642 100644 --- a/packages/baggage-span-processor/package.json +++ b/packages/baggage-span-processor/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/baggage-span-processor", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc mocha test/**/*.test.ts", diff --git a/packages/contrib-test-utils/.eslintrc.js b/packages/contrib-test-utils/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/contrib-test-utils/.eslintrc.js +++ b/packages/contrib-test-utils/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/contrib-test-utils/package.json b/packages/contrib-test-utils/package.json index 7bc829bbfe..5956f4c813 100644 --- a/packages/contrib-test-utils/package.json +++ b/packages/contrib-test-utils/package.json @@ -10,8 +10,8 @@ "scripts": { "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/contrib-test-utils", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "watch": "tsc -w" }, diff --git a/packages/host-metrics/.eslintrc.js b/packages/host-metrics/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/host-metrics/.eslintrc.js +++ b/packages/host-metrics/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/host-metrics/package.json b/packages/host-metrics/package.json index b09d9ab39b..93b20b22b9 100644 --- a/packages/host-metrics/package.json +++ b/packages/host-metrics/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/host-metrics", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc mocha test/**/*.test.ts", diff --git a/packages/id-generator-aws-xray/.eslintrc.js b/packages/id-generator-aws-xray/.eslintrc.js index 9dfe62f9b8..dd021c00fb 100644 --- a/packages/id-generator-aws-xray/.eslintrc.js +++ b/packages/id-generator-aws-xray/.eslintrc.js @@ -1,9 +1,24 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "commonjs": true, - "node": true, - "browser": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + commonjs: true, + node: true, + browser: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/id-generator-aws-xray/karma.conf.js b/packages/id-generator-aws-xray/karma.conf.js index f1a1f3a7e8..25e450db5d 100644 --- a/packages/id-generator-aws-xray/karma.conf.js +++ b/packages/id-generator-aws-xray/karma.conf.js @@ -1,11 +1,11 @@ -/*! +/* * Copyright The OpenTelemetry Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/packages/id-generator-aws-xray/package.json b/packages/id-generator-aws-xray/package.json index 2eafe26867..baf1d35696 100644 --- a/packages/id-generator-aws-xray/package.json +++ b/packages/id-generator-aws-xray/package.json @@ -24,8 +24,8 @@ "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/id-generator-aws-xray", "test": "nyc mocha test/**/*.test.ts", "test:browser": "nyc karma start --single-run", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json", "prepublishOnly": "npm run compile" }, diff --git a/packages/instrumentation-amqplib/.eslintrc.js b/packages/instrumentation-amqplib/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-amqplib/.eslintrc.js +++ b/packages/instrumentation-amqplib/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-amqplib/package.json b/packages/instrumentation-amqplib/package.json index 8e041334a4..d199009f8f 100644 --- a/packages/instrumentation-amqplib/package.json +++ b/packages/instrumentation-amqplib/package.json @@ -33,8 +33,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-amqplib", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/instrumentation-aws-lambda/.eslintrc.js b/packages/instrumentation-aws-lambda/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-aws-lambda/.eslintrc.js +++ b/packages/instrumentation-aws-lambda/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-aws-lambda/package.json b/packages/instrumentation-aws-lambda/package.json index 8d12fccb82..b32ea183be 100644 --- a/packages/instrumentation-aws-lambda/package.json +++ b/packages/instrumentation-aws-lambda/package.json @@ -13,8 +13,8 @@ "test": "nyc mocha 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", "clean": "rimraf build/*", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "version:update": "node ../../scripts/version-update.js", diff --git a/packages/instrumentation-aws-lambda/test/lambda-test/async.js b/packages/instrumentation-aws-lambda/test/lambda-test/async.js index c6c2e529cf..400fa7ed94 100644 --- a/packages/instrumentation-aws-lambda/test/lambda-test/async.js +++ b/packages/instrumentation-aws-lambda/test/lambda-test/async.js @@ -21,17 +21,19 @@ exports.handler = async function (event, context) { exports.error = async function (event, context) { throw new Error('handler error'); -} +}; exports.stringerror = async function (event, context) { throw 'handler error'; -} +}; exports.context = async function (event, context) { return api.trace.getSpan(api.context.active()).spanContext().traceId; }; exports.handler_return_baggage = async function (event, context) { - const [baggageEntryKey, baggageEntryValue] = api.propagation.getBaggage(api.context.active()).getAllEntries()[0]; + const [baggageEntryKey, baggageEntryValue] = api.propagation + .getBaggage(api.context.active()) + .getAllEntries()[0]; return `${baggageEntryKey}=${baggageEntryValue.value}`; -} +}; diff --git a/packages/instrumentation-aws-lambda/test/lambda-test/sync.js b/packages/instrumentation-aws-lambda/test/lambda-test/sync.js index e9f38d8ea7..521c5f6ea4 100644 --- a/packages/instrumentation-aws-lambda/test/lambda-test/sync.js +++ b/packages/instrumentation-aws-lambda/test/lambda-test/sync.js @@ -21,19 +21,19 @@ exports.handler = function (event, context, callback) { exports.error = function (event, context, callback) { throw new Error('handler error'); -} +}; exports.callbackerror = function (event, context, callback) { callback(new Error('handler error')); -} +}; exports.stringerror = function (event, context, callback) { throw 'handler error'; -} +}; exports.callbackstringerror = function (event, context, callback) { callback('handler error'); -} +}; exports.context = function (event, context, callback) { callback(null, api.trace.getSpan(api.context.active()).spanContext().traceId); diff --git a/packages/instrumentation-aws-sdk/.eslintrc.js b/packages/instrumentation-aws-sdk/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-aws-sdk/.eslintrc.js +++ b/packages/instrumentation-aws-sdk/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-aws-sdk/package.json b/packages/instrumentation-aws-sdk/package.json index 1b839c21f9..ef61d4ef95 100644 --- a/packages/instrumentation-aws-sdk/package.json +++ b/packages/instrumentation-aws-sdk/package.json @@ -34,8 +34,8 @@ "clean": "rimraf build/*", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-aws-sdk", "compile": "tsc -p .", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/instrumentation-bunyan/.eslintrc.js b/packages/instrumentation-bunyan/.eslintrc.js index d9630e1c33..912e1cf251 100644 --- a/packages/instrumentation-bunyan/.eslintrc.js +++ b/packages/instrumentation-bunyan/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js'), -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-bunyan/package.json b/packages/instrumentation-bunyan/package.json index 286f536493..bbbe4e1634 100644 --- a/packages/instrumentation-bunyan/package.json +++ b/packages/instrumentation-bunyan/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-bunyan", "compile": "tsc -p .", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc mocha 'test/**/*.test.ts'", diff --git a/packages/instrumentation-cassandra-driver/.eslintrc.js b/packages/instrumentation-cassandra-driver/.eslintrc.js index d9630e1c33..912e1cf251 100644 --- a/packages/instrumentation-cassandra-driver/.eslintrc.js +++ b/packages/instrumentation-cassandra-driver/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js'), -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-cassandra-driver/package.json b/packages/instrumentation-cassandra-driver/package.json index 38b0325d4f..bcdcaa8f4c 100644 --- a/packages/instrumentation-cassandra-driver/package.json +++ b/packages/instrumentation-cassandra-driver/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-cassandra-driver", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/instrumentation-connect/.eslintrc.js b/packages/instrumentation-connect/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-connect/.eslintrc.js +++ b/packages/instrumentation-connect/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-connect/package.json b/packages/instrumentation-connect/package.json index 5ac4985ac8..ac1840d91a 100644 --- a/packages/instrumentation-connect/package.json +++ b/packages/instrumentation-connect/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-connect", "compile": "tsc -p .", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "test": "nyc mocha 'test/**/*.test.ts'", diff --git a/packages/instrumentation-cucumber/.eslintrc.js b/packages/instrumentation-cucumber/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-cucumber/.eslintrc.js +++ b/packages/instrumentation-cucumber/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-cucumber/package.json b/packages/instrumentation-cucumber/package.json index 729292882f..1bcf77c710 100644 --- a/packages/instrumentation-cucumber/package.json +++ b/packages/instrumentation-cucumber/package.json @@ -14,8 +14,8 @@ "test-all-versions": "tav", "tdd": "npm run test -- --watch-extensions ts --watch", "clean": "rimraf build/*", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "version:update": "node ../../scripts/version-update.js", diff --git a/packages/instrumentation-dataloader/.eslintrc.js b/packages/instrumentation-dataloader/.eslintrc.js index d9630e1c33..912e1cf251 100644 --- a/packages/instrumentation-dataloader/.eslintrc.js +++ b/packages/instrumentation-dataloader/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js'), -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-dataloader/package.json b/packages/instrumentation-dataloader/package.json index c0e7204157..952b454717 100644 --- a/packages/instrumentation-dataloader/package.json +++ b/packages/instrumentation-dataloader/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-dataloader", "compile": "tsc -p .", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc mocha 'test/**/*.test.ts'", diff --git a/packages/instrumentation-dataloader/test/fixtures/use-dataloader-default-import.mjs b/packages/instrumentation-dataloader/test/fixtures/use-dataloader-default-import.mjs index 64dc34635a..41ddc71414 100644 --- a/packages/instrumentation-dataloader/test/fixtures/use-dataloader-default-import.mjs +++ b/packages/instrumentation-dataloader/test/fixtures/use-dataloader-default-import.mjs @@ -25,15 +25,13 @@ import { DataloaderInstrumentation } from '../../build/src/index.js'; const sdk = createTestNodeSdk({ serviceName: 'use-dataloader', - instrumentations: [ - new DataloaderInstrumentation() - ] -}) + instrumentations: [new DataloaderInstrumentation()], +}); sdk.start(); import Dataloader from 'dataloader'; -function getMd5HashFromIdx(idx ) { +function getMd5HashFromIdx(idx) { return crypto.createHash('md5').update(String(idx)).digest('hex'); } const dataloader = new Dataloader( @@ -45,7 +43,7 @@ const dataloader = new Dataloader( ); const tracer = trace.getTracer(); -await tracer.startActiveSpan('manual', async (span) => { +await tracer.startActiveSpan('manual', async span => { await dataloader.load(1); span.end(); }); diff --git a/packages/instrumentation-dns/.eslintrc.js b/packages/instrumentation-dns/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-dns/.eslintrc.js +++ b/packages/instrumentation-dns/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-dns/package.json b/packages/instrumentation-dns/package.json index 6d523d5298..ee74b5cb28 100644 --- a/packages/instrumentation-dns/package.json +++ b/packages/instrumentation-dns/package.json @@ -13,8 +13,8 @@ "test": "nyc mocha 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", "clean": "rimraf build/*", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "version:update": "node ../../scripts/version-update.js", "lint:readme": "node ../../scripts/lint-readme", diff --git a/packages/instrumentation-document-load/.eslintrc.js b/packages/instrumentation-document-load/.eslintrc.js index 01b8d09740..498e35290d 100644 --- a/packages/instrumentation-document-load/.eslintrc.js +++ b/packages/instrumentation-document-load/.eslintrc.js @@ -1,9 +1,24 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "commonjs": true, - "browser": true, - "jquery": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + commonjs: true, + browser: true, + jquery: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-document-load/package.json b/packages/instrumentation-document-load/package.json index 881de34469..47d17c016f 100644 --- a/packages/instrumentation-document-load/package.json +++ b/packages/instrumentation-document-load/package.json @@ -13,8 +13,8 @@ }, "scripts": { "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "version:update": "node ../../scripts/version-update.js", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-document-load", diff --git a/packages/instrumentation-document-load/web-test-runner.config.mjs b/packages/instrumentation-document-load/web-test-runner.config.mjs index 1989a756fd..7130bd21fa 100644 --- a/packages/instrumentation-document-load/web-test-runner.config.mjs +++ b/packages/instrumentation-document-load/web-test-runner.config.mjs @@ -1,11 +1,11 @@ -/*! +/* * Copyright The OpenTelemetry Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/packages/instrumentation-express/.eslintrc.js b/packages/instrumentation-express/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-express/.eslintrc.js +++ b/packages/instrumentation-express/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-express/package.json b/packages/instrumentation-express/package.json index 12fa876011..e70cce5799 100644 --- a/packages/instrumentation-express/package.json +++ b/packages/instrumentation-express/package.json @@ -14,8 +14,8 @@ "test": "nyc mocha 'test/**/*.test.ts'", "tdd": "yarn test -- --watch-extensions ts --watch", "clean": "rimraf build/*", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "version:update": "node ../../scripts/version-update.js", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-express", diff --git a/packages/instrumentation-express/test/fixtures/use-express-nested-router.mjs b/packages/instrumentation-express/test/fixtures/use-express-nested-router.mjs index 6f86eb18e5..f4624cb8b0 100644 --- a/packages/instrumentation-express/test/fixtures/use-express-nested-router.mjs +++ b/packages/instrumentation-express/test/fixtures/use-express-nested-router.mjs @@ -22,11 +22,8 @@ import { ExpressInstrumentation } from '../../build/src/index.js'; const sdk = createTestNodeSdk({ serviceName: 'use-express-nested', - instrumentations: [ - new HttpInstrumentation(), - new ExpressInstrumentation() - ] -}) + instrumentations: [new HttpInstrumentation(), new ExpressInstrumentation()], +}); sdk.start(); @@ -75,9 +72,8 @@ const server = http.createServer(app); await new Promise(resolve => server.listen(0, resolve)); const port = server.address().port; - await new Promise(resolve => { - http.get(`http://localhost:${port}/api/user/123/posts/321`, (res) => { + http.get(`http://localhost:${port}/api/user/123/posts/321`, res => { res.resume(); res.on('end', data => { resolve(data); diff --git a/packages/instrumentation-express/test/fixtures/use-express-regex.mjs b/packages/instrumentation-express/test/fixtures/use-express-regex.mjs index d674342dd6..c54e3c55c6 100644 --- a/packages/instrumentation-express/test/fixtures/use-express-regex.mjs +++ b/packages/instrumentation-express/test/fixtures/use-express-regex.mjs @@ -70,15 +70,12 @@ await new Promise(resolve => server.listen(0, resolve)); const port = server.address().port; await new Promise(resolve => { - http.get( - `http://localhost:${port}${process.env.TEST_REGEX_ROUTE}`, - res => { - res.resume(); - res.on('end', () => { - resolve(); - }); - } - ); + http.get(`http://localhost:${port}${process.env.TEST_REGEX_ROUTE}`, res => { + res.resume(); + res.on('end', () => { + resolve(); + }); + }); }); await new Promise(resolve => server.close(resolve)); diff --git a/packages/instrumentation-express/test/fixtures/use-express-router.mjs b/packages/instrumentation-express/test/fixtures/use-express-router.mjs index 5846da88ae..d0d0ef3c13 100644 --- a/packages/instrumentation-express/test/fixtures/use-express-router.mjs +++ b/packages/instrumentation-express/test/fixtures/use-express-router.mjs @@ -22,11 +22,8 @@ import { ExpressInstrumentation } from '../../build/src/index.js'; const sdk = createTestNodeSdk({ serviceName: 'use-express-nested', - instrumentations: [ - new HttpInstrumentation(), - new ExpressInstrumentation() - ] -}) + instrumentations: [new HttpInstrumentation(), new ExpressInstrumentation()], +}); sdk.start(); @@ -58,14 +55,13 @@ const server = http.createServer(app); await new Promise(resolve => server.listen(0, resolve)); const port = server.address().port; - await new Promise(resolve => { - http.get(`http://localhost:${port}/api/user/123`, (res) => { + http.get(`http://localhost:${port}/api/user/123`, res => { res.resume(); res.on('end', data => { resolve(data); }); - }) + }); }); await new Promise(resolve => server.close(resolve)); diff --git a/packages/instrumentation-express/test/fixtures/use-express.mjs b/packages/instrumentation-express/test/fixtures/use-express.mjs index 6dd75360f2..c59712671f 100644 --- a/packages/instrumentation-express/test/fixtures/use-express.mjs +++ b/packages/instrumentation-express/test/fixtures/use-express.mjs @@ -25,11 +25,8 @@ import { ExpressInstrumentation } from '../../build/src/index.js'; const sdk = createTestNodeSdk({ serviceName: 'use-express', - instrumentations: [ - new HttpInstrumentation(), - new ExpressInstrumentation() - ] -}) + instrumentations: [new HttpInstrumentation(), new ExpressInstrumentation()], +}); sdk.start(); import express from 'express'; @@ -55,12 +52,12 @@ await new Promise(resolve => server.listen(0, resolve)); const port = server.address().port; await new Promise(resolve => { - http.get(`http://localhost:${port}/post/0`, (res) => { + http.get(`http://localhost:${port}/post/0`, res => { res.resume(); res.on('end', () => { resolve(); }); - }) + }); }); await new Promise(resolve => server.close(resolve)); diff --git a/packages/instrumentation-fastify/.eslintrc.js b/packages/instrumentation-fastify/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-fastify/.eslintrc.js +++ b/packages/instrumentation-fastify/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-fastify/package.json b/packages/instrumentation-fastify/package.json index 15f7cba178..62bd86e4ef 100644 --- a/packages/instrumentation-fastify/package.json +++ b/packages/instrumentation-fastify/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-fastify", "compile": "tsc -p .", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "test": "nyc mocha 'test/**/*.test.ts'", diff --git a/packages/instrumentation-fastify/test/fixtures/use-fastify.mjs b/packages/instrumentation-fastify/test/fixtures/use-fastify.mjs index 4b234dcb7b..99bd5bffb9 100644 --- a/packages/instrumentation-fastify/test/fixtures/use-fastify.mjs +++ b/packages/instrumentation-fastify/test/fixtures/use-fastify.mjs @@ -23,10 +23,8 @@ import { FastifyInstrumentation } from '../../build/src/index.js'; const sdk = createTestNodeSdk({ serviceName: 'use-fastify', - instrumentations: [ - new FastifyInstrumentation() - ] -}) + instrumentations: [new FastifyInstrumentation()], +}); sdk.start(); import Fastify from 'fastify'; @@ -36,18 +34,18 @@ import http from 'http'; const app = Fastify(); app.get('/a-route', function aRoute(_request, reply) { reply.send({ hello: 'world' }); -}) +}); const addr = await app.listen({ port: 0 }); // Make a single request to it. await new Promise(resolve => { - http.get(addr + '/a-route', (res) => { + http.get(addr + '/a-route', res => { res.resume(); res.on('end', () => { resolve(); }); - }) -}) + }); +}); await app.close(); await sdk.shutdown(); diff --git a/packages/instrumentation-fs/.eslintrc.js b/packages/instrumentation-fs/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-fs/.eslintrc.js +++ b/packages/instrumentation-fs/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-fs/package.json b/packages/instrumentation-fs/package.json index a7bb853e3e..f9aa9c6e78 100644 --- a/packages/instrumentation-fs/package.json +++ b/packages/instrumentation-fs/package.json @@ -13,8 +13,8 @@ "test": "mocha 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", "clean": "rimraf build/*", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "version:update": "node ../../scripts/version-update.js", diff --git a/packages/instrumentation-generic-pool/.eslintrc.js b/packages/instrumentation-generic-pool/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-generic-pool/.eslintrc.js +++ b/packages/instrumentation-generic-pool/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-generic-pool/package.json b/packages/instrumentation-generic-pool/package.json index ad5790ec33..4f503cc4ef 100644 --- a/packages/instrumentation-generic-pool/package.json +++ b/packages/instrumentation-generic-pool/package.json @@ -13,8 +13,8 @@ "test": "nyc mocha 'test/**/*.ts'", "tdd": "yarn test -- --watch-extensions ts --watch", "clean": "rimraf build/*", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "version:update": "node ../../scripts/version-update.js", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-generic-pool", diff --git a/packages/instrumentation-graphql/.eslintrc.js b/packages/instrumentation-graphql/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-graphql/.eslintrc.js +++ b/packages/instrumentation-graphql/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-graphql/package.json b/packages/instrumentation-graphql/package.json index ac801514ef..8798d9c0b1 100644 --- a/packages/instrumentation-graphql/package.json +++ b/packages/instrumentation-graphql/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-graphql", "compile": "tsc -p .", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "test": "nyc mocha 'test/**/*.test.ts'", diff --git a/packages/instrumentation-hapi/.eslintrc.js b/packages/instrumentation-hapi/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-hapi/.eslintrc.js +++ b/packages/instrumentation-hapi/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-hapi/package.json b/packages/instrumentation-hapi/package.json index 6552191482..bb57f4fb4f 100644 --- a/packages/instrumentation-hapi/package.json +++ b/packages/instrumentation-hapi/package.json @@ -14,8 +14,8 @@ "test-all-versions": "tav", "tdd": "yarn test -- --watch-extensions ts --watch", "clean": "rimraf build/*", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "version:update": "node ../../scripts/version-update.js", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-hapi", diff --git a/packages/instrumentation-hapi/test/fixtures/use-hapi.js b/packages/instrumentation-hapi/test/fixtures/use-hapi.js index a898bbd181..a4428fe709 100644 --- a/packages/instrumentation-hapi/test/fixtures/use-hapi.js +++ b/packages/instrumentation-hapi/test/fixtures/use-hapi.js @@ -21,11 +21,8 @@ const { HapiInstrumentation } = require('../../build/src/index.js'); const sdk = createTestNodeSdk({ serviceName: 'use-hapi', - instrumentations: [ - new HttpInstrumentation(), - new HapiInstrumentation() - ] -}) + instrumentations: [new HttpInstrumentation(), new HapiInstrumentation()], +}); sdk.start(); const Hapi = require('@hapi/hapi'); @@ -35,27 +32,30 @@ async function main() { // Start a Hapi server. const server = new Hapi.Server({ port: 0, - host: 'localhost' + host: 'localhost', }); server.route({ method: 'GET', path: '/route/{param}', - handler: function() { + handler: function () { return { hello: 'world' }; - } + }, }); await server.start(); // Make a single request to it. await new Promise(resolve => { - http.get(`http://${server.info.host}:${server.info.port}/route/test`, (res) => { - res.resume(); - res.on('end', () => { - resolve(); - }); - }); + http.get( + `http://${server.info.host}:${server.info.port}/route/test`, + res => { + res.resume(); + res.on('end', () => { + resolve(); + }); + } + ); }); await server.stop(); diff --git a/packages/instrumentation-hapi/test/fixtures/use-hapi.mjs b/packages/instrumentation-hapi/test/fixtures/use-hapi.mjs index 665998fdfe..e09c3a4a28 100644 --- a/packages/instrumentation-hapi/test/fixtures/use-hapi.mjs +++ b/packages/instrumentation-hapi/test/fixtures/use-hapi.mjs @@ -24,11 +24,8 @@ import { HapiInstrumentation } from '../../build/src/index.js'; const sdk = createTestNodeSdk({ serviceName: 'use-hapi', - instrumentations: [ - new HttpInstrumentation(), - new HapiInstrumentation() - ] -}) + instrumentations: [new HttpInstrumentation(), new HapiInstrumentation()], +}); sdk.start(); import Hapi from '@hapi/hapi'; @@ -37,22 +34,22 @@ import http from 'http'; // Start a Hapi server. const server = new Hapi.Server({ port: 0, - host: 'localhost' + host: 'localhost', }); server.route({ method: 'GET', path: '/route/{param}', - handler: function() { + handler: function () { return { hello: 'world' }; - } + }, }); await server.start(); // Make a single request to it. await new Promise(resolve => { - http.get(`http://${server.info.host}:${server.info.port}/route/test`, (res) => { + http.get(`http://${server.info.host}:${server.info.port}/route/test`, res => { res.resume(); res.on('end', () => { resolve(); diff --git a/packages/instrumentation-ioredis/.eslintrc.js b/packages/instrumentation-ioredis/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-ioredis/.eslintrc.js +++ b/packages/instrumentation-ioredis/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-ioredis/package.json b/packages/instrumentation-ioredis/package.json index 0cfe63e1eb..8b65725cd0 100644 --- a/packages/instrumentation-ioredis/package.json +++ b/packages/instrumentation-ioredis/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-ioredis", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/instrumentation-ioredis/test/fixtures/use-ioredis.mjs b/packages/instrumentation-ioredis/test/fixtures/use-ioredis.mjs index 8f3d98940d..89b88c3605 100644 --- a/packages/instrumentation-ioredis/test/fixtures/use-ioredis.mjs +++ b/packages/instrumentation-ioredis/test/fixtures/use-ioredis.mjs @@ -24,10 +24,8 @@ import { IORedisInstrumentation } from '../../build/src/index.js'; const sdk = createTestNodeSdk({ serviceName: 'use-ioredis', - instrumentations: [ - new IORedisInstrumentation() - ] -}) + instrumentations: [new IORedisInstrumentation()], +}); sdk.start(); import assert from 'assert'; @@ -41,7 +39,7 @@ const randomId = ((Math.random() * 2 ** 32) >>> 0).toString(16); const testKeyName = `test-${randomId}`; const tracer = trace.getTracer(); -await tracer.startActiveSpan('manual', async (span) => { +await tracer.startActiveSpan('manual', async span => { redis.set(testKeyName, 'bar'); let val = await redis.get(testKeyName); assert(val === 'bar'); diff --git a/packages/instrumentation-kafkajs/.eslintrc.js b/packages/instrumentation-kafkajs/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-kafkajs/.eslintrc.js +++ b/packages/instrumentation-kafkajs/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-kafkajs/package.json b/packages/instrumentation-kafkajs/package.json index 420b7f6390..195eaff5fe 100644 --- a/packages/instrumentation-kafkajs/package.json +++ b/packages/instrumentation-kafkajs/package.json @@ -14,8 +14,8 @@ "test-all-versions": "tav", "tdd": "npm run test -- --watch-extensions ts --watch", "clean": "rimraf build/*", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme", "prepublishOnly": "npm run compile", "version:update": "node ../../scripts/version-update.js", diff --git a/packages/instrumentation-knex/.eslintrc.js b/packages/instrumentation-knex/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-knex/.eslintrc.js +++ b/packages/instrumentation-knex/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-knex/package.json b/packages/instrumentation-knex/package.json index dc5ac86954..2702a00e96 100644 --- a/packages/instrumentation-knex/package.json +++ b/packages/instrumentation-knex/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-knex", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/instrumentation-koa/.eslintrc.js b/packages/instrumentation-koa/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-koa/.eslintrc.js +++ b/packages/instrumentation-koa/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-koa/package.json b/packages/instrumentation-koa/package.json index c160c42c5b..96addbc1c1 100644 --- a/packages/instrumentation-koa/package.json +++ b/packages/instrumentation-koa/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-koa", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/instrumentation-koa/test/fixtures/use-koa.mjs b/packages/instrumentation-koa/test/fixtures/use-koa.mjs index 967e76375b..1e5a00841c 100644 --- a/packages/instrumentation-koa/test/fixtures/use-koa.mjs +++ b/packages/instrumentation-koa/test/fixtures/use-koa.mjs @@ -25,11 +25,8 @@ import { KoaInstrumentation } from '../../build/src/index.js'; const sdk = createTestNodeSdk({ serviceName: 'use-koa', - instrumentations: [ - new KoaInstrumentation(), - new HttpInstrumentation() - ] -}) + instrumentations: [new KoaInstrumentation(), new HttpInstrumentation()], +}); sdk.start(); import Koa from 'koa'; @@ -59,12 +56,12 @@ await new Promise(resolve => server.listen(0, resolve)); const port = server.address().port; await new Promise(resolve => { - http.get(`http://localhost:${port}/post/0`, (res) => { + http.get(`http://localhost:${port}/post/0`, res => { res.resume(); res.on('end', () => { resolve(); }); - }) + }); }); await new Promise(resolve => server.close(resolve)); diff --git a/packages/instrumentation-long-task/.eslintrc.js b/packages/instrumentation-long-task/.eslintrc.js index 01b8d09740..498e35290d 100644 --- a/packages/instrumentation-long-task/.eslintrc.js +++ b/packages/instrumentation-long-task/.eslintrc.js @@ -1,9 +1,24 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "commonjs": true, - "browser": true, - "jquery": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + commonjs: true, + browser: true, + jquery: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-long-task/karma.conf.js b/packages/instrumentation-long-task/karma.conf.js index 4bc502c46f..5f899152bd 100644 --- a/packages/instrumentation-long-task/karma.conf.js +++ b/packages/instrumentation-long-task/karma.conf.js @@ -1,11 +1,11 @@ -/*! +/* * Copyright The OpenTelemetry Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +17,11 @@ const karmaWebpackConfig = require('../../karma.webpack'); const karmaBaseConfig = require('../../karma.base'); -module.exports = (config) => { - config.set(Object.assign({}, karmaBaseConfig, { - frameworks: karmaBaseConfig.frameworks.concat(['jquery-1.8.3']), - webpack: karmaWebpackConfig, - })) +module.exports = config => { + config.set( + Object.assign({}, karmaBaseConfig, { + frameworks: karmaBaseConfig.frameworks.concat(['jquery-1.8.3']), + webpack: karmaWebpackConfig, + }) + ); }; diff --git a/packages/instrumentation-long-task/package.json b/packages/instrumentation-long-task/package.json index e3c0304218..ca95655893 100644 --- a/packages/instrumentation-long-task/package.json +++ b/packages/instrumentation-long-task/package.json @@ -15,8 +15,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-long-task", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "tdd": "karma start", diff --git a/packages/instrumentation-lru-memoizer/.eslintrc.js b/packages/instrumentation-lru-memoizer/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-lru-memoizer/.eslintrc.js +++ b/packages/instrumentation-lru-memoizer/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-lru-memoizer/package.json b/packages/instrumentation-lru-memoizer/package.json index d2a81ca88f..d7e118a91b 100644 --- a/packages/instrumentation-lru-memoizer/package.json +++ b/packages/instrumentation-lru-memoizer/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-lru-memoizer", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/instrumentation-memcached/.eslintrc.js b/packages/instrumentation-memcached/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-memcached/.eslintrc.js +++ b/packages/instrumentation-memcached/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-memcached/package.json b/packages/instrumentation-memcached/package.json index ed631d6dc5..75915d73bf 100644 --- a/packages/instrumentation-memcached/package.json +++ b/packages/instrumentation-memcached/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-memcached", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc mocha 'test/**/*.test.ts'", diff --git a/packages/instrumentation-mongodb/.eslintrc.js b/packages/instrumentation-mongodb/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-mongodb/.eslintrc.js +++ b/packages/instrumentation-mongodb/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-mongodb/package.json b/packages/instrumentation-mongodb/package.json index 9882833a1d..d5af29644f 100644 --- a/packages/instrumentation-mongodb/package.json +++ b/packages/instrumentation-mongodb/package.json @@ -11,8 +11,8 @@ }, "scripts": { "clean": "rimraf build/*", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "version:update": "node ../../scripts/version-update.js", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-mongodb", diff --git a/packages/instrumentation-mongoose/.eslintrc.js b/packages/instrumentation-mongoose/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-mongoose/.eslintrc.js +++ b/packages/instrumentation-mongoose/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-mongoose/package.json b/packages/instrumentation-mongoose/package.json index 5e4608dfab..f7fae2afb9 100644 --- a/packages/instrumentation-mongoose/package.json +++ b/packages/instrumentation-mongoose/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-mongoose", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/instrumentation-mysql/.eslintrc.js b/packages/instrumentation-mysql/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-mysql/.eslintrc.js +++ b/packages/instrumentation-mysql/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-mysql/package.json b/packages/instrumentation-mysql/package.json index cf50683cb2..0e6f4688b7 100644 --- a/packages/instrumentation-mysql/package.json +++ b/packages/instrumentation-mysql/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-mysql", - "lint:fix": "eslint . --ext .ts --fix", - "lint": "eslint . --ext .ts", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", + "lint": "eslint . --ext=ts,js,mjs", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc mocha 'test/**/*.test.ts'", diff --git a/packages/instrumentation-mysql2/.eslintrc.js b/packages/instrumentation-mysql2/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-mysql2/.eslintrc.js +++ b/packages/instrumentation-mysql2/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-mysql2/package.json b/packages/instrumentation-mysql2/package.json index 43e75ed108..349f7af582 100644 --- a/packages/instrumentation-mysql2/package.json +++ b/packages/instrumentation-mysql2/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-mysql2", - "lint:fix": "eslint . --ext .ts --fix", - "lint": "eslint . --ext .ts", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", + "lint": "eslint . --ext=ts,js,mjs", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc mocha 'test/**/*.test.ts'", diff --git a/packages/instrumentation-nestjs-core/.eslintrc.js b/packages/instrumentation-nestjs-core/.eslintrc.js index 224df6c2dc..912e1cf251 100644 --- a/packages/instrumentation-nestjs-core/.eslintrc.js +++ b/packages/instrumentation-nestjs-core/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - env: { - mocha: true, - node: true - }, - ...require('../../eslint.config.js') + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), }; diff --git a/packages/instrumentation-nestjs-core/package.json b/packages/instrumentation-nestjs-core/package.json index 05c9cb36a5..a7803021cb 100644 --- a/packages/instrumentation-nestjs-core/package.json +++ b/packages/instrumentation-nestjs-core/package.json @@ -14,8 +14,8 @@ "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-nestjs-core", "compile": "tsc -p .", "compile:watch": "tsc -w", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "npm run test-required-node-version && nyc mocha --timeout 5000 'test/**/*.test.ts' || echo 'Node version is not supported for testing'", diff --git a/packages/instrumentation-net/.eslintrc.js b/packages/instrumentation-net/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-net/.eslintrc.js +++ b/packages/instrumentation-net/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-net/package.json b/packages/instrumentation-net/package.json index 8012941ad5..5a319b6516 100644 --- a/packages/instrumentation-net/package.json +++ b/packages/instrumentation-net/package.json @@ -13,8 +13,8 @@ "test": "nyc mocha 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", "clean": "rimraf build/*", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "version:update": "node ../../scripts/version-update.js", diff --git a/packages/instrumentation-openai/.eslintrc.js b/packages/instrumentation-openai/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-openai/.eslintrc.js +++ b/packages/instrumentation-openai/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-openai/package.json b/packages/instrumentation-openai/package.json index 05a42df71c..df919a8bcc 100644 --- a/packages/instrumentation-openai/package.json +++ b/packages/instrumentation-openai/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "setup:dev": "nx run-many -t compile -p @opentelemetry/instrumentation-openai", "compile": "tsc -p .", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/instrumentation-oracledb/.eslintrc.js b/packages/instrumentation-oracledb/.eslintrc.js index af8a1ac3ee..a84ad1caf5 100644 --- a/packages/instrumentation-oracledb/.eslintrc.js +++ b/packages/instrumentation-oracledb/.eslintrc.js @@ -1,19 +1,41 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright (c) 2025, Oracle and/or its affiliates. + * */ const parentConfig = require('../../eslint.config.js'); module.exports = { - extends: '../../eslint.config.js', // Extends the top-level config - ignorePatterns: [ - ...(parentConfig.ignorePatterns || []), // Retain parent's ignorePatterns array - 'src/version.ts', // ignore this file - ], - env: { - mocha: true, - node: true - }, - rules: { - "header/header": ["error", "block", [{ - pattern: /\* Copyright The OpenTelemetry Authors(?:, [^,\r\n]*)?[\r\n]+ \*[\r\n]+ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);[\r\n]+ \* you may not use this file except in compliance with the License\.[\r\n]+ \* You may obtain a copy of the License at[\r\n]+ \*[\r\n]+ \* {6}https:\/\/www\.apache\.org\/licenses\/LICENSE-2\.0[\r\n]+ \*[\r\n]+ \* Unless required by applicable law or agreed to in writing, software[\r\n]+ \* distributed under the License is distributed on an "AS IS" BASIS,[\r\n]+ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.[\r\n]+ \* See the License for the specific language governing permissions and[\r\n]+ \* limitations under the License\.[\r\n]+ \*[\r\n]+ \* Copyright \(c\) 2025, Oracle and\/or its affiliates\.[\r\n]+ \*/gm, - template: ` + extends: '../../eslint.config.js', // Extends the top-level config + ignorePatterns: [ + ...(parentConfig.ignorePatterns || []), // Retain parent's ignorePatterns array + 'src/version.ts', // ignore this file + ], + env: { + mocha: true, + node: true, + }, + rules: { + 'header/header': [ + 'error', + 'block', + [ + { + pattern: + /\* Copyright The OpenTelemetry Authors(?:, [^,\r\n]*)?[\r\n]+ \*[\r\n]+ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);[\r\n]+ \* you may not use this file except in compliance with the License\.[\r\n]+ \* You may obtain a copy of the License at[\r\n]+ \*[\r\n]+ \* {6}https:\/\/www\.apache\.org\/licenses\/LICENSE-2\.0[\r\n]+ \*[\r\n]+ \* Unless required by applicable law or agreed to in writing, software[\r\n]+ \* distributed under the License is distributed on an "AS IS" BASIS,[\r\n]+ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.[\r\n]+ \* See the License for the specific language governing permissions and[\r\n]+ \* limitations under the License\.[\r\n]+ \*[\r\n]+ \* Copyright \(c\) 2025, Oracle and\/or its affiliates\.[\r\n]+ \*/gm, + template: ` * Copyright The OpenTelemetry Authors * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -29,8 +51,9 @@ module.exports = { * limitations under the License. * * Copyright (c) 2025, Oracle and/or its affiliates. - * ` - }]] - } -} - + * `, + }, + ], + ], + }, +}; diff --git a/packages/instrumentation-oracledb/package.json b/packages/instrumentation-oracledb/package.json index 4576a38720..242feeddf1 100644 --- a/packages/instrumentation-oracledb/package.json +++ b/packages/instrumentation-oracledb/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-oracledb", "compile": "tsc -p .", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", diff --git a/packages/instrumentation-pg/.eslintrc.js b/packages/instrumentation-pg/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-pg/.eslintrc.js +++ b/packages/instrumentation-pg/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-pg/package.json b/packages/instrumentation-pg/package.json index 6e5fd49183..63065b7dd5 100644 --- a/packages/instrumentation-pg/package.json +++ b/packages/instrumentation-pg/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-pg", "compile": "tsc -p .", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/instrumentation-pino/.eslintrc.js b/packages/instrumentation-pino/.eslintrc.js index d9630e1c33..912e1cf251 100644 --- a/packages/instrumentation-pino/.eslintrc.js +++ b/packages/instrumentation-pino/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js'), -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-pino/package.json b/packages/instrumentation-pino/package.json index 1957b9c28e..b46cfa128f 100644 --- a/packages/instrumentation-pino/package.json +++ b/packages/instrumentation-pino/package.json @@ -14,8 +14,8 @@ "test-all-versions": "tav", "tdd": "npm run test -- --watch-extensions ts --watch", "clean": "rimraf build/*", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "version:update": "node ../../scripts/version-update.js", diff --git a/packages/instrumentation-pino/test/fixtures/use-pino-default-import.mjs b/packages/instrumentation-pino/test/fixtures/use-pino-default-import.mjs index 2bde519df7..a8748b6c1e 100644 --- a/packages/instrumentation-pino/test/fixtures/use-pino-default-import.mjs +++ b/packages/instrumentation-pino/test/fixtures/use-pino-default-import.mjs @@ -24,18 +24,16 @@ import { PinoInstrumentation } from '../../build/src/index.js'; const sdk = createTestNodeSdk({ serviceName: 'use-pino', - instrumentations: [ - new PinoInstrumentation() - ] -}) + instrumentations: [new PinoInstrumentation()], +}); sdk.start(); import pino from 'pino'; const logger = pino(); const tracer = trace.getTracer(); -await tracer.startActiveSpan('manual', async (span) => { - logger.info('hi from logger') +await tracer.startActiveSpan('manual', async span => { + logger.info('hi from logger'); span.end(); }); diff --git a/packages/instrumentation-pino/test/fixtures/use-pino-named-import.mjs b/packages/instrumentation-pino/test/fixtures/use-pino-named-import.mjs index 543cf84826..0a165a2ffd 100644 --- a/packages/instrumentation-pino/test/fixtures/use-pino-named-import.mjs +++ b/packages/instrumentation-pino/test/fixtures/use-pino-named-import.mjs @@ -24,18 +24,16 @@ import { PinoInstrumentation } from '../../build/src/index.js'; const sdk = createTestNodeSdk({ serviceName: 'use-pino', - instrumentations: [ - new PinoInstrumentation() - ] -}) + instrumentations: [new PinoInstrumentation()], +}); sdk.start(); import { pino } from 'pino'; // named import, supported with pino >=6.8.0 const logger = pino(); const tracer = trace.getTracer(); -await tracer.startActiveSpan('manual', async (span) => { - logger.info('hi from logger') +await tracer.startActiveSpan('manual', async span => { + logger.info('hi from logger'); span.end(); }); diff --git a/packages/instrumentation-redis/.eslintrc.js b/packages/instrumentation-redis/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-redis/.eslintrc.js +++ b/packages/instrumentation-redis/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-redis/package.json b/packages/instrumentation-redis/package.json index 0ebfa3d4d5..b108a5d5f1 100644 --- a/packages/instrumentation-redis/package.json +++ b/packages/instrumentation-redis/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-redis", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/instrumentation-restify/.eslintrc.js b/packages/instrumentation-restify/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-restify/.eslintrc.js +++ b/packages/instrumentation-restify/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-restify/package.json b/packages/instrumentation-restify/package.json index 8306de4012..6502267611 100644 --- a/packages/instrumentation-restify/package.json +++ b/packages/instrumentation-restify/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-restify", "compile": "tsc -p .", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "tdd": "yarn test -- --watch-extensions ts --watch", diff --git a/packages/instrumentation-router/.eslintrc.js b/packages/instrumentation-router/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-router/.eslintrc.js +++ b/packages/instrumentation-router/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-router/package.json b/packages/instrumentation-router/package.json index 71200635f7..beb4da05b8 100644 --- a/packages/instrumentation-router/package.json +++ b/packages/instrumentation-router/package.json @@ -13,8 +13,8 @@ "test": "nyc mocha 'test/**/*.ts'", "tdd": "yarn test -- --watch-extensions ts --watch", "clean": "rimraf build/*", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "version:update": "node ../../scripts/version-update.js", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-router", diff --git a/packages/instrumentation-runtime-node/.eslintrc.js b/packages/instrumentation-runtime-node/.eslintrc.js index 15096b6658..912e1cf251 100644 --- a/packages/instrumentation-runtime-node/.eslintrc.js +++ b/packages/instrumentation-runtime-node/.eslintrc.js @@ -1,3 +1,18 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { env: { mocha: true, diff --git a/packages/instrumentation-runtime-node/package.json b/packages/instrumentation-runtime-node/package.json index 0f6d2af4fe..b20d580bb5 100644 --- a/packages/instrumentation-runtime-node/package.json +++ b/packages/instrumentation-runtime-node/package.json @@ -14,8 +14,8 @@ "clean": "rimraf build/*", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-runtime-node", "compile": "tsc -p .", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "test": "nyc mocha 'test/**/*.test.ts'", "version:update": "node ../../scripts/version-update.js" diff --git a/packages/instrumentation-socket.io/.eslintrc.js b/packages/instrumentation-socket.io/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-socket.io/.eslintrc.js +++ b/packages/instrumentation-socket.io/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-socket.io/package.json b/packages/instrumentation-socket.io/package.json index a9eaf9fe67..afe1bad61b 100644 --- a/packages/instrumentation-socket.io/package.json +++ b/packages/instrumentation-socket.io/package.json @@ -14,8 +14,8 @@ "test-all-versions": "tav", "tdd": "npm run test -- --watch-extensions ts --watch", "clean": "rimraf build/*", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "version:update": "node ../../scripts/version-update.js", diff --git a/packages/instrumentation-tedious/.eslintrc.js b/packages/instrumentation-tedious/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-tedious/.eslintrc.js +++ b/packages/instrumentation-tedious/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-tedious/package.json b/packages/instrumentation-tedious/package.json index 500ab8e30b..1340595c1f 100644 --- a/packages/instrumentation-tedious/package.json +++ b/packages/instrumentation-tedious/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-tedious", - "lint:fix": "eslint . --ext .ts --fix", - "lint": "eslint . --ext .ts", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", + "lint": "eslint . --ext=ts,js,mjs", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc mocha 'test/**/*.test.ts'", diff --git a/packages/instrumentation-typeorm/.eslintrc.js b/packages/instrumentation-typeorm/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-typeorm/.eslintrc.js +++ b/packages/instrumentation-typeorm/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-typeorm/package.json b/packages/instrumentation-typeorm/package.json index 68cc669b1c..09341553c2 100644 --- a/packages/instrumentation-typeorm/package.json +++ b/packages/instrumentation-typeorm/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-typeorm", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prewatch": "npm run precompile", "prepublishOnly": "npm run compile", diff --git a/packages/instrumentation-undici/.eslintrc.js b/packages/instrumentation-undici/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/instrumentation-undici/.eslintrc.js +++ b/packages/instrumentation-undici/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-undici/package.json b/packages/instrumentation-undici/package.json index fa219a7f0f..700057b092 100644 --- a/packages/instrumentation-undici/package.json +++ b/packages/instrumentation-undici/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-undici", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc mocha test/**/*.test.ts", diff --git a/packages/instrumentation-user-interaction/.eslintrc.js b/packages/instrumentation-user-interaction/.eslintrc.js index 0587e2b9e4..b20afe4255 100644 --- a/packages/instrumentation-user-interaction/.eslintrc.js +++ b/packages/instrumentation-user-interaction/.eslintrc.js @@ -1,12 +1,27 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "commonjs": true, - "browser": true, - "jquery": true - }, - "globals": { - "Zone": "readonly" - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + commonjs: true, + browser: true, + jquery: true, + }, + globals: { + Zone: 'readonly', + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-user-interaction/karma.conf.js b/packages/instrumentation-user-interaction/karma.conf.js index 4bc502c46f..5f899152bd 100644 --- a/packages/instrumentation-user-interaction/karma.conf.js +++ b/packages/instrumentation-user-interaction/karma.conf.js @@ -1,11 +1,11 @@ -/*! +/* * Copyright The OpenTelemetry Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +17,11 @@ const karmaWebpackConfig = require('../../karma.webpack'); const karmaBaseConfig = require('../../karma.base'); -module.exports = (config) => { - config.set(Object.assign({}, karmaBaseConfig, { - frameworks: karmaBaseConfig.frameworks.concat(['jquery-1.8.3']), - webpack: karmaWebpackConfig, - })) +module.exports = config => { + config.set( + Object.assign({}, karmaBaseConfig, { + frameworks: karmaBaseConfig.frameworks.concat(['jquery-1.8.3']), + webpack: karmaWebpackConfig, + }) + ); }; diff --git a/packages/instrumentation-user-interaction/package.json b/packages/instrumentation-user-interaction/package.json index 60e0a35fdb..c37c0791ac 100644 --- a/packages/instrumentation-user-interaction/package.json +++ b/packages/instrumentation-user-interaction/package.json @@ -15,8 +15,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-user-interaction", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "tdd": "karma start", diff --git a/packages/instrumentation-winston/.eslintrc.js b/packages/instrumentation-winston/.eslintrc.js index d9630e1c33..912e1cf251 100644 --- a/packages/instrumentation-winston/.eslintrc.js +++ b/packages/instrumentation-winston/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js'), -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/instrumentation-winston/package.json b/packages/instrumentation-winston/package.json index daa94125e5..d69b046c5a 100644 --- a/packages/instrumentation-winston/package.json +++ b/packages/instrumentation-winston/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-winston", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "test": "nyc mocha 'test/**/*.test.ts'", diff --git a/packages/plugin-react-load/.eslintrc.js b/packages/plugin-react-load/.eslintrc.js index 01b8d09740..498e35290d 100644 --- a/packages/plugin-react-load/.eslintrc.js +++ b/packages/plugin-react-load/.eslintrc.js @@ -1,9 +1,24 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "commonjs": true, - "browser": true, - "jquery": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + commonjs: true, + browser: true, + jquery: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/plugin-react-load/karma.conf.js b/packages/plugin-react-load/karma.conf.js index 3019564a15..25e450db5d 100644 --- a/packages/plugin-react-load/karma.conf.js +++ b/packages/plugin-react-load/karma.conf.js @@ -1,11 +1,11 @@ -/*! +/* * Copyright The OpenTelemetry Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,8 +17,10 @@ const karmaWebpackConfig = require('../../karma.webpack'); const karmaBaseConfig = require('../../karma.base'); -module.exports = (config) => { - config.set(Object.assign({}, karmaBaseConfig, { - webpack: karmaWebpackConfig - })) +module.exports = config => { + config.set( + Object.assign({}, karmaBaseConfig, { + webpack: karmaWebpackConfig, + }) + ); }; diff --git a/packages/plugin-react-load/package.json b/packages/plugin-react-load/package.json index 48d90d0dcf..1e714b81e4 100644 --- a/packages/plugin-react-load/package.json +++ b/packages/plugin-react-load/package.json @@ -15,8 +15,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/plugin-react-load", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "lint:readme": "node ../../scripts/lint-readme.js", "prepublishOnly": "npm run compile", "tdd": "karma start", diff --git a/packages/propagation-utils/.eslintrc.js b/packages/propagation-utils/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/propagation-utils/.eslintrc.js +++ b/packages/propagation-utils/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/propagation-utils/package.json b/packages/propagation-utils/package.json index 42ca81e8a2..2c6212037e 100644 --- a/packages/propagation-utils/package.json +++ b/packages/propagation-utils/package.json @@ -11,8 +11,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/propagation-utils", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc mocha 'test/**/*.test.ts'", diff --git a/packages/propagator-aws-xray-lambda/.eslintrc.js b/packages/propagator-aws-xray-lambda/.eslintrc.js index 56b0964fe6..dd021c00fb 100644 --- a/packages/propagator-aws-xray-lambda/.eslintrc.js +++ b/packages/propagator-aws-xray-lambda/.eslintrc.js @@ -1,9 +1,24 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "commonjs": true, - "node": true, - "browser": true + env: { + mocha: true, + commonjs: true, + node: true, + browser: true, }, - ...require('../../eslint.config.js') -} + ...require('../../eslint.config.js'), +}; diff --git a/packages/propagator-aws-xray-lambda/package.json b/packages/propagator-aws-xray-lambda/package.json index c08e3bf1fa..5da9782f52 100644 --- a/packages/propagator-aws-xray-lambda/package.json +++ b/packages/propagator-aws-xray-lambda/package.json @@ -14,8 +14,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/propagator-aws-xray-lambda", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "test": "nyc mocha test/**/*.test.ts", "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json" diff --git a/packages/propagator-aws-xray/.eslintrc.js b/packages/propagator-aws-xray/.eslintrc.js index 56b0964fe6..dd021c00fb 100644 --- a/packages/propagator-aws-xray/.eslintrc.js +++ b/packages/propagator-aws-xray/.eslintrc.js @@ -1,9 +1,24 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "commonjs": true, - "node": true, - "browser": true + env: { + mocha: true, + commonjs: true, + node: true, + browser: true, }, - ...require('../../eslint.config.js') -} + ...require('../../eslint.config.js'), +}; diff --git a/packages/propagator-aws-xray/karma.conf.js b/packages/propagator-aws-xray/karma.conf.js index 133e22df63..d4e4a9e2fd 100644 --- a/packages/propagator-aws-xray/karma.conf.js +++ b/packages/propagator-aws-xray/karma.conf.js @@ -1,11 +1,11 @@ -/*! +/* * Copyright The OpenTelemetry Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -19,25 +19,27 @@ const webpack = require('webpack'); const karmaWebpackConfig = require('../../karma.webpack'); const karmaBaseConfig = require('../../karma.base'); -module.exports = (config) => { +module.exports = config => { { - const plugins = karmaWebpackConfig.plugins = []; - plugins.push(new webpack.ProvidePlugin({ - process: 'process/browser', - })); + const plugins = (karmaWebpackConfig.plugins = []); + plugins.push( + new webpack.ProvidePlugin({ + process: 'process/browser', + }) + ); } { - const plugins = karmaBaseConfig.plugins = []; + const plugins = (karmaBaseConfig.plugins = []); const toAdd = Object.keys(require('./package.json').devDependencies) - .filter((packageName) => packageName.startsWith('karma-')) - .map((packageName) => require(packageName)); - plugins.push( - ...toAdd - ); + .filter(packageName => packageName.startsWith('karma-')) + .map(packageName => require(packageName)); + plugins.push(...toAdd); } - config.set(Object.assign({}, karmaBaseConfig, { - webpack: karmaWebpackConfig - })) + config.set( + Object.assign({}, karmaBaseConfig, { + webpack: karmaWebpackConfig, + }) + ); }; diff --git a/packages/propagator-aws-xray/package.json b/packages/propagator-aws-xray/package.json index 385f21ca18..8288f90126 100644 --- a/packages/propagator-aws-xray/package.json +++ b/packages/propagator-aws-xray/package.json @@ -14,8 +14,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/propagator-aws-xray", "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "test": "nyc mocha test/**/*.test.ts", "test:browser": "nyc karma start --single-run", diff --git a/packages/propagator-instana/.eslintrc.js b/packages/propagator-instana/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/propagator-instana/.eslintrc.js +++ b/packages/propagator-instana/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/propagator-instana/karma.conf.js b/packages/propagator-instana/karma.conf.js index 133e22df63..d4e4a9e2fd 100644 --- a/packages/propagator-instana/karma.conf.js +++ b/packages/propagator-instana/karma.conf.js @@ -1,11 +1,11 @@ -/*! +/* * Copyright The OpenTelemetry Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -19,25 +19,27 @@ const webpack = require('webpack'); const karmaWebpackConfig = require('../../karma.webpack'); const karmaBaseConfig = require('../../karma.base'); -module.exports = (config) => { +module.exports = config => { { - const plugins = karmaWebpackConfig.plugins = []; - plugins.push(new webpack.ProvidePlugin({ - process: 'process/browser', - })); + const plugins = (karmaWebpackConfig.plugins = []); + plugins.push( + new webpack.ProvidePlugin({ + process: 'process/browser', + }) + ); } { - const plugins = karmaBaseConfig.plugins = []; + const plugins = (karmaBaseConfig.plugins = []); const toAdd = Object.keys(require('./package.json').devDependencies) - .filter((packageName) => packageName.startsWith('karma-')) - .map((packageName) => require(packageName)); - plugins.push( - ...toAdd - ); + .filter(packageName => packageName.startsWith('karma-')) + .map(packageName => require(packageName)); + plugins.push(...toAdd); } - config.set(Object.assign({}, karmaBaseConfig, { - webpack: karmaWebpackConfig - })) + config.set( + Object.assign({}, karmaBaseConfig, { + webpack: karmaWebpackConfig, + }) + ); }; diff --git a/packages/propagator-instana/package.json b/packages/propagator-instana/package.json index cf0f5c271d..e5e608f5dc 100644 --- a/packages/propagator-instana/package.json +++ b/packages/propagator-instana/package.json @@ -14,8 +14,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/propagator-instana", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "test": "nyc mocha test/**/*.test.ts", "test:browser": "nyc karma start --single-run", diff --git a/packages/propagator-ot-trace/.eslintrc.js b/packages/propagator-ot-trace/.eslintrc.js index 9dfe62f9b8..dd021c00fb 100644 --- a/packages/propagator-ot-trace/.eslintrc.js +++ b/packages/propagator-ot-trace/.eslintrc.js @@ -1,9 +1,24 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "commonjs": true, - "node": true, - "browser": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + commonjs: true, + node: true, + browser: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/propagator-ot-trace/karma.conf.js b/packages/propagator-ot-trace/karma.conf.js index f1a1f3a7e8..25e450db5d 100644 --- a/packages/propagator-ot-trace/karma.conf.js +++ b/packages/propagator-ot-trace/karma.conf.js @@ -1,11 +1,11 @@ -/*! +/* * Copyright The OpenTelemetry Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/packages/propagator-ot-trace/package.json b/packages/propagator-ot-trace/package.json index 30f4b7806c..d89f015d6e 100644 --- a/packages/propagator-ot-trace/package.json +++ b/packages/propagator-ot-trace/package.json @@ -14,8 +14,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/propagator-ot-trace", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "test": "nyc mocha test/**/*.test.ts", "test:browser": "nyc karma start --single-run", diff --git a/packages/redis-common/.eslintrc.js b/packages/redis-common/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/redis-common/.eslintrc.js +++ b/packages/redis-common/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/redis-common/package.json b/packages/redis-common/package.json index 687a6d34c0..16b87f56bc 100644 --- a/packages/redis-common/package.json +++ b/packages/redis-common/package.json @@ -10,8 +10,8 @@ "scripts": { "compile": "tsc --build tsconfig.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/redis-common", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "test": "nyc mocha 'test/**/*.test.ts'", "watch": "tsc -w" diff --git a/packages/resource-detector-alibaba-cloud/.eslintrc.js b/packages/resource-detector-alibaba-cloud/.eslintrc.js index 7927fa0c36..912e1cf251 100644 --- a/packages/resource-detector-alibaba-cloud/.eslintrc.js +++ b/packages/resource-detector-alibaba-cloud/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true + env: { + mocha: true, + node: true, }, - ...require('../../eslint.config.js') -} + ...require('../../eslint.config.js'), +}; diff --git a/packages/resource-detector-alibaba-cloud/package.json b/packages/resource-detector-alibaba-cloud/package.json index 04260f5ac2..eea82ec3ed 100644 --- a/packages/resource-detector-alibaba-cloud/package.json +++ b/packages/resource-detector-alibaba-cloud/package.json @@ -14,8 +14,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/resource-detector-alibaba-cloud", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "test": "nyc mocha 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/resource-detector-aws/.eslintrc.js b/packages/resource-detector-aws/.eslintrc.js index 7927fa0c36..912e1cf251 100644 --- a/packages/resource-detector-aws/.eslintrc.js +++ b/packages/resource-detector-aws/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true + env: { + mocha: true, + node: true, }, - ...require('../../eslint.config.js') -} + ...require('../../eslint.config.js'), +}; diff --git a/packages/resource-detector-aws/package.json b/packages/resource-detector-aws/package.json index fe61013519..8e751cbb8c 100644 --- a/packages/resource-detector-aws/package.json +++ b/packages/resource-detector-aws/package.json @@ -14,8 +14,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/resource-detector-aws", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "test": "nyc mocha 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/resource-detector-azure/.eslintrc.js b/packages/resource-detector-azure/.eslintrc.js index 6201ba71c1..912e1cf251 100644 --- a/packages/resource-detector-azure/.eslintrc.js +++ b/packages/resource-detector-azure/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { env: { mocha: true, node: true, }, - ...require("../../eslint.config.js"), + ...require('../../eslint.config.js'), }; diff --git a/packages/resource-detector-azure/package.json b/packages/resource-detector-azure/package.json index d36b32579f..53354ea860 100644 --- a/packages/resource-detector-azure/package.json +++ b/packages/resource-detector-azure/package.json @@ -14,8 +14,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/resource-detector-azure", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "test": "nyc mocha 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/resource-detector-container/.eslintrc.js b/packages/resource-detector-container/.eslintrc.js index 6201ba71c1..912e1cf251 100644 --- a/packages/resource-detector-container/.eslintrc.js +++ b/packages/resource-detector-container/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { env: { mocha: true, node: true, }, - ...require("../../eslint.config.js"), + ...require('../../eslint.config.js'), }; diff --git a/packages/resource-detector-container/package.json b/packages/resource-detector-container/package.json index 58e8077ea5..3ef8f29c66 100644 --- a/packages/resource-detector-container/package.json +++ b/packages/resource-detector-container/package.json @@ -14,8 +14,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/resource-detector-container", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "test": "nyc mocha 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/resource-detector-gcp/.eslintrc.js b/packages/resource-detector-gcp/.eslintrc.js index 7927fa0c36..912e1cf251 100644 --- a/packages/resource-detector-gcp/.eslintrc.js +++ b/packages/resource-detector-gcp/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true + env: { + mocha: true, + node: true, }, - ...require('../../eslint.config.js') -} + ...require('../../eslint.config.js'), +}; diff --git a/packages/resource-detector-gcp/package.json b/packages/resource-detector-gcp/package.json index fa58ce221e..25311d4271 100644 --- a/packages/resource-detector-gcp/package.json +++ b/packages/resource-detector-gcp/package.json @@ -14,8 +14,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/resource-detector-gcp", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "test": "nyc mocha 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/resource-detector-github/.eslintrc.js b/packages/resource-detector-github/.eslintrc.js index 7927fa0c36..912e1cf251 100644 --- a/packages/resource-detector-github/.eslintrc.js +++ b/packages/resource-detector-github/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true + env: { + mocha: true, + node: true, }, - ...require('../../eslint.config.js') -} + ...require('../../eslint.config.js'), +}; diff --git a/packages/resource-detector-github/package.json b/packages/resource-detector-github/package.json index e34e89ea5b..19f1618ad6 100644 --- a/packages/resource-detector-github/package.json +++ b/packages/resource-detector-github/package.json @@ -14,8 +14,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/resource-detector-github", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "test": "nyc mocha 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/resource-detector-instana/.eslintrc.js b/packages/resource-detector-instana/.eslintrc.js index 7927fa0c36..912e1cf251 100644 --- a/packages/resource-detector-instana/.eslintrc.js +++ b/packages/resource-detector-instana/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true + env: { + mocha: true, + node: true, }, - ...require('../../eslint.config.js') -} + ...require('../../eslint.config.js'), +}; diff --git a/packages/resource-detector-instana/package.json b/packages/resource-detector-instana/package.json index 72eae077f7..d5386f3631 100644 --- a/packages/resource-detector-instana/package.json +++ b/packages/resource-detector-instana/package.json @@ -14,8 +14,8 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/resource-detector-instana", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "test": "nyc mocha 'test/**/*.test.ts'", "tdd": "npm run test -- --watch-extensions ts --watch", diff --git a/packages/sql-common/.eslintrc.js b/packages/sql-common/.eslintrc.js index 15096b6658..912e1cf251 100644 --- a/packages/sql-common/.eslintrc.js +++ b/packages/sql-common/.eslintrc.js @@ -1,3 +1,18 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { env: { mocha: true, diff --git a/packages/sql-common/package.json b/packages/sql-common/package.json index 43f53d1a37..d4492c66ec 100644 --- a/packages/sql-common/package.json +++ b/packages/sql-common/package.json @@ -10,8 +10,8 @@ "scripts": { "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/sql-common", "compile": "tsc --build tsconfig.json", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "test": "nyc mocha 'test/**/*.test.ts'", "watch": "tsc -w" diff --git a/packages/winston-transport/.eslintrc.js b/packages/winston-transport/.eslintrc.js index f726f3becb..912e1cf251 100644 --- a/packages/winston-transport/.eslintrc.js +++ b/packages/winston-transport/.eslintrc.js @@ -1,7 +1,22 @@ +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ module.exports = { - "env": { - "mocha": true, - "node": true - }, - ...require('../../eslint.config.js') -} + env: { + mocha: true, + node: true, + }, + ...require('../../eslint.config.js'), +}; diff --git a/packages/winston-transport/package.json b/packages/winston-transport/package.json index 36f5f03814..ed32ab8431 100644 --- a/packages/winston-transport/package.json +++ b/packages/winston-transport/package.json @@ -13,8 +13,8 @@ "clean": "rimraf build/*", "compile": "tsc -p .", "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/winston-transport", - "lint": "eslint . --ext .ts", - "lint:fix": "eslint . --ext .ts --fix", + "lint": "eslint . --ext=ts,js,mjs", + "lint:fix": "eslint . --ext=ts,js,mjs --fix", "prepublishOnly": "npm run compile", "tdd": "npm run test -- --watch-extensions ts --watch", "test": "nyc mocha 'test/**/*.test.ts'",