Skip to content

Commit 7745536

Browse files
author
Matej Lednicky
committed
feat: Update eslint and add prettier
Bump @typeform/eslint-config to 3.0.1
1 parent fccaef9 commit 7745536

File tree

94 files changed

+2680
-2282
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+2680
-2282
lines changed

.eslintignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
**/node_modules/**
2-
dist/**
3-
lib/**
4-
redvelvet/**
1+
node_modules/
2+
dist/
3+
build/
4+
CHANGELOG.md
5+
demo/embed.js

.eslintrc.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
11
module.exports = {
2-
extends: ['@typeform/eslint-config'],
3-
globals: {
4-
Feature: true,
5-
Scenario: true,
6-
within: true,
7-
actor: true,
8-
},
9-
rules: {
10-
"comma-dangle": ["error", "never"],
11-
complexity: 0
12-
}
2+
extends: ['@typeform/eslint-config', 'prettier', 'prettier/react', 'plugin:prettier/recommended'],
133
}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: "[BUG]"
4+
title: '[BUG]'
55
labels: bug
66
assignees: ''
7-
87
---
98

109
**Describe the bug**
1110
A clear and concise description of what the bug is.
1211

1312
**To Reproduce**
1413
Steps to reproduce the behavior:
14+
1515
1. Go to '...'
1616
2. Click on '....'
1717
3. Scroll down to '....'
@@ -27,17 +27,19 @@ A clear and concise description of what the actual behavior is.
2727
If applicable, add screenshots to help explain your problem.
2828

2929
**Desktop (please complete the following information):**
30-
- OS: [e.g. MacOS]
31-
- Browser [e.g. chrome, safari]
32-
- Embed SDK Version [e.g. 22]
33-
- NodeJS version - if applicable
34-
- NPM version - if applicable
30+
31+
- OS: [e.g. MacOS]
32+
- Browser [e.g. chrome, safari]
33+
- Embed SDK Version [e.g. 22]
34+
- NodeJS version - if applicable
35+
- NPM version - if applicable
3536

3637
**Smartphone (please complete the following information):**
37-
- Device: [e.g. iPhone6]
38-
- OS: [e.g. iOS8.1]
39-
- Browser [e.g. chrome, safari]
40-
- Version [e.g. 22]
38+
39+
- Device: [e.g. iPhone6]
40+
- OS: [e.g. iOS8.1]
41+
- Browser [e.g. chrome, safari]
42+
- Version [e.g. 22]
4143

4244
**Additional context**
4345
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: "[FEATURE]"
4+
title: '[FEATURE]'
55
labels: enhancement
66
assignees: ''
7-
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
- [ ] Explain the **motivation** for making this change.
44
- [ ] Provide a solid **test plan** for your changes.
5-
- [ ] Link to the issue - if any [issue number here]()
5+
- [ ] Link to the issue - if any [issue number here]()

.github/workflows/check-no-deploy-window.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Check No Deploy Window
22
on:
33
# Runs every Mon-Friday at 4:00 and 10:00 UTC
44
schedule:
5-
- cron: '0 4,10 * * 1-5'
5+
- cron: '0 4,10 * * 1-5'
66
pull_request:
77
branches:
88
- master

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 2,
4+
"semi": false,
5+
"singleQuote": true
6+
}

.travis.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ dist: xenial
44
language: node_js
55

66
node_js:
7-
- "12"
7+
- '12'
88

99
python:
10-
- "3.6"
10+
- '3.6'
1111

1212
addons:
1313
# https://stackoverflow.com/questions/57903415/travis-ci-chrome-62-instead-of-77
@@ -29,7 +29,7 @@ notifications:
2929
on_pull_requests: true
3030

3131
env:
32-
VERSION: "$TRAVIS_BUILD_NUMBER"
32+
VERSION: '$TRAVIS_BUILD_NUMBER'
3333

3434
before_install:
3535
- export APPLITOOLS_BATCH_ID=`echo ${TRAVIS_PULL_REQUEST_SHA:=$TRAVIS_COMMIT}`
@@ -41,35 +41,35 @@ before_install:
4141

4242
jobs:
4343
include:
44-
- stage: "Test"
45-
name: "Lint"
44+
- stage: 'Test'
45+
name: 'Lint'
4646
if: branch = master
4747
script:
4848
- yarn lint
49-
- name: "Unit Tests"
49+
- name: 'Unit Tests'
5050
if: branch = master
5151
script:
5252
- yarn test:unit
53-
- name: "Functional Tests (Internal)"
53+
- name: 'Functional Tests (Internal)'
5454
if: fork = false AND branch = master
5555
script:
5656
- yarn serve-demo & export EMBED_PID=$!
5757
- yarn test:functional --record --parallel --group functional
5858
- kill $EMBED_PID
59-
- name: "Functional Tests (External)"
59+
- name: 'Functional Tests (External)'
6060
if: fork = true AND branch = master
6161
script:
6262
- yarn serve-demo & export EMBED_PID=$!
6363
- yarn test:functional --record false
6464
- kill $EMBED_PID
65-
- name: "Visual Tests (Internal)"
65+
- name: 'Visual Tests (Internal)'
6666
if: fork = false AND branch = master
6767
script:
6868
- yarn serve-demo & export EMBED_PID=$!
6969
- yarn test:visual --record --parallel --group visual
7070
- kill $EMBED_PID
71-
- stage: "Release"
72-
name: "Deploy Preview to AWS"
71+
- stage: 'Release'
72+
name: 'Deploy Preview to AWS'
7373
# Deploy to preview preview URL for testing purposes. Only deploy pull requests to 'master' branch.
7474
if: (type = pull_request AND branch = master AND fork = false) OR (type = push AND branch =~ /preview-./)
7575
script:
@@ -78,11 +78,11 @@ jobs:
7878
- yarn add @typeform/jarvis
7979
- ./scripts/consolidate-dist.sh
8080
- DEBUG=jarvis yarn run jarvis deploy --path dist --preview --notify-preview
81-
- name: "Release to NPM"
81+
- name: 'Release to NPM'
8282
if: branch = master AND type = push
8383
script:
8484
- yarn semantic-release
85-
- name: "Release to AWS"
85+
- name: 'Release to AWS'
8686
if: branch = master AND type = push
8787
script:
8888
- yarn build

.typeform.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: "Embed"
2-
description: "Library for embedding Typeforms in external websites"
1+
name: 'Embed'
2+
description: 'Library for embedding Typeforms in external websites'
33
team:
4-
name: "Sticky bugs"
5-
slack_channel: "#stick_bug"
4+
name: 'Sticky bugs'
5+
slack_channel: '#stick_bug'
66
metrics:
7-
logging: "https://rpm.newrelic.com/accounts/291864/browser/9223656"
7+
logging: 'https://rpm.newrelic.com/accounts/291864/browser/9223656'
88
ci_url:
9-
- "https://travis-ci.com/Typeform/embed"
10-
- "https://jenkins.typeform.tf/view/Embed/"
11-
deploy_url: "https://s3-eu-west-1.amazonaws.com/share.typeform.com"
9+
- 'https://travis-ci.com/Typeform/embed'
10+
- 'https://jenkins.typeform.tf/view/Embed/'
11+
deploy_url: 'https://s3-eu-west-1.amazonaws.com/share.typeform.com'
1212
dependencies:
13-
- { name: "jarvis", url: "https://github.com/Typeform/jarvis" }
13+
- { name: 'jarvis', url: 'https://github.com/Typeform/jarvis' }

CONTRIBUTING.md

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,31 @@ This document describes how to set up the project locally, our development goals
77
## Local set up
88

99
Requirements:
10-
* `node` >= 12
11-
* `yarn`
12-
* `java` >= 14 (to run visual tests)
10+
11+
- `node` >= 12
12+
- `yarn`
13+
- `java` >= 14 (to run visual tests)
1314

1415
To work with Embed as a developer:
1516

1617
1. [fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) this repository (https://github.com/Typeform/embed)
1718
2. clone your fork:
18-
```bash
19-
$ git clone [email protected]:<your-github-username>/embed.git
20-
$ cd embed
21-
```
19+
```bash
20+
$ git clone [email protected]:<your-github-username>/embed.git
21+
$ cd embed
22+
```
2223
3. install dependencies
23-
```bash
24-
$ yarn
25-
```
24+
```bash
25+
$ yarn
26+
```
2627
4. run:
27-
```bash
28-
$ yarn start # start mock-server and run in development the renderer
29-
$ yarn test # run lint, unit and functional tests
30-
$ yarn test:visual # run visual tests (requires EYES_API_KEY env var for AppliTools)
31-
$ yarn build # build project to ./dist and ./lib
32-
$ yarn clean # delete directories with built files (./dist and ./lib)
33-
```
28+
```bash
29+
$ yarn start # start mock-server and run in development the renderer
30+
$ yarn test # run lint, unit and functional tests
31+
$ yarn test:visual # run visual tests (requires EYES_API_KEY env var for AppliTools)
32+
$ yarn build # build project to ./dist and ./lib
33+
$ yarn clean # delete directories with built files (./dist and ./lib)
34+
```
3435

3536
## Development goals
3637

@@ -50,13 +51,15 @@ If you have an idea for a community project, please [tell us about it](https://t
5051
Submit your changes via [GitHub pull request](https://help.github.com/articles/about-pull-requests/) to [/Typeform/embed](https://github.com/Typeform/embed/pulls) with a clear list of the changes you're making. Only one feature per commit.
5152

5253
Commit messages should follow the [angular project guidelines](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits). In short, your message needs to include:
53-
* type (feat, fix, docs, style, refactor, perf, test, chore, revert)
54-
* scope - uppercase JIRA ticket number goes here, you can leave it empty
55-
* message
56-
* body (optional)
57-
* footer (for breaking change only)
54+
55+
- type (feat, fix, docs, style, refactor, perf, test, chore, revert)
56+
- scope - uppercase JIRA ticket number goes here, you can leave it empty
57+
- message
58+
- body (optional)
59+
- footer (for breaking change only)
5860

5961
Commit message example:
62+
6063
```
6164
type(scope): Commit headline
6265
@@ -66,7 +69,8 @@ Can have multiple lines.
6669
BREAKING CHANGE: This line should explain which changes. It is required onyl for commits with breaking change.
6770
```
6871

69-
Each open pull request will be tested automatically with:
72+
Each open pull request will be tested automatically with:
73+
7074
```bash
7175
$ yarn test
7276
$ yarn test:visual

0 commit comments

Comments
 (0)