Skip to content

Commit

Permalink
chore: fix husky (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed May 11, 2022
1 parent 40d05eb commit 1b2e48f
Show file tree
Hide file tree
Showing 207 changed files with 1,357 additions and 3,511 deletions.
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**/node_modules
docs
docs-references
**/lib
**/build
**/dist
**/coverage
**/.nyc_output
**/node_modules
*-lock.json
*.lock
benchmarks.*
**/generated
47 changes: 27 additions & 20 deletions packages/react-formio/.eslintrc → .eslintrc
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"standard",
"standard-react",
"prettier/standard",
"react-app",
"react-app/jest",
"prettier/react",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended"
"plugin:jsx-a11y/strict"
],
"plugins": [
"prettier",
"react-hooks"
],
"env": {
"node": true,
"jest": true
},
"parserOptions": {
"ecmaVersion": 2020,
"ecmaFeatures": {
"legacyDecorators": true,
"jsx": true
}
},
"settings": {
"react": {
"version": "16"
}
"sourceType": "module"
},
"rules": {
"semi": ["error", "always"],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"@typescript-eslint/no-redeclare": 0,
"semi": [
"error",
"always"
],
"space-before-function-paren": 0,
"react/prop-types": 0,
"react/jsx-handler-names": 0,
Expand All @@ -41,7 +37,18 @@
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-var-requires": 0,
"import/export": 0,
"jsx-a11y/no-autofocus": 1
}
},
"overrides": [
{
"files": [
"*.stories.{js,jsx,ts,tsx}"
],
"rules": {
"jsx-a11y/anchor-is-valid": 0
}
}
]
}
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/01_bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@ about: Create a report to help us improve
title: "[BUG] Title"
labels: bug
assignees: Romakita

---

## Information

- **Version:**
- **Version:**
- Packages:
- [ ] @tsed/formio-tailwind
- [ ] @tsed/formio-tailwind
- [ ] @tsed/react-formio
- [ ] @tsed/react-formio-container
- [ ] @tsed/redux-utils
- [ ] @tsed/redux-utils

A few sentences describing the overall goals of the issue.

Expand Down
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/02_feature-request.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
name: "\U0001F680 Feature request"
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement
assignees: Romakita

---

## Informations

**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 [...]

Expand All @@ -19,7 +19,6 @@ import {} from "@tsed/react-formio";
```


**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

Expand Down
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/03_question.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ about: Ask a question about @tsed/react-formio
title: "[QUESTION] Title"
labels: question
assignees: Romakita

---


5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/04_say-thank-you.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: "❤️ Say thank you"
about: Tell us how you use Ts.ED & support our efforts in maintaining it
title: ''
labels: ''
title: ""
labels: ""
assignees: Romakita

---

# ❤️ I'm using Ts.ED
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 14.x ]
node-version: [14.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -33,7 +33,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [ 14.x ]
node-version: [14.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -53,7 +53,7 @@ jobs:

strategy:
matrix:
node-version: [ 14.x ]
node-version: [14.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -76,15 +76,14 @@ jobs:
package.json
packages/*/package.json
publish-pages:
runs-on: ubuntu-latest
needs: deploy-packages
if: ${{ github.event_name != 'pull_request' && (contains(github.ref, 'master') || contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc')) }}

strategy:
matrix:
node-version: [ 14.x ]
node-version: [14.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -99,4 +98,4 @@ jobs:
CI: true
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn publish:storybook
run: yarn publish:storybook
2 changes: 1 addition & 1 deletion .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/post-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

git update-index --again
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged $1
2 changes: 1 addition & 1 deletion packages/react-formio/.prettierrc → .prettierrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"printWidth": 140,
"singleQuote": false,
"jsxSingleQuote": true,
"semi": true,
"tabWidth": 2,
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "always",
"trailingComma": "none"
}
30 changes: 15 additions & 15 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive
environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual
attention or advances
* Trolling, insulting/derogatory comments, and personal or political
attacks
* Public or private harassment
* Publishing others' private information, such as a physical or
electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate
in a professional setting
- The use of sexualized language or imagery and unwelcome sexual
attention or advances
- Trolling, insulting/derogatory comments, and personal or political
attacks
- Public or private harassment
- Publishing others' private information, such as a physical or
electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate
in a professional setting

Project maintainers are responsible for clarifying the standards of
acceptable behavior and are expected to take appropriate and fair
Expand All @@ -53,7 +53,7 @@ at https://gitter.im/Tsed-io/community. All complaints will be
reviewed and investigated and will result in a response that is deemed
necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of
an incident. Further details of specific enforcement policies may be
an incident. Further details of specific enforcement policies may be
posted separately.

Project maintainers who do not follow or enforce the Code of Conduct
Expand Down
14 changes: 9 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Contributing
# Contributing

## Introduction

First, thank you for considering contributing to Ts.ED! It is people like you that make the open source community such a great community! 😊
Expand All @@ -23,15 +24,15 @@ Code review process
The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge. It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you?

---

### WARNING

Ts.ED project uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/) as format commit message.

Release note and tagging version are based on the message commits.
If you don't follow the format, our CI won't be able to increment the version correctly and your feature won't be released on NPM.

To write your commit message, see [convention page here](https://www.conventionalcommits.org/en/v1.0.0-beta.4/)
---
> To write your commit message, see [convention page here](https://www.conventionalcommits.org/en/v1.0.0-beta.4/)
## Financial contributions

Expand All @@ -42,6 +43,7 @@ We also welcome financial contributions in full transparency on our open collect
If you have any questions, create an [issue](https://github.com/TypedProject/tsed/issues) (protip: do a quick search first to see if someone else didn't ask the same question before!). You can also reach us at https://gitter.im/Tsed-io/community.

## How to work on Ts.ED

### Setup

Clone your fork of the repository
Expand All @@ -51,9 +53,11 @@ $ git clone https://github.com/YOUR_USERNAME/tsed-formio.git
```

