Skip to content

Commit

Permalink
[eslint config] [base] add new rules from v7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jun 27, 2020
1 parent 5495541 commit 5124de2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/eslint-config-airbnb-base/rules/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ module.exports = {
// disallow the use of object properties of the global object (Math and JSON) as functions
'no-obj-calls': 'error',

// Disallow returning values from Promise executor functions
// https://eslint.org/docs/rules/no-promise-executor-return
// TODO: enable, semver-minor, once eslint v7.3 is required (which is major)
'no-promise-executor-return': 'off',

// disallow use of Object.prototypes builtins directly
// https://eslint.org/docs/rules/no-prototype-builtins
'no-prototype-builtins': 'error',
Expand All @@ -129,6 +134,13 @@ module.exports = {
// disallow unreachable statements after a return, throw, continue, or break statement
'no-unreachable': 'error',

// Disallow loops with a body that allows only one iteration
// https://eslint.org/docs/rules/no-unreachable-loop
// TODO: enable, semver-minor, once eslint v7.3 is required (which is major)
'no-unreachable-loop': ['off', {
ignore: [], // WhileStatement, DoWhileStatement, ForStatement, ForInStatement, ForOfStatement
}],

// disallow return/throw/break/continue inside finally blocks
// https://eslint.org/docs/rules/no-unsafe-finally
'no-unsafe-finally': 'error',
Expand Down

0 comments on commit 5124de2

Please sign in to comment.