Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ module.exports = {
parserOptions: {
sourceType: 'module',
}
},
{
files: ["test/**/*.js", "test/**/*.mjs"],
rules: {
"no-unused-vars": "off",
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer note: We turn on the same rule for .ts files in test/... dirs.
See #2940 (comment) for discussion.

}
]
};
4 changes: 2 additions & 2 deletions incubator/opentelemetry-sampler-aws-xray/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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'",
Expand Down
4 changes: 2 additions & 2 deletions packages/auto-configuration-propagators/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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'",
Expand Down
4 changes: 2 additions & 2 deletions packages/auto-instrumentations-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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'",
Expand Down
2 changes: 1 addition & 1 deletion packages/auto-instrumentations-node/test/test-app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const options = {
hostname: 'example.com',
port: 80,
path: '/',
method: 'GET'
method: 'GET',
};

const req = http.request(options);
Expand Down
16 changes: 9 additions & 7 deletions packages/auto-instrumentations-web/karma.conf.js
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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,
})
);
};
4 changes: 2 additions & 2 deletions packages/auto-instrumentations-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
27 changes: 21 additions & 6 deletions packages/baggage-log-record-processor/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -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'),
};
4 changes: 2 additions & 2 deletions packages/baggage-log-record-processor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
27 changes: 21 additions & 6 deletions packages/baggage-span-processor/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -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'),
};
4 changes: 2 additions & 2 deletions packages/baggage-span-processor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
27 changes: 21 additions & 6 deletions packages/contrib-test-utils/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -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'),
};
4 changes: 2 additions & 2 deletions packages/contrib-test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
27 changes: 21 additions & 6 deletions packages/host-metrics/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -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'),
};
4 changes: 2 additions & 2 deletions packages/host-metrics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
31 changes: 23 additions & 8 deletions packages/id-generator-aws-xray/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -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'),
};
4 changes: 2 additions & 2 deletions packages/id-generator-aws-xray/karma.conf.js
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
4 changes: 2 additions & 2 deletions packages/id-generator-aws-xray/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
27 changes: 21 additions & 6 deletions packages/instrumentation-amqplib/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -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'),
};
4 changes: 2 additions & 2 deletions packages/instrumentation-amqplib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
27 changes: 21 additions & 6 deletions packages/instrumentation-aws-lambda/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -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'),
};
4 changes: 2 additions & 2 deletions packages/instrumentation-aws-lambda/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading
Loading