eslint-plugin-playlyfe
Version:
custom eslint stuff for playlyfe
92 lines (91 loc) • 3.85 kB
JavaScript
;
module.exports = {
plugins: ['playlyfe'],
rules: {
'for-direction': 'error',
'getter-return': ['error', {
allowImplicit: true
}],
'no-async-promise-executor': 'error',
'no-await-in-loop': 'error',
'playlyfe/babel-no-await-in-loop': 'off',
'no-compare-neg-zero': 'error',
// disallow assignment in conditional expressions
'no-cond-assign': ['error', 'always'],
// disallow use of console
'no-console': 'warn',
// disallow use of constant expressions in conditions
'no-constant-condition': 'error',
// disallow control characters in regular expressions
'no-control-regex': 'error',
// disallow use of debugger
'no-debugger': 'error',
// disallow duplicate arguments in functions
'no-dupe-args': 'error',
// disallow duplicate keys when creating object literals
'no-dupe-keys': 'error',
// disallow a duplicate case label.
'no-duplicate-case': 'error',
// disallow the use of empty character classes in regular expressions
'no-empty-character-class': 'error',
// disallow empty statements
'no-empty': 'error',
// disallow assigning to the exception in a catch block
'no-ex-assign': 'error',
// disallow double-negation boolean casts in a boolean context
// http://eslint.org/docs/rules/no-extra-boolean-cast
'no-extra-boolean-cast': 'error',
// disallow unnecessary parentheses
// http://eslint.org/docs/rules/no-extra-parens
// disabling causing lot of issues
'no-extra-parens': ['off', 'all', {
conditionalAssign: false,
returnAssign: false,
nestedBinaryExpressions: false
}],
// disallow unnecessary semicolons
'no-extra-semi': 'error',
// disallow overwriting functions written as function declarations
'no-func-assign': 'error',
// disallow function or variable declarations in nested blocks
'no-inner-declarations': ['error', 'both'],
// disallow invalid regular expression strings in the RegExp constructor
'no-invalid-regexp': 'error',
// disallow irregular whitespace outside of strings and comments
'no-irregular-whitespace': 'error',
'no-misleading-character-class': 'error',
// disallow the use of object properties of the global object (Math and JSON) as functions
'no-obj-calls': 'error',
// disallow use of Object.prototypes builtins directly
// http://eslint.org/docs/rules/no-prototype-builtins
'no-prototype-builtins': 'error',
// disallow multiple spaces in a regular expression literal
'no-regex-spaces': 'error',
// disallow sparse arrays
'no-sparse-arrays': 'error',
// Disallow template literal placeholder syntax in regular strings
// http://eslint.org/docs/rules/no-template-curly-in-string
'no-template-curly-in-string': 'error',
// Avoid code that looks like two expressions but is actually one
// http://eslint.org/docs/rules/no-unexpected-multiline
'no-unexpected-multiline': 'error',
// disallow unreachable statements after a return, throw, continue, or break statement
'no-unreachable': 'error',
// disallow return/throw/break/continue inside finally blocks
// http://eslint.org/docs/rules/no-unsafe-finally
'no-unsafe-finally': 'error',
// disallow negating the left operand of relational operators
// http://eslint.org/docs/rules/no-unsafe-negation
'no-unsafe-negation': 'error',
'require-atomic-updates': 'error',
'no-negated-in-lhs': 'off',
// disallow comparisons with the value NaN
'use-isnan': 'error',
// ensure JSDoc comments are valid
// http://eslint.org/docs/rules/valid-jsdoc
'valid-jsdoc': 'off',
// ensure that the results of typeof are compared against a valid string
'valid-typeof': 'off',
'playlyfe/babel-valid-typeof': 'error'
}
};