Skip to content

Commit 9924f4d

Browse files
committed
Run prettier formatter and convert to LF
1 parent b8b0277 commit 9924f4d

File tree

8 files changed

+68
-63
lines changed

8 files changed

+68
-63
lines changed

.github/pull_request_template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Closes #
3939
<!-- If your changes affect visuals, please include screenshots. -->
4040

4141
<details>
42-
<summary>Click to view screenshots</summary>
42+
<summary>Click to view screenshots</summary>
4343

44-
<!-- Add your screenshots here -->
44+
<!-- Add your screenshots here -->
4545

46-
</details>
46+
</details>

.github/workflows/check-snippets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Checks snippets syntax
33
on:
44
pull_request:
55
paths:
6-
- 'snippets/**'
6+
- "snippets/**"
77

88
jobs:
99
check-snippets:

.github/workflows/pre-commit-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Pre-commit checks
33
on:
44
pull_request:
55
branches:
6-
- '**'
6+
- "**"
77

88
jobs:
99
pre-commit-checks:

CODE_OF_CONDUCT.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,3 @@ No bots are allowed within the QuickSnip community without prior written permiss
3535
#### Final Notes
3636

3737
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: 56 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,22 @@ tags: number,currency
5050
- An `example` segement, containing one or more examples of use
5151

5252
Example in javascript:
53+
5354
```js
5455
function example(x) {
55-
return x * 2;
56+
return x * 2;
5657
}
5758

5859
// Usage:
59-
example(5) // Returns: 10
60+
example(5); // Returns: 10
6061
```
6162

6263
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.
6364

6465
### Snippet boundaries
6566

