Skip to content

Commit 10d1a6f

Browse files
authored
chore: add code quality tools and contribution guidelines (#1)
- Add MIT LICENSE and CONTRIBUTING.md - Set up ESLint, Prettier, and EditorConfig - Configure Husky with pre-commit hooks and commitlint - Add GitHub Actions CI workflow for PR validation - Add FUNDING.yml for Ko-fi sponsorship - Update package.json metadata for public release
1 parent a7aad01 commit 10d1a6f

File tree

122 files changed

+5273
-2991
lines changed

Some content is hidden

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

122 files changed

+5273
-2991
lines changed

.commitlintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.editorconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# EditorConfig helps maintain consistent coding styles
2+
# https://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
indent_style = space
12+
indent_size = 2
13+
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
17+
[*.json]
18+
indent_size = 2
19+
20+
[*.yml]
21+
indent_size = 2
22+
23+
[Makefile]
24+
indent_style = tab

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
ko_fi: jzimz

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
lint-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Run ESLint
27+
run: npm run lint:eslint
28+
29+
- name: Check formatting with Prettier
30+
run: npm run format:check
31+
32+
- name: Type check with TypeScript
33+
run: npm run lint:types
34+
35+
- name: Run tests
36+
run: npm test

.github/workflows/release.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,34 @@ name: Release Build
33
on:
44
push:
55
tags:
6-
- "v*"
6+
- 'v*'
77

88
permissions:
99
contents: write
1010

1111
jobs:
12+
validate:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '22'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Run linting and tests
28+
run: |
29+
npm run lint
30+
npm test
31+
1232
build-and-release:
33+
needs: validate
1334
strategy:
1435
matrix:
1536
os: [macos-latest, windows-latest]
@@ -28,8 +49,8 @@ jobs:
2849
- name: Setup node.js
2950
uses: actions/setup-node@v4
3051
with:
31-
node-version: "22"
32-
cache: "npm"
52+
node-version: '22'
53+
cache: 'npm'
3354

3455
- name: Set release version
3556
shell: bash
@@ -63,4 +84,4 @@ jobs:
6384
with:
6485
environment: production
6586
sourcemaps: .vite/build .vite/renderer/main_window/assets
66-
release: "ROMie@${{ env.RELEASE_VERSION }}"
87+
release: 'ROMie@${{ env.RELEASE_VERSION }}'

.gitignore

Lines changed: 30 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,47 @@
1+
# Personal/Local files
2+
.vscode
3+
CLAUDE.local.md
4+
.DS_Store
5+
6+
# Secrets & Credentials
17
*.p12
8+
.env
9+
.env.test
10+
.env.sentry-build-plugin
11+
12+
# App data directory
213
.romie
3-
.vscode
14+
15+
# Dependencies
16+
node_modules/
17+
18+
# Build outputs
19+
out/
20+
build/Release
421

522
# Logs
623
logs
724
*.log
825
npm-debug.log*
9-
yarn-debug.log*
10-
yarn-error.log*
11-
lerna-debug.log*
12-
13-
# Diagnostic reports (https://nodejs.org/api/report.html)
14-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
1526

16-
# Runtime data
17-
pids
18-
*.pid
19-
*.seed
20-
*.pid.lock
21-
.DS_Store
22-
23-
# Directory for instrumented libs generated by jscoverage/JSCover
24-
lib-cov
27+
# TypeScript
28+
*.tsbuildinfo
2529

26-
# Coverage directory used by tools like istanbul
30+
# Test coverage
2731
coverage
2832
*.lcov
2933

30-
# nyc test coverage
31-
.nyc_output
32-
33-
# node-waf configuration
34-
.lock-wscript
35-
36-
# Compiled binary addons (https://nodejs.org/api/addons.html)
37-
build/Release
38-
39-
# Dependency directories
40-
node_modules/
41-
jspm_packages/
42-
43-
# TypeScript v1 declaration files
44-
typings/
45-
46-
# TypeScript cache
47-
*.tsbuildinfo
34+
# Vite
35+
.vite/
4836

49-
# Optional npm cache directory
37+
# Caches
38+
.cache
5039
.npm
51-
52-
# Optional eslint cache
5340
.eslintcache
5441

55-
# Optional REPL history
56-
.node_repl_history
57-
58-
# Output of 'npm pack'
42+
# Misc
5943
*.tgz
60-
61-
# Yarn Integrity file
62-
.yarn-integrity
63-
64-
# dotenv environment variables file
65-
.env
66-
.env.test
67-
68-
# parcel-bundler cache (https://parceljs.org/)
69-
.cache
70-
71-
# next.js build output
72-
.next
73-
74-
# nuxt.js build output
75-
.nuxt
76-
77-
# vuepress build output
78-
.vuepress/dist
79-
80-
# Serverless directories
81-
.serverless/
82-
83-
# FuseBox cache
84-
.fusebox/
85-
86-
# DynamoDB Local files
87-
.dynamodb/
88-
89-
# Webpack
90-
.webpack/
91-
92-
# Vite
93-
.vite/
94-
95-
# Electron-Forge
96-
out/
97-
98-
# Sentry Config File
99-
.env.sentry-build-plugin
44+
*.pid
45+
*.seed
46+
*.pid.lock
47+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no -- commitlint --edit $1

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.lintstagedrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"*.{js,cjs,mjs,ts,vue}": ["eslint --fix", "prettier --write"],
3+
"*.{json,md,yml,yaml}": ["prettier --write"]
4+
}

.prettierignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Build outputs
2+
out/
3+
dist/
4+
build/
5+
.vite/
6+
7+
# Dependencies
8+
node_modules/
9+
10+
# Generated files
11+
*.min.js
12+
*.min.css
13+
14+
# Large data files
15+
src/data/ra/*.json
16+
17+
# Logs
18+
*.log
19+
20+
# OS files
21+
.DS_Store

0 commit comments

Comments
 (0)