Skip to content

Commit 1f42d9e

Browse files
committed
Initial Setup
1 parent 9471f07 commit 1f42d9e

32 files changed

+2631
-178
lines changed

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root=true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
7+
[*.{js,jsx,ts,tsx,json,py,scss,css}]
8+
charset = utf-8
9+
10+
[*.{js,jsx,ts,tsx,json}]
11+
indent_style = space
12+
indent_size = 2

.eslintrc.json

+81-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,83 @@
11
{
2-
"extends": "next/core-web-vitals"
2+
"parser": "@typescript-eslint/parser",
3+
"parserOptions": {
4+
"sourceType": "module",
5+
"ecmaVersion": 2020,
6+
"ecmaFeatures": {
7+
"jsx": true
8+
}
9+
},
10+
"env": {
11+
"browser": true,
12+
"es2021": true
13+
},
14+
"extends": [
15+
"standard",
16+
"eslint:recommended",
17+
"plugin:react/recommended",
18+
"plugin:react-hooks/recommended",
19+
"plugin:prettier/recommended",
20+
"plugin:jsx-a11y/recommended",
21+
"plugin:@typescript-eslint/recommended",
22+
"next/core-web-vitals"
23+
],
24+
"plugins": ["@typescript-eslint", "react", "react-hooks", "jsx-a11y"],
25+
"rules": {
26+
"no-use-before-define": [0],
27+
"@typescript-eslint/no-use-before-define": "error",
28+
"@typescript-eslint/no-explicit-any": "off",
29+
"@typescript-eslint/no-empty-interface": "off",
30+
31+
"react/prop-types": "off",
32+
"react/react-in-jsx-scope": "off",
33+
"react/jsx-no-useless-fragment": "error",
34+
35+
"react-hooks/exhaustive-deps": "warn",
36+
"react-hooks/rules-of-hooks": "error",
37+
38+
"import/order": [
39+
"error",
40+
{
41+
"groups": [
42+
"builtin",
43+
"external",
44+
["parent", "internal", "sibling"],
45+
"index",
46+
"object"
47+
],
48+
"pathGroups": [
49+
{
50+
"pattern": "react*",
51+
"group": "external",
52+
"position": "before"
53+
},
54+
{
55+
"pattern": "redux*",
56+
"group": "external",
57+
"position": "before"
58+
},
59+
{
60+
"pattern": "gatsby*",
61+
"group": "external",
62+
"position": "before"
63+
}
64+
],
65+
"pathGroupsExcludedImportTypes": ["react*", "redux*", "next*"],
66+
"newlines-between": "always",
67+
"alphabetize": {
68+
"order": "asc",
69+
"caseInsensitive": true
70+
}
71+
}
72+
]
73+
},
74+
"globals": {
75+
"Atomics": "readonly",
76+
"SharedArrayBuffer": "readonly"
77+
},
78+
"settings": {
79+
"react": {
80+
"version": "detect"
81+
}
82+
}
383
}

.github/workflows/node.js.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Gatsby Build
5+
6+
on:
7+
push:
8+
branches: [master]
9+
pull_request:
10+
branches: [master]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [14.x, 16.x]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- run: npm ci
27+
- run: GOOGLE_ANALYTICS_ID=testkey npm run build --if-present
28+
- run: npm test

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16.14.0

.prettierignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.cache
2+
.next
3+
package.json
4+
package-lock.json
5+
public

.prettierrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"endOfLine": "lf",
3+
"semi": false,
4+
"singleQuote": false,
5+
"tabWidth": 2,
6+
"trailingComma": "es5"
7+
}

.vscode/extensions.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"editorconfig.editorconfig",
5+
"esbenp.prettier-vscode",
6+
"jock.svg",
7+
"graphql.vscode-graphql",
8+
"dsznajder.es7-react-js-snippets"
9+
]
10+
}

.vscode/gatsby.code-snippets

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"Picture Snippet": {
3+
"scope": "javascript,typescript,javascriptreact,typescriptreact,vue,html",
4+
"prefix": "picture",
5+
"body": [
6+
"<picture>",
7+
" <source srcset=\"${3:large.webp}\" media=\"(${4:min-width: 992px})\" type=\"${5:image/webp}\">",
8+
" <source srcset=\"${6:large.jpg}\" media=\"(${7:min-width: 992px})\" type=\"${8:image/jpeg}\">",
9+
" <img src=\"${1:small.jpg}\" alt=\"$2\">",
10+
"</picture>$0"
11+
],
12+
"description": "HTML 5 Picture Element"
13+
}
14+
}

.vscode/launch.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"command": "npm start",
9+
"name": "Run npm start",
10+
"request": "launch",
11+
"type": "node-terminal"
12+
}
13+
]
14+
}

.vscode/settings.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.formatOnPaste": true,
4+
"editor.minimap.renderCharacters": false,
5+
"editor.defaultFormatter": "esbenp.prettier-vscode",
6+
"editor.codeActionsOnSave": {
7+
"source.fixAll.eslint": true
8+
},
9+
"emmet.includeLanguages": {
10+
"django-html": "html",
11+
"javascript": "javascriptreact",
12+
"typescript": "typescriptreact"
13+
},
14+
"[svg]": {
15+
"editor.formatOnSave": false
16+
},
17+
"javascript.updateImportsOnFileMove.enabled": "always",
18+
"typescript.updateImportsOnFileMove.enabled": "always"
19+
}

.vscode/tasks.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "start",
7+
"problemMatcher": [],
8+
"label": "npm: start",
9+
"detail": "npm run develop"
10+
},
11+
{
12+
"type": "npm",
13+
"script": "build",
14+
"group": {
15+
"kind": "build",
16+
"isDefault": true
17+
},
18+
"problemMatcher": [],
19+
"label": "npm: build",
20+
"detail": "gatsby build"
21+
}
22+
]
23+
}

@types/imports.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
declare module "*.svg" {
2+
import React = require("react")
3+
const content: React.FunctionComponent<React.SVGAttributes<SVGElement>>
4+
export default content
5+
}
6+
7+
declare module "*.json" {
8+
const content: string
9+
export default content
10+
}
11+
12+
declare module "*.wav"

LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Jitendra Nirnejak
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+
`

README.md

+3-34
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,3 @@
1-
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2-
3-
## Getting Started
4-
5-
First, run the development server:
6-
7-
```bash
8-
npm run dev
9-
# or
10-
yarn dev
11-
```
12-
13-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
14-
15-
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
16-
17-
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
18-
19-
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
20-
21-
## Learn More
22-
23-
To learn more about Next.js, take a look at the following resources:
24-
25-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
26-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
27-
28-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
29-
30-
## Deploy on Vercel
31-
32-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
33-
34-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
1+
<h1 align="center">
2+
Next.js TypeScript Starter
3+
</h1>

assets/sounds/boop.wav

19.4 KB
Binary file not shown.

assets/sounds/thunk.wav

31.6 KB
Binary file not shown.

assets/sounds/tick.wav

56 KB
Binary file not shown.

assets/sounds/whoop.wav

59.8 KB
Binary file not shown.

next-env.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

next.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
3+
trailingSlash: true,
34
reactStrictMode: true,
45
}
56

0 commit comments

Comments
 (0)