Skip to content

Commit

Permalink
refactor!: migrate to biome
Browse files Browse the repository at this point in the history
  • Loading branch information
jellydn committed Apr 30, 2024
1 parent e06a5fb commit 43c6e55
Show file tree
Hide file tree
Showing 26 changed files with 785 additions and 625 deletions.
77 changes: 34 additions & 43 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,45 +1,36 @@
{
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"commitType": "docs",
"commitConvention": "angular",
"contributors": [
{
"login": "jellydn",
"name": "Dung Duc Huynh (Kaka)",
"avatar_url": "https://avatars.githubusercontent.com/u/870029?v=4",
"profile": "https://productsway.com/",
"contributions": [
"code",
"doc"
]
},
{
"login": "mikah13",
"name": "Mike Hoang",
"avatar_url": "https://avatars.githubusercontent.com/u/25890552?v=4",
"profile": "https://mike-hoang-dev.vercel.app/",
"contributions": [
"code"
]
},
{
"login": "salmansheri",
"name": "Salman Sheriff",
"avatar_url": "https://avatars.githubusercontent.com/u/95226945?v=4",
"profile": "https://github.com/salmansheri",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
"skipCi": true,
"repoType": "github",
"repoHost": "https://github.com",
"projectName": "next-app-starter",
"projectOwner": "jellydn"
"files": ["README.md"],
"imageSize": 100,
"commit": false,
"commitType": "docs",
"commitConvention": "angular",
"contributors": [
{
"login": "jellydn",
"name": "Dung Duc Huynh (Kaka)",
"avatar_url": "https://avatars.githubusercontent.com/u/870029?v=4",
"profile": "https://productsway.com/",
"contributions": ["code", "doc"]
},
{
"login": "mikah13",
"name": "Mike Hoang",
"avatar_url": "https://avatars.githubusercontent.com/u/25890552?v=4",
"profile": "https://mike-hoang-dev.vercel.app/",
"contributions": ["code"]
},
{
"login": "salmansheri",
"name": "Salman Sheriff",
"avatar_url": "https://avatars.githubusercontent.com/u/95226945?v=4",
"profile": "https://github.com/salmansheri",
"contributions": ["code"]
}
],
"contributorsPerLine": 7,
"skipCi": true,
"repoType": "github",
"repoHost": "https://github.com",
"projectName": "next-app-starter",
"projectOwner": "jellydn"
}
7 changes: 0 additions & 7 deletions .eslintrc.json

This file was deleted.

18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repos:
- repo: https://github.com/jellydn/sort-package-json
rev: "1686d9d2ddfb065c4514c637ee4b9985dfbf01dd" # Use the sha / tag you want to point at
hooks:
- id: sort-package-json

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8" # Use the sha or tag you want to point at
hooks:
- id: prettier
# Those are not supported by biomejs yet, refer https://biomejs.dev/internals/language-support/
types_or: [html, css, markdown]
- repo: https://github.com/biomejs/pre-commit
rev: "v0.1.0" # Use the sha / tag you want to point at
hooks:
- id: biome-check
exclude: "package.json"
additional_dependencies: ["@biomejs/[email protected]"]
10 changes: 0 additions & 10 deletions .prettierrc.js

This file was deleted.

32 changes: 16 additions & 16 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { mergeConfig } from 'vite';

export default {
stories: [
'../stories/**/*.stories.mdx',
'../stories/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: ['@storybook/addon-essentials', 'storybook-addon-designs'],
framework: '@storybook/nextjs',
async viteFinal(config) {
// Merge custom configuration into the default config
return mergeConfig(config, {
// Add storybook-specific dependencies to pre-optimization
optimizeDeps: {
include: ['storybook-addon-designs'],
},
});
},
stories: [
'../stories/**/*.stories.mdx',
'../stories/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: ['@storybook/addon-essentials', 'storybook-addon-designs'],
framework: '@storybook/nextjs',
async viteFinal(config) {
// Merge custom configuration into the default config
return mergeConfig(config, {
// Add storybook-specific dependencies to pre-optimization
optimizeDeps: {
include: ['storybook-addon-designs'],
},
});
},
};
14 changes: 7 additions & 7 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
}
};
56 changes: 28 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,37 @@

## Pre-requirements

- [Bun — A fast all-in-one JavaScript runtime](https://bun.sh/)
- [Bun — A fast all-in-one JavaScript runtime](https://bun.sh/)

## 💻 Stack

- [NextJS: the React Framework for Production](https://nextjs.org/docs)
- [Tailwindcss: rapidly build modern websites without ever leaving your HTML](https://tailwindcss.com/)
- [shadcn/ui: Beautifully designed components built with Radix UI and Tailwind CSS.](https://github.com/shadcn/ui)
- [Jotai: primitive and flexible state management for React.](https://docs.pmnd.rs/jotai/introduction)
- [Prisma: next-generation ORM for Node.js and TypeScrip](https://www.prisma.io/)
- [NextAuth.js: Authentication for Next.js](https://next-auth.js.org/v3/getting-started/introduction)
- [next-validations: NextJS API Validations, support Yup, Fastest-Validator, Joi, and more](https://next-validations.productsway.com/)
- [zod: TypeScript-first schema validation with static type inference](https://github.com/colinhacks/zod)
- [consola: Elegant Console Logger for Node.js and Browser 🐨](https://github.com/unjs/consola)
- [Storybook: build bulletproof UI components faster](https://storybook.js.org)
- [React-hook-form: performance, flexible and extensible forms with easy-to-use validation](https://www.react-hook-form.com/)
- [react-testing: simple and complete testing utilities that encourage good testing practices](https://testing-library.com/)
- [React-query: performant and powerful data synchronization for React](https://react-query.tanstack.com/)
- And other standard tools as [Eslint](https://eslint.org/), [Prettier](https://prettier.io/), [nano-staged](https://github.com/usmanyunusov/nano-staged)
- [NextJS: the React Framework for Production](https://nextjs.org/docs)
- [Tailwindcss: rapidly build modern websites without ever leaving your HTML](https://tailwindcss.com/)
- [shadcn/ui: Beautifully designed components built with Radix UI and Tailwind CSS.](https://github.com/shadcn/ui)
- [Jotai: primitive and flexible state management for React.](https://docs.pmnd.rs/jotai/introduction)
- [Prisma: next-generation ORM for Node.js and TypeScrip](https://www.prisma.io/)
- [NextAuth.js: Authentication for Next.js](https://next-auth.js.org/v3/getting-started/introduction)
- [next-validations: NextJS API Validations, support Yup, Fastest-Validator, Joi, and more](https://next-validations.productsway.com/)
- [zod: TypeScript-first schema validation with static type inference](https://github.com/colinhacks/zod)
- [consola: Elegant Console Logger for Node.js and Browser 🐨](https://github.com/unjs/consola)
- [Storybook: build bulletproof UI components faster](https://storybook.js.org)
- [React-hook-form: performance, flexible and extensible forms with easy-to-use validation](https://www.react-hook-form.com/)
- [react-testing: simple and complete testing utilities that encourage good testing practices](https://testing-library.com/)
- [React-query: performant and powerful data synchronization for React](https://react-query.tanstack.com/)
- And other standard tools as [Eslint](https://eslint.org/), [Prettier](https://prettier.io/), [nano-staged](https://github.com/usmanyunusov/nano-staged)

## 📝 Project Summary

- [**app**](app): Main application logic and entry point.
- [**components**](components): Reusable UI components.
- [**pages**](pages): Individual pages/views of the application.
- [**prisma**](prisma): Database ORM and migration scripts.
- [**public**](public): Static assets accessible to the public.
- [**store**](store): State management for the application.
- [**tests**](tests): Unit and integration tests.
- [**types**](types): Custom TypeScript types and interfaces.
- [**storybook**](storybook): Component library and documentation.
- [**.github/workflows**](.github/workflows): CI/CD workflows for GitHub Actions.
- [**app**](app): Main application logic and entry point.
- [**components**](components): Reusable UI components.
- [**pages**](pages): Individual pages/views of the application.
- [**prisma**](prisma): Database ORM and migration scripts.
- [**public**](public): Static assets accessible to the public.
- [**store**](store): State management for the application.
- [**tests**](tests): Unit and integration tests.
- [**types**](types): Custom TypeScript types and interfaces.
- [**storybook**](storybook): Component library and documentation.
- [**.github/workflows**](.github/workflows): CI/CD workflows for GitHub Actions.

## Install

Expand Down Expand Up @@ -85,9 +85,9 @@ This project is licensed under the **MIT License** - see the [**MIT License**](h

## Author

- Website: https://productsway.com/
- Twitter: [@jellydn](https://twitter.com/jellydn)
- Github: [@jellydn](https://github.com/jellydn)
- Website: https://productsway.com/
- Twitter: [@jellydn](https://twitter.com/jellydn)
- Github: [@jellydn](https://github.com/jellydn)

## Stargazers 🌟

Expand Down
5 changes: 3 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import Script from 'next/script';
import { ReactNode } from 'react';

function RootLayout({
// Layouts must accept a children prop.
// This will be populated with nested layouts or pages
children,
}: {
readonly children: React.ReactNode;
readonly children: ReactNode;
}) {
return (
<html lang="en">
<head>
<Script
async
async={true}
id="adsbygoogle"
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5337133458846513"
crossOrigin="anonymous"
Expand Down
Loading

0 comments on commit 43c6e55

Please sign in to comment.