See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| import React from 'react' | |
| import styled from 'styled-components' | |
| import ReactSelect from 'react-select' | |
| export const App = () => { | |
| return ( | |
| <Container> | |
| <Select /> | |
| </Container> | |
| ) |
| import { appConfig } from '@app/config' | |
| export const paginateOptionsProvider = maxLimit => (page = 1, limit = maxLimit) => { | |
| const newLimit = Math.min(maxLimit, limit) | |
| const newPage = Math.max(page, 1) | |
| const offset = Math.max((newPage - 1) * newLimit, 0) | |
| return { | |
| limit: newLimit, | |
| page: newPage, | |
| offset, |
| const noop = () => {} | |
| export default (express, bind) => { | |
| const id = 'id' | |
| const resources = [ | |
| { path: '/', name: 'create', method: 'post' }, | |
| { path: '/', name: 'index', method: 'get' }, | |
| { path: `/:${id}`, name: 'show', method: 'get' }, | |
| { path: `/:${id}`, name: 'update', method: 'put' }, | |
| { path: `/:${id}`, name: 'delete', method: 'delete' }, |
| const deepClone = (initalObj, finalObj = {}) => { | |
| const obj = finalObj | |
| for (let i in initalObj) { | |
| var prop = initalObj[i] | |
| if (prop === obj) { | |
| continue | |
| } | |
| if (typeof prop === 'object') { |
| const { Validator, ValidationError } = require('jsonschema') | |
| const validator = new Validator() | |
| // override standard error messages | |
| // ValidationError.prototype.toString = function toString() { | |
| // const [instance, ...rest] = this.property.split('.') | |
| // return rest.join('.') + ' ' + this.message | |
| // } |