completing obvious best practices

This commit is contained in:
Timo Hocker 2019-12-15 19:37:10 +01:00
parent 5b46dce799
commit f312157cb6

View File

@ -63,54 +63,54 @@ module.exports = {
'no-alert': 'error',
'no-caller': 'error',
'no-case-declarations': 'error',
'no-constructor-return': '', // disallow returning value from constructor
'no-constructor-return': 'error',
'no-div-regex': '', // disallow division operators explicitly at the beginning of regular expressions
'no-else-return': '', // disallow `else` blocks after `return` statements in `if` statements
'no-empty-function': '', // disallow empty functions
'no-empty-pattern': '', // disallow empty destructuring patterns
'no-else-return': 'error',
'no-empty-function': 'error',
'no-empty-pattern': 'error',
'no-eq-null': '', // disallow `null` comparisons without type-checking operators
'no-eval': '', // disallow the use of `eval()`
'no-eval': 'error',
'no-extend-native': '', // disallow extending native types
'no-extra-bind': '', // disallow unnecessary calls to `.bind()`
'no-extra-label': '', // disallow unnecessary labels
'no-fallthrough': '', // disallow fallthrough of `case` statements
'no-fallthrough': 'error',
'no-floating-decimal': '', // disallow leading or trailing decimal points in numeric literals
'no-global-assign': '', // disallow assignments to native objects or read-only global variables
'no-global-assign': 'error',
'no-implicit-coercion': '', // disallow shorthand type conversions
'no-implicit-globals': '', // disallow declarations in the global scope
'no-implied-eval': '', // disallow the use of `eval()`-like methods
'no-invalid-this': '', // disallow `this` keywords outside of classes or class-like objects
'no-iterator': '', // disallow the use of the `__iterator__` property
'no-implied-eval': 'error',
'no-invalid-this': 'error',
'no-iterator': 'error',
'no-labels': '', // disallow labeled statements
'no-lone-blocks': '', // disallow unnecessary nested blocks
'no-loop-func': '', // disallow function declarations that contain unsafe references inside loop statements
'no-lone-blocks': 'error',
'no-loop-func': 'error',
'no-magic-numbers': '', // disallow magic numbers
'no-multi-spaces': '', // disallow multiple spaces
'no-multi-str': '', // disallow multiline strings
'no-new': '', // disallow `new` operators outside of assignments or comparisons
'no-multi-str': 'error',
'no-new': 'error',
'no-new-func': '', // disallow `new` operators with the `Function` object
'no-new-wrappers': '', // disallow `new` operators with the `String`, `Number`, and `Boolean` objects
'no-octal': '', // disallow octal literals
'no-octal-escape': '', // disallow octal escape sequences in string literals
'no-param-reassign': '', // disallow reassigning `function` parameters
'no-proto': '', // disallow the use of the `__proto__` property
'no-redeclare': '', // disallow variable redeclaration
'no-proto': 'error',
'no-redeclare': 'error',
'no-restricted-properties': '', // disallow certain properties on certain objects
'no-return-assign': '', // disallow assignment operators in `return` statements
'no-return-await': '', // disallow unnecessary `return await`
'no-return-await': 'error',
'no-script-url': '', // disallow `javascript:` urls
'no-self-assign': '', // disallow assignments where both sides are exactly the same
'no-self-compare': '', // disallow comparisons where both sides are exactly the same
'no-self-assign': 'error',
'no-self-compare': 'error',
'no-sequences': '', // disallow comma operators
'no-throw-literal': '', // disallow throwing literals as exceptions
'no-unmodified-loop-condition': '', // disallow unmodified loop conditions
'no-unused-expressions': '', // disallow unused expressions
'no-unused-expressions': 'error',
'no-unused-labels': '', // disallow unused labels
'no-useless-call': '', // disallow unnecessary calls to `.call()` and `.apply()`
'no-useless-catch': '', // disallow unnecessary `catch` clauses
'no-useless-concat': '', // disallow unnecessary concatenation of literals or template literals
'no-useless-escape': '', // disallow unnecessary escape characters
'no-useless-return': '', // disallow redundant return statements
'no-useless-concat': 'error',
'no-useless-escape': 'error',
'no-useless-return': 'error',
'no-void': '', // disallow `void` operators
'no-warning-comments': '', // disallow specified warning terms in comments
'no-with': '', // disallow `with` statements
@ -118,9 +118,9 @@ module.exports = {
'prefer-promise-reject-errors': '', // require using Error objects as Promise rejection reasons
'prefer-regex-literals': '', // disallow use of the `RegExp` constructor in favor of regular expression literals
radix: '', // enforce the consistent use of the radix argument when using `parseInt()`
'require-await': '', // disallow async functions which have no `await` expression
'require-await': 'error',
'require-unicode-regexp': '', // enforce the use of `u` flag on RegExp
'vars-on-top': '', // require `var` declarations be placed at the top of their containing scope
'vars-on-top': 'error',
'wrap-iife': '', // require parentheses around immediate `function` invocations
yoda: '', // require or disallow "Yoda" conditions
// ## Strict Mode