-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eslint configuration for getting-started examples #2297
eslint configuration for getting-started examples #2297
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-example
needed another configuration.