Skip to content

Commit

Permalink
refactor: initial structural commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunnamius committed Oct 16, 2022
0 parents commit 2ddf058
Show file tree
Hide file tree
Showing 70 changed files with 36,779 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage:
range: '70...100'
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = space
indent_size = 2
50 changes: 50 additions & 0 deletions .env.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# When running a (projector) pipeline via GHA/Vercel, all required env vars must
# be defined as repo secrets. With projector, the sync command handles this.

# Codecov test analysis token
#
# Required: if deploying
# Matches: ^[a-f0-9-]+$
# On-Sync: mirror
#
# The token used during CI/CD to analyze and upload build artifact code quality
# data to Codecov.
CODECOV_TOKEN=

# GitHub deploy token
#
# Alias: GH_TOKEN
# Required: if deploying
# Matches: ^[a-f0-9]+$
# On-Sync: mirror
#
# The token used during CI/CD to interact with GitHub's API.
GITHUB_TOKEN=

# GPG private key passphrase
#
# Required: if deploying with CI/CD
# On-Sync: mirror
#
# The passphrase used to unlock GPG_PRIVATE_KEY. Not referenced during non-CI/CD
# (i.e. local, manual) deployments.
GPG_PASSPHRASE=

# GPG private key
#
# Required: if deploying with CI/CD
# On-Sync: mirror
#
# The GPG key used to sign all git commits and releases. Not referenced during
# non-CI/CD (i.e. local, manual) deployments.
GPG_PRIVATE_KEY=

# NPM deploy token
#
# Required: if deploying with CI/CD
# Matches: ^[a-f0-9-]+$
# On-Sync: mirror
#
# The token used during CD to login to NPM. Not referenced during non-CI/CD
# (i.e. local, manual) deployments.
NPM_TOKEN=
145 changes: 145 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
'use strict';

const debug = require('debug')(`${require('./package.json').name}:eslint-config`);
const restrictedGlobals = require('confusing-browser-globals');

module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['jest', '@typescript-eslint', 'import', 'module-resolver'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript'
],
parserOptions: {
ecmaVersion: 8,
sourceType: 'module',
ecmaFeatures: {
impliedStrict: true,
experimentalObjectRestSpread: true,
jsx: true
},
project: 'tsconfig.eslint.json'
},
env: {
es6: true,
node: true,
jest: true,
'jest/globals': true,
browser: true,
webextensions: true
},
rules: {
'no-console': 'warn',
'no-return-await': 'warn',
'no-await-in-loop': 'warn',
'import/no-unresolved': ['error', { commonjs: true }],
'module-resolver/use-alias': [
'error',
{
extensions: ['.ts', '.tsx', '.jsx']
}
],
'no-restricted-globals': ['warn'].concat(restrictedGlobals),
'no-extra-boolean-cast': 'off',
'no-empty': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/prefer-ts-expect-error': 'warn',
'@typescript-eslint/no-floating-promises': [
'error',
{ ignoreVoid: true, ignoreIIFE: true }
],
'@typescript-eslint/ban-ts-comment': [
'warn',
{
'ts-expect-error': 'allow-with-description',
minimumDescriptionLength: 6
}
],
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_+',
varsIgnorePattern: '^_+',
caughtErrorsIgnorePattern: '^ignored?\\d*$',
caughtErrors: 'all'
}
],
// ? Ever since v4, we will rely on TypeScript to catch these
'no-undef': 'off',
'@typescript-eslint/no-var-requires': 'off',
'no-unused-vars': 'off'
},
overrides: [
{
files: ['*.test.*'],
extends: ['plugin:jest/all', 'plugin:jest/style'],
rules: {
'jest/lowercase': 'off',
'jest/consistent-test-it': 'off',
'jest/require-top-level-describe': 'off',
'jest/valid-describe': 'off',
'jest/no-hooks': 'off',
'jest/require-to-throw-message': 'off',
'jest/prefer-called-with': 'off',
'jest/prefer-spy-on': 'off',
'jest/no-if': 'off',
'jest/no-disabled-tests': 'warn',
'jest/no-commented-out-tests': 'warn',
'jest/no-alias-methods': 'off',
'jest/max-expects': 'off',
'jest/prefer-mock-promise-shorthand': 'off',
'jest/no-conditional-in-test': 'off',
'jest/prefer-each': 'off'
}
}
],
settings: {
react: {
version: 'detect'
},
'import/extensions': ['.ts', '.tsx', '.js', '.jsx'],
// ? Switch parsers depending on which type of file we're looking at
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
'@babel/eslint-parser': ['.js', '.jsx']
},
'import/resolver': {
alias: {
map: [
// ! If changed, also update these aliases in tsconfig.json,
// ! webpack.config.js, next.config.ts, babel.config.js, and
// ! jest.config.js
['universe', './src'],
['multiverse', './lib'],
['testverse', './test'],
['externals', './external-scripts'],
['types', './types'],
['package', './package.json']
],
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json']
},
typescript: {},
'babel-module': {}
},
'import/ignore': [
// ? Don't go complaining about anything that we don't own
'.*/node_modules/.*',
'.*/bin/.*'
]
},
ignorePatterns: ['coverage', 'dist', 'bin', 'build', '/next.config.js'],
globals: {
page: true,
browser: true,
context: true,
jestPuppeteer: true
}
};

