Skip to content

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

Notifications You must be signed in to change notification settings

Project-EricKousei/NetCoreWeb

Repository files navigation

ReactTS 18 with Tailwind CSS, ESLint, Prettier and Vite

Commitizen friendly

This is a React + TypeScript + Tailwind CSS boilerplate to be built with Vite. It also includes ESLint 8, Vitest, Husky and a pre-commit hook that runs prettier --write and eslint --fix.

What's inside?


Getting Started

Install

Install dependencies.

yarn

Serve with hot reload at http://localhost:{PORT}.

yarn dev

Other Commands

Prettier

yarn format

Lint

Run ESLint

yarn lint

Run ESLint and fix

yarn lint:fix

Build

yarn build

Test

yarn test

Commit commands

This project will use commitlint to ensure that commit messages are Conventional Commits specification compliants.

To help you build more efficient commit messages, you will use the commitizen package by running this command :

yarn cz

shadcn/ui

Adding Components

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.

npx shadcn-ui@latest add button

Adding new colors

To add new colors, you need to add them to your CSS file and to your tailwind.config.js file. More info

app/globals.css

:root {
  --warning: 38 92% 50%;
  --warning-foreground: 48 96% 89%;
}

.dark {
  --warning: 48 96% 89%;
  --warning-foreground: 38 92% 50%;
}

tailwind.config.js

module.exports = {
  theme: {
    extend: {
      colors: {
        warning: "hsl(var(--warning))",
        "warning-foreground": "hsl(var(--warning-foreground))",
      },
    },
  },
};

You can now use the warning utility class in your components.

<div className="bg-warning text-warning-foreground" />

Recommended VS Code extensions

Husky

Workaround for Node Version Managers and GUIs

# ~/.config/husky/init.sh

export NVM_DIR=~/.nvm

#source $(brew --prefix nvm)/nvm.sh # This loads nvm with brew.sh
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # or this loads nvm

#exit 1 # test hook without committing

ESLint version 9+

Open issues

About

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages