Merge branch 'pre-commit'

This commit is contained in:
Yanick Champoux 2022-12-01 13:57:29 -05:00
commit a9a13d76e3
7 changed files with 75 additions and 12 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
node_modules
.pls_cache/
.perl-version
pnpm-lock.yaml

20
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,20 @@
default_stages:
- merge-commit
- push
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: end-of-file-fixer
stages: [merge-commit, push]
- id: trailing-whitespace
stages: [merge-commit, push]
- id: check-merge-conflict
- repo: local
hooks:
- id: lint
name: lint
entry: task lint:fix --
language: system
files: ""

2
.prettierignore Normal file
View File

@ -0,0 +1,2 @@
.gitignore
input

View File

@ -1,12 +0,0 @@
# https://taskfile.dev
version: '3'
vars:
GREETING: Hello, World!
tasks:
default:
cmds:
- echo "{{.GREETING}}"
silent: true

24
Taskfile.yaml Normal file
View File

@ -0,0 +1,24 @@
# https://taskfile.dev
version: "3"
vars:
GREETING: Hello, World!
tasks:
"precommit:init": pre-commit install -t pre-merge-commit -t pre-push
integrate:
cmds:
- git is-clean
- git co main
- git weld -
lint:fix:
cmds:
- npx prettier --write {{.CLI_ARGS | default "." }}
default:
cmds:
- echo "{{.GREETING}}"
silent: true

19
package.json Normal file
View File

@ -0,0 +1,19 @@
{
"name": "2022",
"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": {
"debug": "^4.3.4",
"fs-extra": "^11.1.0",
"prettier": "^2.8.0",
"remeda": "^1.3.0",
"vitest": "^0.25.3"
}
}

9
vitest.config.js Normal file
View File

@ -0,0 +1,9 @@
/// <reference types="vitest" />
import { defineConfig } from "vite";
export default defineConfig({
test: {
include: ["**/*test.js"],
// ...
},
});