Skip to content

Commit 57b618a

Browse files
authored
Merge pull request #18 from officialMECH/dev
Maintenance (2024-09-30)
2 parents 46c6e17 + 93555aa commit 57b618a

Some content is hidden

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

96 files changed

+3861
-4219
lines changed

.eslintrc

-19
This file was deleted.

.github/CONTRIBUTING.md

+28-10
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Thank you for taking the time to contribute!
44

5-
Any contributions to this project are always welcome and encouraged, regardless of programming expertise. If you're not sure where to start or how to contribute, you can refer to [these articles](https://contributing.md/) which may give you some useful pointers and insights.
5+
Any contributions to this project are welcome and encouraged, regardless of programming expertise. If you're not sure where to start or how to contribute, you can refer to [these articles](https://contributing.md/) which may give you some useful pointers and insights.
66

77
Before you jump the gun, we ask that you first and foremost check the following feeds to see if your issue has already been addressed. That way, you'll have a greater possibility of finding a solution to your issue if it is already resolved or any further developments/context related to your issue from other maintainers or collaborators.
88

@@ -18,17 +18,35 @@ This project is bootstrapped with a modified [Vite](https://vitejs.dev/) + [Reac
1818
### Prerequisites
1919

2020
- [Node.js](https://nodejs.dev/en/learn/) (LTS is recommended)
21+
- [Visual Studio Code](https://code.visualstudio.com/docs/sourcecontrol/overview#_branches-and-tags)
2122

2223
### Project Setup
2324

24-
1. [Install Node.js](https://nodejs.dev/en/learn/how-to-install-nodejs/) in your workspace if you haven't already.
25-
2. Open a new terminal and run `yarn install` and `yarn prepare`. This will install all necessary dependencies and run supplementary code generation processes.
26-
3. Make your changes! You can run `yarn dev` at anytime to start a local development server or `yarn build` and `yarn preview` to build a local production server and preview your changes.
27-
4. Before you commit your changes, make sure to run `yarn test` at least once to ensure all unit tests are passing, and check for any underlying errors or vulnerabilities that could make your code unsafe to run in production.
28-
5. Once you're ready, you can submit a new pull request and await feedback.
25+
1. Install [Node.js](https://nodejs.dev/en/learn/how-to-install-nodejs/) and [Visual Studio Code](https://code.visualstudio.com/Download) if you haven't already.
26+
2. [Create a new fork](https://guides.github.com/activities/forking/) of the repository and [clone it](https://code.visualstudio.com/docs/sourcecontrol/overview#_cloning-a-repository) to your local machine.
27+
3. [Create a new dedicated branch](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository#creating-a-branch) and sync it to your workspace.
28+
4. If you're using Visual Studio Code, install the recommended workspace extensions (VSC should prompt you to do so). This will enable useful workspace integrations that are compatible with the codebase.
29+
5. Open a new terminal in your cloned directory and run `yarn install`. This will install all necessary dependencies and run any supplementary code generation processes.
30+
6. Make your changes! You can run `yarn dev` to start a local development environment or `yarn build` + `yarn preview` for a production environment.
31+
- If you're running a local development environment, run `yarn prepare` once beforehand to run all necessary codegen workflows for the server.
32+
7. Once the server is running, you can open the `localhost` link that appears in console to preview your changes on your local machine.
2933

30-
### Other Specifications
34+
#### Git Hooks
3135

32-
- [PandaCSS](https://panda-css.com/) is used as the primary styling engine. After running `yarn prepare` or making changes to the `panda.config.ts` file at runtime, the engine will autogenerate the contents of `src/styles` for use throughout the project.
33-
- Similarly, routing is provided by [Generouted](https://github.com/oedotme/generouted), and will autogenerate the contents of the `src/router.ts` file at runtime.
34-
- ESLint and Prettier will automatically reformat your code when staging new commits to enforce a consistent coding style. If this does not work for some reason, you can run `yarn lint --fix` and `yarn format --write` respectively to manually run the linter/formatter on your code.
36+
Pre-commit hooks are configured via [lefthook](https://github.com/evilmartians/lefthook) to run workflows before making commits to the repository.
37+
38+
**These hooks are not enabled by default**, but you can run `yarn lefthook install` to enable them for your workspace.
39+
40+
### Submitting a Pull Request
41+
42+
If you think you're ready to make a pull request, be sure to run through the following checklist to ensure your code is production-ready:
43+
44+
- [ ] If you did not activate the available git hooks for your workspace, you can run the following command to manually run the linter/formatter on select files: `yarn check --write {files}`.
45+
- [ ] Always run `yarn test` at least once to ensure all unit tests are passing.
46+
- [ ] Make a production build for your application (`yarn build && yarn preview`) and ensure no critical errors are present or noticeable.
47+
48+
## Technologies
49+
50+
- [Biome](https://biomejs.dev/) is used for all linting and formatting concerns. The configured git hooks should run the linting and formatting workflows automatically on pre-commit, but you can also run `yarn biome -h` to run any additional commands as needed.
51+
- [PandaCSS](https://panda-css.com/) is used as the primary styling engine. After running `yarn prepare` or making changes to the `panda.config.ts` file at runtime, the engine will autogenerate the contents of `./styled-system` for use throughout the project.
52+
- Similarly, routing is provided by [Generouted](https://github.com/oedotme/generouted) and will autogenerate the contents of the `src/router.ts` file at runtime.

.github/workflows/pages.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
types: [completed]
99

1010
env:
11-
NODE_VERSION: 18
11+
NODE_VERSION: 20
1212

1313
permissions:
1414
contents: read
@@ -29,9 +29,9 @@ jobs:
2929
if: ${{ github.event.workflow_run.conclusion == 'success' }}
3030
steps:
3131
- name: Checkout
32-
uses: actions/checkout@v3
33-
- name: Setup Node.js
34-
uses: actions/setup-node@v3
32+
uses: actions/checkout@v4
33+
- name: Set up Node
34+
uses: actions/setup-node@v4
3535
with:
3636
node-version: ${{ env.NODE_VERSION }}
3737
cache: yarn
@@ -44,11 +44,11 @@ jobs:
4444
yarn build --base="/${{ github.event.repository.name }}/"
4545
cp ./dist/index.html ./dist/404.html
4646
- name: Setup Pages
47-
uses: actions/configure-pages@v3
47+
uses: actions/configure-pages@v4
4848
- name: Upload artifact
49-
uses: actions/upload-pages-artifact@v2
49+
uses: actions/upload-pages-artifact@v3
5050
with:
51-
path: ./dist
51+
path: './dist'
5252
- name: Deploy to GitHub Pages
5353
id: deployment
54-
uses: actions/deploy-pages@v2
54+
uses: actions/deploy-pages@v4

.github/workflows/quality.yml

+12-35
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,32 @@ name: Code Quality
22

33
on:
44
push:
5-
pull_request:
65
workflow_dispatch:
76

87
env:
9-
NODE_VERSION: 18
8+
NODE_VERSION: 20
109

1110
jobs:
12-
lint:
13-
name: Lint (ESLint)
11+
check:
12+
name: Check (Biome)
1413
runs-on: ubuntu-latest
1514
steps:
1615
- name: Checkout
17-
uses: actions/checkout@v3
18-
- name: Setup Node.js
19-
uses: actions/setup-node@v3
16+
uses: actions/checkout@v4
17+
- name: Setup Biome
18+
uses: biomejs/setup-biome@v2
2019
with:
21-
node-version: ${{ env.NODE_VERSION }}
22-
cache: yarn
23-
- name: Install dependencies
24-
run: yarn install --immutable
25-
- name: Prepare
26-
run: yarn prepare
27-
- name: Run ESLint
28-
run: yarn lint --fix=false
29-
format:
30-
name: Format (Prettier)
31-
runs-on: ubuntu-latest
32-
steps:
33-
- name: Checkout
34-
uses: actions/checkout@v3
35-
- name: Setup Node.js
36-
uses: actions/setup-node@v3
37-
with:
38-
node-version: ${{ env.NODE_VERSION }}
39-
cache: yarn
40-
- name: Install dependencies
41-
run: yarn install --immutable
42-
- name: Prepare
43-
run: yarn prepare
44-
- name: Run Prettier
45-
run: yarn format --check
20+
version: latest
21+
- name: Run Biome
22+
run: biome ci .
4623
test:
4724
name: Run Unit Tests (Vitest)
4825
runs-on: ubuntu-latest
4926
steps:
5027
- name: Checkout
51-
uses: actions/checkout@v3
52-
- name: Setup Node.js
53-
uses: actions/setup-node@v3
28+
uses: actions/checkout@v4
29+
- name: Set up Node
30+
uses: actions/setup-node@v4
5431
with:
5532
node-version: ${{ env.NODE_VERSION }}
5633
cache: yarn

.gitignore

+22-23
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
pnpm-debug.log*
8-
lerna-debug.log*
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
92

10-
node_modules
11-
dist
12-
dist-ssr
3+
# workspace
134
*.local*
5+
*todo*
146

15-
# Yarn
7+
# dependencies
8+
/node_modules
169
.pnp.*
1710
.yarn/*
1811
!.yarn/patches
@@ -21,16 +14,22 @@ dist-ssr
2114
!.yarn/sdks
2215
!.yarn/versions
2316

24-
# Autogenerated
25-
src/styles
17+
# testing
18+
/coverage
19+
20+
# production
21+
/dist
22+
23+
# autogenerated
24+
styled-system
2625

27-
# Editor directories and files
28-
.vscode/*
29-
!.vscode/extensions.json
30-
.idea
26+
# misc
3127
.DS_Store
32-
*.suo
33-
*.ntvs*
34-
*.njsproj
35-
*.sln
36-
*.sw?
28+
.env.local
29+
.env.development.local
30+
.env.test.local
31+
.env.production.local
32+
33+
npm-debug.log*
34+
yarn-debug.log*
35+
yarn-error.log*

.husky/pre-commit

-4
This file was deleted.

.husky/pre-push

-4
This file was deleted.

.lintstagedrc

-3
This file was deleted.

.prettierignore

-1
This file was deleted.

.prettierrc

-6
This file was deleted.

.vscode/extensions.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["biomejs.biome", "vitest.explorer"]
3+
}

.vscode/settings.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"editor.defaultFormatter": "biomejs.biome",
3+
"explorer.fileNesting.patterns": {
4+
"*.js": "${capture}.js.map, ${capture}.min.js, ${capture}.d.ts, ${capture}.test.js",
5+
"*.ts": "${capture}.js, ${capture}.test.ts",
6+
"*.jsx": "${capture}.js",
7+
"*.tsx": "${capture}.ts",
8+
".gitignore": "*ignore",
9+
"package.json": "yarn.lock, .yarnrc.yml, biome.json, lefthook.yml",
10+
"README.md": "*.md, AUTHORS*, BACKERS*, CHANGELOG*, CODEOWNERS*, CONTRIBUTING*, CONTRIBUTORS*, CODE_OF_CONDUCT*, GOVERNANCE*, HISTORY*, LICENSE*, MAINTAINERS*, SECURITY*, SPONSORS*, TODO*",
11+
"tsconfig.json": "tsconfig.*.json",
12+
"vite.config.ts": "*.config.js, *.config.cjs, *.config.mjs, *.config.ts"
13+
},
14+
"files.exclude": {
15+
"**/.git": true,
16+
"**/.yarn": true,
17+
"**/node_modules": true,
18+
"**/yarn.lock": true
19+
}
20+
}

0 commit comments

Comments
 (0)