Skip to content

Commit 979cd3a

Browse files
committed
init set
1 parent 3a00f1f commit 979cd3a

37 files changed

Lines changed: 10456 additions & 39 deletions

.all-contributorsrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"badgeTemplate": "\t<a href=\"#contributors\" target=\"_blank\"><img alt=\"👪 All Contributors: <%= contributors.length %>\" src=\"https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-<%= contributors.length %>-21bb42.svg\" /></a>",
3+
"commit": false,
4+
"commitConvention": "angular",
5+
"commitType": "docs",
6+
"contributors": [],
7+
"contributorsPerLine": 7,
8+
"contributorsSortAlphabetically": true,
9+
"files": ["README.md"],
10+
"imageSize": 100,
11+
"projectName": "loader",
12+
"projectOwner": "Loopshape",
13+
"repoHost": "https://github.com",
14+
"repoType": "github"
15+
}

.eslintrc.cjs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/** @type {import("@types/eslint").Linter.Config} */
2+
module.exports = {
3+
env: {
4+
es2022: true,
5+
node: true,
6+
},
7+
extends: ["eslint:recommended", "plugin:n/recommended"],
8+
ignorePatterns: ["!.*", "lib", "node_modules", "pnpm-lock.yaml"],
9+
overrides: [
10+
{
11+
extends: ["plugin:@typescript-eslint/recommended"],
12+
files: ["**/*.ts"],
13+
parser: "@typescript-eslint/parser",
14+
rules: {
15+
// These off-by-default rules work well for this repo and we like them on.
16+
"logical-assignment-operators": [
17+
"error",
18+
"always",
19+
{ enforceForIfStatements: true },
20+
],
21+
"operator-assignment": "error",
22+
},
23+
},
24+
{
25+
files: "**/*.md/*.ts",
26+
rules: {
27+
"n/no-missing-import": ["error", { allowModules: ["loader"] }],
28+
},
29+
},
30+
{
31+
extends: ["plugin:@typescript-eslint/recommended-type-checked"],
32+
files: ["**/*.ts"],
33+
parser: "@typescript-eslint/parser",
34+
parserOptions: {
35+
project: "./tsconfig.eslint.json",
36+
},
37+
},
38+
],
39+
parser: "@typescript-eslint/parser",
40+
plugins: ["@typescript-eslint"],
41+
reportUnusedDisableDirectives: true,
42+
root: true,
43+
rules: {
44+
// These off/less-strict-by-default rules work well for this repo and we like them on.
45+
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],
46+
47+
// These on-by-default rules don't work well for this repo and we like them off.
48+
"no-case-declarations": "off",
49+
"no-constant-condition": "off",
50+
"no-inner-declarations": "off",
51+
"no-mixed-spaces-and-tabs": "off",
52+
},
53+
};

