-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Early 2.0 * Closer to 2.0.0 * Version 2.0.0 * Documentation * Upd readme?1 * Update * Add more tests * Retry * Fix workflow & retry * Hmm * Try * retry * Reduce number of CI actions Co-authored-by: Denis Tokarev <denis.t@canva.com> Co-authored-by: Denis Tokarev <github@devlato.com>
- Loading branch information
1 parent
06d2ce2
commit 960d93a
Showing
36 changed files
with
10,603 additions
and
412 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 |
---|---|---|
@@ -1,21 +1,36 @@ | ||
engines: | ||
eslint: | ||
enabled: true | ||
channel: 'eslint-3' | ||
config: | ||
extensions: | ||
- .js | ||
ratings: | ||
paths: | ||
- "src/**/*" | ||
- "**.md" | ||
version: '2' | ||
checks: | ||
method-lines: | ||
argument-count: | ||
enabled: false | ||
complex-logic: | ||
enabled: false | ||
file-lines: | ||
enabled: true | ||
config: | ||
threshold: 80 | ||
threshold: 250 | ||
method-complexity: | ||
enabled: true | ||
config: | ||
threshold: 16 | ||
complex-logic: | ||
method-count: | ||
enabled: true | ||
config: | ||
threshold: 20 | ||
method-lines: | ||
enabled: true | ||
config: | ||
threshold: 6 | ||
threshold: 64 | ||
exclude_patterns: | ||
- '.git/' | ||
- '.github/' | ||
- '.idea/' | ||
- 'coverage/' | ||
- 'dist/' | ||
- 'docs/' | ||
- 'node_modules/' | ||
- 'src/tests/' | ||
plugins: | ||
eslint: | ||
enabled: false | ||
nodesecurity: | ||
enabled: 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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
max_line_length=120 |
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 |
---|---|---|
@@ -1,5 +1,14 @@ | ||
coverage | ||
node_modules | ||
test | ||
# Folders | ||
.git/ | ||
.github/ | ||
.idea/ | ||
coverage/ | ||
dist/ | ||
docs/ | ||
lint/ | ||
node_modules/ | ||
|
||
# Garbage | ||
*.DS_Store | ||
*.lock | ||
*.log | ||
*.md |
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,30 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
'prettier/react', | ||
], | ||
plugins: ['@typescript-eslint', 'prettier'], | ||
parserOptions: { | ||
ecmaVersion: 5, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: false, | ||
}, | ||
}, | ||
rules: { | ||
'@typescript-eslint/explicit-function-return-type': [0], | ||
'@typescript-eslint/no-use-before-define': [0], | ||
'prettier/prettier': 'error', | ||
}, | ||
env: { | ||
browser: true, | ||
node: true, | ||
jest: true, | ||
es6: true, | ||
}, | ||
root: 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 @@ | ||
# These are supported funding model platforms | ||
|
||
github: devlato | ||
custom: http://paypal.me/devlatoau |
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,24 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '[Bug Report]' | ||
labels: Bug Report | ||
assignees: 'devlato' | ||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
|
||
1. ... | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**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,19 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '[Feature Request]' | ||
labels: Feature Request | ||
assignees: 'devlato' | ||
--- | ||
|
||
**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,19 @@ | ||
--- | ||
name: New Pull Request | ||
about: Create a report to help us improve | ||
title: '[PR]' | ||
labels: '' | ||
assignees: 'devlato' | ||
--- | ||
|
||
**Describe the problem this PR solves** | ||
A clear and concise description of what the pull request solves. | ||
|
||
**Features and behaviour** | ||
A list of all the new features this PR adds, along with changed behavior. | ||
|
||
**Describe how it solves the problem** | ||
A bit more detailed explanation of technical implementation. | ||
|
||
**Additional context** | ||
Add any other context about the PR here, link issues, etc. |
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,15 @@ | ||
addReviewers: true | ||
addAssignees: true | ||
|
||
reviewers: | ||
- devlato | ||
|
||
numberOfReviewers: 0 | ||
|
||
assignees: | ||
- devlato | ||
|
||
numberOfAssignees: 0 | ||
|
||
skipKeywords: | ||
- WIP |
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,19 @@ | ||
--- | ||
name: New Pull Request | ||
about: Create a report to help us improve | ||
title: '[PR]' | ||
labels: '' | ||
assignees: 'devlato' | ||
--- | ||
|
||
**Describe the problem this PR solves** | ||
A clear and concise description of what the pull request solves. | ||
|
||
**Features and behaviour** | ||
A list of all the new features this PR adds, along with changed behavior. | ||
|
||
**Describe how it solves the problem** | ||
A bit more detailed explanation of technical implementation. | ||
|
||
**Additional context** | ||
Add any other context about the PR here, link issues, etc. |
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,76 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
- gh-pages | ||
tags-ignore: | ||
- '*' | ||
|
||
jobs: | ||
secrets: | ||
name: Secrets | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Scan for secrets | ||
uses: evanextreme/detect-secrets-action@1.0.0 | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Lint the codebase | ||
run: npm run lint:ci | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run tests | ||
run: npm run test:ci | ||
- name: Upload coverage | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: test_coverage | ||
path: coverage | ||
build_code: | ||
name: Build code | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build code | ||
run: npm run build:ci | ||
- name: Upload the dist folder | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: dist | ||
path: dist | ||
build_storybook: | ||
name: Build docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build docs | ||
run: npm run docs:ci | ||
- name: Upload the storybook | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: docs | ||
path: docs |
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,37 @@ | ||
name: Completion | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- labeled | ||
- unlabeled | ||
- synchronize | ||
- opened | ||
- edited | ||
- ready_for_review | ||
- reopened | ||
- unlocked | ||
pull_request_review: | ||
types: | ||
- submitted | ||
check_suite: | ||
types: | ||
- completed | ||
status: {} | ||
|
||
jobs: | ||
maybe_merge: | ||
name: Merge | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.0.0 | ||
- name: automerge | ||
uses: 'pascalgn/automerge-action@v0.13.1' | ||
env: | ||
GITHUB_TOKEN: '${{ secrets.GH_PAT }}' | ||
MERGE_LABELS: Ready to merge | ||
MERGE_METHOD: rebase | ||
MERGE_COMMIT_MESSAGE: 'Merge ${{ github.ref }} into master' | ||
MERGE_RETRIES: 10 | ||
MERGE_RETRY_SLEEP: 30000 |
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,15 @@ | ||
name: Label Approved | ||
|
||
on: pull_request_review | ||
|
||
jobs: | ||
label_when_approved: | ||
name: Label when approved | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Label when approved | ||
uses: pullreminders/label-when-approved-action@1.0.5 | ||
env: | ||
APPROVALS: '1' | ||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
ADD_LABEL: 'Ready to merge' |
Oops, something went wrong.