diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000..d2ae35e8 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn lint-staged diff --git a/package.json b/package.json index 37c66c71..0a0e38d0 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,10 @@ }, "lint-staged": { "./**/*.{js,jsx,ts,tsx}": [ - "next lint --fix" + "eslint --fix" ] + }, + "husky": { + "pre-push": "lint-staged" } } diff --git a/src/components/comment/CommentImageGrid/index.tsx b/src/components/comment/CommentImageGrid/index.tsx index 14d8d55d..73a8b886 100644 --- a/src/components/comment/CommentImageGrid/index.tsx +++ b/src/components/comment/CommentImageGrid/index.tsx @@ -1,8 +1,6 @@ -import React, { FC, useMemo } from 'react'; +import { FC } from 'react'; import classNames from 'classnames'; -import Image from 'next/future/image'; -import Gallery, { ImageWithSize } from 'react-easy-image-gallery'; import { imagePresets } from '~/constants/urls'; import { IFile } from '~/types'; diff --git a/yarn.lock b/yarn.lock index 25addd5c..568f7393 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2809,10 +2809,10 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -swiper@^8.0.7: - version "8.0.7" - resolved "https://registry.yarnpkg.com/swiper/-/swiper-8.0.7.tgz#9eefe26c703e627a6dc7237c0109e172ce06e3f6" - integrity sha512-GHjDfxSZdupfU7LrSVOpaNaT7R1D2zxopPGBFz1UOXOtsYvVJLg0k6NvkTAD7qn0ASl5pTti82qoYwvYvIkg4g== +swiper@^8.4.4: + version "8.4.5" + resolved "https://registry.yarnpkg.com/swiper/-/swiper-8.4.5.tgz#149ca81f67393d3f33abddd0f968fc37e99980b5" + integrity sha512-zveyEFBBv4q1sVkbJHnuH4xCtarKieavJ4SxP0QEHvdpPLJRuD7j/Xg38IVVLbp7Db6qrPsLUePvxohYx39Agw== dependencies: dom7 "^4.0.4" ssr-window "^4.0.2"