Skip to content
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

Tweaks #448

Comments

@plroebuck
Copy link
Contributor

Description

Minor tweaks to "index.js":

https://github.com/okonet/lint-staged/blob/master/src/index.js#L16
Environment variables are strings. Done canonically:

  process.env.FORCE_COLOR = '1'

https://github.com/okonet/lint-staged/blob/master/src/index.js#L56
Remove this line. It's already the default value.

https://github.com/okonet/lint-staged/blob/master/src/index.js#L61
https://github.com/okonet/lint-staged/blob/master/src/index.js#L81
Would set process.exitCode as the first thing done in each catch block.

@sudo-suhas
Copy link
Collaborator

Hey @plroebuck, thanks for the suggestions! Could you open a PR with these changes?

plroebuck added a commit to plroebuck/lint-staged that referenced this issue May 18, 2018
The "support-color" package expects to parse an integer value. Code was wrongly assigning a boolean
when envvars are strings. Don't see how this ever worked. Additionally removed resetting of
`process.exitCode` to its default value, and migrated `process.exitCode` to top of catch blocks.

Fixes lint-staged#448
okonet pushed a commit that referenced this issue May 18, 2018
The "support-color" package expects to parse an integer value. Code was wrongly assigning a boolean
when envvars are strings. Don't see how this ever worked. Additionally removed resetting of
`process.exitCode` to its default value, and migrated `process.exitCode` to top of catch blocks.

Fixes #448
kornicameister pushed a commit to kornicameister/korni that referenced this issue May 23, 2018
## Overview

The following dependencies have been updated by [dependencies.io](https://www.dependencies.io/):

- `lint-staged` in `package.json` from "7.0.5" to "7.1.2"

## Details

### `lint-staged`

This dependency is located in `package.json` and was updated from "7.0.5" to "7.1.2".

<details>
<summary>7.1.0</summary>

# [7.1.0](lint-staged/lint-staged@v7.0.5...v7.1.0) (2018-05-07)


### Features

* Chunked execution of linters on Windows only ([#439](lint-staged/lint-staged#439)) ([1601c02](lint-staged/lint-staged@1601c02))

</details>

<details>
<summary>7.1.1</summary>

## [7.1.1](lint-staged/lint-staged@v7.1.0...v7.1.1) (2018-05-18)


### Bug Fixes

* **cli:** Correct value for FORCE_COLOR env var ([#451](lint-staged/lint-staged#451)) ([9823d26](lint-staged/lint-staged@9823d26)), closes [#448](lint-staged/lint-staged#448)

</details>

<details>
<summary>7.1.2</summary>

## [7.1.2](lint-staged/lint-staged@v7.1.1...v7.1.2) (2018-05-21)


### Bug Fixes

* **package:** Update cosmiconfig to version 5.0.2 ([#444](lint-staged/lint-staged#444)) ([2fc7aa3](lint-staged/lint-staged@2fc7aa3)), closes [#441](lint-staged/lint-staged#441)
* **package:** Update listr to version 0.14.1 ([#445](lint-staged/lint-staged#445)) ([a56d7c9](lint-staged/lint-staged@a56d7c9)), closes [#426](lint-staged/lint-staged#426)
* Add .lintstagedrc.js to list of config files to search ([9e27620](lint-staged/lint-staged@9e27620))

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment