Skip to content

Commit

Permalink
chore: added husky
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangchi0104 committed Jan 24, 2024
1 parent 5d62e9b commit 82198ea
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 34 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm lint:fix
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"build": "webpack --config=./webpack.prod.js",
"lint": "eslint ./src/",
"lint:fix": "eslint ./src/ --fix",
"toc": "i18next-resources-for-ts toc -i ./src/langs/en -o ./src/@types/resources.ts"
"toc": "i18next-resources-for-ts toc -i ./src/langs/en -o ./src/@types/resources.ts",
"prepare": "husky install"
},
"keywords": [],
"author": "",
Expand Down Expand Up @@ -48,7 +49,8 @@
"webpack-bundle-analyzer": "^4.10.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.10.0"
"webpack-merge": "^5.10.0",
"husky": "^8.0.0"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.4.2",
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/@types/resources.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import translations from '../langs/en/translations.json';
import translations from "../langs/en/translations.json";

const resources = {
translations
Expand Down
10 changes: 5 additions & 5 deletions src/animation/particles/Particle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ abstract class Particle
this.dpi = window.devicePixelRatio || 1;
}

move(refreshRate = 60) {
move() {
this.x += this.dx * Particle.DPI;
this.y += this.dy * Particle.DPI;
}

rotate(refreshRate = 60) {
rotate() {
this.deg += this.ddeg;
}

Expand Down Expand Up @@ -98,10 +98,10 @@ abstract class Particle
}
return true;
}
public nextFrame(refreshRate = 60) {
public nextFrame() {
// this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
this.move(refreshRate);
this.rotate(refreshRate);
this.move();
this.rotate();
}
}

Expand Down
1 change: 0 additions & 1 deletion src/components/AboutMe/AboutMeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import React, { useState } from "react";
import { Card } from "../Card";
import Collapsable from "../Collapsable";
import { init } from "i18next";

interface AboutMeCardSelfProps {
heading: string | JSX.Element;
Expand Down
2 changes: 1 addition & 1 deletion src/components/AboutMe/sections/Education.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Suspense } from "react";
import React from "react";
import { useTranslation } from "react-i18next";

import Section from "@/components/Section";
Expand Down
2 changes: 1 addition & 1 deletion src/components/NavBar/Settings/AppearanceMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useAppDispatch, useAppSelector } from "@/hooks";
import { selectAppearance } from "@/store/selectors";

import React, { useTransition } from "react";
import React from "react";
import {
SunIcon,
MoonIcon,
Expand Down
3 changes: 1 addition & 2 deletions src/components/Projects/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React, { Suspense } from "react";
import React from "react";

import IntersectionDetector from "../IntersectionObserver";
import { useAppDispatch } from "@/hooks";
import { setActiveSectionName } from "@/store/actions";
import { useTranslation } from "react-i18next";
import Loading from "../Loading";
const ProjectCard = React.lazy(
() => import(/* webpackChunkName: "project-card" */ "./ProjectCard")
);
Expand Down
21 changes: 0 additions & 21 deletions src/components/Typography.tsx

This file was deleted.

0 comments on commit 82198ea

Please sign in to comment.