-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[eslint-config-kibana] Add jest plugin and settings
This extracts the ui-specific eslint settings from elastic/kibana so they can be applied to other repositories as well.
- Loading branch information
1 parent
bdaf848
commit 88b34e0
Showing
4 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,31 @@ | ||
# eslint-config-kibana | ||
|
||
The eslint config used by the kibana team | ||
|
||
## Usage | ||
|
||
To use this eslint config, just install the peer dependencies and reference it | ||
in your `.eslintrc`: | ||
|
||
```javascript | ||
{ | ||
extends: [ | ||
'@elastic/eslint-config-kibana' | ||
] | ||
} | ||
``` | ||
|
||
## Optional jest config | ||
|
||
If the project uses the [jest test runner](https://facebook.github.io/jest/), | ||
the `@elastic/eslint-config-kibana/jest` config can be extended as well to use | ||
`eslint-plugin-jest` and add settings specific to it: | ||
|
||
```javascript | ||
{ | ||
extends: [ | ||
'@elastic/eslint-config-kibana', | ||
'@elastic/eslint-config-kibana/jest' | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = { | ||
plugins: [ | ||
'jest', | ||
], | ||
|
||
env: { | ||
'jest/globals': true, | ||
}, | ||
|
||
rules: { | ||
'jest/no-disabled-tests': 'error', | ||
'jest/no-focused-tests': 'error', | ||
'jest/no-identical-title': 'error', | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters