eslint configuration for getting-started examples#2297
eslint configuration for getting-started examples#2297obecny merged 9 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2297 +/- ##
==========================================
+ Coverage 92.70% 92.72% +0.02%
==========================================
Files 137 137
Lines 4990 4990
Branches 1054 1054
==========================================
+ Hits 4626 4627 +1
+ Misses 364 363 -1
|
|
Seems like the test is flaky. How can I retrigger the tests? |
obecny
left a comment
There was a problem hiding this comment.
why did you remove use strict ?
|
eslint disallows strict mode directives if the sourceType is module (Docs). |
ddbf67f to
832866d
Compare
|
The examples are not ecmascript modules so the sourceType for at least the examples should be script |
672c547 to
878bee2
Compare
|
Is there any way this can use the already existing eslint rules we have? Don't want to have to maintain two different sets of rules. |
f0b144c to
632ed1c
Compare
I changed the eslintrc to import the eslintrc from the examples directory. |
632ed1c to
a286de2
Compare
| @@ -0,0 +1,16 @@ | |||
| { | |||
There was a problem hiding this comment.
in general, why can't you use our eslint.config.js from main folder and extend from it ?
There was a problem hiding this comment.
That's what he did above https://github.com/open-telemetry/opentelemetry-js/pull/2297/files#diff-4bb0b44ed2e9b719ea2593f63cf9aebd302f9e7a1f3a109e5c35f6ee59d95d87R4
I think he probably just forgot to apply the suggestion to both eslintrc files.
There was a problem hiding this comment.
I was not able to use the project eslint config for typescript files because it requires that getting-started being added to the projects. I get this error when using the project eslint config:
0:0 error Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: getting-started/ts-example/traced-example/tracing.ts.
The file must be included in at least one of the projects provided
e274636 to
a034441
Compare
fixes #1390
Which problem is this PR solving?
Short description of the changes
ts-exampleneeded another configuration.