Skip to content

chore(REACH-458): use typeform eslint and prettier config #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# output folder
dist/
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@typeform/eslint-config'],
}
19 changes: 13 additions & 6 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
---
name: Bug Report
about: Report a bug if something isn't working as expected

---

<!-- Make sure to include as much information as possible so we can fix it as quickly as possible. -->
<!-- If you know how to fix this bug, please open a pull request on https://github.com/Typeform/js-api-client/compare/?template=bugs.md -->
<!-- If you can't answer some sections, please delete them -->

## Description

<!-- Provide a description of this bug -->

## Expected Behavior

<!-- Tell us what should happen -->

## Current Behavior

<!-- Tell us what happens instead -->

## Possible Solution

<!-- Suggest a fix or reason for this bug -->

## Steps to Reproduce

<!-- Provide a link to a live example or steps to reproduce this bug -->

## Screenshots

<!-- Add screenshots of this bug -->

## Your Environment

<!-- Include as many relevant details about the environment you experienced the bug in -->
* Client Version:
* Node.js Version:
* NPM Version:
* Browser Name and Version:
* Operating System and Version:

- Client Version:
- Node.js Version:
- NPM Version:
- Browser Name and Version:
- Operating System and Version:
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
---
name: Feature Request
about: Suggest an idea for this project

---

<!-- Make sure to include as much information as possible so we can add it as quickly as possible. -->
<!-- If you know how to add this feature, please open a pull request on https://github.com/Typeform/js-api-client/compare/?template=features.md -->
<!-- If you can't answer some sections, please delete them -->

## Description

<!-- Provide a description of this change or addition -->

## Context

<!-- Why is this change important to you? How would you use it? How can it benefit other users? -->

## Possible Solution

<!-- Suggest an idea for implementing this change or addition -->

## Screenshots

<!-- Add optional screenshots of this change or addition -->
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/support-question.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
name: Support Question
about: Ask a general support question about this project

---
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/bugs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@
<!-- If you can't answer some sections, please delete them -->

## Description

<!-- Describe your changes in detail -->

## Motivation and Context

<!-- Why is this change required? What problem does it solve? -->
<!-- If it fixes an open issue, please link to the issue here -->

## Testing

<!-- Please describe in detail how you tested your changes -->
<!-- Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc.-->

## Backward Compatibility

<!-- Will your changes brake backward compatibility or not? -->

## Screenshots

<!-- Add screenshots of your changes -->
4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@
<!-- If you can't answer some sections, please delete them -->

## Description

<!-- Describe your changes in detail -->

## Motivation and Context

<!-- Why is this change required? How can it benefit other users? -->
<!-- If it is from an open issue, please link to the issue here -->

## Testing

<!-- Please describe in detail how you tested your changes -->
<!-- Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc

## Backward Compatibility
<!-- Will your changes brake backward compatibility or not? -->

## Screenshots

<!-- Add screenshots of your changes -->
2 changes: 1 addition & 1 deletion .github/workflows/ci-standard-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
- name: CI Standard Checks
uses: Typeform/ci-standard-checks@v1
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
64 changes: 32 additions & 32 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

We'd love for you to contribute to our source code and to help make Typeform products even better than they are today! Here are the guidelines we'd like you to follow:

