Skip to content

Instantly share code, notes, and snippets.

View diegomais's full-sized avatar
💭
The only way to go fast, is to go well.

Diego Mais diegomais

💭
The only way to go fast, is to go well.
View GitHub Profile
@diegomais
diegomais / .dockerignore
Last active September 13, 2020 23:56
Express
node_modules
@diegomais
diegomais / .eslintrc.json
Created August 28, 2020 18:21
ESLint with Standard Style Guide
{
"env": {
"browser": true,
"es2020": true,
"node": true,
"jest": true
},
"extends": [
"plugin:react/recommended",
"standard",
@diegomais
diegomais / prettier.config.js
Created August 28, 2020 18:20
Prettier with Standard Style Guide
module.exports = {
semi: false,
singleQuote: true,
arrowParens: 'avoid',
trailingComma: 'none',
endOfLine: 'auto'
};
@diegomais
diegomais / gitmoji-list.md
Created August 1, 2020 19:54
An emoji guide for commit messages. 😜
emoji code description
🎨 :art: Improve structure / format of the code.
⚡️ :zap: Improve performance.
🔥 :fire: Remove code or files.
🐛 :bug: Fix a bug.
🚑 :ambulance: Critical hotfix.
:sparkles: Introduce new features.
📝 :pencil: Write docs.
🚀 :rocket: Deploy stuff.
[
{ value: 'AC', label: 'Acre' },
{ value: 'AL', label: 'Alagoas' },
{ value: 'AP', label: 'Amapá' },
{ value: 'AM', label: 'Amazonas' },
{ value: 'BA', label: 'Bahia' },
{ value: 'CE', label: 'Ceará' },
{ value: 'DF', label: 'Distrito Federal' },
{ value: 'ES', label: 'Espírito Santo' },
{ value: 'GO', label: 'Goiás' },
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to NVM
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# Path to your oh-my-zsh installation.
export ZSH="/Users/diego/.oh-my-zsh"
version: 2.1
orbs:
node: circleci/[email protected]
jobs:
build-and-test:
executor:
name: node/default
steps:

AdonisJS

Instalando CLI do Adonis

Cole no terminal o seguinte comando para instalar a interface de linha de comando do Adonis:

npm install -g @adonisjs/cli

Criar um novo projeto

Commit lint configuration :emoji:

Instale as seguintes dependências:

yarn add -D husky @commitlint/{config-conventional,cli}

Feito isso, adicione ao package.json o seguinte comando:

"husky": {
@diegomais
diegomais / pt-validation.json
Created May 17, 2020 21:27
Adonis custom validation messages
{
"above": "{{field}} deve ser acima de {{argument.0}}.",
"accepted": "{{field}} deve ter sido aceito",
"after": "{{field}} deve ser uma data após {{argument.0}}",
"after_offset_of": "{{field}} deve ser mais recente que {{argument.0}} {{argument.1}} a partir da data atual",
"alpha": "{{field}} deve conter apenas letras",
"alpha_numeric": "{{field}} deve conter apenas letras e números",
"array": "{{field}} deve ser um ARRAY.",
"before": "{{field}} deve ser uma data anterior a {{argument.0}}.",
"before_offset_of": "{{field}} deve ser aterior a {{argument.0}} {{argument.1}} a partir da data de hoje",