Skip to content

Commit 5bc681c

Browse files
Configure lint and prettier (#1)
* chore: update devDependencies and add linting scripts - Added @eslint/js and eslint for code linting. - Added prettier for code formatting. - Updated scripts to include linting and formatting commands. * style: format markdown and YAML files for consistency
1 parent 547df08 commit 5bc681c

18 files changed

Lines changed: 1008 additions & 60 deletions

.github/Contributor_Guide/Contributing.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contribute to <Project_Name>
22

3-
Thank you for taking the time to contribute to <project_name>! We really appreciate it.
3+
Thank you for taking the time to contribute to <project_name>! We really appreciate it.
44

55
Before contributing, please make sure to read the [Code of Conduct](../../CODE_OF_CONDUCT.md). We expect you to follow it in all your interactions with the project.
66

@@ -29,9 +29,7 @@ If you want to suggest an enhancement to <Project_Name>, please [submit an issue
2929
If you want to contribute to <Project_Name>, submit a pull request.
3030

3131
- url: `https://github.com/OPCODE-Open-Spring-Fest/<project_Name>/compare/branch...YOURGITHUBUSERNAME:<project_Name>:BRANCH?quick_pull=1&template=pr.md`
32-
33-
### Requirements
3432

33+
### Requirements
3534

3635
### Setup
37-
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Project Tour
22

3-
* notes:
4-
* > Discuss about your project file structure
5-
* > what each folder is responsible
6-
* > then go through each file in folders and explain there purpose
7-
* > if possible create a doc system ( there are autogen docs available for most of the languages )
8-
* > decide coding style , linting style and formatting style and other themes like variable naming etc.
9-
* > provide an example for existing function and tests system if possible
10-
*
3+
- notes:
4+
- > Discuss about your project file structure
5+
- > what each folder is responsible
6+
- > then go through each file in folders and explain there purpose
7+
- > if possible create a doc system ( there are autogen docs available for most of the languages )
8+
- > decide coding style , linting style and formatting style and other themes like variable naming etc.
9+
- > provide an example for existing function and tests system if possible
10+
-
1111

12-
# MAKE SURE PROJECT MANAGERS UPDATE THIS MD
12+
# MAKE SURE PROJECT MANAGERS UPDATE THIS MD

.github/Contributor_Guide/commiting.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@
77
### Writing Commit Messages
88

99
- **Clear Subject Line**: Start the commit message with a clear and concise description of the change. It should be no more than 50 characters, start with a capital letter, and be in imperative mood.
10-
1110
- > ```bash
1211
> feat: Add function to calculate average
1312
> ```
1413
1514
- **Separate Subject from Body**: If further explanation is needed, include it in the body of the commit message, following a blank line after the subject line.
1615
1716
- **Explain the Change**: The body of the commit message should explain why the change was needed and how it was implemented. Keep it wrapped to 72 characters and written in present tense.
18-
1917
- > ```bash
2018
> fix: Resolve issue with login form not submitting on Safari
2119
>
@@ -25,7 +23,6 @@
2523
- **Avoid "How" Details**: Use the commit message to explain what changes were made and why, not how they were made. Well-written code should be self-explanatory.
2624
2725
- **Reference Issues or Pull Requests**: If the commit is related to an issue or a pull request, include the reference in the commit message. This can be done in the body of the message or at the end.
28-
2926
- > ```bash
3027
> feat: Add user authentication feature
3128
>
@@ -37,7 +34,6 @@
3734
### Commit Message Structure Rules
3835
3936
- **Type Enum**: Ensure your commit type matches one of the predefined values: `build`, `chore`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `style`, `test`.
40-
4137
- `build`: This type is used for changes related to build processes or tools. It includes modifications to build scripts, configuration files, and build-related dependencies.
4238
4339
- `chore`: Chore changes typically involve tasks related to maintenance or housekeeping. This could include updating dependencies, cleaning up code, or configuring development tools.

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Bug Report
22
description: File a bug report
3-
title: "[Bug]: "
4-
labels: ["Issue:bug"]
3+
title: '[Bug]: '
4+
labels: ['Issue:bug']
55
assignees:
66
- <project_manager>
77
body:
@@ -15,7 +15,7 @@ body:
1515
label: Description
1616
description: Also tell us, what did you expect to happen?
1717
placeholder: Tell us what you see!
18-
value: "Describe the issue happened"
18+
value: 'Describe the issue happened'
1919
validations:
2020
required: true
2121
- type: textarea
@@ -42,7 +42,7 @@ body:
4242
label: Steps to reproduce
4343
description: Please provide detailed steps for reproducing the issue.
4444
placeholder: Tell us how to reproduce the issue
45-
value: "1. 2. 3."
45+
value: '1. 2. 3.'
4646
validations:
4747
required: true
4848
- type: textarea
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
name: Feature Request
1+
name: Feature Request
22
description: Request a feature or suggest us what is in your mind!
3-
title: "[Feature]: "
4-
labels: "Issue:feature"
3+
title: '[Feature]: '
4+
labels: 'Issue:feature'
55
assignees:
6-
- <project manager>
6+
- <project manager>
77
body:
88
- type: markdown
99
attributes:
1010
value: |
1111
Please explain what is in your mind, we would like to hear it from you! 🤠
12-
13-
12+
1413
- type: textarea
1514
id: explaining
1615
attributes:
@@ -19,12 +18,12 @@ body:
1918
placeholder: It's about...
2019
validations:
2120
required: true
22-
21+
2322
- type: checkboxes
2423
id: terms
2524
attributes:
2625
label: Code of Conduct
2726
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OPCODE-Open-Spring-Fest/template/blob/main/.github/Contributor_Guide/CODE_OF_CONDUCT.md)
2827
options:
29-
- label: I agree to follow this project's Code of Conduct
28+
- label: I agree to follow this project's Code of Conduct
3029
required: true

.github/PULL_REQUEST_TEMPLATE/pr.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
## Description
32

43
> Give a brief description of the pull request.
@@ -16,4 +15,3 @@
1615
## Checklist
1716

1817
- [ ] I have read the [Contributing Guidelines](../Contributor_Guide/Contruting.md).
19-

.github/pull_request_template.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
## Description
32

43
> Give a brief description of the pull request.
@@ -16,4 +15,3 @@
1615
## Checklist
1716

1817
- [ ] I have read the [Contributing Guidelines](../Contributor_Guide/Contruting.md).
19-

.github/workflows/checklabels.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
- name: Run Label Checker
1919
run: node .github/workflows/label-checker.js
2020
env:
21-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/label-checker.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ async function run() {
1717
issue_number: pullNumber,
1818
});
1919

20-
const labelNames = labels.map((label) => label.name);
20+
const labelNames = labels.map(label => label.name);
2121

2222
const requiredLabels = [
2323
['Type:Easy', 'Type:Medium', 'Type:Hard'],
2424
['Semver:major', 'Semver:minor', 'Semver:patch'],
2525
['PR:Accept'],
2626
];
2727

28-
const hasRequiredLabels = requiredLabels.every((labelGroup) =>
29-
labelGroup.some((label) => labelNames.includes(label))
28+
const hasRequiredLabels = requiredLabels.every(labelGroup =>
29+
labelGroup.some(label => labelNames.includes(label))
3030
);
3131

3232
if (!hasRequiredLabels) {
@@ -39,4 +39,4 @@ async function run() {
3939
}
4040
}
4141

42-
run();
42+
run();

.github/workflows/prmerged.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
types: [closed]
66

77
jobs:
8-
98
on-merge:
109
runs-on: ubuntu-latest
1110
if: ${{ github.event.pull_request.merged == true }}

0 commit comments

Comments
 (0)