Skip to content

Commit b2de638

Browse files
authored
feat: Design (#1)
1 parent a390225 commit b2de638

28 files changed

+6668
-32389
lines changed

.eslintignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Build directories
2+
3+
build/_
4+
dist/_
5+
public/_
6+
\*\*/out/_
7+
**/.next/\*
8+
**/node_modules/\*
9+
10+
# src/
11+
12+
**/reportWebVitals.\*
13+
**/service-worker._
14+
\*\*/serviceWorkerRegistration._ \*_/setupTests._
15+
16+
# eslintrc
17+
18+
\*_/.eslintrc._
19+
20+
# prettier
21+
22+
**/.prettier.\*
23+
**/prettier.config.\*
24+
25+
# next
26+
27+
\*_/next.config._
28+
29+
# vite
30+
31+
\*_/vite.config._
32+
33+
# tailwind
34+
35+
**/postcss.config.\*
36+
**/tailwind.config.\*
37+
38+
# craco
39+
40+
\*_/craco.config._
41+
42+
# misc
43+
44+
\*\*/jsconfig.json
45+
46+
# openapi
47+
48+
src/lib/swissknife/types.gen.ts

.eslintrc.js

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/**
2+
* @type {import('eslint').ESLint.ConfigData}
3+
*/
4+
module.exports = {
5+
root: true,
6+
env: { browser: true, es2020: true },
7+
plugins: ['perfectionist', 'unused-imports', '@typescript-eslint', 'prettier'],
8+
extends: ['airbnb', 'airbnb-typescript', 'airbnb/hooks', 'prettier'],
9+
parserOptions: {
10+
sourceType: 'module',
11+
ecmaVersion: 'latest',
12+
ecmaFeatures: { jsx: true },
13+
project: './tsconfig.json',
14+
},
15+
settings: {
16+
'import/resolver': {
17+
typescript: {
18+
project: './tsconfig.json',
19+
},
20+
},
21+
},
22+
/**
23+
* 0 ~ 'off'
24+
* 1 ~ 'warn'
25+
* 2 ~ 'error'
26+
*/
27+
rules: {
28+
// general
29+
'no-alert': 0,
30+
camelcase: 0,
31+
'no-console': 0,
32+
'no-unused-vars': 0,
33+
'no-nested-ternary': 0,
34+
'no-param-reassign': 0,
35+
'no-underscore-dangle': 0,
36+
'no-restricted-exports': 0,
37+
'no-promise-executor-return': 0,
38+
'import/prefer-default-export': 0,
39+
'prefer-destructuring': [1, { object: true, array: false }],
40+
// typescript
41+
'@typescript-eslint/naming-convention': 0,
42+
'@typescript-eslint/no-use-before-define': 0,
43+
'@typescript-eslint/consistent-type-exports': 1,
44+
'@typescript-eslint/consistent-type-imports': 1,
45+
'@typescript-eslint/no-unused-vars': [1, { args: 'none' }],
46+
// react
47+
'react/no-children-prop': 0,
48+
'react/react-in-jsx-scope': 0,
49+
'react/no-array-index-key': 0,
50+
'react/require-default-props': 0,
51+
'react/jsx-props-no-spreading': 0,
52+
'react/function-component-definition': 0,
53+
'react/jsx-no-useless-fragment': [1, { allowExpressions: true }],
54+
'react/no-unstable-nested-components': [1, { allowAsProps: true }],
55+
'react/jsx-no-duplicate-props': [1, { ignoreCase: false }],
56+
// jsx-a11y
57+
'jsx-a11y/anchor-is-valid': 0,
58+
'jsx-a11y/control-has-associated-label': 0,
59+
// unused imports
60+
'unused-imports/no-unused-imports': 1,
61+
'unused-imports/no-unused-vars': [
62+
0,
63+
{ vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' },
64+
],
65+
// perfectionist
66+
'perfectionist/sort-exports': [1, { order: 'asc', type: 'line-length' }],
67+
'perfectionist/sort-named-imports': [1, { order: 'asc', type: 'line-length' }],
68+
'perfectionist/sort-named-exports': [1, { order: 'asc', type: 'line-length' }],
69+
'perfectionist/sort-imports': [
70+
1,
71+
{
72+
order: 'asc',
73+
type: 'line-length',
74+
'newlines-between': 'always',
75+
groups: [
76+
'style',
77+
'type',
78+
['builtin', 'external'],
79+
'custom-mui',
80+
'custom-routes',
81+
'custom-hooks',
82+
'custom-utils',
83+
'internal',
84+
'custom-components',
85+
'custom-sections',
86+
'custom-auth',
87+
'custom-types',
88+
['parent', 'sibling', 'index'],
89+
['parent-type', 'sibling-type', 'index-type'],
90+
'object',
91+
'unknown',
92+
],
93+
'custom-groups': {
94+
value: {
95+
['custom-mui']: '@mui/**',
96+
['custom-auth']: 'src/auth/**',
97+
['custom-hooks']: 'src/hooks/**',
98+
['custom-utils']: 'src/utils/**',
99+
['custom-types']: 'src/types/**',
100+
['custom-routes']: 'src/routes/**',
101+
['custom-sections']: 'src/sections/**',
102+
['custom-components']: 'src/components/**',
103+
},
104+
},
105+
'internal-pattern': ['src/**'],
106+
},
107+
],
108+
},
109+
};

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Bug Report
2+
description: Create a report to help us improve
3+
labels: ['bug']
4+
body:
5+
- type: textarea
6+
id: issue-description
7+
attributes:
8+
label: Describe the bug
9+
description: A clear and concise description of what the bug is.
10+
placeholder: Describe the bug here.
11+
validations:
12+
required: true
13+
- type: textarea
14+
id: issue-reproduction
15+
attributes:
16+
label: Steps to reproduce
17+
description: Describe steps to reproduce the behavior.
18+
placeholder: Steps to reproduce the bug here.
19+
validations:
20+
required: true
21+
- type: textarea
22+
id: expected-behavior
23+
attributes:
24+
label: Expected behavior
25+
description: A clear and concise description of what you expected to happen.
26+
placeholder: Expected behavior here.
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: screenshots
31+
attributes:
32+
label: Screenshots
33+
description: If applicable, add screenshots to help explain your problem.
34+
placeholder: Add screenshots here.

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Lint, Prettier and Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
lint-and-prettier:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
24+
- name: Enable Corepack
25+
run: corepack enable
26+
27+
- name: Install dependencies
28+
run: yarn install
29+
30+
- name: Run ESLint
31+
run: yarn lint
32+
33+
- name: Run Prettier
34+
run: yarn fm:check
35+
36+
- name: Run build
37+
run: yarn build

0 commit comments

Comments
 (0)