Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
Add Boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
meisZWFLZ committed Nov 26, 2023
0 parents commit bdf51dd
Show file tree
Hide file tree
Showing 19 changed files with 11,732 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"standard-with-typescript",
"prettier",
],
// overrides: [
// {
// env: {
// node: true,
// },
// files: [".eslintrc.{js,cjs}"],
// parserOptions: {
// sourceType: "script",
// },
// },
// ],
parser: "@typescript-eslint/parser",
// parserOptions: {
// ecmaVersion: "latest",
// },
plugins: ["@typescript-eslint"],
rules: {},
};
115 changes: 115 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Code of Conduct - LemLink

## 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, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate,
threatening, offensive, or harmful.

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, and will
communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail 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 to the community leaders responsible for enforcement at <>.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org/), version
[1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct/code_of_conduct.md) and
[2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct/code_of_conduct.md),
and was generated by [contributing-gen](https://github.com/bttger/contributing-gen).
179 changes: 179 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
<!-- omit in toc -->
# Contributing to LemLink

First off, thanks for taking the time to contribute! ❤️

All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉

> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
> - Star the project
> - Refer this project in your project's readme
> - Mention the project at local meetups with your fellow competitors
> - Mention the use of this project in judging presentations
> - Open a bug report or feature request [here](https://github.com/LemLib/LemLink/issues/new/choose)
> - Discuss and give feedback in our [Discord](https://discord.gg/pCHr7XZUTj)
<!-- omit in toc -->
## Table of Contents

- [I Have a Question](#i-have-a-question)
- [I Want To Contribute](#i-want-to-contribute)
- [Reporting Bugs](#reporting-bugs)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Your First Code Contribution](#your-first-code-contribution)
- [Improving The Documentation](#improving-the-documentation)
- [Styleguides](#styleguides)
- [C++ Coding Style](#c-coding-style)
- [Commit Messages](#commit-messages)


## I Have a Question

> If you want to ask a question, we assume that you have read the available [Documentation](https://lemlib.github.io/LemLink/).
Before you ask a question, it is best to search for existing [Issues](https://github.com/LemLib/LemLink/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. In addition, you can also search for existing questions in the [Vex Discord](https://discord.gg/VUStG8p), the [VEX Forum](https://www.vexforum.com/), or the our [Discord](https://discord.gg/pCHr7XZUTj).


If you then still feel the need to ask a question and need clarification, we recommend the following:

- Open an [Issue](https://github.com/LemLib/LemLink/issues/new).
- Provide as much context as you can about what you're running into.
- Provide OS, Platform, and Version (Windows, Linux, macOS, x86, ARM).
- Provide LemLink version (run `lem -v`).
- Any additional information you think is relevant

We will then take care of the issue as soon as possible.

<!--
You might want to create a separate issue tag for questions and include it in this description. People should then tag their issues accordingly.
Depending on how large the project is, you may want to outsource the questioning, e.g. to Stack Overflow or Gitter. You may add additional contact and information possibilities:
- IRC
- Slack
- Gitter
- Stack Overflow tag
- Blog
- FAQ
- Roadmap
- E-Mail List
- Forum
-->

## I Want To Contribute

> ### Legal Notice <!-- omit in toc -->
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
### Reporting Bugs

<!-- omit in toc -->
#### Before Submitting a Bug Report

A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.

- Make sure that you are using the latest version.
- Determine if your bug is really a bug and not an error on your side e.g. (TODO!!!) (Make sure that you have read the [documentation](https://lemlib.github.io/LemLink/). If you are looking for support, you might want to check [this section](#i-have-a-question)).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/LemLib/LemLink/issues?q=label%3Abug).
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
- Collect information about the bug:
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
- Possibly your command and the output
- Can you reliably reproduce the issue?

<!-- omit in toc -->
#### How Do I Submit a Good Bug Report?

> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to .
<!-- You may add a PGP key to allow the messages to be sent encrypted as well. -->
We use GitHub issues to track bugs and errors. If you run into an issue with the project:

- Open an [Issue](https://github.com/LemLib/LemLink/issues/new). Use the Bug Report issue template.
- Explain the behavior you would expect and the actual behavior.
- Provide OS, Platform, and Version (Windows, Linux, macOS, x86, ARM).
- Provide LemLink version (run `lem -v`).
- Provide as much context as you can about what you're running into.
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your command. For good bug reports you should isolate the problem and create a reduced test case.
- Provide the information you collected in the previous section.
- Provide any additional information you think is relevant, but does not fit previous sections.

Once it's filed:

- The project team will label the issue accordingly.
- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
- If the team is able to reproduce the issue, it will be marked `confirmed-bug`, as well as possibly other tags (such as `p: critical`), and the issue will be left to be [implemented by someone](#your-first-code-contribution).


### Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for LemLink, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.

<!-- omit in toc -->
#### Before Submitting an Enhancement

- Make sure that you are using the latest version.
- Read the [documentation](https://lemlib.github.io/LemLink/) carefully and find out if the functionality is already covered, maybe by an individual configuration.
- Perform a [search](https://github.com/LemLib/LemLink/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset.

<!-- omit in toc -->
#### How Do I Submit a Good Enhancement Suggestion?

Enhancement suggestions are tracked as [GitHub issues](https://github.com/LemLib/LemLink/issues). You can use the Feature Request issue template upon creation of a new issue.

- Use a **clear and descriptive title** for the issue to identify the suggestion.
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
- **Describe the current behavior** so the project team can understand the difference between your suggestion and the current behavior.
- **Explain why this enhancement would be useful** to most LemLink users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
- **(Optional) List possible implementations and alternatives** you have in mind.

<!-- You might want to create an issue template for enhancement suggestions that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->

### Your First Code Contribution

> Using a development environment different from the one recommended below is fine.
We recommend using [Visual Studio Code](https://code.visualstudio.com/) as your IDE. It is free, open-source, and cross-platform.
Here is a list of recommended extensions:
- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
- [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) to check for spelling mistakes
- [file-icons](https://marketplace.visualstudio.com/items?itemName=file-icons.file-icons) to display file icons

In order to contribute to LemLink, you will need to
1. [fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the repository and clone it to your local machine.
2. Then, run `npm i`, to install all dependencies.
3. You can then [commit](#commit-messages) your changes to your fork.
4. And to generate the executable, for testing, run `npm run build; npm run package`
5. Once you are done, you can [create a pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request) to the master branch. You can use the [Pull Request Template](.github/PULL_REQUEST_TEMPLATE.md) to structure your pull request.



### Improving The Documentation
<!-- TODO
Updating, improving and correcting the documentation
-->

## Styleguides

### C++ Coding Style

We use eslint to enforce linting rules and prettier to enforce formatting. You can run `npm run clean`, to fix these stylings.

> [!WARNING]
> We also use a pre-commit hook to prevent any code that doesn't match these style guides from ever being committed.
>
> To get around this, you can run the commit command from git's cli with `--no-verify`
### Commit Messages
Commit titles should be short and descriptive. They should be written in the imperative mood, i.e. as if you were commanding someone. They should not end with a period. If you are fixing an issue, you should include the issue number in the commit title. Additional information can be provided in the commit body. For example:

```
Add support for Bluetooth (fixes #42)
This commit adds support for a Bluetooth connection to the brain. It also adds a new class called BluetoothConnection.
```

<!-- omit in toc -->
## Attribution
This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Bug Report
about: Report a bug in the project
title: "[BUG]"
labels: "needs confirmation"
assignees: ""
---

#### Expected Behavior
<!-- Concisely describe the behavior you expected -->

#### Observed Behavior
<!-- Concisely describe the behavior you observed -->

#### Steps to Reproduce
<!-- Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include code to reproduce, if relevant -->

#### Environment
<!-- Please provide the following information -->

- LemLink Version: <!-- (e.g. 0.4.5) -->

#### Additional Information
<!-- Add any other relevant information about the problem here -->
<!-- This includes screenshots, code snippets, videos, anything you think is relevant -->
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature Request
about: Suggest an idea for the project
title: "[FEATURE]"
labels: "enhancement"
assignees: ""
---

#### Requested Feature
<!-- Concisely describe the behavior you are requesting here -->

<!-- Describe any details in point form here -->
- a
- b
- c

#### Current Implementation
<!-- Describe the current implementation here -->

#### Motivation
<!-- Explain why this feature would benefit users and/or maintainers -->

#### (Optional) Possible Implementations and Alternatives
<!-- Describe any possible implementations or alternatives you have considered -->
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#### Summary
<!-- Provide a brief summary on the pull request -->

#### Motivation
<!-- Why are you making this pull request? -->

#### Test Plan
<!-- How did you test / plan to test this pull request? -->

#### Additional Notes
<!-- Add any other information you think is relevant -->
Loading

0 comments on commit bdf51dd

Please sign in to comment.