Skip to content

Commit

Permalink
feat: initial commit with toast, rhf, and rq
Browse files Browse the repository at this point in the history
  • Loading branch information
theodorusclarence committed Jan 17, 2022
0 parents commit a016048
Show file tree
Hide file tree
Showing 88 changed files with 15,414 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,79 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
plugins: ['@typescript-eslint', 'simple-import-sort', 'unused-imports'],
extends: [
'eslint:recommended',
'next',
'next/core-web-vitals',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'no-unused-vars': 'off',
'no-console': 'warn',
'@typescript-eslint/explicit-module-boundary-types': 'off',

'react/display-name': 'off',

//#region //*=========== Unused Import ===========
'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'warn',
'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
//#endregion //*======== Unused Import ===========

//#region //*=========== Import Sort ===========
'simple-import-sort/exports': 'warn',
'simple-import-sort/imports': [
'warn',
{
groups: [
// ext library & side effect imports
['^@?\\w', '^\\u0000'],
// {s}css files
['^.+\\.s?css$'],
// Lib and hooks
['^@/lib', '^@/hooks'],
// static data
['^@/data'],
// components
['^@/components', '^@/container'],
// zustand store
['^@/store'],
// Other imports
['^@/'],
// relative paths up until 3 level
[
'^\\./?$',
'^\\.(?!/?$)',
'^\\.\\./?$',
'^\\.\\.(?!/?$)',
'^\\.\\./\\.\\./?$',
'^\\.\\./\\.\\.(?!/?$)',
'^\\.\\./\\.\\./\\.\\./?$',
'^\\.\\./\\.\\./\\.\\.(?!/?$)',
],
['^@/types'],
// other that didnt fit in
['^'],
],
},
],
//#endregion //*======== Import Sort ===========
},
globals: {
React: true,
JSX: true,
},
};
9 changes: 9 additions & 0 deletions .github/issue-branch.yml
@@ -0,0 +1,9 @@
# https://github.com/robvanderleek/create-issue-branch#option-2-configure-github-action

# ex: i4-lower_camel_upper
branchName: 'i${issue.number}-${issue.title,}'
branches:
- label: epic
skip: true
- label: debt
skip: true
14 changes: 14 additions & 0 deletions .github/workflows/create-branch.yml
@@ -0,0 +1,14 @@
name: Create Branch from Issue

on:
issues:
types: [assigned]

jobs:
create_issue_branch_job:
runs-on: ubuntu-latest
steps:
- name: Create Issue Branch
uses: robvanderleek/create-issue-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/issue-autolink.yml
@@ -0,0 +1,14 @@
name: 'Issue Autolink'
on:
pull_request:
types: [opened]

jobs:
issue-links:
runs-on: ubuntu-latest
steps:
- uses: tkt-actions/add-issue-links@v1.6.0
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
branch-prefix: 'i'
resolve: 'true'
53 changes: 53 additions & 0 deletions .github/workflows/lint.yml
@@ -0,0 +1,53 @@
name: PR Source Code Check

on:
- push

jobs:
lint:
name: Run ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'
- run: yarn
- run: yarn lint:strict

tsc:
name: Run Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'
- run: yarn
- run: yarn typecheck

prettier:
name: Run Prettier Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'
- run: yarn
- run: yarn format:check

test:
name: Run Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'
- run: yarn
- run: yarn test
38 changes: 38 additions & 0 deletions .gitignore
@@ -0,0 +1,38 @@
# 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*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

# next-sitemap
robots.txt
sitemap.xml
4 changes: 4 additions & 0 deletions .husky/commit-msg
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/post-merge
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn
4 changes: 4 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
38 changes: 38 additions & 0 deletions .prettierignore
@@ -0,0 +1,38 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
.next
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

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

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

# changelog
CHANGELOG.md
11 changes: 11 additions & 0 deletions .prettierrc.js
@@ -0,0 +1,11 @@
module.exports = {
arrowParens: 'always',
singleQuote: true,
jsxSingleQuote: true,
tabWidth: 2,
semi: true,
sortClassNamesUnknownClassesSeparator: '',
sortClassNamesPrefixes:
'xs:,sm:,md:,lg:,xl:,2xl:,dark:,motion-safe:,motion-reduce:,first:,last:,odd:,even:,visited:,checked:,group-hover:,group-focus:,focus-within:,hover:,focus:,focus-visible:,active:,disabled:',
sortClassNamesSortFunctions: 'clsx,classNames,cx,clsxm',
};
10 changes: 10 additions & 0 deletions .vscode/css.code-snippets
@@ -0,0 +1,10 @@
{
"Region CSS": {
"prefix": "regc",
"body": [
"/* #region /**=========== ${1} =========== */",
"$0",
"/* #endregion /**======== ${1} =========== */"
]
}
}
9 changes: 9 additions & 0 deletions .vscode/extensions.json
@@ -0,0 +1,9 @@
{
"recommendations": [
// Tailwind CSS Intellisense
"bradlc.vscode-tailwindcss",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"aaron-bond.better-comments"
]
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,9 @@
{
"css.validate": false,
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"headwind.runOnSave": false
}

1 comment on commit a016048

@vercel
Copy link

@vercel vercel bot commented on a016048 Jan 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.