debug('exports: %O', module.exports);
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# See https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/about-code-owners

* @Xunnamius
82 changes: 82 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# 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, socioeconomic 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:

- Racism or sexism in any shape or form
- 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]][1]. 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][2]

For answers to common questions about this code of conduct, see
[https://www.contributor-covenant.org/faq][3]

[homepage]: https://www.contributor-covenant.org
[1]: mailto:[email protected]
[2]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[3]: https://www.contributor-covenant.org/faq
77 changes: 77 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
name: 🤯 Bug report
about: Alert us about an issue
labels: bug
---

<!-- THANK YOU for taking a moment to improve this project. 🤘🏿 You rock! 🎸 -->

<details open><summary><strong>The problem</strong></summary>

<!--
🚩 Required (1 of 2): please replace this comment with a clear and concise
description of your issue. If applicable, add code samples and relevant error
log lines to help explain the problem. Favor code samples over code screenshots.
-->

</details>

<details><summary><strong>Reproduction steps</strong></summary>

<!--
🚩 Required (2 of 2): please replace this comment with a link to a repo
demonstrating your issue *using as few lines of code as possible*. If we can't
reproduce the problem on our side, how can we ever hope to fix it for you 🤷🏾?
If your issue is simple enough that it doesn't warrant a demo repo, include
instead the simplest most basic possible steps to reproduce your problem; e.g.:
1. Clone the dummy repo I made: https://github.com/...
2. Run `npm install`
3. Run `npx jest`
4. See error "xyz" at test 2, which shouldn't be happening
-->

</details>

<!--
<details><summary><strong>Expected behavior</strong></summary>
Optional: uncomment this block and replace this text with a clear and concise
description of what you expected to happen if not included above. If applicable,
add screenshots and code samples to help explain the problem.
</details>
-->

<!--
<details><summary><strong>Suggested solution</strong></summary>
Optional: uncomment this block and replace this text with a clear and concise
proposal of how your issue might be solved, including any unnoted workarounds.
If applicable, add code samples and screenshots.
</details>
-->

<!--
<details><summary><strong>Additional context</strong></summary>
Optional: uncomment this block and replace this text with any additional
information that might help us figure out what's going on. This could be dense
runtime details, lengthy error logs, assets links, or what have you; e.g.:
- OS: ubuntu 26.04
- Node version: 20
- Babel: yes, version 8.1.0
- TypeScript: yes, version 5.2.0
- Browser: firefox 171, chrome 190
- List of installed packages: https://github.com/.../main/package.json
Relevant log lines:
```
(super long error log lines pasted here)
```
</details>
-->
Loading

0 comments on commit 2ddf058

Please sign in to comment.