Skip to content

Commit b8af7f6

Browse files
authored
Merge branch 'dostonnabotov:main' into feat/rust-snippets-enhancements
2 parents ee4fb58 + ef24250 commit b8af7f6

File tree

292 files changed

+11891
-653
lines changed

Some content is hidden

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

292 files changed

+11891
-653
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/src/ @psychlone77 @saminjay
88

99
# Snippets maintainers
10-
/public/data @Mathys-Gasnier
10+
/snippets @Mathys-Gasnier
1111

1212

1313
# ---------- What is a maintainer ----------

.github/workflows/check-snippets.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Checks snippets syntax
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'snippets/**'
7+
8+
jobs:
9+
check-snippets:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 22
24+
25+
- name: Check if snippets are formated correctly
26+
uses: int128/comment-action@v1
27+
with:
28+
run: node utils/checkSnippetFormatting.js # Run the script located in the utils/ folder
29+
post-on-failure: |
30+
## :x: Snippet Format Error
31+
${run.output}

.github/workflows/consolidate-snippets.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Consolidate JSON Files
33
on:
44
push:
55
paths:
6-
- "public/data/**"
6+
- "snippets/**"
77

88
permissions:
99
contents: write
@@ -14,25 +14,26 @@ jobs:
1414

1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818

1919
- name: Set up Node.js
20-
uses: actions/setup-node@v3
20+
uses: actions/setup-node@v4
2121
with:
22-
node-version: "16"
22+
node-version: 22
2323

2424
- name: Install dependencies
2525
run: |
2626
npm install
2727
28-
- name: Consolidate JSON files
28+
- name: Consolidate Snippets
2929
run: |
30-
node utils/consolidate.js # Run the script located in the utils/ folder
30+
node utils/consolidateSnippets.js # Run the script located in the utils/ folder
3131
3232
- name: Commit and push changes
3333
run: |
3434
git config --global user.name "GitHub Action"
3535
git config --global user.email "[email protected]"
36-
git add public/consolidated/all_snippets.json
37-
git commit -m "Update consolidated snippets"
36+
git add public/consolidated/*
37+
git add public/icons/*
38+
git diff-index --quiet HEAD || git commit -m "Update consolidated snippets"
3839
git push
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Pre-commit checks
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
pre-commit-checks:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 22
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Run cspell
25+
run: npm run cspell
26+
27+
- name: Run lint
28+
run: npm run lint
29+
30+
- name: Run build
31+
run: npm run build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ node_modules
1111
dist
1212
dist-ssr
1313
*.local
14+
*.tsbuildinfo
1415

1516
# Editor directories and files
1617
.vscode/*

.husky/pre-commit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
npm run cspell
2+
npm run lint
3+
npm run build

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
node_modules
22
dist
3+
snippets
4+
public
35
.vite
46
coverage
57
package-lock.json

CODE_OF_CONDUCT.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## QuickSnip Code of Conduct
2+
3+
QuickSnip is a welcoming and collaborative community for developers to organize, share, and discover code snippets. By participating in QuickSnip, you agree to uphold this code of conduct to maintain a friendly and inclusive environment.
4+
5+
### Short Version
6+
7+
- Be respectful to everyone in the community.
8+
- Avoid harassment, trolling, or spamming.
9+
- Ensure QuickSnip remains a safe and productive space for all.
10+
- Report any inappropriate behavior to [me](mailto:[email protected]), the owner of QuickSnip, or our [Discord team](https://discord.gg/UtJJcnsN).
11+
- No unauthorized bots without prior permission.
12+
13+
---
14+
15+
### Long Version
16+
17+
#### Harassment-Free Environment
18+
19+
We are committed to providing a harassment-free experience for everyone, regardless of gender, gender identity and expression, age, sexual orientation, disability, physical appearance, body size, race, ethnicity, national origin, or religion (or lack thereof). Examples of unacceptable behavior include:
20+
21+
- **Harassment:** Includes sexual language or imagery, deliberate intimidation, stalking, name-calling, unwelcome attention, libel, and malicious hacking or social engineering.
22+
- **Trolling:** Posting inflammatory comments to provoke an emotional response or disrupt discussions.
23+
- **Spamming:** Posting off-topic messages, promoting unrelated products, soliciting donations, advertising jobs or gigs, or flooding discussions with files or text.
24+
25+
#### Reporting Issues
26+
27+
If you experience or witness harassment, trolling, spamming, or any other inappropriate behavior, please report it to [me](mailto:[email protected]), the owner of QuickSnip, or our QuickSnip [Discord team](https://discord.gg/UtJJcnsN). Include details like screenshots and URLs, if possible, to help us address the issue effectively.
28+
29+
I, or the QuickSnip team will review all reports and take appropriate actions, which may include warnings, temporary bans, or permanent removal from the community.
30+
31+
#### Respectful Use of Bots
32+
33+
No bots are allowed within the QuickSnip community without prior written permission from the QuickSnip team. Unauthorized bots will be removed.
34+
35+
#### Final Notes
36+
37+
This code of conduct is inspired by [FreeCodeCamp’s approach](https://www.freecodecamp.org/news/code-of-conduct), emphasizing clarity and friendliness. Let’s work together to make QuickSnip a supportive and productive space for all developers!
38+

0 commit comments

Comments
 (0)