Skip to content

Commit

Permalink
feat: init
Browse files Browse the repository at this point in the history
  • Loading branch information
shalluv committed Aug 6, 2024
0 parents commit 4979870
Show file tree
Hide file tree
Showing 32 changed files with 6,687 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'next/core-web-vitals',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'prettier',
'plugin:tailwindcss/recommended',
],
ignorePatterns: [],
parser: '@typescript-eslint/parser',
rules: {},
}
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
41 changes: 41 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Linter and style checker

on:
push:
branches:
- 'main'

permissions:
contents: read
pages: write
id-token: write

jobs:
lint-and-style-check:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Lint
run: pnpm run lint

- name: Style check
run: pnpm run style-check
38 changes: 38 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Vitest

on:
push:
branches:
- 'main'

permissions:
contents: read
pages: write
id-token: write

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Test
run: pnpm run test
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# 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

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm dlx commitlint --edit $1
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm dlx lint-staged
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/**/*
pnpm-lock.yaml
.gitignore
.prettierignore
.nvmrc
.npmrc
39 changes: 39 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"trailingComma": "es5",
"semi": false,
"tabWidth": 2,
"useTabs": false,
"endOfLine": "auto",
"printWidth": 80,
"singleQuote": true,
"jsxSingleQuote": true,
"proseWrap": "preserve",
"arrowParens": "always",
"importOrder": [
"^@/components(.*)$",
"^@/lib(.*)$",
"^@/styles(.*)$",
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"plugins": [
"@trivago/prettier-plugin-sort-imports",
"prettier-plugin-tailwindcss"
],
"overrides": [
{
"files": "*.json",
"options": {
"singleQuote": false
}
},
{
"files": ".*rc",
"options": {
"singleQuote": false,
"parser": "json"
}
}
]
}
76 changes: 76 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributing Guide to ESC-UI

## Prerequisites

- Node.js v20.0.0 or later (lts/iron recommended)
- PNPM v8.0.0 or later

## Getting Started

1. Clone the repository

```bash
git clone https://github.com/esc-chula/intania-form.git
```

1. Install the dependencies

```bash
pnpm install
```

1. Start the development server

```bash
pnpm dev
```

1. Done! You are now good to go!

## Practices

- **Commit Message**: Use the following format for commit messages: `type: description`. For example, `feat: add button component`.
Please check [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for more information.

- **Branching**: Use the following format for branch names: `type/description`. For example, `feature/button`.

## Pull Request

1. Create a new branch from the `main` branch.

```bash
git checkout -b your-branch
```

1. Make changes to the code.

1. Staged and Commit the changes.

```bash
git add .
git commit -m "message"
```

1. Push the changes to the remote repository.

```bash
git push origin your-branch
```

1. Create a pull request to the `main` branch.

1. Done! You can now wait for the review.

## Recommended Extensions for VSCode

- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
- [Error Lens](https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens)
- [Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)

### WSL

_Not required but recommended._
If you have some time or encounter some issues, I recommend setting up WSL for development.

Please check the [official documentation](https://docs.microsoft.com/en-us/windows/wsl/install) for more information.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Intania - Form

Intania Form is a form wrapper of NocoDB for internal uses in the Engineering Faculty of Chulalongkorn University.

## Contributing

Please read the [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
2 changes: 2 additions & 0 deletions commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const config = { extends: ['@commitlint/config-conventional'] }
export default config
4 changes: 4 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}

export default nextConfig
Loading

0 comments on commit 4979870

Please sign in to comment.