eslint-plugin-jest
Advanced tools
Comparing version 1.0.2 to 18.5.0-alpha.7da3df39
{ | ||
"name": "eslint-plugin-jest", | ||
"version": "1.0.2", | ||
"version": "18.5.0-alpha.7da3df39", | ||
"description": "Eslint rules for Jest", | ||
@@ -10,22 +10,16 @@ "keywords": [ | ||
], | ||
"author": "Jonathan Kim", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"test": "jest" | ||
"author": { | ||
"name": "Jonathan Kim", | ||
"email": "hello@jkimbo.com", | ||
"url": "jkimbo.com" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"eslint": "^3.9.0", | ||
"eslint-config-airbnb-base": "^9.0.0", | ||
"eslint-plugin-import": "^2.1.0", | ||
"jest": "^16.0.2" | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/facebook/jest.git" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
"main": "build/index.js", | ||
"peerDependencies": { | ||
"eslint": ">=3.6" | ||
}, | ||
"license": "ISC", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jkimbo/eslint-plugin-jest.git" | ||
} | ||
"license": "BSD-3-Clause" | ||
} |
@@ -8,3 +8,3 @@ # eslint-plugin-jest | ||
``` | ||
$ yarn install eslint eslint-plugin-jest --dev | ||
$ yarn add --dev eslint eslint-plugin-jest | ||
``` | ||
@@ -32,4 +32,5 @@ | ||
"rules": { | ||
"jest/no-exclusive-tests": 2, | ||
"jest/no-identical-title": 2 | ||
"jest/no-disabled-tests": "warn", | ||
"jest/no-focused-tests": "error", | ||
"jest/no-identical-title": "error", | ||
} | ||
@@ -39,8 +40,40 @@ } | ||
You can also whitelist the environment variables provided by Jest by doing: | ||
```json | ||
{ | ||
"env": { | ||
"jest/globals": true | ||
} | ||
} | ||
``` | ||
## Supported Rules | ||
- [no-exclusive-tests](docs/rules/no-exclusive-tests.md) - disallow exclusive tests. | ||
- [no-disabled-tests](docs/rules/no-disabled-tests.md) - disallow disabled tests. | ||
- [no-focused-tests](docs/rules/no-focused-tests.md) - disallow focused tests. | ||
- [no-identical-title](docs/rules/no-identical-title.md) - disallow identical titles. | ||
## Shareable configurations | ||
### Recommended | ||
This plugin exports a recommended configuration that enforces good testing practices. | ||
To enable this configuration use the `extends` property in your `.eslintrc` config file: | ||
```js | ||
{ | ||
"extends": ["plugin:jest/recommended"] | ||
} | ||
``` | ||
See [ESLint documentation](http://eslint.org/docs/user-guide/configuring#extending-configuration-files) for more information about extending configuration files. | ||
The rules enabled in this configuration are: | ||
- [jest/no-disabled-tests](docs/rules/no-disabled-tests.md) | ||
- [jest/no-focused-tests](docs/rules/no-focused-tests.md) | ||
- [jest/no-identical-title](docs/rules/no-identical-title.md) | ||
## Credit | ||
@@ -47,0 +80,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
0
80
13003
1
11
226
2
2