From 0177374334fb83d32f3c0757584b04783ff5b029 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 0cf74b0b83..6b385b6215 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 aa7a396362..287ab78cb3 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 6189d314e8..af61cef67e 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 1e2399f287..0eefcc04fc 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 aa7a396362..287ab78cb3 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 15040f834f..6877140d94 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');