-
Notifications
You must be signed in to change notification settings - Fork 153
Maintenance: apply linting to docs/snippets
code snippets
#1252
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
Comments
@dreamorosi i can take this as task for Friday. |
Sure, that works. I expect the current linting to give errors about |
* fix(docs): apply eslint rules to code snippets * fix(docs): remove overrides, introduce changes to code-snippets * fix(docs): code-snippet captureAWSAll (#1252)
|
Summary
As part of the efforts described in #729 we are extracting the code snippets present in the docs in their own files, so that we can apply linting as part of our CI.
Once all the code has been extracted, and #1251 has been merged, we should apply the same linting that the rest of the project has to these files.
Why is this needed?
So that we can automate checking the correctness of the code snippets that are part of the docs, leading to a better DX.
Which area does this relate to?
Automation
Solution
The steps needed to close the issue would be:
docs/snippets/package.json
file:"lint": "eslint --ext .ts --no-error-on-unmatched-pattern logger tracer metrics parameters",
- example"lint-fix": "eslint --fix --ext .ts --no-error-on-unmatched-pattern logger tracer metrics parameters",
- exampleeslintrc.js
file at the root of the projectnpm run lint -w docs/snippets
and fix all the linting issues that show upNotes
handler
function contains theany
type. I would recommend to type them asunknown
for the time beingnpm i -D dependency-name -w docs/snippets
Acknowledgment
The text was updated successfully, but these errors were encountered: