Start
yarn create next-app
Git Flow
git flow init
Development Dependencies
Prettier
- Adicionar o
prettier
, seus plugins e criar os arquivos de configuraĆ§Ć£o:
yarn add prettier --dev;
git add -A;
git commit -m 'chore(prettier): adiciona o "prettier"';
yarn add @ianvs/prettier-plugin-sort-imports --dev;
git add -A;
git commit -m 'chore(prettier): adiciona o "@ianvs/prettier-plugin-sort-imports"';
yarn add eslint-config-prettier --dev;
git add -A;
git commit -m 'chore(prettier): adiciona o "eslint-config-prettier"';
yarn add prettier-plugin-package --dev;
git add -A;
git commit -m 'chore(prettier): adiciona o "prettier-plugin-package"';
yarn add prettier-plugin-prisma --dev;
git add -A;
git commit -m 'chore(prettier): adiciona o "prettier-plugin-prisma"';
yarn add prettier-plugin-tailwindcss --dev;
git add -A;
git commit -m 'chore(prettier): adiciona o "prettier-plugin-tailwindcss"';
echo ".next\\\\n.turbo" > .prettierignore;
git add -A;
git commit -m 'chore(prettier): cria o ".prettierignore"'
echo "{}" > prettier.config.mjs;
git add -A;
git commit -m 'chore(prettier): cria o "prettier.config.mjs"'
- Adicionar o script
format
no package.json
:
"format": "prettier --write \\"**/*.{css,html,js,json,jsx,md,mjs,scss,ts,tsx}\\""
git add -A;
git commit -m 'chore(prettier): adiciona o script "format" no "package.json"'
- Adicionar a
"prettier"
na lista "extends"
do .eslintrc.json
:
git add -A;
git commit -m 'chore(prettier): adiciona o "prettier" na "extends" do ".eslintrc.json"'
- Adicionar o
importOrder
no config
do prettier.config.mjs
:
importOrder: [
"<TYPES>^(node:)",
"",
"<TYPES>",
"",
"<TYPES>^[.]",
"",
"<BUILTIN_MODULES>",
"",
"<THIRD_PARTY_MODULES>",
"",
"^next",
"",
"^@/app/(.*)$",
"",
"^[.]",
"",
"^(?!.*[.]css$)[./].*$",
"",
".css$",
]
git add -A;
git commit -m 'chore(prettier): adiciona o "importOrder" no "config" do "prettier.config.mjs"'
- Adicionar o
plugins
no config
do prettier.config.mjs
:
plugins: [
"@ianvs/prettier-plugin-sort-imports",
"prettier-plugin-package",
"prettier-plugin-prisma",
"prettier-plugin-tailwindcss",
]