Skip to content

Commit

Permalink
Small readme changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rogeliog committed Sep 26, 2017
1 parent 13994ce commit c0dbd4d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 42 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**/node_modules
build

**/coverage/
integrationTests/__fixtures__/skipped/__eslint__/file.js
71 changes: 29 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,54 +58,41 @@ In `package.json`
```json
{
"jest-runner-eslint": {
"cliOptions": {}
"cliOptions": {
// Options here
}
}
}
```

### cliOptions

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

|cliOption|description|default|example
|-----|-----|-----|-----|
|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`
|global||`[]`|`"global": "it"` or `"global": ["it", "describe"]`
|ignorePath||`null`|`"ignorePath": "/path/to/ignore"`
|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"]`
|rule||`null`|`"rule": "'quotes: [2, double]'"` or `"rule": ["quotes: [2, double]", "no-console: 2"]`
|rulesdir||`[]`|`"rulesdir": "/path/to/rules/dir"` or `"env": ["/path/to/rules/dir", "/path/to/other"]`


#### `noInlineConfig`: boolean

```json
"cliOptions": {
"noInlineConfig": true
or in `jest-runner-eslint.config.js`
```js
module.exports = {
cliOptions: {
// Options here
}
}
```

#### `env`: string|Array\<string\>

Single value
```json
"cliOptions": {
"env": "mocha"
}
```
### cliOptions

Multiple values
```json
"cliOptions": {
"env": ["mocha", "other"]
}
```
jest-runner-eslint maps a lot of ESLint CLI arguments to config options. For example `--fix` is `cliOptions.fix`

|option|default|example
|-----|-----|-----|
|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`
|global|`[]`|`"global": "it"` or `"global": ["it", "describe"]`
|ignorePath|`null`|`"ignorePath": "/path/to/ignore"`
|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"]`
|rule|`null`|`"rule": "'quotes: [2, double]'"` or `"rule": ["quotes: [2, double]", "no-console: 2"]`
|rulesdir|`[]`|`"rulesdir": "/path/to/rules/dir"` or `"env": ["/path/to/rules/dir", "/path/to/other"]`

0 comments on commit c0dbd4d

Please sign in to comment.