generator-important-misc
v0.2.0
Published
Create linter/formatter/githook into your project
Downloads
2
Readme
generator-important-misc
Create linter/formatter/githook into your project
Installation
First, install Yeoman and generator-important-misc using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-important-misc
Then generate your linter/formatter/githooks:
cd <your-project-root>
yo important-misc
What is included
- editorconfig
- ignore-sync CLI tool to build and sync .*ignore files across files and repositories
- markdownlint Markdown lint tool
- commitlint Lint commit messages
- import-sort
- lint-staged
Default created/updated files
├── .commitlintrc.json
├── .editorconfig
├── .gitattributes
├── .gitignore
├── .gitignore-sync
├── .markdownlint.json
├── package.json
└── yarn.lock
package.json
{
"devDependencies": {
+ "ignore-sync": "^1.2.0",
+ "markdownlint-cli": "^0.8.1",
+ "@commitlint/cli": "^6.1.3",
+ "@commitlint/config-conventional": "^6.1.3",
+ "import-sort-cli": "^4.2.0",
+ "import-sort-parser-babylon": "^4.2.0",
+ "import-sort-style-module": "^4.2.0",
+ "husky": "^0.14.3",
+ "lint-staged": "^7.0.0"
},
"scripts": {
+ "ignore-sync": "ignore-sync",
+ "commitmsg": "commitlint -e $GIT_PARAMS",
+ "lint-staged": "lint-staged",
+ "precommit": "lint-staged"
},
+ "importSort": {
+ ".js": {
+ "parser": "import-sort-parser-babylon",
+ "style": "import-sort-style-module"
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "import-sort --write",
+ "git add"
+ ],
+ "*ignore-sync": [
+ "ignore-sync",
+ "git add"
+ ],
+ "*.md": [
+ "markdownlint",
+ "git add"
+ ]
+ }
}
License
MIT © Nick Chan