6667
To ensure your snippet isn’t refused, consider these questions:
68+
6769
- **Does the standard library of my language provide an easy way of doing this ?**
6870
- **Does that snippet not have a real, and practical use case ?**
6971
- **Could it be split into separate parts to be better understood ?**
@@ -79,23 +81,23 @@ If any answer is yes, then your snippet will most likely get rejected.
7981
1. **Ensure your snippet match [guidelines](#snippets-guidelines)**
8082

8183
2. **Navigate to the relevant folder:**
82-
83-
- Go to the `/snippets` folder in the root directory.
84-
- Locate the folder for the programming language of your snippet, such as `javascript` or `python`.
84+
85+
- Go to the `/snippets` folder in the root directory.
86+
- Locate the folder for the programming language of your snippet, such as `javascript` or `python`.
8587

8688
3. **Choose the correct category:**
8789

88-
- Within the language folder, find the relevant category folder for your snippet.
89-
- If no suitable category exists, refer to [Adding a New Category](#adding-a-new-category).
90+
- Within the language folder, find the relevant category folder for your snippet.
91+
- If no suitable category exists, refer to [Adding a New Category](#adding-a-new-category).
9092

9193
4. **Create a markdown file:**
9294

93-
- Create a new file with a `.md` extension.
94-
- Name the file appropriately, keeping it descriptive and concise.
95+
- Create a new file with a `.md` extension.
96+
- Name the file appropriately, keeping it descriptive and concise.
9597

9698
5. **Add your snippet:**
9799

98-
- Use the following format to structure your snippet:
100+
- Use the following format to structure your snippet:
99101

100102
````md
101103
---
@@ -121,39 +123,46 @@ tags: date,format
121123
---
122124

123125
```js
124-
const formatDate = (date) => date.toISOString().split('T')[0];
126+
const formatDate = (date) => date.toISOString().split("T")[0];
125127

126128
// Usage:
127129
console.log(formatDate(new Date())); // Output: '2024-12-10'
128130
```
129131
````
130132

131133
6. **Use syntax highlighting:**
132-
- Enclose your code with triple backticks (```).
133-
- Specify the language after the first set of backticks for syntax highlighting.
134+
135+
- Enclose your code with triple backticks (```).
136+
- Specify the language after the first set of backticks for syntax highlighting.
134137

135138
7. **Test your snippet:**
139+
136140
- Ensure your code runs as expected. \
137-
To test that your snippets are formatted correctly use the `snippets:check` script:
138-
```
139-
$ npm run snippets:check
140-
```
141-
It will return nothing if they are well formatted, otherwise it will tell you what the error is.
142-
143-
---
144-
To preview the snippets, start the vite server using:
145-
```
146-
$ npm run dev
147-
```
148-
It will use HMR to update the snippets in the `/public` folder, making them available to the frontend.
141+
To test that your snippets are formatted correctly use the `snippets:check` script:
142+
143+
```
144+
$ npm run snippets:check
145+
```
146+
147+
It will return nothing if they are well formatted, otherwise it will tell you what the error is.
148+
149+
***
150+
151+
To preview the snippets, start the vite server using:
152+
153+
```
154+
$ npm run dev
155+
```
156+
157+
It will use HMR to update the snippets in the `/public` folder, making them available to the frontend.
149158
150159
Expected file structure:
151160
152161
```md
153162
/snippets
154-
|- language
155-
|- category-name
156-
|- your-snippet-here.md
163+
|- language
164+
|- category-name
165+
|- your-snippet-here.md
157166
```
158167

159168
> Please do **NOT** add or edit anything in `/public` folder. It will be used for consolidating snippets.
@@ -164,7 +173,7 @@ If you’d like to refine or improve an existing snippet:
164173

165174
1. **Add a `contributors` field:**
166175

167-
- Include your GitHub username under the `contributors` field in the metadata section.
176+
- Include your GitHub username under the `contributors` field in the metadata section.
168177

169178
````md
170179
---
@@ -182,15 +191,15 @@ Updated code here
182191

183192
2. **Credit all contributors:**
184193

185-
- If contributors already exist, add your username separated by a comma
194+
- If contributors already exist, add your username separated by a comma
186195

187196
```md
188197
contributors: contributor1, contributor2, your-github-username
189198
```
190199

191200
3. **Document changes:**
192201

193-
- Clearly indicate what you updated and why in your pull request description.
202+
- Clearly indicate what you updated and why in your pull request description.
194203

195204
> We want to make sure that original author and contributor(s) are credited for their work.
196205
@@ -200,21 +209,21 @@ If your snippet doesn’t fit into any existing category, you can create a new o
200209

201210
1. **Create a new category folder:**
202211

203-
- In the relevant language directory, add a new folder.
204-
- Use a lowercase name with hyphens for separation (e.g., `file-handling`).
212+
- In the relevant language directory, add a new folder.
213+
- Use a lowercase name with hyphens for separation (e.g., `file-handling`).
205214

206215
2. **Add snippets:**
207216

208-
- Follow the [Adding a New Snippet](#adding-a-new-snippet) instructions.
217+
- Follow the [Adding a New Snippet](#adding-a-new-snippet) instructions.
209218

210219
Example structure:
211220

212221
```md
213222
/snippets
214-
|- python
215-
|- file-handling
216-
|- list-manipulation
217-
|- ....
223+
|- python
224+
|- file-handling
225+
|- list-manipulation
226+
|- ....
218227
```
219228

220229
### Adding a New Language
@@ -223,21 +232,21 @@ If you want to introduce a new programming language, here's how to do it:
223232

224233
1. **Create a language folder:**
225234

226-
- Add a new folder under the `snippets` directory.
227-
- Name it after the language in lowercase (e.g., `go`, `ruby`).
235+
- Add a new folder under the `snippets` directory.
236+
- Name it after the language in lowercase (e.g., `go`, `ruby`).
228237

229238
2. **Add categories and snippets:**
230239

231-
- Follow the [Adding a New Snippet](#adding-a-new-snippet) and [Adding a New Category](#adding-a-new-category) guidelines.
240+
- Follow the [Adding a New Snippet](#adding-a-new-snippet) and [Adding a New Category](#adding-a-new-category) guidelines.
232241

233-
4. **Include an icon:**
242+
3. **Include an icon:**
234243

235-
- Add an `icon.svg` file (50x50px) in the same language folder.
236-
- Use tools like [Resize SVG](https://www.iloveimg.com/resize-image/resize-svg) to ensure the correct size.
244+
- Add an `icon.svg` file (50x50px) in the same language folder.
245+
- Use tools like [Resize SVG](https://www.iloveimg.com/resize-image/resize-svg) to ensure the correct size.
237246

238-
5. **Double-check your work:**
247+
4. **Double-check your work:**
239248

240-
- Verify that everything is structured correctly and displays as intended.
249+
- Verify that everything is structured correctly and displays as intended.
241250

242251
---
243252

@@ -252,6 +261,7 @@ $ npm run snippets:check
252261
It will return nothing if they are well formatted, otherwise it will tell you what the error is.
253262

254263
---
264+
255265
To preview the snippets, you need to consolidate them, use the following script:
256266

257267
```

VISION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ QuickSnip is an open-source tool designed for developers who want to organize, s
2121
We do **NOT** aim to be:
2222

2323
- a component library
24-
- a documentation
24+
- a documentation
2525

2626
## QuickSnip Roadmap
2727

@@ -52,4 +52,4 @@ This roadmap outlines our current vision for QuickSnip and may evolve based on u
5252

5353
QuickSnip aims to become the preferred platform for developers to store, retrieve, and collaborate on code snippets.
5454

55-
Explore our [GitHub Releases](https://github.com/dostonnabotov/quicksnip/releases) for updates and join us on this journey.
55+
Explore our [GitHub Releases](https://github.com/dostonnabotov/quicksnip/releases) for updates and join us on this journey.

cspell.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,5 @@
88
}
99
],
1010
"dictionaries": ["workspace"],
11-
"ignorePaths": [
12-
"node_modules",
13-
"dist",
14-
"coverage",
15-
"public"
16-
]
11+
"ignorePaths": ["node_modules", "dist", "coverage", "public"]
1712
}

src/styles/main.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@ abbr {
325325
margin-left: 2.25em;
326326
}
327327

328-
.search-field:hover, .search-field:hover * {
328+
.search-field:hover,
329+
.search-field:hover * {
329330
cursor: pointer;
330331
}
331332

@@ -445,7 +446,7 @@ abbr {
445446
margin-left: 1.5rem;
446447
}
447448

448-
.sublanguage__button{
449+
.sublanguage__button {
449450
margin-left: auto;
450451
display: flex;
451452
align-items: center;
@@ -615,7 +616,7 @@ abbr {
615616
max-height: 90vh;
616617
overflow-y: auto;
617618
overflow-x: hidden;
618-
padding: 0.5rem 1rem 1rem 1rem;
619+
padding: 0.5rem 1rem 1rem 1rem;
619620
align-content: start;
620621
}
621622

0 commit comments

Comments
 (0)