-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from hashtopolis/dev
merge dev updates into master for next release
- Loading branch information
Showing
613 changed files
with
39,199 additions
and
24,765 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"endOfLine": "auto", | ||
"tabWidth": 2, | ||
"semi:": false, | ||
"bracketSameLine:": true, | ||
"arrowParens": "always" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"eslint.enable": true, | ||
"eslint.validate": [ | ||
"javascript", | ||
"typescript", | ||
"css", | ||
"scss", | ||
"html" | ||
], | ||
"editor.formatOnSave": true, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"prettier.configPath": ".prettierrc.json", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or electronic address, without explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [project email]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html) | ||
|
||
For answers to common questions about this code of conduct, see [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq) | ||
|
||
[homepage]: https://www.contributor-covenant.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Contributing to Hashtopolis Web UI | ||
|
||
First off, thank you for considering contributing to Hashtopolis Web UI! 👍 | ||
|
||
## Code of Conduct | ||
|
||
Please note that this project is released with a [Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project, you agree to abide by its terms. | ||
|
||
## How Can I Contribute? | ||
|
||
### Reporting Bugs | ||
|
||
If you find a bug, open an issue. Make sure to include details like your operating system, browser version, and steps to reproduce the bug. | ||
|
||
### Suggesting Enhancements | ||
|
||
For new features or improvements, open an issue with your proposal. Discuss the scope, implementation details, and potential challenges. | ||
|
||
### Pull Requests | ||
|
||
1. Fork the repository and create your branch from `master`. | ||
2. If you've added code that should be tested, add tests. | ||
3. Ensure the test suite passes (`npm test`). | ||
4. Make sure your code lints (`npm run lint`). | ||
5. Issue a pull request. | ||
|
||
## Development Setup | ||
|
||
See [DEVELOPMENT.md](DEVELOPMENT.md) | ||
|
||
## Code Style | ||
|
||
Follow the [style guide](STYLE_GUIDE.md) to maintain consistency in the codebase. | ||
|
||
## Versioning | ||
|
||
This project follows semantic versioning. Before creating a pull request, consider how your changes will impact the version number. | ||
|
||
## License | ||
|
||
By contributing, you agree that your contributions will be licensed under the [LICENSE](LICENSE.md) file. | ||
|
||
--- | ||
|
||
Thank you for your contributions! 🚀 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
# Project Style Guide | ||
|
||
This document outlines the coding and documentation conventions for our project. | ||
|
||
## Table of Contents | ||
|
||
1. [General Guidelines](#general-guidelines) | ||
2. [Naming Conventions](#naming-conventions) | ||
3. [Comments](#comments) | ||
4. [Formatting](#formatting) | ||
5. [Error Handling](#error-handling) | ||
6. [Documentation](#documentation) | ||
7. [Angular-Specific Guidelines](#angular-specific-guidelines) | ||
|
||
## 1. General Guidelines | ||
|
||
- Write clear and concise code. | ||
- Keep functions and methods focused on a single responsibility. | ||
- Follow the [Code of Conduct](CONTRIBUTING.md). | ||
|
||
## 2. Naming Conventions | ||
|
||
### Variable Names: | ||
|
||
Choose variable names that are descriptive, clear, and contextually relevant, avoiding ambiguity, generic terms, and "magic" values, and strive for consistency and single responsibility to enhance code readability and maintainability. Below are some guidelines for variable naming. | ||
|
||
- Boolean Variables: consider using prefixes like is (e.g., isVisible, isFinished) or has (e.g., hasPermission, hasErrors) | ||
|
||
### Constants: | ||
|
||
- Use uppercase letters and underscores to separate words (e.g., MAX_ATTEMPTS, API_URL). | ||
- Group related constants with a common prefix (e.g., APP_CONSTANTS_MAX_ATTEMPTS). | ||
|
||
### Classes: | ||
|
||
- Use PascalCase for class names (e.g., AppComponent, UserService). | ||
- Suffix services with "Service" (e.g., DataService). | ||
- Use descriptive names that convey the purpose of the class. | ||
|
||
### Components: | ||
|
||
- Use kebab-case for component selectors (e.g., <app-my-component>). | ||
- Use PascalCase for component class names (e.g., MyComponent). | ||
- Suffix components with "Component" (e.g., UserListComponent). | ||
- Choose clear and concise names that reflect the component's role. | ||
|
||
### Files: | ||
|
||
- Use kebab-case for file names (e.g., user-list.component.ts, data-service.service.ts). | ||
- Match the file name with the primary class or component it contains. | ||
- Include the file extension (e.g., .ts, .html, .scss). | ||
|
||
### Interfaces: | ||
|
||
- Use PascalCase for interface names (e.g., User, ApiResponse). | ||
- Prefix interfaces with "I" (e.g., IUser, IApiResponse), although this is optional. | ||
|
||
### Modules: | ||
|
||
- Use PascalCase for module names (e.g., AppModule, UserModule). | ||
- Choose names that represent the feature or functionality encapsulated by the module. | ||
|
||
### Directives: | ||
|
||
- Use camelCase for directive selectors (e.g., appMyDirective). | ||
- Use PascalCase for directive class names (e.g., MyDirective). | ||
- Suffix directives with "Directive" (e.g., HighlightDirective). | ||
|
||
### Services: | ||
|
||
- Use camelCase for service instances (e.g., dataService, authService). | ||
- Use PascalCase for service class names (e.g., DataService, AuthService). | ||
- Suffix services with "Service" (e.g., DataService). | ||
|
||
### Enums: | ||
|
||
- Use PascalCase for enum names (e.g., Color, UserRole). | ||
- Use uppercase letters for enum values (e.g., RED, ADMIN). | ||
|
||
### Routes: | ||
|
||
- Use kebab-case for route paths (e.g., /user-profile, /dashboard). | ||
- Use PascalCase for route components (e.g., UserProfileComponent, DashboardComponent). | ||
|
||
## 3. Comments | ||
|
||
- Use comments sparingly; prefer self-explanatory code. | ||
- Add comments for complex logic or where clarification is needed. | ||
- Keep comments up-to-date. | ||
|
||
```typescript | ||
// Good | ||
const calculateTotal = (items: number[]): number => { | ||
// Sum up the array of items | ||
return items.reduce((sum, item) => sum + item, 0); | ||
}; | ||
|
||
// Bad | ||
const calculateTotal = (arr: number[]): number => arr.reduce((s, i) => s + i, 0); | ||
``` | ||
|
||
## 4. Formatting | ||
|
||
- Follow consistent indentation (2 spaces). | ||
- Keep lines around 80-120 characters. | ||
- Use a consistent line break style (e.g., Unix-style line endings). | ||
|
||
## 5. Error Handling | ||
|
||
- Always handle errors appropriately. | ||
- Avoid empty catch blocks; log or handle the error. | ||
|
||
```typescript | ||
// Good | ||
try { | ||
// some code that may throw an error | ||
} catch (error) { | ||
console.error('An error occurred:', error); | ||
} | ||
|
||
// Bad | ||
try { | ||
// some code that may throw an error | ||
} catch (error) { | ||
// empty catch block | ||
} | ||
``` | ||
|
||
## 6. Documentation | ||
|
||
- Provide clear and concise documentation for public APIs. | ||
- Use JSDoc comments for functions and methods. | ||
|
||
```typescript | ||
/** | ||
* Adds two numbers. | ||
* @param {number} a - The first number. | ||
* @param {number} b - The second number. | ||
* @returns {number} The sum of the two numbers. | ||
*/ | ||
const addNumbers = (a: number, b: number): number => a + b; | ||
``` | ||
|
||
## 7. Angular-Specific Guidelines | ||
|
||
- Follow the official [Angular Style Guide](https://angular.io/guide/styleguide). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"failFast": false, | ||
"failSpecWithNoExpectations": true, | ||
"random": false | ||
} |
Oops, something went wrong.