initial commit
This commit is contained in:
commit
24359c9934
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
pnpm-lock.yaml
|
||||
node_modules/
|
12
app/index.js
Normal file
12
app/index.js
Normal 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')
|
||||
);
|
||||
}
|
||||
|
||||
};
|
14
app/templates/pre-commit-config.yaml.ejs
Normal file
14
app/templates/pre-commit-config.yaml.ejs
Normal 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
15
package.json
Normal 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"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user