Skip to content

Commit f8cc1dc

Browse files
committed
feat: 🎸 First release
1 parent 906a44f commit f8cc1dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+7825
-10670
lines changed

.eslintignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
dist
2+
node_modules
3+
jest.config.ts
4+
babel.config.js
5+
rollup.config.js
6+
jest.config.js
7+
tsconfig.json
8+
coverage
9+
temp
10+
commitlint.config.js

.eslintrc.json

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 11,
6+
"ecmaFeatures": {
7+
"jsx": true
8+
},
9+
"project": "./tsconfig.json"
10+
},
11+
"settings": {
12+
"import/resolver": {
13+
"node": {
14+
"moduleDirectory": ["node_modules", "src/"]
15+
}
16+
},
17+
"react": {
18+
"pragma": "React",
19+
"version": "detect"
20+
}
21+
},
22+
"plugins": ["react", "react-hooks"],
23+
"extends": [
24+
"eslint:recommended",
25+
"plugin:react-hooks/recommended",
26+
"prettier",
27+
"plugin:react/recommended",
28+
"plugin:@typescript-eslint/recommended",
29+
"plugin:import/typescript",
30+
"airbnb",
31+
"airbnb-typescript",
32+
"plugin:prettier/recommended"
33+
],
34+
"rules": {
35+
"react-hooks/rules-of-hooks": "error",
36+
"react-hooks/exhaustive-deps": "warn",
37+
"react/prop-types": "off",
38+
"react/jsx-uses-react": "error",
39+
"react/jsx-uses-vars": "error",
40+
"no-console": ["error", { "allow": ["warn", "error"] }],
41+
"react/react-in-jsx-scope": "off",
42+
"react/display-name": 0,
43+
"import/no-extraneous-dependencies": 0,
44+
"import/prefer-default-export": 0,
45+
"import/no-cycle": 0,
46+
"@typescript-eslint/no-explicit-any": 0,
47+
"@typescript-eslint/lines-between-class-members": "off",
48+
"prettier/prettier": ["error"],
49+
"consistent-return": 0,
50+
"@typescript-eslint/no-throw-literal": 0,
51+
"no-underscore-dangle": 0,
52+
"react/function-component-definition": 0,
53+
"testing-library/render-result-naming-convention": "off",
54+
"import/order": [
55+
"error",
56+
{
57+
"groups": [
58+
["builtin", "external"],
59+
["internal", "parent", "sibling", "index"]
60+
],
61+
"pathGroups": [
62+
{ "pattern": "assets/**", "group": "sibling", "position": "after" },
63+
{
64+
"pattern": "@external/**/*.css",
65+
"group": "sibling",
66+
"position": "after"
67+
},
68+
{
69+
"pattern": "*.css",
70+
"group": "index",
71+
"patternOptions": { "matchBase": true },
72+
"position": "after"
73+
}
74+
],
75+
"warnOnUnassignedImports": true,
76+
"pathGroupsExcludedImportTypes": ["css"],
77+
"newlines-between": "always"
78+
}
79+
]
80+
},
81+
"overrides": [
82+
{
83+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
84+
"rules": {
85+
"testing-library/render-result-naming-convention": "off"
86+
}
87+
}
88+
]
89+
}

.github/ISSUE_TEMPLATE/bug_report.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/release.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release packages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- beta
8+
- alpha
9+
10+
defaults:
11+
run:
12+
shell: sh
13+
14+
jobs:
15+
release:
16+
name: Release
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Wait on tests
20+
uses: lewagon/[email protected]
21+
with:
22+
ref: ${{ github.ref }}
23+
check-name: "Run tests"
24+
repo-token: ${{ secrets.GITHUB_TOKEN }}
25+
wait-interval: 10
26+
27+
- name: Checkout
28+
uses: actions/checkout@v3
29+
30+
- name: Set up Node
31+
uses: actions/setup-node@v3
32+
with:
33+
node-version: "16"
34+
cache: "yarn"
35+
36+
- name: Install packages
37+
run: yarn install --frozen-lockfile
38+
39+
- name: Build
40+
run: yarn build
41+
42+
- name: Publish
43+
run: yarn release
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/tests.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Tests
2+
3+
on: push
4+
5+
jobs:
6+
tests:
7+
name: Run tests
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
13+
- name: Set up Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: "16"
17+
cache: "yarn"
18+
19+
- name: Install packages
20+
run: yarn install --frozen-lockfile
21+
22+
- name: Build
23+
run: yarn build
24+
25+
- name: Lint
26+
run: yarn lint
27+
28+
- name: Clear Jest
29+
run: yarn jest --clearCache
30+
31+
- name: Test
32+
run: yarn test --coverage
33+
34+
# - name: Send Report
35+
# uses: paambaati/[email protected]
36+
# env:
37+
# CC_TEST_REPORTER_ID: c206a2ed5aa86c7480a13634e91e440a27a98a5d134653f8ea9a7d5f987e68c3
38+
# with:
39+
# coverageLocations: |
40+
# ${{github.workspace}}/packages/core/coverage/lcov.info:lcov
41+
# ${{github.workspace}}/packages/react/coverage/lcov.info:lcov

