Best practices around using AWS SDK in Javascript & Typescript projects.
References:
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install @stedi-oss/eslint-plugin-stedi-aws-rules
:
npm install @stedi-oss/eslint-plugin-stedi-aws-rules --save-dev
Add stedi
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["@stedi-oss/stedi-aws-rules"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"@stedi-oss/stedi-aws-rules/no-aws-import": "error",
"@stedi-oss/stedi-aws-rules/instrument-aws-clients": "error",
"@stedi-oss/stedi-aws-rules/instrument-document-clients": "error"
}
}
As Stedi uses this for own projects, we know this might not be the perfect approach for all the projects out there. If you have any ideas, just open an issue and tell us you think.
If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.
To follow our structure, when bootstraping new rule please use generator-eslint to do so.
Make sure you're in the top-level directory of this repo and type:
$ yo eslint:rule
New releases are generated with each commit to the master using semantic-release