Skip to content

Commit

Permalink
upgrade all dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Sep 28, 2018
1 parent 0976e27 commit 4de0198
Show file tree
Hide file tree
Showing 14 changed files with 1,786 additions and 1,244 deletions.
10 changes: 3 additions & 7 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
{
"presets": [
[
"env",
"@babel/preset-env",
{
"useBuiltIns": true,
"targets": {
"node": "4"
},
"exclude": [
"transform-regenerator"
]
"node": "6"
}
}
]
]
Expand Down
1 change: 0 additions & 1 deletion .dockerignore

This file was deleted.

7 changes: 3 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
**/node_modules
build

build/
**/coverage/
integrationTests/__fixtures__/skipped/__eslint__/file.js
integrationTests/__fixtures__/
examples/
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package.json
build/
23 changes: 9 additions & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
{
"editor.rulers": [80],
"files.exclude": {
"**/.git": true,
"**/node_modules": true,
"**/build": true
},
"prettier.parser": "flow",
"prettier.printWidth": 80,
"prettier.singleQuote": true,
"prettier.trailingComma": "all",
"prettier.semi": true,
"editor.formatOnSave": true,
"prettier.eslintIntegration": true
}
"editor.rulers": [80],
"files.exclude": {
"**/.git": true,
"**/node_modules": true,
"**/build": true
},
"editor.formatOnSave": true,
"prettier.eslintIntegration": true
}
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
## 0.6.0

