0.2.7 • Published 11 months ago
@haydenull/fabric v0.2.7
@haydenull/fabric
A collection of configuration files containing prettier, eslint, tsconfig and more
Usage
Install the package
pnpm add @haydenull/fabric -D
eslint-config
in .eslintrc.cjs
module.exports = {
extends: [require.resolve('@haydenull/fabric/eslint/react')],
}
prettier
in prettier.config.cjs
module.exports = {
...require("@haydenull/fabric/prettier"),
// docs: https://github.com/tailwindlabs/prettier-plugin-tailwindcss#sorting-classes-in-function-calls
tailwindConfig: '.your-path/tailwind.config.js',
tailwindFunctions: [], // ['cn', 'clsx']
}
verify commit
- install husky
- add commit-msg hook
# on Linux or Mac
echo "npx haydenull-fabric verify-commit" >> .husky/commit-msg
tsconfig
in tsconfig.json
{
"extends": "@haydenull/fabric/tsconfig/tsconfig.json",
}
czg
- global install
npm install -g czg
2.in cz.config.js
/** @type {import('czg').CommitizenGitOptions} */
module.exports = {
...require('@haydenull/fabric/cz'),
scopes: [/** your scopes */],
}
Recommended
Use lint-staged
- Install
pnpm add -D lint-staged
- in
package.json
{
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": [
"npx prettier --write",
"npx eslint --fix"
]
}
}
- add git hooks
# on Linux or Mac
echo "npx lint-staged" >> .husky/pre-commit
type check before commit
- in
package.json
{
"scripts": {
"typecheck": "tsc --noEmit"
}
}
- add git hooks
# on Linux or Mac
echo "npm run typecheck" >> .husky/pre-commit
spell check
Install Code Spell Checker Plugin for VSCode.
0.2.7
11 months ago
0.2.6
1 year ago
0.2.5
2 years ago
0.2.4
2 years ago
0.2.3
2 years ago
0.2.2
2 years ago
0.2.1
2 years ago
0.2.0
2 years ago
0.1.0
2 years ago
0.0.1-dev.13
2 years ago
0.0.1-dev.12
2 years ago
0.0.1-dev.11
2 years ago
0.0.1-dev.10
2 years ago
0.0.1-dev.9
2 years ago
0.0.1-dev.8
2 years ago
0.0.1-dev.7
2 years ago
0.0.1-dev.6
2 years ago
0.0.1-dev.5
2 years ago
0.0.1-dev.4
2 years ago
0.0.1-dev.3
2 years ago
0.0.1-dev.2
2 years ago
0.0.1-dev.1
2 years ago
0.0.1
2 years ago