Skip to content

Commit 4d34149

Browse files
committed
feat: add initial boilerplate
0 parents  commit 4d34149

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+9266
-0
lines changed

.eslintrc.js

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
node: true,
6+
},
7+
plugins: ['@typescript-eslint', 'simple-import-sort', 'unused-imports'],
8+
extends: [
9+
'eslint:recommended',
10+
'next',
11+
'next/core-web-vitals',
12+
'plugin:@typescript-eslint/recommended',
13+
'prettier',
14+
],
15+
rules: {
16+
'no-unused-vars': 'off',
17+
'no-console': 'warn',
18+
'@typescript-eslint/explicit-module-boundary-types': 'off',
19+
20+
'react/display-name': 'off',
21+
'react/jsx-curly-brace-presence': [
22+
'warn',
23+
{ props: 'never', children: 'never' },
24+
],
25+
26+
//#region //*=========== Unused Import ===========
27+
'@typescript-eslint/no-unused-vars': 'off',
28+
'unused-imports/no-unused-imports': 'warn',
29+
'unused-imports/no-unused-vars': [
30+
'warn',
31+
{
32+
vars: 'all',
33+
varsIgnorePattern: '^_',
34+
args: 'after-used',
35+
argsIgnorePattern: '^_',
36+
},
37+
],
38+
//#endregion //*======== Unused Import ===========
39+
40+
//#region //*=========== Import Sort ===========
41+
'simple-import-sort/exports': 'warn',
42+
'simple-import-sort/imports': [
43+
'warn',
44+
{
45+
groups: [
46+
// ext library & side effect imports
47+
['^@?\\w', '^\\u0000'],
48+
// {s}css files
49+
['^.+\\.s?css$'],
50+
// Lib and hooks
51+
['^@/lib', '^@/hooks'],
52+
// static data
53+
['^@/data'],
54+
// components
55+
['^@/components', '^@/container'],
56+
// zustand store
57+
['^@/store'],
58+
// Other imports
59+
['^@/'],
60+
// relative paths up until 3 level
61+
[
62+
'^\\./?$',
63+
'^\\.(?!/?$)',
64+
'^\\.\\./?$',
65+
'^\\.\\.(?!/?$)',
66+
'^\\.\\./\\.\\./?$',
67+
'^\\.\\./\\.\\.(?!/?$)',
68+
'^\\.\\./\\.\\./\\.\\./?$',
69+
'^\\.\\./\\.\\./\\.\\.(?!/?$)',
70+
],
71+
['^@/types'],
72+
// other that didnt fit in
73+
['^'],
74+
],
75+
},
76+
],
77+
//#endregion //*======== Import Sort ===========
78+
},
79+
globals: {
80+
React: true,
81+
JSX: true,
82+
},
83+
};

.github/issue-branch.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# https://github.com/robvanderleek/create-issue-branch#option-2-configure-github-action
2+
3+
# ex: i4-lower_camel_upper
4+
branchName: 'i${issue.number}-${issue.title,}'
5+
branches:
6+
- label: epic
7+
skip: true
8+
- label: debt
9+
skip: true

.github/workflows/create-branch.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Create Branch from Issue
2+
3+
on:
4+
issues:
5+
types: [assigned]
6+
7+
jobs:
8+
create_issue_branch_job:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Create Issue Branch
12+
uses: robvanderleek/create-issue-branch@main
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/issue-autolink.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: 'Issue Autolink'
2+
on:
3+
pull_request:
4+
types: [opened]
5+
6+
jobs:
7+
issue-links:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: tkt-actions/[email protected]
11+
with:
12+
repo-token: '${{ secrets.GITHUB_TOKEN }}'
13+
branch-prefix: 'i'
14+
resolve: 'true'

.github/workflows/lint.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: PR Source Code Check
2+
3+
on:
4+
- push
5+
6+
jobs:
7+
lint:
8+
name: Run ESLint
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: '14'
15+
cache: 'yarn'
16+
- run: yarn
17+
- run: yarn lint:strict
18+
19+
tsc:
20+
name: Run Type Check
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: actions/setup-node@v2
25+
with:
26+
node-version: '14'
27+
cache: 'yarn'
28+
- run: yarn
29+
- run: yarn typecheck
30+
31+
prettier:
32+
name: Run Prettier Check
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
- uses: actions/setup-node@v2
37+
with:
38+
node-version: '14'
39+
cache: 'yarn'
40+
- run: yarn
41+
- run: yarn format:check
42+
43+
test:
44+
name: Run Test
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v2
48+
- uses: actions/setup-node@v2
49+
with:
50+
node-version: '14'
51+
cache: 'yarn'
52+
- run: yarn
53+
- run: yarn test

.gitignore

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env.local
29+
.env.development.local
30+
.env.test.local
31+
.env.production.local
32+
33+
# vercel
34+
.vercel
35+
36+
# next-sitemap
37+
robots.txt
38+
sitemap.xml
39+
sitemap-*.xml

.husky/commit-msg

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

.husky/post-merge

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

.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+
pnpm lint-staged

.npmrc

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

.prettierignore

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
.next
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env.local
30+
.env.development.local
31+
.env.test.local
32+
.env.production.local
33+
34+
# vercel
35+
.vercel
36+
37+
# changelog
38+
CHANGELOG.md

.prettierrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
arrowParens: 'always',
3+
singleQuote: true,
4+
jsxSingleQuote: true,
5+
tabWidth: 2,
6+
semi: true,
7+
};

.vscode/css.code-snippets

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"Region CSS": {
3+
"prefix": "regc",
4+
"body": [
5+
"/* #region /**=========== ${1} =========== */",
6+
"$0",
7+
"/* #endregion /**======== ${1} =========== */"
8+
]
9+
}
10+
}

.vscode/extensions.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
// Tailwind CSS Intellisense
4+
"bradlc.vscode-tailwindcss",
5+
"esbenp.prettier-vscode",
6+
"dbaeumer.vscode-eslint",
7+
"aaron-bond.better-comments"
8+
]
9+
}

.vscode/settings.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"css.validate": false,
3+
"editor.formatOnSave": true,
4+
"editor.tabSize": 2,
5+
"editor.codeActionsOnSave": {
6+
"source.fixAll": true
7+
},
8+
"headwind.runOnSave": false,
9+
"typescript.preferences.importModuleSpecifier": "non-relative"
10+
}

0 commit comments

Comments
 (0)