Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Update formatting related configs (prettier etc) #37

Merged
merged 13 commits into from
Aug 25, 2020
10 changes: 9 additions & 1 deletion .circleci/config.yml
Expand Up @@ -53,4 +53,12 @@ jobs:
- run: npm run build

# run code linters
- run: npm run lint
- run:
name: Run code linters (ESLint)
command: npm run lint:js
- run:
name: Run code linters (TSLint)
command: npm run lint:ts
- run:
name: Run code linters (Prettier)
command: npm run lint:format
2 changes: 1 addition & 1 deletion .eslintrc.json
@@ -1,3 +1,3 @@
{
"extends": "airbnb-base"
"extends": ["airbnb-base"]
}
8 changes: 8 additions & 0 deletions .prettierignore
@@ -0,0 +1,8 @@
# Ignore artifacts:
/coverage

# lib contains compiled typescript to js code
/lib

# changelog is generated by github_changelog_generator gem
CHANGELOG.md
3 changes: 3 additions & 0 deletions .prettierrc.json
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
52 changes: 42 additions & 10 deletions CHANGELOG.md
@@ -1,13 +1,31 @@
# Change Log
# Changelog

## [Unreleased](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/HEAD)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v3.1.0...HEAD)

**Implemented enhancements:**

- Use @knapsack-pro/core 3.0.0 [\#36](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/36) ([ArturT](https://github.com/ArturT))

**Closed issues:**

- Update cypress dependency [\#32](https://github.com/KnapsackPro/knapsack-pro-cypress/issues/32)

**Merged pull requests:**

- Use Node 12.18.3 LTS in development and update README requirements [\#35](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/35) ([ArturT](https://github.com/ArturT))

## [v3.1.0](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v3.1.0) (2020-07-30)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v3.0.0...v3.1.0)

**Merged pull requests:**

- Update cypress dependency to \>= 4.9.0 [\#33](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/33) ([ArturT](https://github.com/ArturT))

## [v3.0.0](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v3.0.0) (2020-06-27)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v2.0.0...v3.0.0)

**Implemented enhancements:**
Expand All @@ -20,18 +38,21 @@
- Bump minimist from 1.2.0 to 1.2.3 [\#28](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/28) ([dependabot[bot]](https://github.com/apps/dependabot))

## [v2.0.0](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v2.0.0) (2020-02-20)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v1.7.0...v2.0.0)

**Merged pull requests:**

- Update dependency to use Cypress 4.x [\#26](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/26) ([ArturT](https://github.com/ArturT))

## [v1.7.0](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v1.7.0) (2019-11-22)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v1.6.0...v1.7.0)

**Implemented enhancements:**

- Run tests only when they are detected on the disk. Do not run tests when the test file pattern is invalid. Require to set KNAPSACK\_PRO\_TEST\_FILE\_PATTERN [\#21](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/21) ([ArturT](https://github.com/ArturT))
- Add support for Codefresh.io CI provider [\#19](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/19) ([ArturT](https://github.com/ArturT))

**Merged pull requests:**

Expand All @@ -41,67 +62,68 @@
- Bump extend from 3.0.1 to 3.0.2 [\#22](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/22) ([dependabot[bot]](https://github.com/apps/dependabot))

## [v1.6.0](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v1.6.0) (2019-10-13)
[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v1.5.1...v1.6.0)

**Implemented enhancements:**

- Add support for Codefresh.io CI provider [\#19](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/19) ([ArturT](https://github.com/ArturT))
[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v1.5.1...v1.6.0)

## [v1.5.1](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v1.5.1) (2019-09-26)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v1.5.0...v1.5.1)

**Fixed bugs:**

- fix\(bug\): When Cypress crashed then exit code should be 1 [\#18](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/18) ([ArturT](https://github.com/ArturT))

## [v1.5.0](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v1.5.0) (2019-09-15)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v1.4.1...v1.5.0)

**Implemented enhancements:**

- Update @knapsack-pro/core 1.5.0 to add support for GitHub Actions [\#17](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/17) ([ArturT](https://github.com/ArturT))

## [v1.4.1](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v1.4.1) (2019-09-04)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v1.4.0...v1.4.1)

**Fixed bugs:**

- Update @knapsack-pro/core 1.4.1 [\#16](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/16) ([ArturT](https://github.com/ArturT))

## [v1.4.0](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v1.4.0) (2019-08-23)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v1.3.1...v1.4.0)

**Implemented enhancements:**

- Update @knapsack-pro/core 1.4.0 and update docs for Semaphore 2.0 [\#15](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/15) ([ArturT](https://github.com/ArturT))

## [v1.3.1](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v1.3.1) (2019-07-06)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v1.3.0...v1.3.1)

**Fixed bugs:**

- Update @knapsack-pro/core 1.3.1 [\#14](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/14) ([ArturT](https://github.com/ArturT))

## [v1.3.0](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v1.3.0) (2019-04-14)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v1.2.0...v1.3.0)

**Implemented enhancements:**

- Reduce data transfer and speed up usage of Knapsack Pro API for Queue Mode [\#13](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/13) ([ArturT](https://github.com/ArturT))

## [v1.2.0](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v1.2.0) (2019-03-15)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v1.1.0...v1.2.0)

**Implemented enhancements:**

- Pass CLI arguments to cypress.run [\#10](https://github.com/KnapsackPro/knapsack-pro-cypress/issues/10)
- Add support for Semaphore CI 2.0 [\#12](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/12) ([ArturT](https://github.com/ArturT))

**Fixed bugs:**

- Pass CLI arguments to cypress.run [\#10](https://github.com/KnapsackPro/knapsack-pro-cypress/issues/10)

## [v1.1.0](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v1.1.0) (2019-03-07)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v1.0.1...v1.1.0)

**Implemented enhancements:**
Expand All @@ -113,9 +135,11 @@
- Update package dependencies [\#9](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/9) ([rafaltrzop](https://github.com/rafaltrzop))

## [v1.0.1](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v1.0.1) (2018-12-29)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v1.0.0...v1.0.1)

## [v1.0.0](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v1.0.0) (2018-12-29)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v0.3.1...v1.0.0)

**Implemented enhancements:**
Expand All @@ -128,16 +152,19 @@
- Add Prettier and configure TSLint [\#6](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/6) ([ArturT](https://github.com/ArturT))

## [v0.3.1](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v0.3.1) (2018-11-15)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v0.3.0...v0.3.1)

## [v0.3.0](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v0.3.0) (2018-11-15)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v0.2.1...v0.3.0)

**Implemented enhancements:**

- Add support for GitLab \>= 11.5 env variables [\#5](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/5) ([ArturT](https://github.com/ArturT))

## [v0.2.1](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v0.2.1) (2018-10-22)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v0.2.0...v0.2.1)

**Fixed bugs:**
Expand All @@ -147,12 +174,17 @@
- Filter bin files from proper out dir [\#1](https://github.com/KnapsackPro/knapsack-pro-cypress/pull/1) ([ArturT](https://github.com/ArturT))

## [v0.2.0](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v0.2.0) (2018-09-15)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v0.1.2...v0.2.0)

## [v0.1.2](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v0.1.2) (2018-09-14)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/v0.1.1...v0.1.2)

## [v0.1.1](https://github.com/KnapsackPro/knapsack-pro-cypress/tree/v0.1.1) (2018-09-14)

[Full Changelog](https://github.com/KnapsackPro/knapsack-pro-cypress/compare/2b61b43cfe89059e8ac93eaebffc7918989c09af...v0.1.1)



\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
65 changes: 17 additions & 48 deletions README.md
Expand Up @@ -10,6 +10,7 @@ Read article about [runnning javascript E2E tests faster with Cypress on paralle

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

## Table of Contents

- [Installation](#installation)
Expand Down Expand Up @@ -166,7 +167,7 @@ You can parallelize your CI build across virtual machines with [travis matrix fe
```yaml
# .travis.yml
script:
- "$(npm bin)/knapsack-pro-cypress"
- '$(npm bin)/knapsack-pro-cypress'

env:
global:
Expand Down Expand Up @@ -212,7 +213,7 @@ When using the `docker-compose` plugin on Buildkite, you have to tell it which e

```yaml
steps:
- label: "Test"
- label: 'Test'
parallelism: 2
plugins:
- docker-compose#3.0.3:
Expand Down Expand Up @@ -549,32 +550,32 @@ Below you can find Codefresh YAML config and `Test.Dockerfile` used by Codefresh

```yaml
# .codefresh/codefresh.yml
version: "1.0"
version: '1.0'

stages:
- "clone"
- "build"
- "tests"
- 'clone'
- 'build'
- 'tests'

steps:
main_clone:
type: "git-clone"
description: "Cloning main repository..."
repo: "${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}"
revision: "${{CF_BRANCH}}"
stage: "clone"
type: 'git-clone'
description: 'Cloning main repository...'
repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
revision: '${{CF_BRANCH}}'
stage: 'clone'
BuildTestDockerImage:
title: Building Test Docker image
type: build
arguments:
image_name: "${{CF_ACCOUNT}}/${{CF_REPO_NAME}}-test"
tag: "${{CF_BRANCH_TAG_NORMALIZED}}-${{CF_SHORT_REVISION}}"
image_name: '${{CF_ACCOUNT}}/${{CF_REPO_NAME}}-test'
tag: '${{CF_BRANCH_TAG_NORMALIZED}}-${{CF_SHORT_REVISION}}'
dockerfile: Test.Dockerfile
stage: "build"
stage: 'build'

run_tests:
stage: "tests"
image: "${{BuildTestDockerImage}}"
stage: 'tests'
image: '${{BuildTestDockerImage}}'
working_directory: /src
fail_fast: false
environment:
Expand Down Expand Up @@ -744,27 +745,6 @@ You can use [NVM](https://github.com/nvm-sh/nvm) to manage Node version in devel

6. Set up your IDE:

- WebStorm / PhpStorm

- Install the following plugins:

- [Prettier](https://plugins.jetbrains.com/plugin/10456-prettier)
- [EditorConfig](https://plugins.jetbrains.com/plugin/7294-editorconfig)
- [.ignore](https://plugins.jetbrains.com/plugin/7495--ignore)
- [.env files support](https://plugins.jetbrains.com/plugin/9525--env-files-support)

- Go to `File > Settings > Languages & Frameworks > JavaScript > Code Quality Tools > ESLint`

Turn on `Enable` checkbox.

- Go to `File > Settings > Languages & Frameworks > TypeScript > TSLint`

Turn on `Enable` checkbox.

- Go to `File > Settings > Tools > File Watchers`

Click `Import` button and select `watchers.xml` file from the repository.

- Visual Studio Code

- Install the following plugins:
Expand All @@ -774,17 +754,6 @@ You can use [NVM](https://github.com/nvm-sh/nvm) to manage Node version in devel
- [TypeScript TSLint Plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin)
- [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)

- Go to `File > Preferences > Settings > Extensions > Prettier - Code formatter`

- Turn on `Prettier: Eslint Integration` checkbox.
- Turn on `Prettier: Tslint Integration` checkbox. If you can't find this checkbox, use `Ctrl + Shift + P` shortcut to find `Preferences: Open Settings (JSON)` option. Add below line to your settings file:

```
{
"prettier.tslintIntegration": true
}
```

- Go to `File > Preferences > Settings > Text Editor > Formatting`

Turn on `Format On Save` checkbox.
Expand Down
3 changes: 2 additions & 1 deletion gulpfile.babel.js
Expand Up @@ -13,7 +13,8 @@ const paths = {
function compile() {
const filterBinFiles = gFilter(
`${tsProject.config.compilerOptions.outDir}/knapsack-pro-cypress.js`,
{ restore: true },
// eslint-disable-next-line comma-dangle
{ restore: true }
);

return (
Expand Down