Skip to content

Commit 0c87a21

Browse files
authored
Merge branch 'main' into ruby-language
2 parents bebe1c7 + 621db73 commit 0c87a21

File tree

263 files changed

+1524
-1911
lines changed

Some content is hidden

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

263 files changed

+1524
-1911
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
text eol=lf

.github/CODEOWNERS

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44
* @Mathys-Gasnier
55

66
# Code maintainers
7-
/src/ @psychlone77 @saminjay
7+
/src/ @psychlone77 @saminjay @Mathys-Gasnier
88

99
# Snippets maintainers
10-
/snippets @Mathys-Gasnier
10+
/snippets @majvax @Mathys-Gasnier
11+
/snippets/javascript @psychlone77 @saminjay
12+
/snippets/python @psychlone77 @saminjay
13+
/snippets/cpp @saminjay
1114

1215

1316
# ---------- What is a maintainer ----------

.github/pull_request_template.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
<!-- **ANY PULL REQUEST NOT FOLLOWING GUIDELINES OR NOT INCLUDING A DESCRIPTION WILL BE CLOSED !** -->
2+
13
# Description
24

3-
<!-- Please include a summary of your changes. -->
5+
<!-- Include a summary of your changes. -->
46

57
## Type of Change
68

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:technophilechannelyt@gmail.com), 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:technophilechannelyt@gmail.com), 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+

CONTRIBUTING.md

Lines changed: 65 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,89 @@ You can contribute in two main ways:
1111

1212
## Improving the code
1313

14-
If you have a feature request or want to fix a bug, feel free to:
14+
### How to report bugs
1515

