Skip to content

Commit

Permalink
Merge pull request #12 from mjangir/version2
Browse files Browse the repository at this point in the history
Merge v2 source into master
  • Loading branch information
mjangir authored Sep 21, 2021
2 parents c6b802d + b047938 commit bb1da41
Show file tree
Hide file tree
Showing 118 changed files with 25,918 additions and 11,929 deletions.
13 changes: 0 additions & 13 deletions .babelrc

This file was deleted.

8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)
13 changes: 13 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "mjangir/formik-wizard-form" }
],
"commit": false,
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/thirty-teachers-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'formik-wizard-form': major
---

Write form-wizard-form from scratch with typescript and entirely a different set of APIs. Please refer to http://formikwizard.manishjangir.com
73 changes: 8 additions & 65 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,69 +1,12 @@
const fs = require('fs');
const path = require('path');

const prettierOptions = JSON.parse(fs.readFileSync('./.prettierrc', 'utf8'));

module.exports = {
extends: ['airbnb', 'prettier', 'prettier/react'],
plugins: ['prettier', 'react', 'babel-eslint', 'jsx-a11y'],
env: {
browser: true,
node: true,
jest: true,
es6: true,
},
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
extends: [
'react-app',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
settings: {
react: {
version: 'detect',
},
},
rules: {
'prettier/prettier': ['error', prettierOptions],
'arrow-body-style': [2, 'as-needed'],
'class-methods-use-this': 0,
'comma-dangle': [2, 'always-multiline'],
'import/imports-first': 0,
'import/newline-after-import': 0,
'import/no-dynamic-require': 0,
'import/no-extraneous-dependencies': 0,
'import/no-named-as-default': 0,
'import/no-unresolved': 2,
'import/no-webpack-loader-syntax': 0,
'import/prefer-default-export': 0,
indent: [
2,
2,
{
SwitchCase: 1,
},
],
'jsx-a11y/aria-props': 2,
'jsx-a11y/heading-has-content': 0,
'jsx-a11y/label-has-for': 2,
'jsx-a11y/mouse-events-have-key-events': 2,
'jsx-a11y/role-has-required-aria-props': 2,
'jsx-a11y/role-supports-aria-props': 2,
'max-len': 0,
'newline-per-chained-call': 0,
'no-confusing-arrow': 0,
'no-console': 1,
'no-use-before-define': 0,
'prefer-template': 2,
'react/jsx-closing-tag-location': 0,
'react/forbid-prop-types': 0,
'react/jsx-first-prop-new-line': [2, 'multiline'],
'react/jsx-filename-extension': 0,
'react/jsx-no-target-blank': 0,
'react/require-default-props': 0,
'react/require-extension': 0,
'react/self-closing-comp': 0,
'react/sort-comp': 0,
'require-yield': 0,
'jsx-a11y/anchor-is-valid': [ 'error', {
'components': [ 'Link' ],
'specialLink': [ 'to' ]
}],
},
};
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @mjangir
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/1.Bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Bug report
about: Create a bug report for formik-wizard-form
title: ''
labels: 'Type: Bug'
assignees: ''
---

## Bug report

### Current Behavior

<!-- If applicable, add screenshots to help explain your problem. -->

### Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

### Reproducible example

<!-- Use one of the Codesandbox templates: -->

<!-- <FormikWizard /> template: https://codesandbox.io/s/91q6rxmmrp -->

<!-- useFormikWizard() template: https://codesandbox.io/s/437wy20rx4 -->

### Suggested solution(s)

<!-- How could we solve this bug? What changes would need to made to Formik? -->

### Additional context

<!-- Add any other context about the problem here. -->

### Your environment

<!-- PLEASE FILL THIS OUT -->

| Software | Version(s) |
| ------------------ | ---------- |
| Formik Wizard Form |
| Formik |
| React |
| TypeScript |
| Browser |
| npm/Yarn |
| Operating System |
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/2.Feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Feature request
about: Request a new feature for Wizard
title: ''
labels: 'Type: Feature Request'
assignees: ''
---

## Feature request

### Current Behavior

<!-- A clear and concise description of what is the current behavior / use. -->

### Desired Behavior

<!-- A clear and concise description of what you want to happen. -->

### Suggested Solution

<!-- Suggest a solution that the community/maintainers/you may take to enable the desired behavior -->

<!-- NOTE: Feature Requests without suggested solutions may not be addressed or treated with the same level of urgency as those that have suggested solutions. -->

### Who does this impact? Who is this for?

<!-- Who is this for? All users? TypeScript users? Beginners? Advanced? Yourself? People using X, Y, X, etc.? -->

### 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 links about the feature request here. -->
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/mjangir/formik-wizard-form/discussions
about: Ask questions and discuss with other community members
- name: Join Discord
url: https://discord.gg/GaezX3M52w
about: Chat with other community members in real-time
44 changes: 44 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: deploy-docusaurus

on:
push:
branches: [master]
pull_request:
branches: [master]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
publish:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out repo
uses: actions/checkout@v2
# Node is required for npm
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '12'
# Install and build Docusaurus website
- name: Build Docusaurus website
run: |
cd website
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
elif [ -e package-lock.json ]; then
npm ci
else
npm i
fi
npm run build
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: website/build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 16 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: E2E Test

on: [pull_request]

jobs:
cypress-run:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- name: Cypress run
uses: cypress-io/github-action@v2
timeout-minutes: 5
with:
start: npm run start:app
wait-on: 'http://localhost:3000'
wait-on-timeout: 120
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release
on:
push:
branches:
- master
- next
jobs:
release:
runs-on: ubuntu-latest
if: github.repository == 'mjangir/formik-wizard-form'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Use Node.js 12.x
uses: actions/setup-node@v2
with:
version: 12.x

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
with:
install-command: yarn install --frozen-lockfile --ignore-scripts
- name: Create Release Pull Request or Publish to npm
uses: changesets/action@master
with:
commit: 'chore: release package(s)'
title: 'chore: release package(s)'
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Compressed Size

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: preactjs/compressed-size-action@v2
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
19 changes: 19 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Close stale issues/prs'
on:
schedule:
- cron: '1 0 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
days-before-close: 60
stale-issue-label: 'stale'
stale-pr-label: 'stale'
stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days'
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days'
any-of-labels: 'Resolution: Duplicate,Resolution: Invalid,Resolution: Support Redirect,Resolution: Unsolved,Resolution: User Land,Resolution: Wontfix,Resolution: Workaround,Status: Author Feedback,Status: Needs More Information'
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Unit Test

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node: ['12.x']

name: Test on node ${{ matrix.node }}

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}

- uses: actions/cache@v2
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install deps, build, and test
run: |
node --version
npm --version
yarn --version
yarn install --frozen-lockfile
yarn test --coverage
env:
CI: true
NODE_OPTIONS: --max-old-space-size=4096
Loading

0 comments on commit bb1da41

Please sign in to comment.