.github/CODE_OF_CONDUCT.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
- The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
bitmax.coinwarp@gmail.com.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series of
86+
actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or permanent
93+
ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within the
113+
community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.1, available at
119+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120+
121+
Community Impact Guidelines were inspired by
122+
[Mozilla's code of conduct enforcement ladder][mozilla coc].
123+
124+
For answers to common questions about this code of conduct, see the FAQ at
125+
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
126+
[https://www.contributor-covenant.org/translations][translations].
127+
128+
[homepage]: https://www.contributor-covenant.org
129+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130+
[mozilla coc]: https://github.com/mozilla/diversity
131+
[faq]: https://www.contributor-covenant.org/faq
132+
[translations]: https://www.contributor-covenant.org/translations

.github/CONTRIBUTING.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Contributing
2+
3+
Thanks for your interest in contributing to `loader`! 💖
4+
5+
> After this page, see [DEVELOPMENT.md](./DEVELOPMENT.md) for local development instructions.
6+
7+
## Code of Conduct
8+
9+
This project contains a [Contributor Covenant code of conduct](./CODE_OF_CONDUCT.md) all contributors are expected to follow.
10+
11+
## Reporting Issues
12+
13+
Please do [report an issue on the issue tracker](https://github.com/Loopshape/loader/issues/new/choose) if there's any bugfix, documentation improvement, or general enhancement you'd like to see in the repository! Please fully fill out all required fields in the most appropriate issue form.
14+
15+
## Sending Contributions
16+
17+
Sending your own changes as contribution is always appreciated!
18+
There are two steps involved:
19+
20+
1. [Finding an Issue](#finding-an-issue)
21+
2. [Sending a Pull Request](#sending-a-pull-request)
22+
23+
### Finding an Issue
24+
25+
With the exception of very small typos, all changes to this repository generally need to correspond to an [unassigned open issue marked as `status: accepting prs` on the issue tracker](https://github.com/Loopshape/loader/issues?q=is%3Aissue+is%3Aopen+label%3A%22status%3A+accepting+prs%22+no%3Aassignee+).
26+
If this is your first time contributing, consider searching for [unassigned issues that also have the `good first issue` label](https://github.com/Loopshape/loader/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3A%22status%3A+accepting+prs%22+no%3Aassignee+).
27+
If the issue you'd like to fix isn't found on the issue, see [Reporting Issues](#reporting-issues) for filing your own (please do!).
28+
29+
#### Issue Claiming
30+
31+
We don't use any kind of issue claiming system.
32+
We've found in the past that they result in accidental ["licked cookie"](https://devblogs.microsoft.com/oldnewthing/20091201-00/?p=15843) situations where contributors claim an issue but run out of time or energy trying before sending a PR.
33+
34+
If an unassigned issue has been marked as `status: accepting prs` and an open PR does not exist, feel free to send a PR.
35+
Please don't post comments asking for permission or stating you will work on an issue.
36+
37+
### Sending a Pull Request
38+
39+
Once you've identified an open issue accepting PRs that doesn't yet have a PR sent, you're free to send a pull request.
40+
Be sure to fill out the pull request template's requested information -- otherwise your PR will likely be closed.
41+
42+
PRs are also expected to have a title that adheres to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0).
43+
Only PR titles need to be in that format, not individual commits.
44+
Don't worry if you get this wrong: you can always change the PR title after sending it.
45+
Check [previously merged PRs](https://github.com/Loopshape/loader/pulls?q=is%3Apr+is%3Amerged+-label%3Adependencies+) for reference.
46+
47+
#### Draft PRs
48+
49+
If you don't think your PR is ready for review, [set it as a draft](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#converting-a-pull-request-to-a-draft).
50+
Draft PRs won't be reviewed.
51+
52+
#### Granular PRs
53+
54+
Please keep pull requests single-purpose: in other words, don't attempt to solve multiple unrelated problems in one pull request.
55+
Send one PR per area of concern.
56+
Multi-purpose pull requests are harder and slower to review, block all changes from being merged until the whole pull request is reviewed, and are difficult to name well with semantic PR titles.
57+
58+
#### Pull Request Reviews
59+
60+
When a PR is not in draft, it's considered ready for review.
61+
Please don't manually `@` tag anybody to request review.
62+
A maintainer will look at it when they're next able to.
63+
64+
PRs should have passing [GitHub status checks](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks) before review is requested (unless there are explicit questions asked in the PR about any failures).
65+
66+
#### Asking Questions
67+
68+
If you need help and/or have a question, posting a comment in the PR is a great way to do so.
69+
There's no need to tag anybody individually.
70+
One of us will drop by and help when we can.
71+
72+
Please post comments as [line comments](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request) when possible, so that they can be threaded.
73+
You can [resolve conversations](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request#resolving-conversations) on your own when you feel they're resolved - no need to comment explicitly and/or wait for a maintainer.
74+
75+
#### Requested Changes
76+
77+
After a maintainer reviews your PR, they may request changes on it.
78+
Once you've made those changes, [re-request review on GitHub](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews#re-requesting-a-review).
79+
80+
Please try not to force-push commits to PRs that have already been reviewed.
81+
Doing so makes it harder to review the changes.
82+
We squash merge all commits so there's no need to try to preserve Git history within a PR branch.
83+
84+
Once you've addressed all our feedback by making code changes and/or started a followup discussion, [re-request review](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews#re-requesting-a-review) from each maintainer whose feedback you addressed.
85+
86+
Once all feedback is addressed and the PR is approved, we'll ensure the branch is up to date with `main` and merge it for you.
87+
88+
#### Post-Merge Recognition
89+
90+
Once your PR is merged, if you haven't yet been added to the [_Contributors_ table in the README.md](../README.md#contributors) for its [type of contribution](https://allcontributors.org/docs/en/emoji-key "Allcontributors emoji key"), you should be soon.
91+
Please do ping the maintainer who merged your PR if that doesn't happen within 24 hours - it was likely an oversight on our end!
92+
93+
## Emojis & Appreciation
94+
95+
If you made it all the way to the end, bravo dear user, we love you.
96+
Please include your favorite emoji in the bottom of your issues and PRs to signal to us that you did in fact read this file and are trying to conform to it as best as possible.
97+
💖 is a good starter if you're not sure which to use.

.github/DEVELOPMENT.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Development
2+
3+
After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing pnpm](https://pnpm.io/installation):
4+
5+
```shell
6+
git clone https://github.com/<your-name-here>/loader
7+
cd loader
8+
pnpm install
9+
```
10+
11+
> This repository includes a list of suggested VS Code extensions.
12+
> It's a good idea to use [VS Code](https://code.visualstudio.com) and accept its suggestion to install them, as they'll help with development.
13+
14+
## Building
15+
16+
Run [**tsup**](https://tsup.egoist.dev) locally to build source files from `src/` into output files in `lib/`:
17+
18+
```shell
19+
pnpm build
20+
```
21+
22+
Add `--watch` to run the builder in a watch mode that continuously cleans and recreates `lib/` as you save files:
23+
24+
```shell
25+
pnpm build --watch
26+
```
27+
28+
## Formatting
29+
30+
[Prettier](https://prettier.io) is used to format code.
31+
It should be applied automatically when you save files in VS Code or make a Git commit.
32+
33+
To manually reformat all files, you can run:
34+
35+
```shell
36+
pnpm format --write
37+
```
38+
39+
## Linting
40+
41+
[ESLint](https://eslint.org) is used with with [typescript-eslint](https://typescript-eslint.io)) to lint JavaScript and TypeScript source files.
42+
You can run it locally on the command-line:
43+
44+
```shell
45+
pnpm run lint
46+
```
47+
48+
ESLint can be run with `--fix` to auto-fix some lint rule complaints:
49+
50+
```shell
51+
pnpm run lint --fix
52+
```
53+
54+
Note that you'll likely need to run `pnpm build` before `pnpm lint` so that lint rules which check the file system can pick up on any built files.
55+
56+
## Type Checking
57+
58+
You should be able to see suggestions from [TypeScript](https://typescriptlang.org) in your editor for all open files.
59+
60+
However, it can be useful to run the TypeScript command-line (`tsc`) to type check all files in `src/`:
61+
62+
```shell
63+
pnpm tsc
64+
```
65+
66+
Add `--watch` to keep the type checker running in a watch mode that updates the display as you save files:
67+
68+
```shell
69+
pnpm tsc --watch
70+
```

.github/ISSUE_TEMPLATE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Note: Please must use one of our issue templates to file an issue! 🛑 -->
2+
<!-- 👉 https://github.com/Loopshape/loader/issues/new/choose 👈 -->
3+
<!-- **Issues that should have been filed with a template will be closed without action, and we will ask you to use a template.** -->
4+
5+
<!-- This blank issue template is only for issues that don't fit any of the templates. -->
6+
7+
## Overview
8+
9+
...

0 commit comments

Comments
 (0)