Skip to content

Commit c51f9fd

Browse files
authored
chore: project init
2 parents a2bbccc + ed17883 commit c51f9fd

19 files changed

+8832
-0
lines changed

.eslintrc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true
5+
},
6+
extends: ['standard'],
7+
parser: '@typescript-eslint/parser',
8+
parserOptions: {
9+
ecmaVersion: 12,
10+
sourceType: 'module'
11+
},
12+
plugins: ['@typescript-eslint'],
13+
rules: {
14+
semi: ['error', 'always']
15+
}
16+
};

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior
14+
15+
**Expected behavior**
16+
A clear and concise description of what you expected to happen.
17+
18+
**Screenshots**
19+
If applicable, add screenshots to help explain your problem.
20+
21+
**Desktop (please complete the following information):**
22+
23+
- OS: [e.g. MacOs, Linux]
24+
- Node.js [e.g. 12, 14]
25+
26+
**Additional context**
27+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Ask a question
4+
url: https://github.com/react-hook-form/react-hook-form/discussions
5+
about: Ask questions and discuss with other community members
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Fixes #
2+
3+
## Proposed Changes
4+
5+
-
6+
-
7+
-

.github/workflows/main.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- beta
7+
pull_request:
8+
paths-ignore:
9+
- '.gitignore'
10+
- '.npmignore'
11+
- '*.md'
12+
13+
jobs:
14+
build:
15+
name: Lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repo
20+
uses: actions/checkout@v2
21+
22+
- name: Use Node ${{ matrix.node }}
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: ${{ matrix.node }}
26+
27+
- name: Install deps and build (with cache)
28+
uses: bahmutov/npm-install@v1
29+
30+
- name: Lint
31+
run: |
32+
yarn lint
33+
yarn lint:types
34+
- name: Test
35+
run: yarn test --ci
36+
37+
publish-module:
38+
name: 'Publish Module to NPM on Node ${{ matrix.node }} and ${{ matrix.os }}'
39+
needs: build
40+
if: github.repository == 'react-hook-form/codemod' && (github.ref =='refs/heads/master')
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout repo
44+
uses: actions/checkout@v2
45+
- name: 'Use Node ${{ matrix.node }}'
46+
uses: actions/setup-node@v1
47+
with:
48+
node-version: '${{ matrix.node }}'
49+
registry-url: 'https://registry.npmjs.org/'
50+
- name: Install dependencies
51+
uses: bahmutov/npm-install@v1
52+
- name: Build
53+
run: yarn build
54+
- name: Publish
55+
run: npx semantic-release
56+
env:
57+
NODE_AUTH_TOKEN: '${{secrets.NPM_TOKEN}}'
58+
GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}'

.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Coverage directory used by tools like istanbul
9+
coverage
10+
11+
# Dependency directories
12+
node_modules/
13+
14+
# Optional npm cache directory
15+
.npm
16+
17+
# Optional eslint cache
18+
.eslintcache
19+
20+
# Output of 'npm pack'
21+
*.tgz
22+
23+
# Yarn Integrity file
24+
.yarn-integrity
25+
26+
.DS_Store
27+
dist
28+
.idea/
29+
package-lock.json

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn lint:types && yarn lint-staged

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
transforms/__testfixtures__

0 commit comments

Comments
 (0)