Skip to content

Commit 5124de2

Browse files
committed
[eslint config] [base] add new rules from v7.3
1 parent 5495541 commit 5124de2

File tree

1 file changed

+12
-0
lines changed
  • packages/eslint-config-airbnb-base/rules

1 file changed

+12
-0
lines changed

packages/eslint-config-airbnb-base/rules/errors.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ module.exports = {
103103
// disallow the use of object properties of the global object (Math and JSON) as functions
104104
'no-obj-calls': 'error',
105105

106+
// Disallow returning values from Promise executor functions
107+
// https://eslint.org/docs/rules/no-promise-executor-return
108+
// TODO: enable, semver-minor, once eslint v7.3 is required (which is major)
109+
'no-promise-executor-return': 'off',
110+
106111
// disallow use of Object.prototypes builtins directly
107112
// https://eslint.org/docs/rules/no-prototype-builtins
108113
'no-prototype-builtins': 'error',
@@ -129,6 +134,13 @@ module.exports = {
129134
// disallow unreachable statements after a return, throw, continue, or break statement
130135
'no-unreachable': 'error',
131136

137+
// Disallow loops with a body that allows only one iteration
138+
// https://eslint.org/docs/rules/no-unreachable-loop
139+
// TODO: enable, semver-minor, once eslint v7.3 is required (which is major)
140+
'no-unreachable-loop': ['off', {
141+
ignore: [], // WhileStatement, DoWhileStatement, ForStatement, ForInStatement, ForOfStatement
142+
}],
143+
132144
// disallow return/throw/break/continue inside finally blocks
133145
// https://eslint.org/docs/rules/no-unsafe-finally
134146
'no-unsafe-finally': 'error',

0 commit comments

Comments
 (0)