mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 10:58:01 -05:00
[eslint config] [breaking] enable no-restricted-syntax rule.
Forbids “with”, “break”, “debugger”, “for..in”, and labels.
This commit is contained in:
@@ -104,6 +104,16 @@ module.exports = {
|
||||
'no-proto': 2,
|
||||
// disallow declaring the same variable more then once
|
||||
'no-redeclare': 2,
|
||||
// disallow certain syntax forms
|
||||
// http://eslint.org/docs/rules/no-restricted-syntax
|
||||
'no-restricted-syntax': [
|
||||
2,
|
||||
'BreakStatement',
|
||||
'DebuggerStatement',
|
||||
'ForInStatement',
|
||||
'LabeledStatement',
|
||||
'WithStatement',
|
||||
],
|
||||
// disallow use of assignment in return statement
|
||||
'no-return-assign': 2,
|
||||
// disallow use of `javascript:` urls.
|
||||
|
||||
Reference in New Issue
Block a user