From 85573638d17a0287f1ee847175385f60f10e0119 Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Tue, 25 May 2021 10:43:52 +0300 Subject: [PATCH] chore: fix eslint config (#79) Co-authored-by: Valentin Marchaud --- api/.eslintrc.js | 8 +++++++- api/backwards-compatability/node10/index.ts | 19 +++++++++++++++++-- .../node10/tsconfig.json | 10 +--------- api/backwards-compatability/node12/index.ts | 19 +++++++++++++++++-- .../node12/tsconfig.json | 10 +--------- api/backwards-compatability/node8/index.ts | 19 +++++++++++++++++-- .../node8/tsconfig.json | 10 +--------- 7 files changed, 61 insertions(+), 34 deletions(-) diff --git a/api/.eslintrc.js b/api/.eslintrc.js index dc6c5b2faa..614b74a540 100644 --- a/api/.eslintrc.js +++ b/api/.eslintrc.js @@ -13,8 +13,14 @@ module.exports = { ], parser: "@typescript-eslint/parser", parserOptions: { - "project": "./tsconfig.json" + "project": [ + "./tsconfig.json", + "backwards-compatability/*/tsconfig.json" + ] }, + ignorePatterns: [ + 'build', + ], rules: { "@typescript-eslint/no-this-alias": "off", "eqeqeq": [ diff --git a/api/backwards-compatability/node10/index.ts b/api/backwards-compatability/node10/index.ts index 985d78f7d2..949c48a794 100644 --- a/api/backwards-compatability/node10/index.ts +++ b/api/backwards-compatability/node10/index.ts @@ -1,5 +1,20 @@ -import {NodeSDK, api} from '@opentelemetry/sdk-node'; -import {ConsoleSpanExporter} from '@opentelemetry/tracing'; +/* + * 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. + */ +import { NodeSDK, api } from '@opentelemetry/sdk-node'; +import { ConsoleSpanExporter } from '@opentelemetry/tracing'; const sdk = new NodeSDK({ traceExporter: new ConsoleSpanExporter(), diff --git a/api/backwards-compatability/node10/tsconfig.json b/api/backwards-compatability/node10/tsconfig.json index 0e5977e0b9..0a0c58df2f 100644 --- a/api/backwards-compatability/node10/tsconfig.json +++ b/api/backwards-compatability/node10/tsconfig.json @@ -1,18 +1,10 @@ { - "extends": "../../tsconfig.es5.json", + "extends": "../../tsconfig.json", "compilerOptions": { "rootDir": ".", "outDir": "build" }, "include": [ "index.ts" - ], - "references": [ - { - "path": "../../packages/opentelemetry-sdk-node" - }, - { - "path": "../../packages/opentelemetry-tracing" - } ] } diff --git a/api/backwards-compatability/node12/index.ts b/api/backwards-compatability/node12/index.ts index 985d78f7d2..949c48a794 100644 --- a/api/backwards-compatability/node12/index.ts +++ b/api/backwards-compatability/node12/index.ts @@ -1,5 +1,20 @@ -import {NodeSDK, api} from '@opentelemetry/sdk-node'; -import {ConsoleSpanExporter} from '@opentelemetry/tracing'; +/* + * 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. + */ +import { NodeSDK, api } from '@opentelemetry/sdk-node'; +import { ConsoleSpanExporter } from '@opentelemetry/tracing'; const sdk = new NodeSDK({ traceExporter: new ConsoleSpanExporter(), diff --git a/api/backwards-compatability/node12/tsconfig.json b/api/backwards-compatability/node12/tsconfig.json index 0e5977e0b9..0a0c58df2f 100644 --- a/api/backwards-compatability/node12/tsconfig.json +++ b/api/backwards-compatability/node12/tsconfig.json @@ -1,18 +1,10 @@ { - "extends": "../../tsconfig.es5.json", + "extends": "../../tsconfig.json", "compilerOptions": { "rootDir": ".", "outDir": "build" }, "include": [ "index.ts" - ], - "references": [ - { - "path": "../../packages/opentelemetry-sdk-node" - }, - { - "path": "../../packages/opentelemetry-tracing" - } ] } diff --git a/api/backwards-compatability/node8/index.ts b/api/backwards-compatability/node8/index.ts index 985d78f7d2..949c48a794 100644 --- a/api/backwards-compatability/node8/index.ts +++ b/api/backwards-compatability/node8/index.ts @@ -1,5 +1,20 @@ -import {NodeSDK, api} from '@opentelemetry/sdk-node'; -import {ConsoleSpanExporter} from '@opentelemetry/tracing'; +/* + * 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. + */ +import { NodeSDK, api } from '@opentelemetry/sdk-node'; +import { ConsoleSpanExporter } from '@opentelemetry/tracing'; const sdk = new NodeSDK({ traceExporter: new ConsoleSpanExporter(), diff --git a/api/backwards-compatability/node8/tsconfig.json b/api/backwards-compatability/node8/tsconfig.json index 0e5977e0b9..0a0c58df2f 100644 --- a/api/backwards-compatability/node8/tsconfig.json +++ b/api/backwards-compatability/node8/tsconfig.json @@ -1,18 +1,10 @@ { - "extends": "../../tsconfig.es5.json", + "extends": "../../tsconfig.json", "compilerOptions": { "rootDir": ".", "outDir": "build" }, "include": [ "index.ts" - ], - "references": [ - { - "path": "../../packages/opentelemetry-sdk-node" - }, - { - "path": "../../packages/opentelemetry-tracing" - } ] }