Copy the .npmrc file to your project
For example:
yarn add @janziemba/eslint-config-base @janziemba/eslint-config-react @janziemba/eslint-config-typescript
module.exports = {
extends: [
require.resolve('@janziemba/eslint-config-base'),
require.resolve('@janziemba/eslint-config-react'),
require.resolve('@janziemba/eslint-config-typescript'),
],
};
yarn add @janziemba/frontend-shared-configs
In VS Code, install ESLint plugin and Prettier plugin
Copy + paste the file .vscode/settings.json to your project.
module.exports = {
extends: [require.resolve('@janziemba/frontend-shared-configs/.commitlintrc.js')],
};
Copy + paste the file .editorconfig
See example in .lintstagedrc.js
module.exports = require('@janziemba/frontend-shared-configs/.prettierrc.js');
module.exports = {
extends: [require.resolve('@janziemba/frontend-shared-configs/.releaserc.js')],
};
{
"extends": "./node_modules/@janziemba/frontend-shared-configs/tsconfig.json"
}
yarn add husky pretty-quick lint-staged --dev
npm set-script prepare "husky install && echo 'PATH=$PATH:'$PATH >> .husky/_/husky.sh"
yarn prepare
yarn husky add .husky/pre-commit "yarn pretty-quick --staged && yarn lint-staged && yarn tsc"
yarn husky add .husky/commit-msg 'yarn commitlint --edit "$1"'