From 878bee27733f35403ed79eeb583e9ab569f532ce Mon Sep 17 00:00:00 2001 From: Ali Sabzevari Date: Sat, 26 Jun 2021 11:58:17 +0200 Subject: [PATCH] chore: fix strict rule in getting-started lint config --- getting-started/.eslintrc | 9 ++++----- getting-started/example/app.js | 2 ++ getting-started/monitored-example/app.js | 2 ++ getting-started/monitored-example/monitoring.js | 2 ++ getting-started/traced-example/app.js | 2 ++ getting-started/traced-example/tracing.js | 2 ++ 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/getting-started/.eslintrc b/getting-started/.eslintrc index 0cf74b0b835..6b385b62156 100644 --- a/getting-started/.eslintrc +++ b/getting-started/.eslintrc @@ -4,14 +4,13 @@ }, "extends": "airbnb-base", "parserOptions": { - "sourceType": "module" + "sourceType": "script" }, "rules": { - "strict": ["error", "global"], "no-use-before-define": ["error", "nofunc"], "no-console": "off", "import/no-unresolved": "off", - "no-unused-vars": ["error", { "argsIgnorePattern": "^_" }] - }, - "ignorePatterns": "**/*_pb.js" + "no-unused-vars": ["error"], + "strict": ["error", "global"] + } } diff --git a/getting-started/example/app.js b/getting-started/example/app.js index aa7a3963626..287ab78cb3c 100644 --- a/getting-started/example/app.js +++ b/getting-started/example/app.js @@ -1,3 +1,5 @@ +'use strict'; + const PORT = process.env.PORT || '8080'; const express = require('express'); diff --git a/getting-started/monitored-example/app.js b/getting-started/monitored-example/app.js index 6189d314e85..af61cef67e5 100644 --- a/getting-started/monitored-example/app.js +++ b/getting-started/monitored-example/app.js @@ -1,3 +1,5 @@ +'use strict'; + const PORT = process.env.PORT || '8080'; const express = require('express'); diff --git a/getting-started/monitored-example/monitoring.js b/getting-started/monitored-example/monitoring.js index 1e2399f2879..0eefcc04fc1 100644 --- a/getting-started/monitored-example/monitoring.js +++ b/getting-started/monitored-example/monitoring.js @@ -1,3 +1,5 @@ +'use strict'; + const { MeterProvider } = require('@opentelemetry/metrics'); const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus'); diff --git a/getting-started/traced-example/app.js b/getting-started/traced-example/app.js index aa7a3963626..287ab78cb3c 100644 --- a/getting-started/traced-example/app.js +++ b/getting-started/traced-example/app.js @@ -1,3 +1,5 @@ +'use strict'; + const PORT = process.env.PORT || '8080'; const express = require('express'); diff --git a/getting-started/traced-example/tracing.js b/getting-started/traced-example/tracing.js index 1f80c373496..134d063251b 100644 --- a/getting-started/traced-example/tracing.js +++ b/getting-started/traced-example/tracing.js @@ -1,3 +1,5 @@ +'use strict'; + const { NodeTracerProvider } = require('@opentelemetry/node'); const { SimpleSpanProcessor } = require('@opentelemetry/tracing'); const { Resource } = require('@opentelemetry/resources');