Code Monkey home page Code Monkey logo

vite-template's Introduction

ViteRC ❤️‍🔥

A modern minimal Vite + React + TypeScript template with pre-configured ESLint (with Airbnb JS/React rules), Prettier, Testing with Jest and Git hooks with Husky out of the box 📦

Vite React TypeScript ESLint Prettier Jest Testing Library Commitlint

Screenshot

Features

  • ⚡️ Vite - Next Generation Frontend Tooling
  • ⚛️ React 18 - A JavaScript library for building user interfaces
  • 💎 TypeScript - Why not?!
  • 🔨 EsLint - Pluggable JavaScript linter
  • 🌀 Prettier - Opinionated Code Formatter
  • 🐺 Husky - Native Git hooks
  • ⚙️ Jest - Testing libraries
  • ⌨️ Absolute Imports
  • 📑 Commitlint - Linting your commits based on commit convention

Why

This template arose out of a need to unite all the above libraries, which were not found in the existing Vite templates. This template has an active contributors that will update everything on this template as needed

Usage

npx degit potreco/viterc my-app

cd my-app

# Required if you want a repository and work with Git hooks
git init

yarn install

yarn dev

Available commands

In this project, you can run the following scripts:

Script Description
yarn dev Runs the app in the development mode.
yarn build Builds the app for production to the dist folder.
yarn preview Builds the app for production to the dist folder, and run locally server.
yarn lint Runs the Eslint and show code problems
yarn lint:fix Runs the Eslint and fix the code problems
yarn format Runs the Prettier and fix code style
yarn compile Runs the TS Compiling
yarn test Run the app tests.
yarn commit Open the CZ CLI to create a message to your commit.

About the absolute imports

To correctly functioning (code and tests) of absolute imports, you should add some codes in some files, like:

  • jest.config.js
  • vite.config.ts
  • tsconfig.json

We already writed some absolute imports on these files, so if you wanna more paths or edit some, feel free to do. If your not safe about it or have some question, send us a thread on Github Discussions asking for, we were happy to help

TODO

  • Eslint
  • Prettier
  • Husky
  • Testing Tools
  • Absolute imports
  • Commit linting

License

MIT

Package.json

D:\dev\react_version\viterc>npx npm-check-updates Checking D:\dev\react_version\viterc\package.json [====================] 33/33 100%

@testing-library/jest-dom ^5.16.4 → ^6.0.1

Run npx npm-check-updates -u to upgrade package.json

Warning: Don't update. It break tests.

vite-template's People

Contributors

potreco avatar stephyswe avatar

Stargazers

Shreyas Chaliha aka Trace avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.