-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
11,781 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
dist | ||
node_modules | ||
jest.config.ts | ||
babel.config.js | ||
rollup.config.js | ||
jest.config.js | ||
tsconfig.json | ||
coverage | ||
temp | ||
commitlint.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 11, | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"project": "./tsconfig.json" | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"node": { | ||
"moduleDirectory": ["node_modules", "src/"] | ||
} | ||
}, | ||
"react": { | ||
"pragma": "React", | ||
"version": "detect" | ||
} | ||
}, | ||
"plugins": ["react", "react-hooks"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react-hooks/recommended", | ||
"prettier", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:import/typescript", | ||
"airbnb", | ||
"airbnb-typescript", | ||
"plugin:prettier/recommended" | ||
], | ||
"rules": { | ||
"react-hooks/rules-of-hooks": "error", | ||
"react-hooks/exhaustive-deps": "warn", | ||
"react/require-default-props": "off", | ||
"react/jsx-props-no-spreading": "off", | ||
"react/prop-types": "off", | ||
"react/jsx-uses-react": "error", | ||
"react/jsx-uses-vars": "error", | ||
"no-console": ["error", { "allow": ["warn", "error"] }], | ||
"react/react-in-jsx-scope": "off", | ||
"react/display-name": 0, | ||
"import/no-extraneous-dependencies": 0, | ||
"import/prefer-default-export": 0, | ||
"import/no-cycle": 0, | ||
"@typescript-eslint/no-explicit-any": 0, | ||
"@typescript-eslint/lines-between-class-members": "off", | ||
"prettier/prettier": ["error"], | ||
"consistent-return": 0, | ||
"@typescript-eslint/no-throw-literal": 0, | ||
"no-underscore-dangle": 0, | ||
"react/function-component-definition": 0, | ||
"testing-library/render-result-naming-convention": "off", | ||
"import/order": [ | ||
"error", | ||
{ | ||
"groups": [ | ||
["builtin", "external"], | ||
["internal", "parent", "sibling", "index"] | ||
], | ||
"pathGroups": [ | ||
{ "pattern": "assets/**", "group": "sibling", "position": "after" }, | ||
{ | ||
"pattern": "@external/**/*.css", | ||
"group": "sibling", | ||
"position": "after" | ||
}, | ||
{ | ||
"pattern": "*.css", | ||
"group": "index", | ||
"patternOptions": { "matchBase": true }, | ||
"position": "after" | ||
} | ||
], | ||
"warnOnUnassignedImports": true, | ||
"pathGroupsExcludedImportTypes": ["css"], | ||
"newlines-between": "always" | ||
} | ||
] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": { | ||
"testing-library/render-result-naming-convention": "off" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.js linguist-detectable=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This is a comment. | ||
# Each line is a file pattern followed by one or more owners. | ||
|
||
# These owners will be the default owners for everything in | ||
# the repo. Unless a later match takes precedence, they will | ||
# be requested for review when someone opens a pull request. | ||
* @prc5 | ||
|
||
# Order is important; the last matching pattern takes the most | ||
# precedence. When someone opens a pull request that only | ||
# modifies JS files, only @js-owner and not the global | ||
# owner(s) will be requested for a review. | ||
# *.js @js-owner | ||
|
||
# You can also use email addresses if you prefer. They'll be | ||
# used to look up users just like we do for commit author | ||
# emails. | ||
# *.go [email protected] | ||
|
||
# In this example, @doctocat owns any files in the build/logs | ||
# directory at the root of the repository and any of its | ||
# subdirectories. | ||
# /build/logs/ @doctocat | ||
|
||
# The `docs/*` pattern will match files like | ||
# `docs/getting-started.md` but not further nested files like | ||
# `docs/build-app/troubleshooting.md`. | ||
# docs/* [email protected] | ||
|
||
# In this example, @octocat owns any file in an apps directory | ||
# anywhere in your repository. | ||
# apps/ @octocat | ||
|
||
# In this example, @doctocat owns any file in the `/docs` | ||
# directory in the root of your repository. | ||
# /docs/ @doctocat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
name: Workflow | ||
on: push | ||
|
||
concurrency: | ||
group: | ||
"${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || | ||
github.ref }}" | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: sh | ||
|
||
jobs: | ||
prepare-environment: | ||
runs-on: ubuntu-latest | ||
name: Prepare environment | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18" | ||
cache: "yarn" | ||
cache-dependency-path: yarn.lock | ||
env: | ||
FORCE_COLOR: 0 | ||
- name: Install node_modules on cache miss | ||
if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
run: yarn install --frozen-lockfile | ||
- name: Cache node_modules | ||
if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: node_modules | ||
key: yarn-${{ hashFiles('yarn.lock') }} | ||
|
||
tests: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
needs: prepare-environment | ||
# Tests timeout after 40 minutes | ||
timeout-minutes: 40 | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18" | ||
cache: "yarn" | ||
cache-dependency-path: yarn.lock | ||
- name: Restore node_modules | ||
uses: actions/cache/restore@v3 | ||
id: cache-node-modules | ||
with: | ||
path: node_modules | ||
key: yarn-${{ hashFiles('yarn.lock') }} | ||
fail-on-cache-miss: false | ||
- name: Install node_modules on cache miss | ||
if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
run: yarn install --frozen-lockfile | ||
- name: Build | ||
run: yarn build | ||
- name: Lint | ||
run: yarn lint | ||
- name: Clear Jest | ||
run: yarn jest --clearCache | ||
- name: Test | ||
run: yarn test --coverage | ||
# - name: Send Report | ||
# uses: paambaati/[email protected] | ||
# env: | ||
# CC_TEST_REPORTER_ID: c206a2ed5aa86c7480a13634e91e440a27a98a5d134653f8ea9a7d5f987e68c3 | ||
# with: | ||
# coverageLocations: | | ||
# ${{github.workspace}}/packages/core/coverage/lcov.info:lcov | ||
# ${{github.workspace}}/packages/react/coverage/lcov.info:lcov | ||
|
||
release: | ||
name: Release | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
runs-on: ubuntu-latest | ||
needs: tests | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18" | ||
cache: "yarn" | ||
cache-dependency-path: yarn.lock | ||
- name: Restore node_modules | ||
uses: actions/cache/restore@v3 | ||
id: cache-node-modules | ||
with: | ||
path: node_modules | ||
key: yarn-${{ hashFiles('yarn.lock') }} | ||
fail-on-cache-miss: false | ||
- name: Install node_modules on cache miss | ||
if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
run: yarn install --frozen-lockfile | ||
- name: Build | ||
run: yarn build | ||
- name: Publish | ||
run: yarn release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
/dist | ||
|
||
# misc | ||
.eslintcache | ||
.idea | ||
.vscode | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn commitlint --edit "$1" | ||
yarn lint | ||
yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
src | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
legacy-peer-deps=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Add files here to ignore them from prettier formatting | ||
|
||
/dist | ||
/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": false, | ||
"trailingComma": "all", | ||
"bracketSpacing": true, | ||
"jsxBracketSameLine": false, | ||
"proseWrap": "always", | ||
"arrowParens": "always" | ||
} |
Oops, something went wrong.