All Projects → abhishekbhardwaj → tailwind-react-next.js-typescript-eslint-jest-starter

abhishekbhardwaj / tailwind-react-next.js-typescript-eslint-jest-starter

Licence: MIT license
Starter template for building a project using React, Typescript, Next.js, Jest, TailwindCSS and ESLint.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects
CSS
56736 projects

Projects that are alternatives of or similar to tailwind-react-next.js-typescript-eslint-jest-starter

react-simple-boilerplate
Simple React Boilerplate with Webpack, Github Actions, Scss, Lazy Loading etc....
Stars: ✭ 38 (-52.5%)
Mutual labels:  eslint, tailwindcss, react-testing-library
node-boilerplate
Node Typescript Boilerplate for Microservices. Skeleton for Node.js Apps written in TypeScript (with Setup Instructions for ESLint, Prettier, and Husky)
Stars: ✭ 92 (+15%)
Mutual labels:  eslint, starter-template
sapper-postcss-template
A template that includes Sapper for Svelte and PostCSS preprocessing with Tailwind CSS
Stars: ✭ 84 (+5%)
Mutual labels:  eslint, tailwindcss
next-tailwind-starter
A starter for Next.js with Tailwind CSS and Typescript. Pre-configured with absolute import, TailwindUI and some additional components.
Stars: ✭ 22 (-72.5%)
Mutual labels:  tailwindcss, nextjs-starter
next-pwa-template
Next.js progressive web app template
Stars: ✭ 266 (+232.5%)
Mutual labels:  eslint, tailwindcss
awesome-address-book
This project shows a basic address book built with ReactJS, Redux Toolkit and Typescript 📖
Stars: ✭ 20 (-75%)
Mutual labels:  eslint, react-testing-library
Node Flowtype Boilerplate
This boilerplate repository is outdated and no longer maintained. Instead, I strongly recommend to use TypeScript.
Stars: ✭ 104 (+30%)
Mutual labels:  eslint, starter-template
db-portfolio
My personal portfolio website.
Stars: ✭ 97 (+21.25%)
Mutual labels:  eslint, tailwindcss
Next Js Blog Boilerplate
🚀 Nextjs Blog Boilerplate is starter code for your blog based on Next framework. ⚡️ Made with Nextjs, TypeScript, ESLint, Prettier, PostCSS, Tailwind CSS.
Stars: ✭ 134 (+67.5%)
Mutual labels:  eslint, starter-template
nextjs-semantic
Next.js + Fomantic-UI + Styled Components
Stars: ✭ 68 (-15%)
Mutual labels:  starter-template, nextjs-starter
nextarter-chakra
battery packed template / boilerplate to initialize Next.js app with Chakra UI & Typescript setup ✨
Stars: ✭ 616 (+670%)
Mutual labels:  starter-template, nextjs-starter
wargabantuwarga.com
Inisiatif warga untuk berbagi informasi seputar fasilitas kesehatan dan alat kesehatan untuk COVID-19.
Stars: ✭ 533 (+566.25%)
Mutual labels:  tailwindcss, react-testing-library
vite-react-ts-tailwind-firebase-starter
Starter using Vite + React + TypeScript + Tailwind CSS. And already set up Firebase(v9), Prettier and ESLint.
Stars: ✭ 108 (+35%)
Mutual labels:  eslint, tailwindcss
fullstack-template
This is a template repository to get up and running quickly with Vite, React, Jest, Express Docker, and Github Actions for CI/CD.
Stars: ✭ 14 (-82.5%)
Mutual labels:  eslint, tailwindcss
nextjs-complete-boilerplate
Next js 12.3.1 boilerplate with Styled Components, Jest, React Testing Library, Prettier, ESLint, Plop JS and more 🚀
Stars: ✭ 50 (-37.5%)
Mutual labels:  react-testing-library, nextjs-starter
Node Typescript Boilerplate
Minimalistic project template to jump start a Node.js back-end application in TypeScript. ESLint, Jest and type definitions included.
Stars: ✭ 1,061 (+1226.25%)
Mutual labels:  eslint, starter-template
eslint-plugin-tailwind
ESLint rules for Tailwind CSS
Stars: ✭ 97 (+21.25%)
Mutual labels:  eslint, tailwindcss
next.js-tailwindcss-template
Opinionated Next.js and TailwindCSS template.
Stars: ✭ 15 (-81.25%)
Mutual labels:  eslint, tailwindcss
Sapper Firebase Typescript Graphql Tailwindcss Actions Template
A template that includes Sapper for Svelte, Firebase functions and hosting, TypeScript and TypeGraphQL, Tailwind CSS, ESLint, and automatic building and deployment with GitHub Actions
Stars: ✭ 111 (+38.75%)
Mutual labels:  eslint, tailwindcss
cra-template-quickstart-redux
Opinionated quickstart Create React App template with Redux, React Testing Library and custom eslint configuration
Stars: ✭ 66 (-17.5%)
Mutual labels:  starter-template, react-testing-library

tailwind-react-next.js-typescript-eslint-jest-starter

Starter template for building a project using React, Typescript, Next.js, Jest, TailwindCSS and ESLint.

Setup Instructions

  1. Clone or download the project.
  2. cd in the project directory.
  3. If you cloned the project, make sure you remove the remote reference to this project by running git remote rm origin.
  4. Copy .env.example to .env as that file is used to load up all your environment variables.
  5. Run yarn install or npm install to install all dependencies.

Commands

  • yarn dev: To start a local development server.

  • yarn test: To run the entire unit test suite using jest.

  • yarn test:ci: To run tests on CI.

  • yarn lint: To run the ESLint based linter to find out the issues in the project.

  • yarn format: To autoformat all the issues.

  • yarn export: Run this after running yarn analyze to export a build copy.

  • yarn production: To export a production build. Use yarn start to serve that.

  • yarn upgrade --latest: To upgrade all packages to their latest versions (could include breaking changes).

Code Structure

All source code is located in the src/ directory.

  1. All Next.js entrypoints are housed in the src/pages directory as a default.

    • Currently has _app.tsx which imports TailwindCSS.
    • There's also a sample index.tsx.

    NOTE: Feel free to move pages outside of src/ if that's what you prefer. You'll just need to restart your local development server and everything should continue working as normal.

  2. src/components are all stateless reusable components.

  3. src/css folder is there just to house any CSS.

    • Currently contains the TailwindCSS initialization CSS file.
  4. All env variables are available in .env files (.env file isn't committed). Whenever you update .env, please update .env.example and .env.test and next.config.js to proxy all environment variables properly.

    • You can access these variables in the app source code anywhere using process.env.<VAR_NAME>.

If you feel like changing the directory structure, please change the appropriate settings in the following files:

  • .swcrc
  • jest.config.js
  • postcss.config.js
  • tsconfig.json
  • The lint and the format scripts in package.json

Note

  1. This project removes the x-powered-by response header via next.config.js by marking the poweredByHeader property as false.

  2. If you wish to use Enzyme instead of React Testing Library, please refer to this commit. Enzyme was removed with that commit.

  3. If you wish to use Babel instead of SWC (introduced with the Next.js v12 upgrade), please remove the .swcrc file and add a .babelrc file at the root with the following:

{
    "presets": [
        "next/babel"
    ],
    "plugins": [
        [
            "module-resolver",
            {
                "root": [
                    "./"
                ],
                "alias": {
                    "@src": "./src"
                },
                "extensions": [
                    ".js",
                    ".jsx",
                    ".ts",
                    ".tsx"
                ]
            }
        ]
    ]
}

Then, open ./jest.config.js and find the globals config. Add babelConfig: true, to it, like so:

{
    globals: {
        'ts-jest': {
            tsconfig: '<rootDir>/tsconfig.jest.json',
+           babelConfig: true,
            diagnostics: false,
        },
    },
}

Also, run yarn add -D @babel/core babel-plugin-module-resolver eslint-import-resolver-babel-module to install Babel's dependencies.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].