* [Code of Conduct](#code-of-conduct)
* [Issues and Bugs](#issues-and-bugs)
* [Submission Guidelines](#submission-guidelines)
* [Commit Message Guidelines](#commit-message-guidelines)
- [Code of Conduct](#code-of-conduct)
- [Issues and Bugs](#issues-and-bugs)
- [Submission Guidelines](#submission-guidelines)
- [Commit Message Guidelines](#commit-message-guidelines)

## Code of Conduct

Expand Down Expand Up @@ -33,37 +33,37 @@ Before you submit your issue, try searching [past issues][archive] or [StackOver

If your issue appears to be a bug, and hasn't been reported, open a new issue. Providing the following information will increase the chances of your issue being dealt with quickly:

* **Description of the Issue** - if an error is being thrown a non-minified stack trace helps
* **Motivation for or Use Case** - explain why this is a bug for you
* **Related Issues** - has a similar issue been reported before?
* **Environment Configuration** - is this a problem with Node.js, or only a specific browser? Is this only in a specific version of the library?
* **Reproduce the Error** - provide a live example (like on [StackBlitz](https://stackblitz.com/)), a Github repo, or an unambiguous set of steps
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be causing the problem (line of code or commit)
- **Description of the Issue** - if an error is being thrown a non-minified stack trace helps
- **Motivation for or Use Case** - explain why this is a bug for you
- **Related Issues** - has a similar issue been reported before?
- **Environment Configuration** - is this a problem with Node.js, or only a specific browser? Is this only in a specific version of the library?
- **Reproduce the Error** - provide a live example (like on [StackBlitz](https://stackblitz.com/)), a Github repo, or an unambiguous set of steps
- **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be causing the problem (line of code or commit)

### Submitting a Pull Request

#### Pull Request Guidelines

* Search [GitHub][pulls] for an open or closed Pull Request that relates to your submission. You don't want to duplicate effort.
* Create an issue to discuss a change before submitting a PR. We'd hate to have to turn down your contributions because of something that could have been communicated early on.
* [Create a fork of the GitHub repo][fork-repo] to ensure that you can push your changes for us to review.
* Make your changes in a new git branch:
- Search [GitHub][pulls] for an open or closed Pull Request that relates to your submission. You don't want to duplicate effort.
- Create an issue to discuss a change before submitting a PR. We'd hate to have to turn down your contributions because of something that could have been communicated early on.
- [Create a fork of the GitHub repo][fork-repo] to ensure that you can push your changes for us to review.
- Make your changes in a new git branch:

```shell
git checkout -b my-fix-branch dev
```

* Create your patch, **including appropriate test cases**. Patches with tests are more likely to be merged.
* Avoid checking in files that shouldn't be tracked (e.g `node_modules`, `gulp-cache`, `.tmp`, `.idea`). If your development setup automatically creates some of these files, please add them to the `.gitignore` at the root of the package (click [here][gitignore] to read more on how to add entries to the `.gitignore`).
* Commit your changes using a commit message that follows our [commit message guidelines](#commit-message-guidelines).
- Create your patch, **including appropriate test cases**. Patches with tests are more likely to be merged.
- Avoid checking in files that shouldn't be tracked (e.g `node_modules`, `gulp-cache`, `.tmp`, `.idea`). If your development setup automatically creates some of these files, please add them to the `.gitignore` at the root of the package (click [here][gitignore] to read more on how to add entries to the `.gitignore`).
- Commit your changes using a commit message that follows our [commit message guidelines](#commit-message-guidelines).

```shell
git commit -a
```

_Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files._

* Test your changes locally to ensure everything is in good working order:
- Test your changes locally to ensure everything is in good working order:

```shell
# Run the server in one terminal window
Expand All @@ -76,22 +76,22 @@ If your issue appears to be a bug, and hasn't been reported, open a new issue. P
yarn test:integration
```

* Push your branch to your fork on GitHub:
- Push your branch to your fork on GitHub:

```shell
git push origin my-fix-branch
```

* In GitHub, send a pull request to `js-api-client:main`.
* All pull requests must be reviewed by a member of the Typeform team, who will merge it when/if they feel it is good to go.
- In GitHub, send a pull request to `js-api-client:main`.
- All pull requests must be reviewed by a member of the Typeform team, who will merge it when/if they feel it is good to go.

## Commit Message Guidelines

We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**. But also, we use the git commit messages to **generate the project change log**.
We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**. But also, we use the git commit messages to **generate the project change log**.

### Commit Message Format

Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**:
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**:

```text
<type>(<scope>): <subject>
Expand All @@ -111,15 +111,15 @@ If the commit reverts a previous commit, it should begin with `revert:`, followe

Must be one of the following:

* **feat**: A new feature
* **fix**: A bug fix
* **docs**: Documentation only changes
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **perf**: A code change that improves performance
* **test**: Adding missing tests or correcting existing tests
* **build**: Changes that affect the build system, CI configuration or external dependencies (example scopes: gulp, broccoli, npm)
* **chore**: Other changes that don't modify `src` or `test` files
- **feat**: A new feature
- **fix**: A bug fix
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing tests or correcting existing tests
- **build**: Changes that affect the build system, CI configuration or external dependencies (example scopes: gulp, broccoli, npm)
- **chore**: Other changes that don't modify `src` or `test` files

That's it! Thank you for your contribution!

Expand Down
Loading