Skip to content

Commit 23ae816

Browse files
chore(deps): fix lint rule
1 parent 7f9dbe0 commit 23ae816

11 files changed

Lines changed: 265 additions & 261 deletions

File tree

.config/eslint.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import js from "@eslint/js";
2+
import { globalIgnores } from "eslint/config";
23
import sonarjs from "eslint-plugin-sonarjs";
34
import globals from "globals";
45
import tseslint from "typescript-eslint";
56

67
export default tseslint.config([
8+
tseslint.configs.recommended,
9+
sonarjs.configs.recommended,
710
{
811
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
912
ignores: ["coverage/**", "dist/**"],
@@ -15,6 +18,5 @@ export default tseslint.config([
1518
"sonarjs/no-commented-code": "off",
1619
},
1720
},
18-
tseslint.configs.recommended,
19-
sonarjs.configs.recommended,
21+
globalIgnores(["dist/**/*"]),
2022
]);

.github/CONTRIBUTING.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# Contributing to Flashot
2+
3+
Thank you for your interest in contributing! This guide covers setup, development, testing, building, and publishing.
4+
5+
## 🛠️ Setup
6+
7+
1. **Clone the repository:**
8+
9+
```bash
10+
git clone https://github.com/thuongtruong109/flashot.git
11+
cd flashot
12+
```
13+
14+
2. **Install dependencies:**
15+
16+
```bash
17+
bun install
18+
# or
19+
npm install
20+
```
21+
22+
3. **Configure Git hooks (recommended):**
23+
```bash
24+
bunx lefthook install
25+
```
26+
27+
## 🚀 Run
28+
29+
- **Start development server (watch mode):**
30+
```bash
31+
bun run dev
32+
```
33+
34+
## 🧪 Test
35+
36+
- **Run all tests:**
37+
38+
```bash
39+
bun test
40+
```
41+
42+
- **Interactive test UI:**
43+
44+
```bash
45+
bun test:ui
46+
```
47+
48+
- **Coverage report:**
49+
```bash
50+
bun test:coverage
51+
```
52+
53+
## 🏗️ Build
54+
55+
- **Build for production:**
56+
```bash
57+
bun run build
58+
```
59+
60+
## 🧹 Lint & Format
61+
62+
- **Lint code:**
63+
64+
```bash
65+
bun run lint
66+
```
67+
68+
- **Auto-fix lint issues:**
69+
70+
```bash
71+
bun run lint:fix
72+
```
73+
74+
- **Biome checks:**
75+
76+
```bash
77+
bun run biome
78+
```
79+
80+
- **Auto-fix Biome issues:**
81+
```bash
82+
bun run biome:fix
83+
```
84+
85+
## 📦 Publish
86+
87+
1. **Update version:**
88+
89+
```bash
90+
npm version patch|minor|major
91+
```
92+
93+
2. **Build the library:**
94+
95+
```bash
96+
bun run build
97+
```
98+
99+
3. **Publish to npm:**
100+
```bash
101+
npm publish
102+
```
103+
104+
## ✅ Quality Checks
105+
106+
- **Run all checks:**
107+
108+
```bash
109+
bun run check
110+
```
111+
112+
- **Auto-fix all issues:**
113+
```bash
114+
bun run check:fix
115+
```
116+
117+
## 💡 Tips
118+
119+
- Ensure all tests and checks pass before submitting a PR.
120+
- Follow code style enforced by Biome and ESLint.
121+
122+
## 🤝 Need Help?
123+
124+
Open an issue or discussion on GitHub if you need assistance.

.github/FUNDING.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
github: thuongtruong109
2-
ko_fi: thuongtruong
32
custom:
43
["https://paypal.me/thuongtruong1009", "https://nhantien.momo.vn/0917085937"]

.github/workflows/ci.yml

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,36 @@ name: CI
22

33
on:
44
push:
5-
branches:
6-
- main
7-
5+
branches: [main]
86
pull_request:
9-
branches:
10-
- main
7+
branches: [main]
118

129
jobs:
1310
test:
14-
runs-on: ${{ matrix.os }}
15-
16-
strategy:
17-
matrix:
18-
os: [ubuntu-latest]
19-
fail-fast: false
11+
runs-on: ubuntu-latest
2012

2113
steps:
22-
- id: checkout
23-
name: Checkout
14+
- name: Checkout
2415
uses: actions/checkout@v3
25-
- id: setup-bun
26-
name: Setup Bun
16+
17+
- name: Setup Bun
2718
uses: oven-sh/setup-bun@v1
2819
with:
2920
bun-version: latest
30-
- id: install-deps
31-
name: Install dependencies
32-
run: |
33-
bun install
34-
- id: test
35-
name: Run test
36-
run: |
37-
bun test
38-
- id: lint
39-
name: Run lint
40-
run: |
41-
bun lint
21+
22+
- name: Cache Bun dependencies
23+
uses: actions/cache@v3
24+
with:
25+
path: |
26+
.bun
27+
node_modules
28+
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lockb') }}
29+
30+
- name: Install dependencies
31+
run: bun install
32+
33+
- name: Run tests
34+
run: bun test
35+
36+
- name: Lint and Format
37+
run: bun check

0 commit comments

Comments
 (0)