Meistrari `mise-en-place` ---
npm install @meistrari/mise-en-placeMeistrari mise-en-place
---
Before cooking anything, it's important to have your mise en place ready. This project helps you set up your development environment with essential configurations and tools.
Add mise-en-place postinstall to your project's package.json postinstall script to automatically set up the mise en place after installing dependencies:
``json`
{
"scripts": {
"postinstall": "mise-en-place postinstall"
}
}
Then install the package as a development dependency and run the postinstall script:
`sh`
bun i -D @meistrari/mise-en-place
bunx mise-en-place postinstall
It will also setup the initial _mise-en-place_ in your project. Which includes:
- Adding a Makefile with useful commands..editorconfig
- Adding an file.postinstall
- Adding ESLint configuration.
- Adding TypeScript configuration.
- Setting up script to keep all @meistrari/* packages up to date.
script to run mise-en-place postinstall, every time you run install your dependencies, it will check for the latest versions of all @meistrari/* packages in your project and update them if necessary.This process will add a leading caret (
^) to the version range if it is not already present. Which means that it will update to the latest minor and patch versions automatically but never the major version.Makefile
Commands with ## after the target are 'public' commands and are intended to be used by developers and will show up in the help message.The other commands are 'hidden' and are intended to be used by automations or by other 'public' commands.
If you installed
@meistrari/mise-en-place on a parent directory, you may need to set the MISE_EN_PLACE_INSTALL_DIR variable before including the Makefile:`Makefile
MISE_EN_PLACE_INSTALL_DIR=.. # Parent directory
-include $(MISE_EN_PLACE_INSTALL_DIR)/node_modules/@meistrari/mise-en-place/Makefile`EditorConfig
Since the editorconfig file don't support extending from other files, the postinstall script will always copy the .editorconfig file from this project to your project root.Eslint Config
Add the following code in your eslint.config.mjs to include this project's ESLint configuration:`ts
export { default } from '@meistrari/mise-en-place/eslint'
`> If some rules needs to be updated, you can update the rules in this project (preferrable) or customize them in your own configuration (not preferrable).
> You probably don't need to customize the configuration, since it is already designed to be a good starting point for most projects.
> Remember that customizing too much can make your project diverge from the standard and make it harder to maintain.
If you understand the risk and NEED to customize the configuration, you can import the default configuration and extend it:
`ts
import miseEnPlaceEslintConfig from '@meistrari/mise-en-place/eslint'export default miseEnPlaceEslintConfig
.append({
rules: {
// your custom rules here
}
})
`TSConfig
Add the following code in your
tsconfig.json to include this project's TypeScript configuration:`json
{
"extends": "./node_modules/@meistrari/mise-en-place/tsconfig.base.json"
}
``