mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 08:41:37 +00:00
chore(deps): add prettier organize import
format code
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
{
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"endOfLine": "lf"
|
||||
"singleQuote": true
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import GistsCodeSkeleton from 'components/pages/gists/gists-code-skeleton';
|
||||
import clsx from 'clsx';
|
||||
import GistsCodeSkeleton from 'components/pages/gists/gists-code-skeleton';
|
||||
|
||||
const loading = () => {
|
||||
return (
|
||||
|
@ -1,7 +1,6 @@
|
||||
import clsx from 'clsx';
|
||||
import { projects, selfHosts } from 'components/pages/projects/content';
|
||||
import PojectCardSkeleton from 'components/pages/projects/project-card-skeleton';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
const Loading = () => {
|
||||
return (
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { AnchorHTMLAttributes, forwardRef, memo } from 'react';
|
||||
import clsx from 'clsx';
|
||||
import { AnchorHTMLAttributes, forwardRef, memo } from 'react';
|
||||
import { FiExternalLink } from 'react-icons/fi';
|
||||
|
||||
interface Props extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
||||
|
@ -1,13 +1,13 @@
|
||||
import GistCode from 'components/common/gist-code';
|
||||
import Anchor from 'components/mdx/anchor';
|
||||
import Image from 'components/mdx/image';
|
||||
import Paragraph from 'components/mdx/paragraph';
|
||||
import Pre from 'components/mdx/pre';
|
||||
import RUACodepen from 'components/rua/rua-codepen';
|
||||
import RUACodeSandbox from 'components/rua/rua-code-sandbox';
|
||||
import RUACodepen from 'components/rua/rua-codepen';
|
||||
import RUASandpack from 'components/rua/rua-sandpack';
|
||||
import Tab from 'components/rua/tab';
|
||||
import TabItem from 'components/rua/tab/tab-item';
|
||||
import GistCode from 'components/common/gist-code';
|
||||
import Paragraph from 'components/mdx/paragraph';
|
||||
|
||||
const components = {
|
||||
RUASandpack,
|
||||
|
@ -1,14 +1,6 @@
|
||||
import clsx from 'clsx';
|
||||
import CopyButton from 'components/post/copy-button';
|
||||
import CopyCode from 'components/post/copy-code';
|
||||
import useCopyToClipboard from 'lib/hooks/use-copy-to-clipboard';
|
||||
import {
|
||||
DetailedHTMLProps,
|
||||
HTMLAttributes,
|
||||
memo,
|
||||
useCallback,
|
||||
useRef,
|
||||
} from 'react';
|
||||
import { DetailedHTMLProps, HTMLAttributes, memo } from 'react';
|
||||
|
||||
type Props = {} & DetailedHTMLProps<
|
||||
HTMLAttributes<HTMLPreElement>,
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
import { Canvas } from '@react-three/fiber';
|
||||
import clsx from 'clsx';
|
||||
import Loading from 'components/rua/loading/rua-loading';
|
||||
import { Suspense, lazy } from 'react';
|
||||
import useStore from 'store';
|
||||
import Loading from 'components/rua/loading/rua-loading';
|
||||
|
||||
const CloudModel = lazy(() => import('components/models/cloud-model'));
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Link from 'next/link';
|
||||
import { Post } from 'types';
|
||||
import clsx from 'clsx';
|
||||
import Link from 'next/link';
|
||||
import { memo } from 'react';
|
||||
import { Post } from 'types';
|
||||
|
||||
interface Props {
|
||||
post: Post;
|
||||
|
@ -1,11 +1,11 @@
|
||||
'use client';
|
||||
|
||||
import clsx from 'clsx';
|
||||
import { THEME_CATPUCCIN_MAP } from 'lib/consts';
|
||||
import useInView from 'lib/hooks/use-in-view';
|
||||
import { useTheme } from 'next-themes';
|
||||
import { memo, useEffect, useState } from 'react';
|
||||
import RUALoading from './loading/rua-loading';
|
||||
import { THEME_CATPUCCIN_MAP, THEME_MAP } from 'lib/consts';
|
||||
|
||||
const pattern =
|
||||
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/;
|
||||
|
@ -6,10 +6,18 @@ import {
|
||||
} from 'content/sandpack/how-to-load-a-background-with-threejs';
|
||||
import { Button, Input } from './sandpack';
|
||||
import {
|
||||
miniRedux,
|
||||
multi,
|
||||
app1,
|
||||
app2,
|
||||
app3,
|
||||
signal1,
|
||||
signal2,
|
||||
signal3,
|
||||
} from './sandpack/automatic-dependency-collect';
|
||||
import {
|
||||
MultiStore,
|
||||
Reducer,
|
||||
miniRedux,
|
||||
multi,
|
||||
} from './sandpack/build-own-store-with-usesyncexternalstore';
|
||||
import {
|
||||
genericApp,
|
||||
@ -24,14 +32,6 @@ import {
|
||||
useSyncExternalStore,
|
||||
useTransition,
|
||||
} from './sandpack/react18-new-hooks';
|
||||
import {
|
||||
app1,
|
||||
app2,
|
||||
app3,
|
||||
signal1,
|
||||
signal2,
|
||||
signal3,
|
||||
} from './sandpack/automatic-dependency-collect';
|
||||
|
||||
const data = {
|
||||
sandpack: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Lobster, Barlow, JetBrains_Mono, Poppins } from 'next/font/google';
|
||||
import { Barlow, JetBrains_Mono, Lobster, Poppins } from 'next/font/google';
|
||||
|
||||
export const lobster = Lobster({
|
||||
weight: ['400'],
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
const useMounted = () => {
|
||||
const [mounted, setMounted] = useState(false);
|
||||
|
@ -1,9 +1,9 @@
|
||||
import fs from 'fs/promises';
|
||||
import path from 'path';
|
||||
import matter from 'gray-matter';
|
||||
import { MyMatters, Post } from 'types';
|
||||
import { sortByDate } from 'lib/utils';
|
||||
import path from 'path';
|
||||
import { cache } from 'react';
|
||||
import { MyMatters, Post } from 'types';
|
||||
|
||||
export const dataPath = 'content/posts';
|
||||
|
||||
|
@ -9,9 +9,9 @@
|
||||
"build-local": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"pretty": "prettier --write \"./**/*.{js,jsx,ts,tsx,json,md,mdx,css}\" --ignore-unknown",
|
||||
"pretty-check": "prettier \"./**/*.{js,jsx,ts,tsx,json,md,mdx,css}\" --ignore-unknown --check",
|
||||
"prepare": "husky"
|
||||
"pretty": "prettier --write \"./**/*.{js,jsx,ts,tsx,json,md,mdx,css}\" --ignore-unknown --plugin=prettier-plugin-organize-imports",
|
||||
"pretty-check": "prettier \"./**/*.{js,jsx,ts,tsx,json,md,mdx,css}\" --ignore-unknown --check --plugin=prettier-plugin-organize-imports",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"dependencies": {
|
||||
"@catppuccin/highlightjs": "^0.1.4",
|
||||
@ -63,6 +63,7 @@
|
||||
"leva": "^0.9.35",
|
||||
"postcss": "^8.4.38",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier-plugin-organize-imports": "^4.0.0",
|
||||
"raw-loader": "^4.0.2",
|
||||
"sass": "^1.77.2",
|
||||
"tailwindcss": "^3.4.3",
|
||||
|
39
pnpm-lock.yaml
generated
39
pnpm-lock.yaml
generated
@ -150,6 +150,9 @@ importers:
|
||||
prettier:
|
||||
specifier: ^3.2.5
|
||||
version: 3.2.5
|
||||
prettier-plugin-organize-imports:
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0(prettier@3.2.5)(typescript@5.4.5)
|
||||
raw-loader:
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.2(webpack@5.88.2)
|
||||
@ -2885,6 +2888,19 @@ packages:
|
||||
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
|
||||
prettier-plugin-organize-imports@4.0.0:
|
||||
resolution: {integrity: sha512-vnKSdgv9aOlqKeEFGhf9SCBsTyzDSyScy1k7E0R1Uo4L0cTcOV7c1XQaT7jfXIOc/p08WLBfN2QUQA9zDSZMxA==}
|
||||
peerDependencies:
|
||||
'@vue/language-plugin-pug': ^2.0.24
|
||||
prettier: '>=2.0'
|
||||
typescript: '>=2.9'
|
||||
vue-tsc: ^2.0.24
|
||||
peerDependenciesMeta:
|
||||
'@vue/language-plugin-pug':
|
||||
optional: true
|
||||
vue-tsc:
|
||||
optional: true
|
||||
|
||||
prettier@3.2.5:
|
||||
resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==}
|
||||
engines: {node: '>=14'}
|
||||
@ -5260,8 +5276,8 @@ snapshots:
|
||||
'@typescript-eslint/parser': 6.7.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
eslint: 8.57.0
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.57.0)
|
||||
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.0)(eslint@8.57.0)
|
||||
eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0)
|
||||
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
|
||||
eslint-plugin-jsx-a11y: 6.7.1(eslint@8.57.0)
|
||||
eslint-plugin-react: 7.33.2(eslint@8.57.0)
|
||||
eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.57.0)
|
||||
@ -5279,13 +5295,13 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.57.0):
|
||||
eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0):
|
||||
dependencies:
|
||||
debug: 4.3.4
|
||||
enhanced-resolve: 5.15.0
|
||||
eslint: 8.57.0
|
||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.57.0))(eslint@8.57.0)
|
||||
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.0)(eslint@8.57.0)
|
||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
|
||||
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
|
||||
fast-glob: 3.3.1
|
||||
get-tsconfig: 4.7.0
|
||||
is-core-module: 2.13.0
|
||||
@ -5296,18 +5312,18 @@ snapshots:
|
||||
- eslint-import-resolver-webpack
|
||||
- supports-color
|
||||
|
||||
eslint-module-utils@2.8.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.57.0))(eslint@8.57.0):
|
||||
eslint-module-utils@2.8.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0):
|
||||
dependencies:
|
||||
debug: 3.2.7
|
||||
optionalDependencies:
|
||||
'@typescript-eslint/parser': 6.7.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
eslint: 8.57.0
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.57.0)
|
||||
eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.0)(eslint@8.57.0):
|
||||
eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0):
|
||||
dependencies:
|
||||
array-includes: 3.1.7
|
||||
array.prototype.findlastindex: 1.2.3
|
||||
@ -5317,7 +5333,7 @@ snapshots:
|
||||
doctrine: 2.1.0
|
||||
eslint: 8.57.0
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.57.0))(eslint@8.57.0)
|
||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.7.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
|
||||
has: 1.0.3
|
||||
is-core-module: 2.13.0
|
||||
is-glob: 4.0.3
|
||||
@ -6982,6 +6998,11 @@ snapshots:
|
||||
|
||||
prelude-ls@1.2.1: {}
|
||||
|
||||
prettier-plugin-organize-imports@4.0.0(prettier@3.2.5)(typescript@5.4.5):
|
||||
dependencies:
|
||||
prettier: 3.2.5
|
||||
typescript: 5.4.5
|
||||
|
||||
prettier@3.2.5: {}
|
||||
|
||||
promise-worker-transferable@1.0.4:
|
||||
|
Reference in New Issue
Block a user