Skip to content

bingtsingw/mrm-preset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@bingtsingw/mrm-preset

mrm preset to keep configuration files in-sync and consistent across various projects. Highly inspired by mrm-preset-default and @adonisjs/mrm-preset.

✅ This project is configured by itself.

⚠️ This documentation uses @antfu/ni for npm operations.

Usage

$ ni mrm @bingtsingw/mrm-preset -D

Add script to package.json file

{
  "scripts": {
    "mrm": "mrm --preset=@bingtsingw/mrm-preset"
  }
}

Or use only one command

$ ni mrm @bingtsingw/mrm-preset -D && jq '.scripts += { mrm: "mrm --preset=@bingtsingw/mrm-preset" }' package.json > package.tmp && mv package.tmp package.json

Tasks

MIT License

Re-Create LICENSE file inside the project root.

$ nr mrm mit

Editorconfig

Remove and Re-Create a .editorconfig file inside the project root.

$ nr mrm editorconfig

Git Ignore

Re-Create .gitignore file inside the project root.

$ nr mrm gitignore

Typescript

  1. Create tsconfig.json (DO NOT add any configuration)
  2. Update .vscode/settings.json to support typescript
  3. install typescript, @types/node
$ nr mrm typescript

Release-it

  1. Add .release-it.json
  2. Add release npm scripts
  3. Add release-it and @release-it/conventional-changelog
$ nr mrm release-it

VSCode

Create a .vscode/settings.json file to set basic editor settings.

$ nr mrm vscode

Husky

  1. Remove current .husky folder
  2. Add husky package and run npx husky install
$ nr mrm husky

Lint-Staged

  1. Remove all .lintstaged configs
  2. Add lint-staged package and add husky pre-commit hook
$ nr mrm lint-staged

Commitizen

  1. Remove all commitizen configs
  2. Add commitizen packages and configs
  3. Install husky hook if exists
$ nr mrm commitizen

Prettier

  1. Remove all prettier config files
  2. Add .prettierrc.json and .prettierignore file
  3. Update .vscode/settings.json settings
  4. Add package.json scripts
  5. install prettier
    1. install prettier-plugin-organize-imports if in a typescript project
$ nr mrm prettier

Prisma

  1. Add prisma package and script
  2. Init prisma and add diff.sh
$ nr mrm prisma