Skip to content

Commit

Permalink
Merge branch 'main' into metrics-ff/async-timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan authored May 12, 2022
2 parents 93535d6 + 65fbb2f commit 4842a06
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 68 deletions.
53 changes: 29 additions & 24 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,14 @@ module.exports = {
"no-trailing-spaces": "error",
"eol-last": "error",
"quotes": [2, "single", { "avoidEscape": true }],
"@typescript-eslint/no-floating-promises": 2,
"@typescript-eslint/no-this-alias": "off",
"brace-style": ["error", "1tbs"],
"eqeqeq": [
"error",
"smart"
],
"prefer-rest-params": "off",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "memberLike",
"modifiers": ["private", "protected"],
"format": ["camelCase"],
"leadingUnderscore": "require"
}
],
"no-console": "error",
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["warn"],
"@typescript-eslint/no-unused-vars": ["error", {"argsIgnorePattern": "^_", "args": "after-used"}],
"@typescript-eslint/no-inferrable-types": ["error", { ignoreProperties: true }],
"@typescript-eslint/no-empty-function": ["off"],
"@typescript-eslint/ban-types": ["warn", {
"types": {
"Function": null,
}
}],
"@typescript-eslint/no-shadow": ["warn"],
"@typescript-eslint/semi": "error",
"arrow-parens": ["error", "as-needed"],
"node/no-deprecated-api": ["warn"],
"header/header": [2, "block", [{
Expand All @@ -54,8 +32,35 @@ module.exports = {
},
overrides: [
{
"files": ["test/**/*.ts"],
"rules": {
files: ['*.ts'],
rules: {
"@typescript-eslint/no-floating-promises": 2,
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "memberLike",
"modifiers": ["private", "protected"],
"format": ["camelCase"],
"leadingUnderscore": "require"
}
],
"@typescript-eslint/no-shadow": ["warn"],
"@typescript-eslint/no-unused-vars": ["error", {"argsIgnorePattern": "^_", "args": "after-used"}],
"@typescript-eslint/no-inferrable-types": ["error", { ignoreProperties: true }],
"@typescript-eslint/no-empty-function": ["off"],
"@typescript-eslint/ban-types": ["warn", {
"types": {
"Function": null,
}
}],
"@typescript-eslint/no-shadow": ["warn"],
"@typescript-eslint/semi": "error"
}
},
{
files: ["test/**/*.ts"],
rules: {
"no-empty": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-empty-function": "off",
Expand Down
13 changes: 13 additions & 0 deletions examples/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
env: {
mocha: true,
node: true,
es6: true
},
parserOptions: {
ecmaVersion: '2021'
},
rules: {
"header/header": "off"
}
}
17 changes: 0 additions & 17 deletions examples/.eslintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion examples/grpc-js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const api = require('@opentelemetry/api');
const tracer = require('./tracer')('example-grpc-js-client');
// eslint-disable-next-line import/order
const grpc = require('@grpc/grpc-js');
const messages = require('./helloworld_pb');
const services = require('./helloworld_grpc_pb');
Expand Down
1 change: 0 additions & 1 deletion examples/grpc-js/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const api = require('@opentelemetry/api');
const tracer = require('./tracer')(('example-grpc-js-server'));
// eslint-disable-next-line import/order
const grpc = require('@grpc/grpc-js');

const messages = require('./helloworld_pb');
Expand Down
1 change: 0 additions & 1 deletion examples/grpc/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const api = require('@opentelemetry/api');
const tracer = require('./tracer')('example-grpc-client');
// eslint-disable-next-line import/order
const grpc = require('grpc');
const messages = require('./helloworld_pb');
const services = require('./helloworld_grpc_pb');
Expand Down
1 change: 0 additions & 1 deletion examples/grpc/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const api = require('@opentelemetry/api');
const tracer = require('./tracer')(('example-grpc-server'));
// eslint-disable-next-line import/order
const grpc = require('grpc');

const messages = require('./helloworld_pb');
Expand Down
1 change: 0 additions & 1 deletion examples/http/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const api = require('@opentelemetry/api');
const tracer = require('./tracer')('example-http-client');
// eslint-disable-next-line import/order
const http = require('http');

/** A function which makes requests and handles response. */
Expand Down
1 change: 0 additions & 1 deletion examples/http/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const api = require('@opentelemetry/api');
const tracer = require('./tracer')('example-http-server');
// eslint-disable-next-line import/order
const http = require('http');

/** Starts a HTTP server that receives requests on sample server port. */
Expand Down
1 change: 0 additions & 1 deletion examples/https/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const api = require('@opentelemetry/api');
const tracer = require('./tracer')('example-https-client');
// eslint-disable-next-line import/order
const https = require('https');

/** A function which makes requests and handles response. */
Expand Down
1 change: 0 additions & 1 deletion examples/https/server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const api = require('@opentelemetry/api');
// eslint-disable-next-line import/order
const tracer = require('./tracer')('example-https-server');
const fs = require('fs');
const https = require('https');
Expand Down
17 changes: 0 additions & 17 deletions examples/tracer-web/.eslintrc

This file was deleted.

5 changes: 5 additions & 0 deletions examples/tracer-web/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
env: {
browser: true
}
}
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@
"@typescript-eslint/eslint-plugin": "5.3.1",
"@typescript-eslint/parser": "5.3.1",
"eslint": "7.32.0",
"eslint-config-airbnb-base": "14.2.1",
"eslint-plugin-header": "3.1.1",
"eslint-plugin-import": "2.25.3",
"eslint-plugin-node": "11.1.0",
"gh-pages": "3.2.3",
"lerna": "3.22.1",
Expand Down

0 comments on commit 4842a06

Please sign in to comment.