See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
| # | |
| # Sets Prezto options. | |
| # | |
| # Authors: | |
| # Sorin Ionescu <[email protected]> | |
| # | |
| # | |
| # General | |
| # |
While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.
Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.
lib/ is intended for code that can run as-issrc/ is intended for code that needs to be manipulated before it can be used| const AWS = require("aws-sdk"); | |
| const s3 = new AWS.S3({ apiVersion: "2006-03-01" }); | |
| exports.handler = async(event) => { | |
| const buckets = await s3.listBuckets().promise(); | |
| return { | |
| statusCode: 200, | |
| body: JSON.stringify(buckets), | |
| }; |
| /* | |
| Code examples from the article: S.O.L.I.D The first 5 priciples of Object Oriented Design with JavaScript | |
| https://medium.com/@cramirez92/s-o-l-i-d-the-first-5-priciples-of-object-oriented-design-with-javascript-790f6ac9b9fa#.7uj4n7rsa | |
| */ | |
| const shapeInterface = (state) => ({ | |
| type: 'shapeInterface', | |
| area: () => state.area(state) | |
| }) |