@fcsukltd/config
v1.1.1
Published
This library provides a number of shared configurations
Downloads
141
Keywords
Readme
Shared Configuration
This library provides a number of shared configurations.
By default, nothing is installed. So if you wish to leverage shared configuration, add the snippets below to your own code:
TypeScript
Create tsconfig.json
in the root of the project:
{
"extends": "@fcsukltd/config/shared/tsconfig.json"
}
Prettier
Add the following to package.json
:
{
"prettier": "@fcsukltd/config/shared/prettier"
}
ESLint
Add the following to package.json
:
{
"scripts": {
"lint": "cryo lint"
},
"eslintConfig": {
"extends": ["./node_modules/@fcsukltd/config/shared/eslint"]
}
}
Jest
Add the following to package.json
:
Note: This uses the SWC compiler for TypeScript
{
"scripts": {
"test": "cryo test"
},
"jest": {
"preset": "@fcsukltd/config/shared/jest"
}
}
Commitlint
Add the following to package.json
:
{
"commitlint": {
"extends": ["@fcsukltd/config/shared/commitlint"]
}
}
Semantic Release
Add the following to package.json
:
{
"scripts": {
"semantic-release": "cryo release"
},
"release": {
"extends": "@fcsukltd/config/shared/release"
}
}
Husky
Adding Husky to your project will also automatically enable
commitlint
andlint-staged
libraries.
You must have the [Jest] and [ESLint] configurations installed to use this
Add the following to package.json
:
{
"scripts": {
"postinstall": "cryo husky install"
}
}