diff --git a/README.md b/README.md index 351b7674c..b370f1a50 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,21 @@ See [ESLint documentation](http://eslint.org/docs/user-guide/configuring#extending-configuration-files) for more information about extending configuration files. +### All + +If you want to enable all rules instead of only some you can do so by adding the +`all` configuration to your `.eslintrc` config file: + +```json +{ + "extends": ["plugin:jest/all"] +} +``` + +While the `recommended` and `style` configurations only change in major versions +the `all` configuration may change in any release and is thus unsuited for +installations requiring long-term consistency. + ## Rules | Rule | Description | Recommended | Fixable | diff --git a/src/index.js b/src/index.js index 53e7afd5b..31101b385 100644 --- a/src/index.js +++ b/src/index.js @@ -11,11 +11,22 @@ const rules = fs (acc, curr) => Object.assign(acc, { [curr]: require(`./rules/${curr}`) }), {}, ); +let allRules = {}; +Object.keys(rules).forEach(function(key) { + allRules[`jest/${key}`] = 'error'; +}); const snapshotProcessor = require('./processors/snapshot-processor'); module.exports = { configs: { + all: { + plugins: ['jest'], + env: { + 'jest/globals': true, + }, + rules: allRules, + }, recommended: { plugins: ['jest'], env: {