Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
shgysk8zer0 authored Oct 13, 2024
0 parents commit e6f71d1
Show file tree
Hide file tree
Showing 34 changed files with 4,146 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8

[*.{html,xml,svg,js,css,php}]
indent_style = tab
trim_trailing_whitespace = true
max_line_length = 80

[*.{md,markdown,yml,json}]
indent_style = space
indent_size = 2

[*.{yml,json}]
trim_trailing_whitespace = true

[*.{md,markdown}]
trim_trailing_whitespace = false

[*.{js,php}]
quote_type = single
spaces_around_operators = true
spaces_around_brackets = true

[*.{html,xml,svg,css}]
quote_type = double
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @shgysk8zer0
76 changes: 76 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making 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 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 e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and 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 1.4,
available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html)

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
[https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq)
49 changes: 49 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Contributing to the project

Due to Content-Security-Policy, use of `eval` and inline scripts are **prohibited**.
Further, this project uses [native JavaScript modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/),
so be sure to familiarize yourself with the syntax. It also uses [classes](https://hacks.mozilla.org/2015/07/es6-in-depth-classes/)
and many other [ES6](https://hacks.mozilla.org/category/es6-in-depth/) features,
so you should be familiar with them.

## Issues
`ISSUE_TEMPALTE.md` will be used to pre-fill any issues created. Logs and detailed
descriptions are extremely helpful and may be required. **DO NOT** report any
issues relating to browser compatibility. Only modern browsers are supported, and
it is your responsibility to deal with vendor prefixes and polyfills. The included
polyfills are deprecated and will be moved to another repository. I suggest that
you look into [Polyfill.io](https://polyfill.io).

## Pull requests
Please use an open issue and reference that issue in the pull request, as suggested
in `PULL_REQUEST_TEMPLATE.md` (will be pre-filled when opening a pull request).
When you open a pull request, it **MUST** pass test/linting or it cannot be merged.

It is also suggested that you label your branches according to the issue and label,
so a bug reported in issue 14 becomes a branch named `bug/14` and a feature requested
in issue 42 becomes `feature/42`. Do not work directly on master branch, as your
pull request may not end up being accepted, causing your fork to divert.

## Testing
All JavaScript **MUST** pass Eslint according to the rules defined in `.eslintrc`
and have an extension of `.js`. Tests are run using either `eslint` command directly
or by running `npm test`.

### Linting rules
- Single quotes
- Semicolons required
- Indent using tabs (align using spaces)
- No `require` function. This uses native modules only

> Tabs require fewer characters and can be adjusted by altering tab width. A developer
> can increase/decrease indentation just by altering tab width, without making
> any changes to the code itself. Since spaces are still to be used for alignment,
> I see zero benefit to using 2 or 4 space characters instead of a single tab.
Since this project minifies and packages all JavaScript using Babel & Webpack,
all script **MUST NOT** execute any code, but only import/export functions,
classes, etc. Modules which do not export anything, however, are the only exception
to this rule.

The simple rule is: if it exports, it **MUST NOT** have side effects. If it has
side effects, it **MUST NOT** export.
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: shgysk8zer0
liberapay: shgysk8zer0
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: Report a bug
labels: bug
assignees: ''
---

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

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser: [e.g. chrome, safari]
- Version: [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser: [e.g. stock browser, safari]
- Version: [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: Request a feature
labels: enhancement
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Description and issue

> Please add relevant sections (Added, removed, changed, fixed) to `CHANGELOG.md`
## List of significant changes made
-
-
32 changes: 32 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
day: thursday
time: '08:00'
timezone: America/Los_Angeles
open-pull-requests-limit: 10
reviewers:
- shgysk8zer0
assignees:
- shgysk8zer0
labels:
- dependencies
- javascript
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: thursday
time: '08:00'
timezone: America/Los_Angeles
open-pull-requests-limit: 10
reviewers:
- shgysk8zer0
assignees:
- shgysk8zer0
labels:
- dependencies
- github-actions
93 changes: 93 additions & 0 deletions .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
#############################
#############################
## JavaScript Linter rules ##
#############################
#############################

############
# Env Vars #
############
env:
browser: true
es6: true
jest: true

###############
# Global Vars #
###############
globals:
Atomics: readonly
SharedArrayBuffer: readonly
ga: readonly

###############
# Parser vars #
###############
parser: '@typescript-eslint/parser'
parserOptions:
ecmaVersion: 2018
sourceType: module

###########
# Plugins #
###########
plugins:
- '@typescript-eslint'

#########
# Rules #
#########
rules:
indent:
- 2
- tab
quotes:
- 2
- single
semi:
- 2
- always
no-console: 0
# async-await/space-after-async: 2
# async-await/space-after-await: 2
generator-star-spacing:
- error
- before: false
after: true
anonymous: neither
method:
before: true
after: false

##############################
# Overrides for JSON parsing #
##############################
overrides:

# JSON files
- files:
- "*.json"
extends:
- plugin:jsonc/recommended-with-json
parser: jsonc-eslint-parser
parserOptions:
jsonSyntax: JSON

# JSONC files
- files:
- "*.jsonc"
extends:
- plugin:jsonc/recommended-with-jsonc
parser: jsonc-eslint-parser
parserOptions:
jsonSyntax: JSONC

# JSON5 files
- files:
- "*.json5"
extends:
- plugin:jsonc/recommended-with-json5
parser: jsonc-eslint-parser
parserOptions:
jsonSyntax: JSON5
34 changes: 34 additions & 0 deletions .github/linters/.htmlhintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"tagname-lowercase": [
"clipPath",
"linearGradient"
],
"attr-lowercase": [
"viewBox",
"preserveAspectRatio",
"linearGradient",
"gradientTransform",
"gradientUnits"
],
"attr-value-double-quotes": true,
"attr-value-not-empty": false,
"attr-no-duplication": true,
"doctype-first": true,
"tag-pair": true,
"tag-self-close": true,
"spec-char-escape": true,
"id-unique": true,
"src-not-empty": true,
"title-require": false,
"alt-require": true,
"doctype-html5": true,
"id-class-value": "dash",
"style-disabled": true,
"inline-style-disabled": true,
"inline-script-disabled": true,
"space-tab-mixed-disabled": "tab",
"id-class-ad-disabled": false,
"href-abs-or-rel": false,
"attr-unsafe-chars": true,
"head-script-disabled": false
}
Loading

0 comments on commit e6f71d1

Please sign in to comment.