Skip to content

Commit

Permalink
refactor: remove unnessscory code
Browse files Browse the repository at this point in the history
  • Loading branch information
a0v0 authored May 13, 2024
2 parents 2b7200a + a2deae3 commit 34dc022
Show file tree
Hide file tree
Showing 37 changed files with 41 additions and 17,581 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ build
!plopfile.js
!react-shim.js
!tsup.config.ts
apps/docs/preinstall.js
apps/docs/next-redirect.js
126 changes: 1 addition & 125 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,127 +1,3 @@
{
"$schema": "https://json.schemastore.org/eslintrc.json",
"env": {
"browser": false,
"es2021": true,
"node": true
},
"extends": [
"plugin:react/recommended",
"plugin:prettier/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended"
],
"plugins": [
"react",
"unused-imports",
"import",
"@typescript-eslint",
"jsx-a11y",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"no-console": "warn",
"react/prop-types": "off",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react-hooks/exhaustive-deps": "off",
"jsx-a11y/click-events-have-key-events": "warn",
"jsx-a11y/interactive-supports-focus": "warn",
"prettier/prettier": "warn",
"no-unused-vars": "off",
"unused-imports/no-unused-vars": "off",
"unused-imports/no-unused-imports": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"args": "after-used",
"ignoreRestSiblings": false,
"argsIgnorePattern": "^_.*?$"
}
],
"import/order": [
"warn",
{
"groups": [
"type",
"builtin",
"object",
"external",
"internal",
"parent",
"sibling",
"index"
],
"pathGroups": [
{
"pattern": "~/**",
"group": "external",
"position": "after"
}
],
"newlines-between": "always"
}
],
"react/self-closing-comp": "warn",
"react/jsx-sort-props": [
"warn",
{
"callbacksLast": true,
"shorthandFirst": true,
"noSortAlphabetically": false,
"reservedFirst": true
}
],
"padding-line-between-statements": [
"warn",
{ "blankLine": "always", "prev": "*", "next": "return" },
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*" },
{
"blankLine": "any",
"prev": ["const", "let", "var"],
"next": ["const", "let", "var"]
}
]
},
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"parserOptions": {
"project": ["apps/docs/tsconfig(.*)?.json"],
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"react/no-unknown-property": [
2,
{
"ignore": ["jsx", "global"]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
"extends": "next/core-web-vitals"
}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
engine-strict=true
package-lock=false
enable-pre-post-scripts=true
public-hoist-pattern[]=*@nextui-org/*
7 changes: 0 additions & 7 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
## To DOs

- TODO: add seo
- TODO: add link to public roadmap
- TODO: rewrite README.md see https://github.com/lobehub/sd-webui-lobe-theme

## Checkpoints for new tool

- [ ] Logic
- [ ] Breadcumbs

<!-- wasm notes -->

```
Expand Down
4 changes: 2 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {routes as manifest} from "@/config/routes";
import {siteConfig} from "@/config/site";
import {getToolByHref} from "@/config/tools";
import "@/styles/globals.css";
import "@/styles/sandpack.css";
// import "@/styles/sandpack.css";
import {__PROD__} from "@/utils";
import {getPathnameFromMetadataState} from "@/utils/links";
import {clsx} from "@nextui-org/shared-utils";
Expand Down Expand Up @@ -61,7 +61,7 @@ export const viewport: Viewport = {
export default function RootLayout({children}: {children: React.ReactNode}) {
return (
<html suppressHydrationWarning dir="ltr" lang="en">
{/* <head /> */}
<head />
<body className={clsx("min-h-screen bg-background font-sans antialiased", fontSans.variable)}>
<BackgroundEffects />
<Providers themeProps={{attribute: "class", defaultTheme: "dark"}}>
Expand Down
4 changes: 2 additions & 2 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import BackgroundEffects from "@/components/background-effects";
import HeroX from "@/components/hero";
import Hero from "@/components/hero";
import {ToolsCards} from "@/components/tools";

export default async function Home() {
return (
<main className="container mx-auto max-w-7xl px-6 flex-grow">
<section className="flex flex-col items-center ">
<BackgroundEffects />
<HeroX />
<Hero />
<ToolsCards />
</section>
</main>
Expand Down
79 changes: 0 additions & 79 deletions components/blog-post.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion components/docs/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from "./sidebar";
export * from "./toc";
export * from "./pager";

export * from "./components/code-demo";
61 changes: 0 additions & 61 deletions components/docs/pager.tsx

This file was deleted.

9 changes: 4 additions & 5 deletions components/hero.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
"use client";
import {Link} from "@nextui-org/link";
import {Button} from "@nextui-org/react";
import {ArrowRightIcon} from "@nextui-org/shared-icons";
// import Link from "next/link";
import {Link} from "@nextui-org/link";
import {Logo} from "./icons";
import {subtitle, title} from "./primitives";

function HeroX() {
function Hero() {
return (
<main id="checl" className="h-screen text-center mt-24">
<main className="h-screen text-center mt-24">
<center>
<Logo />
</center>
Expand Down Expand Up @@ -36,4 +35,4 @@ function HeroX() {
);
}

export default HeroX;
export default Hero;
Loading

0 comments on commit 34dc022

Please sign in to comment.