Start
npx create-turbo@latest --package-manager=yarn
Yarn
- Run
yarn
for the first time:
yarn;
git add -A;
git commit -m 'chore: runs yarn for the first time'
Git Flow
git flow init -d
Development Dependencies
Prettier
- Add
prettier
, its plugins and create configuration files:
yarn add @ianvs/prettier-plugin-sort-imports --dev --ignore-workspace-root-check;
git add -A;
git commit -m 'chore(prettier): adds @ianvs/prettier-plugin-sort-imports';
yarn add eslint-config-prettier --dev --ignore-workspace-root-check;
git add -A;
git commit -m 'chore(prettier): adds eslint-config-prettier';
yarn add prettier-plugin-package --dev --ignore-workspace-root-check;
git add -A;
git commit -m 'chore(prettier): adds prettier-plugin-package';
yarn add prettier-plugin-prisma --dev --ignore-workspace-root-check;
git add -A;
git commit -m 'chore(prettier): adds prettier-plugin-prisma';
yarn add prettier-plugin-tailwindcss --dev --ignore-workspace-root-check;
git add -A;
git commit -m 'chore(prettier): adds prettier-plugin-tailwindcss';
echo ".next\\\\n.turbo" > .prettierignore;
git add -A;
git commit -m 'chore(prettier): creates the .prettierignore';
cat <<EOF > prettier.config.mjs
/**
* @see <https://prettier.io/docs/en/configuration.html>
* @type {import("prettier").Config}
*/
const config = {};
export default config;
EOF
;
git add -A;
git commit -m 'chore(prettier): creates the prettier.config.mjs'
- Adjust the
format
script:
"format": "prettier --write \\"**/*.{css,html,js,json,jsx,md,ts,tsx}\\"",
git add -A;
git commit -m 'chore(prettier): adjusts the format script'
- Add the
importOrder
in the config
of 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): adds the "importOrder" in the "prettier.config.mjs" "config"'
- Add the
plugins
in the config
of prettier.config.mjs
: