Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint Files

# This workflow lints the client and server directories
# And will trigger on push *any* branch
on:
push:
branches-ignore:
- master
- dev

jobs:
lint-client:
name: Lint Client
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Use NodeJS v18.14.2
uses: actions/setup-node@v3
with:
node-version: 18.14.2

- name: Install Dependencies and Lint
run: |
cd client
npm install
npm run lint
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,30 @@

A React (NextJS) playground for testing using react hooks.

## Requirements

The following dependecies are used for this project. Feel free to experiment using other dependencies and versions.

1. Windows 64-bit OS
2. nvm version 1.1.9 (for Windows)
- NOTE: Using nvm is optional if you want to continue using your pre-installed NodeJS.
3. NodeJS LTS v18.14.2 installed using nvm
- node v18.14.2
- npm v9.5.0
- > **NOTE:** We will use v18.14.2 for the official production client and server builds but feel free to use other NodeJS versions by setting "engine-strict=false" in the .npmrc file when working on localhost development as needed, but please use v18.14.2 when installing new modules. Do not commit the package.json or package-lock.json files should they change when "engine-strict=false".

### Core Libraries and Frameworks

- Client app
- NextJS 13.2.4
- React 18.2.0

## Installation

1. Clone this repository.<br>
`https://github.com/weaponsforge/react-hooks-playground.git`

2. Follow the instructions on the README files inside the `/client` directory for more information on configuring and using the NextJS client app.

@weaponsforge<br>
20230319
21 changes: 21 additions & 0 deletions client/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"env": {
"node": true,
"browser": true,
"es6": true
},
"extends": "next/core-web-vitals",
"plugins": [
"eslint-plugin-react", "eslint-plugin-react-hooks"
],
"rules": {
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "never"],
"no-unused-vars": "error",
"no-undef": "error",
"no-trailing-spaces": "error",
"no-console": ["error", { "allow": ["error"] }]
}
}
32 changes: 32 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel
1 change: 1 addition & 0 deletions client/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
1 change: 1 addition & 0 deletions client/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.14.2
45 changes: 45 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## react-hooks-playground/client

A React (NextJS) playground for testing using react hooks.

## Requirements

The following dependecies are used for this project. Feel free to experiment using other dependencies and versions.

1. Windows 64-bit OS
2. nvm version 1.1.9 (for Windows)
- NOTE: Using nvm is optional if you want to continue using your pre-installed NodeJS.
3. NodeJS LTS v18.14.2 installed using nvm
- node v18.14.2
- npm v9.5.0
- > **NOTE:** We will use v18.14.2 for the official production client and server builds but feel free to use other NodeJS versions by setting "engine-strict=false" in the .npmrc file when working on localhost development as needed, but please use v18.14.2 when installing new modules. Do not commit the package.json or package-lock.json files should they change when "engine-strict=false".

### Core Libraries and Frameworks

- Client app
- NextJS 13.2.4
- React 18.2.0

## Installation

1. Clone this repository.<br>
`https://github.com/weaponsforge/react-hooks-playground.git`

## Available Scripts

### `npm run dev`
Run the project in development mode. Launch the development website from:<br>
http://localhost:3000

### `npm run lint`
Check for lint errors.

### `npm run export`
Export the static website.

### `npm start`
Load the static website built from npm run export (no hot reloads). View the built website on:<br>
http://localhost:3000

@weaponsforge<br>
20230319
7 changes: 7 additions & 0 deletions client/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
}
}
6 changes: 6 additions & 0 deletions client/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
}

module.exports = nextConfig
Loading