Browse Source

Merge branch 'pre-commit'

main
Yanick Champoux 4 months ago
parent
commit
d5737d88d3
  1. 1
      .gitignore
  2. 20
      .pre-commit-config.yaml
  3. 2
      .prettierignore
  4. 12
      2022/Taskfile.yaml
  5. 2250
      2022/input
  6. 24
      Taskfile.yaml
  7. 19
      package.json
  8. 9
      vitest.config.js

1
.gitignore vendored

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

20
.pre-commit-config.yaml

@ -0,0 +1,20 @@ @@ -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

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

12
2022/Taskfile.yaml

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

2250
2022/input

File diff suppressed because it is too large Load Diff

24
Taskfile.yaml

@ -0,0 +1,24 @@ @@ -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

@ -0,0 +1,19 @@ @@ -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

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