forked from facebook/create-react-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove ESLint extends and add Jest rules (facebook#9587)
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Copyright (c) 2015-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
// We use eslint-loader so even warnings are very visible. | ||
// This is why we prefer to use "WARNING" level for potential errors, | ||
// and we try not to use "ERROR" level at all. | ||
|
||
module.exports = { | ||
plugins: ['jest'], | ||
overrides: [ | ||
{ | ||
files: ['**/__tests__/**/*', '**/*.{spec,test}.*'], | ||
env: { | ||
'jest/globals': true, | ||
}, | ||
// A subset of the recommended rules: | ||
// https://github.com/jest-community/eslint-plugin-jest#rules | ||
rules: { | ||
'jest/expect-expect': 'warn', | ||
'jest/no-identical-title': 'warn', | ||
'jest/valid-describe': 'warn', | ||
'jest/valid-expect': 'warn', | ||
'jest/valid-expect-in-promise': 'warn', | ||
}, | ||
}, | ||
], | ||
}; |