.husky/pre-commit

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn commitlint --edit "$1"
5+
yarn lint
6+
yarn test

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps=true

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Add files here to ignore them from prettier formatting
2+
3+
/dist
4+
/coverage

.releaserc.json

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"branches": [
3+
"+([0-9])?(.{+([0-9]),x}).x",
4+
{
5+
"name": "main"
6+
},
7+
{
8+
"name": "beta",
9+
"prerelease": true
10+
},
11+
{
12+
"name": "alpha",
13+
"prerelease": true
14+
}
15+
],
16+
"release": {
17+
"plugins": [
18+
[
19+
"@semantic-release/commit-analyzer",
20+
{
21+
"releaseRules": [
22+
{
23+
"scope": "no-release",
24+
"release": false
25+
},
26+
{
27+
"breaking": true,
28+
"release": "major"
29+
},
30+
{
31+
"type": "feat",
32+
"release": "minor"
33+
},
34+
{
35+
"type": "refactor",
36+
"scope": "core-*",
37+
"release": "minor"
38+
},
39+
{
40+
"type": "*",
41+
"release": "patch"
42+
}
43+
]
44+
}
45+
],
46+
[
47+
"@semantic-release/changelog",
48+
{
49+
"changelogFile": "CHANGELOG.md"
50+
}
51+
],
52+
"@semantic-release/release-notes-generator",
53+
"@semantic-release/npm",
54+
[
55+
"@semantic-release/git",
56+
{
57+
"assets": ["CHANGELOG.md"]
58+
}
59+
],
60+
"@semantic-release/github"
61+
]
62+
}
63+
}

Code_of_Conduct.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make
6+
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
7+
disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education,
8+
socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
9+
10+
## Our Standards
11+
12+
Examples of behavior that contributes to creating a positive environment include:
13+
14+
- Using welcoming and inclusive language
15+
- Being respectful of differing viewpoints and experiences
16+
- Gracefully accepting constructive criticism
17+
- Focusing on what is best for the community
18+
- Showing empathy towards other community members
19+
20+
Examples of unacceptable behavior by participants include:
21+
22+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
23+
- Trolling, insulting/derogatory comments, and personal or political attacks
24+
- Public or private harassment
25+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
26+
- Other conduct which could reasonably be considered inappropriate in a professional setting
27+
28+
## Our Responsibilities
29+
30+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
31+
appropriate and fair corrective action in response to any instances of unacceptable behavior.
32+
33+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
34+
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
35+
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
36+
37+
## Scope
38+
39+
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the
40+
project or its community in public spaces. Examples of representing a project or community include using an official
41+
project e-mail address, posting via an official social media account, or acting as an appointed representative at an
42+
online or offline event. Representation of a project may be further defined and clarified by project maintainers.
43+
44+
## Enforcement
45+
46+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
47+
[email protected]. All complaints will be reviewed and investigated and will result in a response that is deemed
48+
necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to
49+
the reporter of an incident. Further details of specific enforcement policies may be posted separately.
50+
51+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
52+
repercussions as determined by other members of the project's leadership.
53+
54+
## Attribution
55+
56+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at
57+
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
58+
59+
[homepage]: https://www.contributor-covenant.org
60+
61+
For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq

0 commit comments

Comments
 (0)