### Fixes
* cli options rules should be passed as an object instead of array of strings ([#39](https://github.com/jest-community/jest-runner-eslint/pull/39))

- cli options rules should be passed as an object instead of array of strings ([#39](https://github.com/jest-community/jest-runner-eslint/pull/39))

## 0.5.0

### Other
* refactor: use create-jest-runner ([#37](https://github.com/jest-community/jest-runner-eslint/pull/37))
* Document usage with other Jest runners ([#34](https://github.com/jest-community/jest-runner-eslint/pull/34))

## 0.4.0
- refactor: use create-jest-runner ([#37](https://github.com/jest-community/jest-runner-eslint/pull/37))
- Document usage with other Jest runners ([#34](https://github.com/jest-community/jest-runner-eslint/pull/34))

## 0.4.0
28 changes: 13 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
### Setup up your dev environment

1. Fork the repo and create your branch from `master`.
A guide on how to fork a repository: https://help.github.com/articles/fork-a-repo/

1. Fork the repo and create your branch from `master`. A guide on how to fork a repository: https://help.github.com/articles/fork-a-repo/

Open terminal (e.g. Terminal, iTerm, Git Bash or Git Shell) and type:

```sh
git clone https://github.com/<your_username>/jest-runner-eslint
cd jest
git checkout -b my_branch
```
Note:
Replace `<your_username>` with your GitHub username

2. jest-runner-eslint uses [Yarn](https://code.facebook.com/posts/1840075619545360)
for running development scripts. If you haven't already done so,
please [install yarn](https://yarnpkg.com/en/docs/install).
Note: Replace `<your_username>` with your GitHub username

2. jest-runner-eslint uses [Yarn](https://code.facebook.com/posts/1840075619545360) for running development scripts. If you haven't already done so, please [install yarn](https://yarnpkg.com/en/docs/install).
3. Run `yarn`.
```sh
yarn
```
5. If you've changed APIs, update the documentation.
```sh
yarn
```
4. If you've changed APIs, update the documentation.

6. Ensure the test suite passes via `yarn test`. To run the test suite you
5. Ensure the test suite passes via `yarn test`. To run the test suite you

```sh
yarn test
```
```
99 changes: 50 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<img src="https://user-images.githubusercontent.com/574806/30197438-9681385c-941c-11e7-80a8-2b11f15bd412.gif">
</div>


## Usage

### Install
Expand All @@ -27,31 +26,32 @@ yarn add --dev jest jest-runner-eslint
# or with NPM

npm install --save-dev jest jest-runner-eslint

```

### Add it to your Jest config

#### Standalone

In your `package.json`

```json
{
"jest": {
"runner": "jest-runner-eslint",
"displayName": "lint",
"testMatch": ["<rootDir>/src/**/*.js"],
"testMatch": ["<rootDir>/src/**/*.js"]
}
}
```

Or in `jest.config.js`

```js
module.exports = {
runner: 'jest-runner-eslint',
displayName: 'lint',
testMatch: ['<rootDir>/src/**/*.js'],
}
};
```

Please update `testMatch` to match your project folder structure
Expand All @@ -66,16 +66,16 @@ If you are using Jest <22.0.5, you can use multiple Jest configuration files and
// jest-test.config.js
module.exports = {
// your Jest test options
displayName: 'test'
}
displayName: 'test',
};

// jest-eslint.config.js
module.exports = {
// your jest-runner-eslint options
runner: 'jest-runner-eslint',
displayName: 'lint',
testMatch: ['<rootDir>/src/**/*.js']
}
testMatch: ['<rootDir>/src/**/*.js'],
};
```

In your `package.json`:
Expand All @@ -97,9 +97,9 @@ Or in `jest.config.js`:
module.exports = {
projects: [
'<rootDir>/jest-test.config.js',
'<rootDir>/jest-eslint.config.js'
]
}
'<rootDir>/jest-eslint.config.js',
],
};
```

If you are using Jest >=22.0.5, you can supply an array of project configuration objects instead. In your `package.json`:
Expand All @@ -114,9 +114,9 @@ If you are using Jest >=22.0.5, you can supply an array of project configuration
{
"runner": "jest-runner-eslint",
"displayName": "lint",
"testMatch": ["<rootDir>/src/**/*.js"],
"testMatch": ["<rootDir>/src/**/*.js"]
}
]
]
}
}
```
Expand All @@ -127,32 +127,33 @@ Or in `jest.config.js`:
module.exports = {
projects: [
{
displayName: 'test'
displayName: 'test',
},
{
runner: 'jest-runner-eslint',
displayName: 'lint',
testMatch: ['<rootDir>/src/**/*.js']
}
]
}
testMatch: ['<rootDir>/src/**/*.js'],
},
],
};
```

### Run Jest

```bash
yarn jest
```


## Options

This project uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig), so you can provide config via:
* a `jest-runner-eslint` property in your `package.json`
* a `jest-runner-eslint.config.js` JS file
* a `.jest-runner-eslintrc` JSON file

- a `jest-runner-eslint` property in your `package.json`
- a `jest-runner-eslint.config.js` JS file
- a `.jest-runner-eslintrc` JSON file

In `package.json`

```json
{
"jest-runner-eslint": {
Expand All @@ -164,40 +165,40 @@ In `package.json`
```

or in `jest-runner-eslint.config.js`

```js
module.exports = {
cliOptions: {
// Options here
}
}
},
};
```


### cliOptions

jest-runner-eslint maps a lot of ESLint CLI arguments to config options. For example `--fix` is `cliOptions.fix`

|option|default|example
|-----|-----|-----|
|cache|`false`|`"cache": true`
|cacheLocation|`.eslintcache`|`"cacheLocation": "/path/to/cache"`
|config|`null`|`"config": "/path/to/config"`
|env|`null`|`"env": "mocha"` or `"env": ["mocha", "other"]`
|ext|`[".js"]`|`"ext": ".jsx"` or `"ext": [".jsx", ".ts"]`
|fix|`false`|`"fix": true`
|fixDryRun|`false`|`"fixDryRun": true`
|format|`null`|`"format": "codeframe"`
|global|`[]`|`"global": "it"` or `"global": ["it", "describe"]`
|ignorePath|`null`|`"ignorePath": "/path/to/ignore"`
|ignorePattern|`[]`|`"ignorePattern": ["/path/to/ignore/*"]`
|maxWarnings|`-1`|`"maxWarnings": 0`
|noEslintrc|`false`|`"noEslintrc": true`
|noIgnore|`false`|`"noIgnore": true`
|noInlineConfig|`false`|`"noInlineConfig": true`
|parser|`espree`|`"parser": "flow"`
|parserOptions|`{}`|`"parserOptions": { "myOption": true }`
|plugin|`[]`|`"plugin": "prettier"` or `"plugin": ["pettier", "other"]`
|quiet|`true`|`"quiet": false`
|reportUnusedDisableDirectives|`false`|`"reportUnusedDisableDirectives": true`
|rules|`null`|`"rules": {"quotes": [2, "double"]}` or `"rules": {"quotes": [2, "double"], "no-console": 2}`
|rulesdir|`[]`|`"rulesdir": "/path/to/rules/dir"` or `"env": ["/path/to/rules/dir", "/path/to/other"]`
| option | default | example |
| ----------------------------- | -------------- | --------------------------------------------------------------------------------------------- |
| cache | `false` | `"cache": true` |
| cacheLocation | `.eslintcache` | `"cacheLocation": "/path/to/cache"` |
| config | `null` | `"config": "/path/to/config"` |
| env | `null` | `"env": "mocha"` or `"env": ["mocha", "other"]` |
| ext | `[".js"]` | `"ext": ".jsx"` or `"ext": [".jsx", ".ts"]` |
| fix | `false` | `"fix": true` |
| fixDryRun | `false` | `"fixDryRun": true` |
| format | `null` | `"format": "codeframe"` |
| global | `[]` | `"global": "it"` or `"global": ["it", "describe"]` |
| ignorePath | `null` | `"ignorePath": "/path/to/ignore"` |
| ignorePattern | `[]` | `"ignorePattern": ["/path/to/ignore/*"]` |
| maxWarnings | `-1` | `"maxWarnings": 0` |
| noEslintrc | `false` | `"noEslintrc": true` |
| noIgnore | `false` | `"noIgnore": true` |
| noInlineConfig | `false` | `"noInlineConfig": true` |
| parser | `espree` | `"parser": "flow"` |
| parserOptions | `{}` | `"parserOptions": { "myOption": true }` |
| plugin | `[]` | `"plugin": "prettier"` or `"plugin": ["pettier", "other"]` |
| quiet | `true` | `"quiet": false` |
| reportUnusedDisableDirectives | `false` | `"reportUnusedDisableDirectives": true` |
| rules | `null` | `"rules": {"quotes": [2, "double"]}` or `"rules": {"quotes": [2, "double"], "no-console": 2}` |
| rulesdir | `[]` | `"rulesdir": "/path/to/rules/dir"` or `"env": ["/path/to/rules/dir", "/path/to/other"]` |
4 changes: 3 additions & 1 deletion examples/simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"jest": {
"runner": "jest-runner-eslint",
"displayName": "lint",
"testMatch": ["<rootDir>/src/**/*.js"]
"testMatch": [
"<rootDir>/src/**/*.js"
]
}
}
5 changes: 2 additions & 3 deletions integrationTests/runJest.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ const runJest = (project, options = []) => {
].concat(options),
{
env: process.env,
reject: false,
},
)
.catch(t => t)
.then(({ stdout, stderr }) => `${normalize(stderr)}\n${normalize(stdout)}`);
).then(({ stdout, stderr }) => `${normalize(stderr)}\n${normalize(stdout)}`);
};

module.exports = runJest;
Loading

0 comments on commit 4de0198

Please sign in to comment.