16-
- [Open an Issue](https://github.com/dostonnabotov/quicksnip/issues) to let us know what’s up.
17-
- [Send a Pull Request](https://github.com/dostonnabotov/quicksnip/pulls) with your changes.
16+
If you spot a bug in the codebase or issues with the documentation, please open up a [GitHub issue](https://github.com/dostonnabotov/quicksnip/issues) detailing the problem before creating a PR. Once confirmed with maintainers, you can then create a PR.
17+
18+
### How to propose new features
19+
20+
If you are interested in proposing new features, please open up a new [GitHub discussion](https://github.com/dostonnabotov/quicksnip/discussions) with details for the proposed feature.
21+
22+
Please do not create a PR for a new feature without first discussing it with the maintainers. If you create a PR for a new feature without discussing it first, then your PR will be closed.
23+
24+
---
25+
26+
## Snippets Guidelines
27+
28+
### Snippet Tags
29+
30+
- Tags must describe the snippet with simple word.
31+
32+
Here's an example:
33+
34+
```md
35+
---
36+
title: Convert Number to Currency
37+
description: Converts a number to a currency format with a specific locale.
38+
author: axorax
39+
tags: number,currency
40+
---
41+
```
42+
43+
**Do not use generic keywords or the language itself as a tag `utility` or `javascript`!**
44+
45+
### Snippet Format
46+
47+
**All** snippets should follow the following structure:
48+
49+
- A `code` segment, containing a function with the actual snippet functionnality
50+
- An `example` segement, containing one or more examples of use
51+
52+
Example in javascript:
53+
```js
54+
function example(x) {
55+
return x * 2;
56+
}
57+
58+
// Usage:
59+
example(5) // Returns: 10
60+
```
61+
62+
If your function doesn't return anything just show how to use it. If the result of your function is too complicated to be expressed in a single comment, your snippet is probably too complex to begin with.
63+
64+
### Snippet boundaries
65+
66+
To ensure your snippet isn’t refused, consider these questions:
67+
- **Does the standard library of my language provide an easy way of doing this ?**
68+
- **Does that snippet have a real, and practical use case ?**
69+
- **Could it be split into separate parts to be better understood ?**
70+
71+
If any answer is yes, then your snippet will most likely get rejected.
1872

1973
---
2074

2175
## Adding Snippets
2276

2377
### Adding a New Snippet
2478

25-
To add a new code snippet:
79+
1. **Ensure your snippet match [guidelines](#snippets-guidelines)**
2680

27-
1. **Navigate to the relevant folder:**
81+
2. **Navigate to the relevant folder:**
2882

2983
- Go to the `/snippets` folder in the root directory.
3084
- Locate the folder for the programming language of your snippet, such as `javascript` or `python`.
3185

32-
2. **Choose the correct category:**
86+
3. **Choose the correct category:**
3387

3488
- Within the language folder, find the relevant category folder for your snippet.
3589
- If no suitable category exists, refer to [Adding a New Category](#adding-a-new-category).
3690

37-
3. **Create a markdown file:**
91+
4. **Create a markdown file:**
3892

3993
- Create a new file with a `.md` extension.
4094
- Name the file appropriately, keeping it descriptive and concise.
4195

42-
4. **Add your snippet:**
96+
5. **Add your snippet:**
4397

4498
- Use the following format to structure your snippet:
4599

@@ -74,11 +128,11 @@ console.log(formatDate(new Date())); // Output: '2024-12-10'
74128
```
75129
````
76130

77-
5. **Use syntax highlighting:**
131+
6. **Use syntax highlighting:**
78132
- Enclose your code with triple backticks (```).
79133
- Specify the language after the first set of backticks for syntax highlighting.
80134

81-
6. **Test your snippet:**
135+
7. **Test your snippet:**
82136
- Ensure your code runs as expected. \
83137
To test that your snippets are formatted correctly use the `snippets:check` script:
84138
```
@@ -193,6 +247,6 @@ If you want to introduce a new programming language, here's how to do it:
193247

194248
Whether you’re fixing a tiny typo, writing a new snippet, or dreaming up big features, every bit counts! 🛠️
195249

196-
If you have any questions or need help, feel free to open an issue or tag me.
250+
If you have any questions or need help, feel free to open a new [GitHub discussion](https://github.com/dostonnabotov/quicksnip/discussions).
197251

198252
Happy coding! 💻✨

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,15 @@ Be sure to check out the [CONTRIBUTING.md](/CONTRIBUTING.md) file for detailed g
2323

2424
### Improving the code
2525

26-
Got a feature idea or bug fix? Here's how you can contribute:
26+
- **Reporting bugs**
2727

28-
- [Open an issue](https://github.com/dostonnabotov/quicksnip/issues) to share your ideas or report a bug.
29-
- [Send a pull request](https://github.com/dostonnabotov/quicksnip/pulls) with your changes.
28+
- If you spot a bug in the codebase or issues with the documentation, please open up a [GitHub issue](https://github.com/dostonnabotov/quicksnip/issues) detailing the problem before creating a PR.
29+
- Once confirmed with maintainers, you can then create a PR.
30+
31+
- **Proposing new features**
32+
33+
- If you are interested in proposing new features, please open up a new [GitHub discussion](https://github.com/dostonnabotov/quicksnip/discussions) with details for the proposed feature.
34+
- Please do **not** create a PR for a new feature without first discussing it with the maintainers. If you create a PR for a new feature without discussing it first, then your PR will be closed.
3035

3136
### Adding a Snippet
3237

@@ -99,11 +104,13 @@ For more details about adding new categories or programming languages, check out
99104

100105
To keep things smooth and consistent, please:
101106

102-
- Follow the formatting rules described above.
103-
- Include all mandatory fields in the snippet.
104-
- Test your snippet to ensure it works as expected.
107+
- [x] Follow the style and contribution guidelines of this project.
108+
- [x] Include all mandatory fields in the snippet.
109+
- [x] Test your snippet to ensure it works as expected.
110+
111+
Following these guidelines helps us (and everyone else) review and merge your contributions faster.
105112

106-
Following these guidelines helps me (and everyone else) review and merge your contributions faster.
113+
**If you fail to meet the guidelines, your PR will most likely get rejected.**
107114

108115
## License
109116

VISION.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Vision for QuickSnip
2+
3+
## What is QuickSnip?
4+
5+
QuickSnip is an open-source tool designed for developers who want to organize, search, and share code snippets. It aims to streamline the coding process by providing a centralized platform for snippet management.
6+
7+
## Core Principles
8+
9+
- **Developer Focused**: Focus on features that truly improve developer productivity.
10+
11+
- **Open and Extensible**: Encourage community contributions and integrations.
12+
13+
- **Lightweight and Fast**: Keep performance high and avoid unnecessary complexity.
14+
15+
## Our Goals
16+
17+
- Seamless snippet management without turning into an overly complex tool
18+
19+
- Enable collaboration and sharing while respecting user privacy and customization needs.
20+
21+
We do **NOT** aim to be:
22+
23+
- a component library
24+
- a documentation
25+
26+
## QuickSnip Roadmap
27+
28+
### v1.0 (Launching Soon)
29+
30+
- [x] A new snippets storage system for better maintainability and scalability
31+
- [ ] Search functionality
32+
- [ ] A support for frameworks and libraries
33+
- [ ] An ability to share snippets with others
34+
- [ ] A basic SEO (Search Engine Optimization)
35+
36+
### v2.0 (Planned Vision)
37+
38+
- [ ] An ability to have private snippets with personal account
39+
- [ ] Improved search functionality with filters
40+
- [ ] An improved SEO (Search Engine Optimization)
41+
42+
### Potential Future Ideas
43+
44+
- [ ] Plugins for IDEs like VS Code and JetBrains
45+
- [ ] Enterprise-grade support for larger organizations
46+
47+
## Disclaimer on Future Plans
48+
49+
This roadmap outlines our current vision for QuickSnip and may evolve based on user feedback, community contributions, and shifting priorities. We welcome your input and encourage you to help shape QuickSnip’s future.
50+
51+
## Future Vision
52+
53+
QuickSnip aims to become the preferred platform for developers to store, retrieve, and collaborate on code snippets.
54+
55+
Explore our [GitHub Releases](https://github.com/dostonnabotov/quicksnip/releases) for updates and join us on this journey.

cspell-dict.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
quicksnip
2+
slugifyed

eslint.config.js

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { fixupPluginRules } from "@eslint/compat";
22
import { FlatCompat } from "@eslint/eslintrc";
33
import js from "@eslint/js";
44
import globals from "globals";
5-
import reactPlugin from 'eslint-plugin-react';
5+
import reactPlugin from "eslint-plugin-react";
66
import reactHooks from "eslint-plugin-react-hooks";
77
import reactRefresh from "eslint-plugin-react-refresh";
88
import tseslint from "typescript-eslint";
@@ -49,46 +49,55 @@ export default tseslint.config(
4949
alwaysTryTypes: true,
5050
},
5151
},
52+
react: {
53+
version: "detect",
54+
},
5255
},
5356
rules: {
5457
...reactHooks.configs.recommended.rules,
5558
"@typescript-eslint/no-empty-object-type": "off",
56-
"@typescript-eslint/no-unused-vars": ["error", {
57-
"argsIgnorePattern": "^_",
58-
"varsIgnorePattern": "^_",
59-
"caughtErrorsIgnorePattern": "^_"
60-
}],
61-
"import/order": ["error", {
62-
"groups": [
63-
"builtin",
64-
"external",
65-
"internal",
66-
["parent", "sibling"],
67-
"index",
68-
"object",
69-
"type",
70-
"unknown"
71-
],
72-
"pathGroups": [
73-
{
74-
"pattern": "@*",
75-
"group": "internal",
76-
"position": "after"
77-
}
78-
],
79-
"pathGroupsExcludedImportTypes": ["builtin", "internal"],
80-
"newlines-between": "always",
81-
"alphabetize": {
82-
"order": "asc",
83-
"caseInsensitive": true
84-
}
85-
}],
59+
"@typescript-eslint/no-unused-vars": [
60+
"error",
61+
{
62+
argsIgnorePattern: "^_",
63+
varsIgnorePattern: "^_",
64+
caughtErrorsIgnorePattern: "^_",
65+
},
66+
],
67+
"import/order": [
68+
"error",
69+
{
70+
groups: [
71+
"builtin",
72+
"external",
73+
"internal",
74+
["parent", "sibling"],
75+
"index",
76+
"object",
77+
"type",
78+
"unknown",
79+
],
80+
pathGroups: [
81+
{
82+
pattern: "@*",
83+
group: "internal",
84+
position: "after",
85+
},
86+
],
87+
pathGroupsExcludedImportTypes: ["builtin", "internal"],
88+
"newlines-between": "always",
89+
alphabetize: {
90+
order: "asc",
91+
caseInsensitive: true,
92+
},
93+
},
94+
],
8695
"react/react-in-jsx-scope": "off",
8796
"react-refresh/only-export-components": [
8897
"warn",
8998
{ allowConstantExport: true },
9099
],
91-
"semi": ["error", "always"],
100+
semi: ["error", "always"],
92101
},
93102
}
94103
);

0 commit comments

Comments
 (0)