Closed
Description
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:
- add two new npm scripts to the
docs/snippets/package.json
file: - verify that the linting rules applied are the one in the main
eslintrc.js
file at the root of the project - run
npm run lint -w docs/snippets
and fix all the linting issues that show up
Notes
- in many cases the signature of the
handler
function contains theany
type. I would recommend to type them asunknown
for the time being - as far as I can tell, there's no missing dependency. If there's any, install them like this
npm i -D dependency-name -w docs/snippets
Acknowledgment
- This request meets Lambda Powertools Tenets
- Should this be considered in other Lambda Powertools languages? i.e. Python, Java