-
Notifications
You must be signed in to change notification settings - Fork 155
chore(commons): Create a common package #314
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
Conversation
I know it's a draft, just leaving this here so I don't forget. Reviewed the files and it's looking good! Only note is to update the |
} | ||
} | ||
] | ||
} |
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 think we can remove all eslint config files outside of the root folder.
I did some research and eslint is smart enough to navigate to all the parent folders to look for a valid config file and use that one. We can leave the one at the root and set the value root
= true
in the file:
https://eslint.org/docs/user-guide/configuring/configuration-files#cascading-and-hierarchy
After that you can simply do the same in your IDE (webstorm works)
aws-lambda-powertools-typescript
├── package.json
├── .eslintrc -> setting `root` = `true`
├── packages
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.
yep but there is a lot to fix
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.
so préfères to keep it for a dedicated pr
logGroupName: '/aws/lambda/foo-bar-function-123456abcdef', | ||
logStreamName: '2021/03/09/[$LATEST]abcdef123456abcdef123456abcdef123456', | ||
invokedFunctionArn: 'arn:aws:lambda:eu-central-1:123456789012:function:Example', | ||
awsRequestId: 'c6af9ac6-7b61-11e6-9a41-93e8deadbeef', |
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 made some changes in the middleware branch: removed the deadbeef references and improved consistency of values:
arn:aws:lambda:eu-central-1:123456789012:function:Example -> arn:aws:lambda:eu-central-1:123456789012:function:foo-bar-function
Happy to repeat it in yours if you want
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.
Thanks Florian! Can you add an example on how can we leveage the shared resources like the tsconfig file in the commons package in another package?
you have a usage example in #316 |
Description
in order to simplify modules packaging, creating a common module for shared elements such as interfaces, types , test events etc.
Related issues, RFCs
#316
PR status
Is this ready for review?: YES
Is it a breaking change?: NO
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.