Install npm dependencies with yarn (not with NPM!):

```bash
yarn
```

> After installing dependencies, yarn/npm run the `postinstall` hook and mounted all packages with `npm link`.
Compile TypeScript:
Expand Down Expand Up @@ -88,6 +92,7 @@ git commit -m "feat(domain): Your message"
```

Then:

```bash
npm run test
git fetch
Expand Down Expand Up @@ -132,18 +137,17 @@ The review is always takes priority over other tasks. We can validate the PR ver
- Feel free to ask for help from other members of the Ts.ED team.

## Credits

### Contributors

<a href="https://github.com/TypedProject/ts-express-decorators/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>


### Backers

Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tsed#backer)]

<a href="https://opencollective.com/tsed#backers" target="_blank"><img src="https://opencollective.com/tsed/backers.svg?width=890"></a>


### Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)]
Expand Down
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ Dedicated repository for Formio front-end related packages.

## Features

* Provide an alternative of react-formio ([@tsed/react-formio](./packages/react-formio/readme.md)) wrapper with some improvement.
* Provide a better TypeScript support,
* Provide a [@tsed/tailwind-formio](./packages/tailwind-formio/readme.md) package to support tailwind CSS framework with formio.
* Provide a lightweight redux utils packages.
* Provide a [storybook](https://formio.tsed.io)
- Provide an alternative of react-formio ([@tsed/react-formio](./packages/react-formio/readme.md)) wrapper with some improvement.
- Provide a better TypeScript support,
- Provide a [@tsed/tailwind-formio](./packages/tailwind-formio/readme.md) package to support tailwind CSS framework with formio.
- Provide a lightweight redux utils packages.
- Provide a [storybook](https://formio.tsed.io)

## Documentation

Expand All @@ -53,18 +53,17 @@ Documentation is available on [https://formio.tsed.io](https://formio.tsed.io).
- [@tsed/tailwind-formio](./packages/tailwind-formio/readme.md)

## Contributors

Please read [contributing guidelines here](./CONTRIBUTING.md).

<a href="https://github.com/TypedProject/tsed/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>


## Backers

Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tsed#backer)]

<a href="https://opencollective.com/tsed#backers" target="_blank"><img src="https://opencollective.com/tsed/tiers/backer.svg?width=890"></a>


## Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)]
Expand All @@ -82,4 +81,3 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

[travis]: https://travis-ci.org/

Loading

0 comments on commit 1b2e48f

Please sign in to comment.