initial commit

This commit is contained in:
Yanick Champoux 2021-11-24 11:05:15 -05:00
commit 24359c9934
4 changed files with 43 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
pnpm-lock.yaml
node_modules/

12
app/index.js Normal file
View File

@ -0,0 +1,12 @@
const Generator = require("yeoman-generator");
module.exports = class extends Generator {
async writing() {
await this.fs.copyTpl(
this.templatePath('pre-commit-config.yaml.ejs'),
this.destinationPath('.pre-commit-config.yaml.ejs')
);
}
};

View File

@ -0,0 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-merge-conflict
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.4.1" # Use the sha / tag you want to point at
hooks:
- id: prettier
additional_dependencies:
- prettier@2.4.1

15
package.json Normal file
View File

@ -0,0 +1,15 @@
{
"name": "generator-pre-commit",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "Yanick Champoux <yanick@babyl.ca> (http://techblog.babyl.ca/)",
"license": "ISC",
"dependencies": {
"yeoman-generator": "^5.4.2"
}
}