9.1.0 • Published 2 months ago
hd-scripts v9.1.0
hd-scripts
My personal config and scripts for projects
Install
pnpm install hd-scripts
Usage
package.json
{
"main": "src/index.js",
"types": "dist/src/index.d.ts",
"files": ["dist/src", "src", "index.js", "cli.js"],
"scripts": {
"lint": "eslint . && prettier --check **/*.{js,ts,yml,json} --ignore-path .gitignore && tsc"
},
"simple-git-hooks": {
"pre-commit": "npx lint-staged"
},
"lint-staged": {
"*.{js,ts,md,yml,json}": "prettier --write",
"*": "eslint --fix"
},
"eslintConfig": {
"extends": "./node_modules/hd-scripts/eslint/index.js",
"ignorePatterns": ["node_modules", "coverage", "dist", "docs"],
// for preact
"rules": {
"react/no-unknown-property": "off",
"react/prop-types": "off"
},
"settings": {
"react": {
"pragma": "h",
"version": "18.0"
}
}
},
"prettier": "hd-scripts/prettier.config.js"
}
tsconfig.json
{
"extends": "hd-scripts/tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"emitDeclarationOnly": true
},
"include": ["src", "test.js", "cli.js", "package.json"]
}
For typescript code bases:
{
"extends": "hd-scripts/tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"module": "NodeNext",
"moduleResolution": "NodeNext"
},
"include": ["src", "test.js", "cli.js", "package.json"]
}
In monorepos you can install hd-scripts
only in the root and extends the root tsconfig.json
in the packages.
License
MIT © Hugo Dias
9.1.0
2 months ago
9.0.6
7 months ago
9.0.5
8 months ago
9.0.4
8 months ago
9.0.3
8 months ago
8.1.2
8 months ago
8.1.1
8 months ago
9.0.2
8 months ago
9.0.1
8 months ago
9.0.0
8 months ago
8.0.0
9 months ago
7.0.0
11 months ago
5.0.0
1 year ago
6.0.0
1 year ago
4.1.0
1 year ago
4.0.0
1 year ago
3.0.2
2 years ago
3.0.1
2 years ago
3.0.0
2 years ago
2.1.0
2 years ago
2.0.1
2 years ago
2.0.0
2 years ago
1.1.2
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.0
3 years ago
0.1.1
3 years ago
0.0.13
7 years ago
0.0.12
7 years ago
0.0.11
7 years ago
0.0.9
7 years ago
0.0.8
7 years ago
0.0.6
7 years ago
0.0.5
7 years ago
0.0.4
7 years ago
0.0.3
7 years ago
0.0.1
7 years ago