Skip to content

Commit

Permalink
Breaking: Add require-yield rule to eslint:recommended (fixes #6550
Browse files Browse the repository at this point in the history
…) (#6554)
  • Loading branch information
gyandeeps authored and nzakas committed Jul 1, 2016
1 parent 7988427 commit dc5b78b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conf/eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
"quotes": "off",
"radix": "off",
"require-jsdoc": "off",
"require-yield": "off",
"require-yield": "error",
"rest-spread-spacing": "off",
"semi": "off",
"semi-spacing": "off",
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ These rules relate to ES6, also known as ES2015:
* [prefer-rest-params](prefer-rest-params.md): require rest parameters instead of `arguments`
* [prefer-spread](prefer-spread.md): require spread operators instead of `.apply()`
* [prefer-template](prefer-template.md): require template literals instead of string concatenation
* [require-yield](require-yield.md): require generator functions to contain `yield`
* [require-yield](require-yield.md): require generator functions to contain `yield` (recommended)
* [rest-spread-spacing](rest-spread-spacing.md): enforce spacing between rest and spread operators and their expressions (fixable)
* [sort-imports](sort-imports.md): enforce sorted import declarations within modules
* [template-curly-spacing](template-curly-spacing.md): require or disallow spacing around embedded expressions of template strings (fixable)
Expand Down
4 changes: 3 additions & 1 deletion docs/user-guide/migrating-to-3.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ In 3.0.0, the following rules were added to `"eslint:recommended"`:

* [`no-unsafe-finally`](http://eslint.org/docs/rules/no-unsafe-finally) helps catch `finally` clauses that may not behave as you think.
* [`no-native-reassign`](http://eslint.org/docs/rules/no-native-reassign) was previously part of `no-undef`, but was split out because it didn't make sense as part of another rule. The `no-native-reassign` rule warns whenever you try to overwrite a read-only global variable.
* [`require-yield`](http://eslint.org/docs/rules/require-yield) helps to identify generator functions that do not have the `yield` keyword.

The following rules were removed from `"eslint:recommended"`:

Expand All @@ -55,7 +56,8 @@ The following rules were modified:
"no-unsafe-finally": "off",
"no-native-reassign": "off",
"complexity": ["off", 11],
"comma-dangle": "error"
"comma-dangle": "error",
"require-yield": "error"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/require-yield.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
docs: {
description: "require generator functions to contain `yield`",
category: "ECMAScript 6",
recommended: false
recommended: true
},

schema: []
Expand Down

0 comments on commit dc5b78b

Please sign in to comment.