Skip to content

Commit 73b1e02

Browse files
authored
ci: format with prettier (DenverCoder1#254)
* ci: format with prettier * style: Formatted code with Prettier * Update print width * style: Formatted code with Prettier * ci: ignore minified * Update prettier.yml * Update CONTRIBUTING.md * Restore jscolor.min.js * increase length to 120 * style: Formatted code with Prettier Co-authored-by: DenverCoder1 <[email protected]>
1 parent 09efd2f commit 73b1e02

21 files changed

+215
-175
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: 'bug'
6-
assignees: ''
7-
4+
title: ""
5+
labels: "bug"
6+
assignees: ""
87
---
98

109
**Describe the bug**
1110
A clear and concise description of what the bug is.
1211

1312
**To Reproduce**
1413
Steps to reproduce the behavior:
14+
1515
1. Go to '...'
1616
2. Click on '....'
1717
3. Scroll down to '....'
@@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

2626
**Desktop (please complete the following information):**
27-
- OS: [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version [e.g. 22]
27+
28+
- OS: [e.g. iOS]
29+
- Browser [e.g. chrome, safari]
30+
- Version [e.g. 22]
3031

3132
**Smartphone (please complete the following information):**
32-
- Device: [e.g. iPhone6]
33-
- OS: [e.g. iOS8.1]
34-
- Browser [e.g. stock browser, safari]
35-
- Version [e.g. 22]
33+
34+
- Device: [e.g. iPhone6]
35+
- OS: [e.g. iOS8.1]
36+
- Browser [e.g. stock browser, safari]
37+
- Version [e.g. 22]
3638

3739
**Additional context**
3840
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
5-
labels: 'enhancement'
6-
assignees: ''
7-
4+
title: ""
5+
labels: "enhancement"
6+
assignees: ""
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.github/ISSUE_TEMPLATE/question.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
---
22
name: Question
33
about: I have a question about GitHub Streak Stats
4-
title: ''
5-
labels: 'question'
6-
assignees: ''
7-
4+
title: ""
5+
labels: "question"
6+
assignees: ""
87
---
98

10-
119
**Description**
1210

1311
A brief description of the question or issue:
14-

.github/ISSUE_TEMPLATE/theme.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
---
22
name: Theme Request
33
about: Request a theme for the project
4-
title: ''
5-
labels: 'theme'
6-
assignees: ''
7-
4+
title: ""
5+
labels: "theme"
6+
assignees: ""
87
---
98

109
**Describe your theme in detail**
1110
A clear description about what the theme would entail.
1211

1312
**Include a screenshot / image**
13+
1414
<!-- Optional -->
1515

1616
**Color palette**
1717
Describe the colors that could be used with this theme.
1818

19-
2019
Are you going to add the theme?
20+
2121
- [ ] Check for yes

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Fixes # <!-- add issue number -->
1515

1616
## How Has This Been Tested?
1717

18-
<!--
19-
If you have changed a feature of the stats cards, please describe the tests you made to verify your changes.
18+
<!--
19+
If you have changed a feature of the stats cards, please describe the tests you made to verify your changes.
2020
Changes strictly related to documentation can skip this section.
2121
-->
2222

.github/workflows/prettier.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Format with Prettier
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
prettier:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
with:
17+
ref: ${{ github.head_ref }}
18+
19+
- name: Prettify code
20+
uses: creyD/[email protected]
21+
with:
22+
prettier_options: "--write **/*.{php,md,js,css} !**/*.min.js --print-width 120"
23+
commit_message: "style: Formatted code with Prettier"
24+
prettier_plugins: "@prettier/plugin-php"

.gitignore

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1+
# Generated files
2+
vendor/
3+
node_modules/
4+
*.log
15
composer.phar
2-
/vendor/
6+
yarn.lock
7+
package-lock.json
8+
9+
# Local Configuration
10+
package.json
11+
12+
# Environment
313
.env
14+
15+
# IDE
416
.vscode/

CODE_OF_CONDUCT.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
32-
professional setting
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
3333

3434
## Our Responsibilities
3535

CONTRIBUTING.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ You can refer to the following articles on the basics of Git and GitHub in case
2020

2121
#### Requirements
2222

23-
* [PHP 8.0+](https://www.apachefriends.org/index.html)
24-
* [Composer](https://getcomposer.org)
25-
* [Imagick](https://www.php.net/imagick)
23+
- [PHP 8.0+](https://www.apachefriends.org/index.html)
24+
- [Composer](https://getcomposer.org)
25+
- [Imagick](https://www.php.net/imagick)
2626

2727
#### Linux
2828

@@ -60,6 +60,7 @@ TOKEN=<your-token>
6060
```
6161

6262
### Install dependencies
63+
6364
Run the following command to install all the required dependencies to work on this project.
6465

6566
```bash
@@ -91,40 +92,37 @@ Below you will find the process and workflow used to review and merge your chang
9192
### Step 0 : Find an issue
9293

9394
- Take a look at the existing issues or create your **own** issues!
94-
- Wait for the issue to be assigned to you after which you can start working on it.
9595

9696
![issues tab](https://user-images.githubusercontent.com/63443481/136185624-24447858-de8d-4b0a-bb6b-2528d9031196.PNG)
9797

98-
9998
### Step 1 : Fork the Project
10099

101100
- Fork this repository. This will create a copy of this repository on your GitHub profile.
102-
Keep a reference to the original project in the `upstream` remote.
101+
Keep a reference to the original project in the `upstream` remote.
103102

104103
```bash
105-
git clone https://github.com/<your-username>/github-readme-streak-stats.git
106-
cd github-readme-streak-stats
107-
git remote add upstream https://github.com/DenverCoder1/github-readme-streak-stats.git
108-
```
104+
git clone https://github.com/<your-username>/github-readme-streak-stats.git
105+
cd github-readme-streak-stats
106+
git remote add upstream https://github.com/DenverCoder1/github-readme-streak-stats.git
107+
```
109108

110109
![fork button](https://user-images.githubusercontent.com/63443481/136185816-0b6770d7-0b00-4951-861a-dd15e3954918.PNG)
111-
112110

113111
- If you have already forked the project, update your copy before working.
114112

115113
```bash
116114
git remote update
117115
git checkout <branch-name>
118116
git rebase upstream/<branch-name>
119-
```
117+
```
120118

121119
### Step 2 : Branch
122120

123121
Create a new branch. Use its name to identify the issue you're addressing.
124122

125123
```bash
126-
# It will create a new branch with the name Branch_Name and switch to that branch
127-
git checkout -b Branch_Name
124+
# Creates a new branch with the name feature_name and switches to it
125+
git checkout -b feature_name
128126
```
129127

130128
### Step 3 : Work on the issue assigned
@@ -133,9 +131,9 @@ git checkout -b Branch_Name
133131
- Make all the necessary changes to the codebase.
134132
- After you've made changes or made your contribution to the project, add changes to the branch you've just created using:
135133

136-
```bash
137-
# To add all new files to the branch
138-
git add .
134+
```bash
135+
# To add all new files to the branch
136+
git add .
139137

140138
# To add only a few files to the branch
141139
git add <some files (with path)>
@@ -155,21 +153,23 @@ git commit -m "message"
155153
- Now you are ready to your work on the remote repository.
156154
- When your work is ready and complies with the project conventions, upload your changes to your fork:
157155

158-
```bash
156+
```bash
159157
# To push your work to your remote repository
160158
git push -u origin Branch_Name
161159
```
162160

163161
- Here is how your branch will look.
164-
![forked branch](https://user-images.githubusercontent.com/63443481/136186235-204f5c7a-1129-44b5-af20-89aa6a68d952.PNG)
162+
163+
![forked branch](https://user-images.githubusercontent.com/63443481/136186235-204f5c7a-1129-44b5-af20-89aa6a68d952.PNG)
165164

166165
### Step 6 : Pull Request
167166

168-
- Go to your forked repository in your browser and click on "Compare and pull request". Then add a title and description to your pull request that explains your contribution.
167+
- Go to your forked repository in your browser and click on "Compare and pull request". Then add a title and description to your pull request that explains your contribution.
169168

170-
<img width="700" alt="compare and pull request" src="https://user-images.githubusercontent.com/63443481/136186304-c0a767ea-1fd2-4b0c-b5a8-3e366ddc06a3.PNG">
169+
<img width="700" alt="compare and pull request" src="https://user-images.githubusercontent.com/63443481/136186304-c0a767ea-1fd2-4b0c-b5a8-3e366ddc06a3.PNG">
171170

172-
<img width="882" alt="opening pull request" src="https://user-images.githubusercontent.com/63443481/136186322-bfd5f333-136a-4d2f-8891-e8f97c379ba8.PNG">
171+
<img width="882" alt="opening pull request" src="https://user-images.githubusercontent.com/63443481/136186322-bfd5f333-136a-4d2f-8891-e8f97c379ba8.PNG">
173172

174173
- Voila! Your Pull Request has been submitted and it's ready to be merged.🥳
175-
#### Happy Contributing!
174+
175+
#### Happy Contributing!

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ To enable a theme, append `&theme=` followed by the theme name to the end of the
4343
[![GitHub Streak](https://github-readme-streak-stats.herokuapp.com/?user=DenverCoder1&theme=dark)](https://git.io/streak-stats)
4444
```
4545

46-
| Theme | Preview |
47-
| :------------: | :-----------------------------------------------------------------: |
48-
| `default` | ![default](https://i.imgur.com/IaTuYdS.png) |
49-
| `dark` | ![dark](https://i.imgur.com/bUrsjlp.png) |
50-
| `highcontrast` | ![highcontrast](https://i.imgur.com/ovrVrTY.png) |
46+
| Theme | Preview |
47+
| :------------: | :------------------------------------------------------------------: |
48+
| `default` | ![default](https://i.imgur.com/IaTuYdS.png) |
49+
| `dark` | ![dark](https://i.imgur.com/bUrsjlp.png) |
50+
| `highcontrast` | ![highcontrast](https://i.imgur.com/ovrVrTY.png) |
5151
| More themes! | **🎨 [See a list of all available themes](./docs/themes/README.md)** |
5252

5353
> If you have come up with a new theme you'd like to share with others, open an issue to add it!
@@ -138,15 +138,14 @@ You can deploy the PHP files on any website server with PHP installed or as a He
138138

139139
[![](https://user-images.githubusercontent.com/20955511/136058102-b79570bc-4912-4369-b664-064a0ada8588.png)](#) [![Deploy to Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/DenverCoder1/github-readme-streak-stats/tree/main "Deploy to Heroku")
140140

141-
5. **Add the token** as a Config Var with the key `TOKEN`:
141+
5. **Add the token** as a Config Var with the key `TOKEN`:
142142

143-
![heroku config variables](https://user-images.githubusercontent.com/20955511/136292022-a8d9b3b5-d7d8-4a5e-a049-8d23b51ce9d7.png)
144-
145-
6. Click **"Deploy App"** at the end of the form
146-
7. Once the app is deployed, you can use `<your-app-name>.herokuapp.com` in place of `github-readme-streak-stats.herokuapp.com`
147-
148-
</details>
143+
![heroku config variables](https://user-images.githubusercontent.com/20955511/136292022-a8d9b3b5-d7d8-4a5e-a049-8d23b51ce9d7.png)
149144

145+
6. Click **"Deploy App"** at the end of the form
146+
7. Once the app is deployed, you can use `<your-app-name>.herokuapp.com` in place of `github-readme-streak-stats.herokuapp.com`
147+
148+
</details>
150149

151150
## 🤗 Contributing
152151

@@ -186,6 +185,7 @@ cd github-readme-streak-stats
186185
```
187186

188187
### Install dependencies
188+
189189
Run the following command to install all the required dependencies to work on this project.
190190

191191
```bash

0 commit comments

Comments
 (0)