Skip to content

Commit 826a11f

Browse files
committed
Merge branch 'main' of https://github.com/sugarlabs/www-v2
2 parents bd4d353 + 785a12e commit 826a11f

File tree

2 files changed

+29
-26
lines changed

2 files changed

+29
-26
lines changed

docs/CONTRIBUTING.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,66 +14,66 @@ Feel free. But, please don't spam :p.
1414
## Keep in Mind
1515

1616
1. Your contributions need not necessarily have to address any discovered issue. If you encounter any,
17-
feel free to add a fix through a PR, or create a new issue ticket.
17+
feel free to add a fix through a PR, or create a new issue ticket.
1818

1919
2. Use [labels](https://github.com/sugarlabs/www-v2/labels) on your issues and PRs.
2020

2121
3. Do not spam with lots of PRs with little changes.
2222

2323
4. If you are addressing a bulk change, divide your commits across multiple PRs, and send them one at
24-
a time. The fewer the number of files addressed per PR, the better.
24+
a time. The fewer the number of files addressed per PR, the better.
2525

2626
5. Communicate effectively. Go straight to the point. Don't write unnecessary comments; don't be
27-
over-apologetic. Every single contribution is welcome, as long as it doesn't spam or distract the flow.
27+
over-apologetic. Every single contribution is welcome, as long as it doesn't spam or distract the flow.
2828

2929
6. Write useful, brief commit messages. Add commit descriptions if necessary. PR name should speak
30-
about what it is addressing and not the issue. In case a PR fixes an issue, use `fixes #ticketno` or
31-
`closes #ticketno` in the PR's comment. Briefly explain what your PR is doing.
30+
about what it is addressing and not the issue. In case a PR fixes an issue, use `fixes #ticketno` or
31+
`closes #ticketno` in the PR's comment. Briefly explain what your PR is doing.
3232

3333
7. Always test your changes extensively before creating a PR. There's no sense in merging broken code.
34-
If a PR is a _work in progress (WIP)_, convert it to draft. It'll let the maintainers know it isn't
35-
ready for merging.
34+
If a PR is a _work in progress (WIP)_, convert it to draft. It'll let the maintainers know it isn't
35+
ready for merging.
3636

3737
8. Read and revise the concepts about programming constructs you're dealing with. You must be clear
38-
about the behavior of the language or compiler/transpiler. See
39-
[JavaScript docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript) and [TypeScript docs](https://www.typescriptlang.org/docs/).
38+
about the behavior of the language or compiler/transpiler. See
39+
[JavaScript docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript) and [TypeScript docs](https://www.typescriptlang.org/docs/).
4040

4141
9. If you have a question, do a _web search_ first. If you don't find any satisfactory answer, then
42-
ask it in a comment. If it is a general question, please use the new
43-
[discussions](https://github.com/sugarlabs/www-v2/discussions) tab on top the the repository, or
44-
the _Sugar-dev Devel <[[email protected]](mailto:[email protected])>_ mailing
45-
list. Don't ask silly questions (unless you don't know it is silly ;p) before searching it on the web.
42+
ask it in a comment. If it is a general question, please use the new
43+
[discussions](https://github.com/sugarlabs/www-v2/discussions) tab on top the the repository, or
44+
the _Sugar-dev Devel <[[email protected]](mailto:[email protected])>_ mailing
45+
list. Don't ask silly questions (unless you don't know it is silly ;p) before searching it on the web.
4646

4747
## Code Quality Notes
4848

4949
1. Sticking to _TypeScript_ conventions, use _camelCase_ for filenames (_PascalCase_ for _class_ files),
50-
_CAPITALCASE_ for constants, _camelCase_ for identifiers, and _PascalCase_ for _classes_. Linting has
51-
been strictly configured. A `super-linter` is configured to lint check the files on a pull request.
52-
In fact, the _TypeScript_ watcher or build will throw errors/warnings if there are linting problems.
53-
This has been done to maintain code quality.
50+
_CAPITALCASE_ for constants, _camelCase_ for identifiers, and _PascalCase_ for _classes_. Linting has
51+
been strictly configured. A `super-linter` is configured to lint check the files on a pull request.
52+
In fact, the _TypeScript_ watcher or build will throw errors/warnings if there are linting problems.
53+
This has been done to maintain code quality.
5454

5555
2. If a PR is addressing an issue, prefix the branch name with the issue number. For example, say a
56-
PR is addressing issue `100`, a branch name could be `100-patch-foobar`.
56+
PR is addressing issue `100`, a branch name could be `100-patch-foobar`.
5757

5858
3. Meaningfully separate code across commits. Don't create arbitrary commits. In case it gets dirty,
59-
please do an _interactive rebase_ with _squash_ and _reword_ to improve.
59+
please do an _interactive rebase_ with _squash_ and _reword_ to improve.
6060

6161
4. Follow [conventional commit messages specification](https://www.conventionalcommits.org/en/v1.0.0-beta.2/)
62-
to help issue tracking. More often than not, take time to add meaningful commit descriptions. However,
63-
add specificity by mentioning the component; prefer `feat(mycomponent): [UI] add button` over
64-
`feat: add button`, `fix(mycomponent): use try-catch` over `fix: use try-catch`, etc.
62+
to help issue tracking. More often than not, take time to add meaningful commit descriptions. However,
63+
add specificity by mentioning the component; prefer `feat(mycomponent): [UI] add button` over
64+
`feat: add button`, `fix(mycomponent): use try-catch` over `fix: use try-catch`, etc.
6565

6666
5. At any point, when new components are created or existing components are modified, unit tests (passing)
67-
reflecting the changes need to be part of the PR before being reviewed.
67+
reflecting the changes need to be part of the PR before being reviewed.
6868

6969
6. Two workflows -- a _Continuous Integration_ (_CI_) and a _Linter_ (_Super Linter_), have been configured.
70-
Each PR must pass the checks before being reviewed.
70+
Each PR must pass the checks before being reviewed.
7171

7272
7. For any new functions/methods or classes, add extensive [TSDoc](https://tsdoc.org/) documentation.
7373

7474
8. Each PR needs to have supporting unit tests covering all (or as much practical) use cases to qualify
75-
for review. In case testing is done via some non-standard method, adequate description of the method/s
76-
need/s to be specified in the PR body.
75+
for review. In case testing is done via some non-standard method, adequate description of the method/s
76+
need/s to be specified in the PR body.
7777

7878
## Checklist before Commits
7979

@@ -83,6 +83,8 @@ need/s to be specified in the PR body.
8383

8484
- Format code you've modified. Run `npm run format`.
8585

86+
**Note for Windows users:** To format a specific file, run `npm run format:file <file-path>`.
87+
8688
- Make sure the application builds successfully. Run `npm run build` to verify.
8789

8890
- Add meaningful documentation to every new function/method/class/type added.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"lint:ts": "eslint 'src/**/*.{ts,tsx}'",
1515
"lint:md": "markdownlint '**/*.md' --ignore node_modules",
1616
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,json,css,md}'",
17+
"format:file": "prettier --write",
1718
"format:check": "prettier --check 'src/**/*.{js,jsx,ts,tsx,json,css,md}'"
1819
},
1920
"dependencies": {

0 commit comments

Comments
 (0)