Comparison of StandardJS and XO ESLint rules
Contents
- Rules both agree on
- Rules both set but with different error levels
- Rules both set but with different options
- All ESlint rules
Rules both agree on (13)
Key:
- Green
- Set
- Red
- Not set
- Orange
- Has differences
Rule | Description | Error level | Options | ||
---|---|---|---|---|---|
StandardJS | XO | StandardJS | XO | ||
arrow-spacing | enforce consistent spacing before and after the arrow in arrow functions | error | error |
Both are set to:
[ { "before": true, "after": true } ] |
|
comma-spacing | enforce consistent spacing before and after commas | error | error |
Both are set to:
[ { "before": false, "after": true } ] |
|
comma-style | enforce consistent comma style | error | error |
Both are set to:
[ "last" ] |
|
dot-location | enforce consistent newlines before and after dots | error | error |
Both are set to:
[ "property" ] |
|
func-call-spacing | require or disallow spacing between function identifiers and their invocations | error | error |
Both are set to:
[ "never" ] |
|
key-spacing | enforce consistent spacing between keys and values in object literal properties | error | error |
Both are set to:
[ { "beforeColon": false, "afterColon": true } ] |
|
rest-spread-spacing | enforce spacing between rest and spread operators and their expressions | error | error |
Both are set to:
[ "never" ] |
|
semi-spacing | enforce consistent spacing before and after semicolons | error | error |
Both are set to:
[ { "before": false, "after": true } ] |
|
space-before-blocks | enforce consistent spacing before blocks | error | error |
Both are set to:
[ "always" ] |
|
space-in-parens | enforce consistent spacing inside parentheses | error | error |
Both are set to:
[ "never" ] |
|
template-tag-spacing | require or disallow spacing between template tags and their literals | error | error |
Both are set to:
[ "never" ] |
|
unicode-bom | require or disallow Unicode byte order mark (BOM) | error | error |
Both are set to:
[ "never" ] |
|
yield-star-spacing | require or disallow spacing around the `*` in `yield*` expressions | error | error |
Both are set to:
[ "both" ] |
Rules both set but with different error levels (1)
Key:
- Green
- Set
- Red
- Not set
- Orange
- Has differences
Rule | Description | Error level | Options | ||
---|---|---|---|---|---|
StandardJS | XO | StandardJS | XO | ||
handle-callback-err | require error handling in callbacks | error | warn |
[ "^(err|error)$" ] |
Rules both set but with different options (35)
Key:
- Green
- Set
- Red
- Not set
- Orange
- Has differences
Rule | Description | Error level | Options | ||
---|---|---|---|---|---|
StandardJS | XO | StandardJS | XO | ||
brace-style | enforce consistent brace style for blocks | error | error |
[ "1tbs", { "allowSingleLine": true } ] |
[ "1tbs", { "allowSingleLine": false } ] |
camelcase | enforce camelcase naming convention | error | error |
[ { "properties": "never" } ] |
[ { "properties": "always" } ] |
comma-dangle | require or disallow trailing commas | error | error |
[ { "arrays": "never", "objects": "never", "imports": "never", "exports": "never", "functions": "never" } ] |
[ "never" ] |
curly | enforce consistent brace style for all control statements | error | error |
[ "multi-line" ] |
|
eqeqeq | require the use of `===` and `!==` | error | error |
[ "always", { "null": "ignore" } ] |
|
generator-star-spacing | enforce consistent spacing around `*` operators in generator functions | error | error |
[ { "before": true, "after": true } ] |
[ "both" ] |
handle-callback-err | require error handling in callbacks | error | warn |
[ "^(err|error)$" ] |
|
indent | enforce consistent indentation | error | error |
[ 2, { "SwitchCase": 1, "VariableDeclarator": 1, "outerIIFEBody": 1, "MemberExpression": 1, "FunctionDeclaration": { "parameters": 1, "body": 1 }, "FunctionExpression": { "parameters": 1, "body": 1 }, "CallExpression": { "arguments": 1 }, "ArrayExpression": 1, "ObjectExpression": 1, "ImportDeclaration": 1, "flatTernaryExpressions": false, "ignoreComments": false } ] |
[ "tab", { "SwitchCase": 1 } ] |
keyword-spacing | enforce consistent spacing before and after keywords | error | error |
[ { "before": true, "after": true } ] |
|
new-cap | require constructor names to begin with a capital letter | error | error |
[ { "newIsCap": true, "capIsNew": false } ] |
[ { "newIsCap": true, "capIsNew": true } ] |
no-constant-condition | disallow constant expressions in conditions | error | error |
[ { "checkLoops": false } ] |
|
no-inner-declarations | disallow variable or `function` declarations in nested blocks | error | error |
[ "functions" ] |
|
no-labels | disallow labeled statements | error | error |
[ { "allowLoop": false, "allowSwitch": false } ] |
|
no-mixed-operators | disallow mixed binary operators | error | error |
[ { "groups": [ [ "==", "!=", "===", "!==", ">", ">=", "<", "<=" ], [ "&&", "||" ], [ "in", "instanceof" ] ], "allowSamePrecedence": true } ] |
|
no-multiple-empty-lines | disallow multiple empty lines | error | error |
[ { "max": 1, "maxEOF": 0 } ] |
[ { "max": 1 } ] |
no-return-assign | disallow assignment operators in `return` statements | error | error |
[ "except-parens" ] |
[ "always" ] |
no-self-assign | disallow assignments where both sides are exactly the same | error | error |
[ { "props": true } ] |
|
no-undef | disallow the use of undeclared variables unless mentioned in `/*global */` comments | error | error |
[ { "typeof": true } ] |
|
no-unneeded-ternary | disallow ternary operators when simpler alternatives exist | error | error |
[ { "defaultAssignment": false } ] |
|
no-unused-expressions | disallow unused expressions | error | error |
[ { "allowShortCircuit": true, "allowTernary": true, "allowTaggedTemplates": true } ] |
|
no-unused-vars | disallow unused variables | error | error |
[ { "vars": "all", "args": "none", "ignoreRestSiblings": true } ] |
[ { "ignoreRestSiblings": true, "argsIgnorePattern": "^_$" } ] |
no-use-before-define | disallow the use of variables before they are defined | error | error |
[ { "functions": false, "classes": false, "variables": false } ] |
[ "nofunc" ] |
one-var | enforce variables to be declared either together or separately in functions | error | error |
[ { "initialized": "never" } ] |
[ "never" ] |
operator-linebreak | enforce consistent linebreak style for operators | error | error |
[ "after", { "overrides": { "?": "before", ":": "before" } } ] |
[ "after" ] |
padded-blocks | require or disallow padding within blocks | error | error |
[ { "blocks": "never", "switches": "never", "classes": "never" } ] |
[ "never" ] |
prefer-promise-reject-errors | require using Error objects as Promise rejection reasons | error | error |
[ { "allowEmptyReject": true } ] |
|
quotes | enforce the consistent use of either backticks, double, or single quotes | error | error |
[ "single", { "avoidEscape": true, "allowTemplateLiterals": true } ] |
[ "single", { "allowTemplateLiterals": true } ] |
semi | require or disallow semicolons instead of ASI | error | error |
[ "never" ] |
[ "always" ] |
space-before-function-paren | enforce consistent spacing before `function` definition opening parenthesis | error | error |
[ "always" ] |
[ { "anonymous": "always", "named": "never", "asyncArrow": "always" } ] |
space-unary-ops | enforce consistent spacing before or after unary operators | error | error |
[ { "words": true, "nonwords": false } ] |
|
spaced-comment | enforce consistent spacing after the `//` or `/*` in a comment | error | error |
[ "always", { "line": { "markers": [ "*package", "!", "/", ",", "=" ] }, "block": { "balanced": true, "markers": [ "*package", "!", ",", ":", "::", "flow-include" ], "exceptions": [ "*" ] } } ] |
[ "always", { "line": { "exceptions": [ "-", "+", "*" ], "markers": [ "!", "/" ] }, "block": { "exceptions": [ "-", "+", "*" ], "markers": [ "!", "*" ], "balanced": true } } ] |
template-curly-spacing | require or disallow spacing around embedded expressions of template strings | error | error |
[ "never" ] |
|
valid-typeof | enforce comparing `typeof` expressions against valid strings | error | error |
[ { "requireStringLiterals": true } ] |
[ { "requireStringLiterals": false } ] |
wrap-iife | require parentheses around immediate `function` invocations | error | error |
[ "any", { "functionPrototypeMethods": true } ] |
[ "inside", { "functionPrototypeMethods": true } ] |
yoda | require or disallow "Yoda" conditions | error | error |
[ "never" ] |
All ESlint rules (264)
Key:
- Green
- Set
- Red
- Not set
- Orange
- Has differences
Rule | Description | Error level | Options | ||
---|---|---|---|---|---|
StandardJS | XO | StandardJS | XO | ||
accessor-pairs | enforce getter and setter pairs in objects | error | error | ||
array-bracket-newline | enforce linebreaks after opening and before closing array brackets | undefined | error |
undefined |
[ "consistent" ] |
array-bracket-spacing | enforce consistent spacing inside array brackets | undefined | error |
undefined |
[ "never" ] |
array-callback-return | enforce `return` statements in callbacks of array methods | undefined | error |
undefined |
|
array-element-newline | enforce line breaks after each array element | undefined | error |
undefined |
[ "consistent" ] |
arrow-body-style | require braces around arrow function bodies | undefined | undefined |
undefined |
undefined |
arrow-parens | require parentheses around arrow function arguments | undefined | error |
undefined |
[ "as-needed" ] |
arrow-spacing | enforce consistent spacing before and after the arrow in arrow functions | error | error |
Both are set to:
[ { "before": true, "after": true } ] |
|
block-scoped-var | enforce the use of variables within the scope they are defined | undefined | error |
undefined |
|
block-spacing | disallow or enforce spaces inside of blocks after opening block and before closing block | error | undefined |
[ "always" ] |
undefined |
brace-style | enforce consistent brace style for blocks | error | error |
[ "1tbs", { "allowSingleLine": true } ] |
[ "1tbs", { "allowSingleLine": false } ] |
callback-return | require `return` statements after callbacks | undefined | undefined |
undefined |
undefined |
camelcase | enforce camelcase naming convention | error | error |
[ { "properties": "never" } ] |
[ { "properties": "always" } ] |
capitalized-comments | enforce or disallow capitalization of the first letter of a comment | undefined | error |
undefined |
[ "always", { "ignorePattern": "pragma|ignore|prettier-ignore", "ignoreInlineComments": true, "ignoreConsecutiveComments": true } ] |
class-methods-use-this | enforce that class methods utilize `this` | undefined | undefined |
undefined |
undefined |
comma-dangle | require or disallow trailing commas | error | error |
[ { "arrays": "never", "objects": "never", "imports": "never", "exports": "never", "functions": "never" } ] |
[ "never" ] |
comma-spacing | enforce consistent spacing before and after commas | error | error |
Both are set to:
[ { "before": false, "after": true } ] |
|
comma-style | enforce consistent comma style | error | error |
Both are set to:
[ "last" ] |
|
complexity | enforce a maximum cyclomatic complexity allowed in a program | undefined | warn |
undefined |
|
computed-property-spacing | enforce consistent spacing inside computed property brackets | undefined | error |
undefined |
[ "never" ] |
consistent-return | require `return` statements to either always or never specify values | undefined | undefined |
undefined |
undefined |
consistent-this | enforce consistent naming when capturing the current execution context | undefined | undefined |
undefined |
undefined |
constructor-super | require `super()` calls in constructors | error | error | ||
curly | enforce consistent brace style for all control statements | error | error |
[ "multi-line" ] |
|
default-case | require `default` cases in `switch` statements | undefined | error |
undefined |
|
dot-location | enforce consistent newlines before and after dots | error | error |
Both are set to:
[ "property" ] |
|
dot-notation | enforce dot notation whenever possible | undefined | error |
undefined |
|
eol-last | require or disallow newline at the end of files | error | error | ||
eqeqeq | require the use of `===` and `!==` | error | error |
[ "always", { "null": "ignore" } ] |
|
for-direction | enforce "for" loop update clause moving the counter in the right direction. | undefined | error |
undefined |
|
func-call-spacing | require or disallow spacing between function identifiers and their invocations | error | error |
Both are set to:
[ "never" ] |
|
func-name-matching | require function names to match the name of the variable or property to which they are assigned | undefined | error |
undefined |
[ { "considerPropertyDescriptor": true } ] |
func-names | require or disallow named `function` expressions | undefined | error |
undefined |
[ "never" ] |
func-style | enforce the consistent use of either `function` declarations or expressions | undefined | undefined |
undefined |
undefined |
function-paren-newline | enforce consistent line breaks inside function parentheses | undefined | undefined |
undefined |
undefined |
generator-star-spacing | enforce consistent spacing around `*` operators in generator functions | error | error |
[ { "before": true, "after": true } ] |
[ "both" ] |
getter-return | enforce `return` statements in getters | undefined | error |
undefined |
|
global-require | require `require()` calls to be placed at top-level module scope | undefined | undefined |
undefined |
undefined |
guard-for-in | require `for-in` loops to include an `if` statement | undefined | error |
undefined |
|
handle-callback-err | require error handling in callbacks | error | warn |
[ "^(err|error)$" ] |
|
id-blacklist | disallow specified identifiers | undefined | undefined |
undefined |
undefined |
id-length | enforce minimum and maximum identifier lengths | undefined | undefined |
undefined |
undefined |
id-match | require identifiers to match a specified regular expression | undefined | undefined |
undefined |
undefined |
implicit-arrow-linebreak | enforce the location of arrow function bodies | undefined | undefined |
undefined |
undefined |
indent-legacy | enforce consistent indentation | undefined | undefined |
undefined |
undefined |
indent | enforce consistent indentation | error | error |
[ 2, { "SwitchCase": 1, "VariableDeclarator": 1, "outerIIFEBody": 1, "MemberExpression": 1, "FunctionDeclaration": { "parameters": 1, "body": 1 }, "FunctionExpression": { "parameters": 1, "body": 1 }, "CallExpression": { "arguments": 1 }, "ArrayExpression": 1, "ObjectExpression": 1, "ImportDeclaration": 1, "flatTernaryExpressions": false, "ignoreComments": false } ] |
[ "tab", { "SwitchCase": 1 } ] |
init-declarations | require or disallow initialization in variable declarations | undefined | undefined |
undefined |
undefined |
jsx-quotes | enforce the consistent use of either double or single quotes in JSX attributes | undefined | error |
undefined |
|
key-spacing | enforce consistent spacing between keys and values in object literal properties | error | error |
Both are set to:
[ { "beforeColon": false, "afterColon": true } ] |
|
keyword-spacing | enforce consistent spacing before and after keywords | error | error |
[ { "before": true, "after": true } ] |
|
line-comment-position | enforce position of line comments | undefined | undefined |
undefined |
undefined |
linebreak-style | enforce consistent linebreak style | undefined | error |
undefined |
[ "unix" ] |
lines-around-comment | require empty lines around comments | undefined | undefined |
undefined |
undefined |
lines-around-directive | require or disallow newlines around directives | undefined | undefined |
undefined |
undefined |
lines-between-class-members | require or disallow an empty line between class members | undefined | error |
undefined |
[ "always" ] |
max-classes-per-file | enforce a maximum number of classes per file | undefined | undefined |
undefined |
undefined |
max-depth | enforce a maximum depth that blocks can be nested | undefined | warn |
undefined |
|
max-len | enforce a maximum line length | undefined | undefined |
undefined |
undefined |
max-lines-per-function | enforce a maximum number of line of code in a function | undefined | undefined |
undefined |
undefined |
max-lines | enforce a maximum number of lines per file | undefined | undefined |
undefined |
undefined |
max-nested-callbacks | enforce a maximum depth that callbacks can be nested | undefined | warn |
undefined |
[ 4 ] |
max-params | enforce a maximum number of parameters in function definitions | undefined | warn |
undefined |
[ { "max": 4 } ] |
max-statements-per-line | enforce a maximum number of statements allowed per line | undefined | error |
undefined |
|
max-statements | enforce a maximum number of statements allowed in function blocks | undefined | undefined |
undefined |
undefined |
multiline-comment-style | enforce a particular style for multiline comments | undefined | undefined |
undefined |
undefined |
multiline-ternary | enforce newlines between operands of ternary expressions | undefined | undefined |
undefined |
undefined |
new-cap | require constructor names to begin with a capital letter | error | error |
[ { "newIsCap": true, "capIsNew": false } ] |
[ { "newIsCap": true, "capIsNew": true } ] |
new-parens | require parentheses when invoking a constructor with no arguments | error | error | ||
newline-after-var | require or disallow an empty line after variable declarations | undefined | undefined |
undefined |
undefined |
newline-before-return | require an empty line before `return` statements | undefined | undefined |
undefined |
undefined |
newline-per-chained-call | require a newline after each call in a method chain | undefined | undefined |
undefined |
undefined |
no-alert | disallow the use of `alert`, `confirm`, and `prompt` | undefined | error |
undefined |
|
no-array-constructor | disallow `Array` constructors | error | error | ||
no-async-promise-executor | disallow using an async function as a Promise executor | undefined | error |
undefined |
|
no-await-in-loop | disallow `await` inside of loops | undefined | error |
undefined |
|
no-bitwise | disallow bitwise operators | undefined | undefined |
undefined |
undefined |
no-buffer-constructor | disallow use of the `Buffer()` constructor | undefined | error |
undefined |
|
no-caller | disallow the use of `arguments.caller` or `arguments.callee` | error | error | ||
no-case-declarations | disallow lexical declarations in case clauses | undefined | error |
undefined |
|
no-catch-shadow | disallow `catch` clause parameters from shadowing variables in the outer scope | undefined | undefined |
undefined |
undefined |
no-class-assign | disallow reassigning class members | error | error | ||
no-compare-neg-zero | disallow comparing against -0 | error | error | ||
no-cond-assign | disallow assignment operators in conditional expressions | error | error | ||
no-confusing-arrow | disallow arrow functions where they could be confused with comparisons | undefined | undefined |
undefined |
undefined |
no-console | disallow the use of `console` | undefined | undefined |
undefined |
undefined |
no-const-assign | disallow reassigning `const` variables | error | error | ||
no-constant-condition | disallow constant expressions in conditions | error | error |
[ { "checkLoops": false } ] |
|
no-continue | disallow `continue` statements | undefined | undefined |
undefined |
undefined |
no-control-regex | disallow control characters in regular expressions | error | error | ||
no-debugger | disallow the use of `debugger` | error | error | ||
no-delete-var | disallow deleting variables | error | error | ||
no-div-regex | disallow division operators explicitly at the beginning of regular expressions | undefined | error |
undefined |
|
no-dupe-args | disallow duplicate arguments in `function` definitions | error | error | ||
no-dupe-class-members | disallow duplicate class members | error | error | ||
no-dupe-keys | disallow duplicate keys in object literals | error | error | ||
no-duplicate-case | disallow duplicate case labels | error | error | ||
no-duplicate-imports | disallow duplicate module imports | undefined | undefined |
undefined |
undefined |
no-else-return | disallow `else` blocks after `return` statements in `if` statements | undefined | error |
undefined |
[ { "allowElseIf": false } ] |
no-empty-character-class | disallow empty character classes in regular expressions | error | error | ||
no-empty-function | disallow empty functions | undefined | undefined |
undefined |
undefined |
no-empty-pattern | disallow empty destructuring patterns | error | error | ||
no-empty | disallow empty block statements | undefined | error |
undefined |
[ { "allowEmptyCatch": true } ] |
no-eq-null | disallow `null` comparisons without type-checking operators | undefined | error |
undefined |
|
no-eval | disallow the use of `eval()` | error | error | ||
no-ex-assign | disallow reassigning exceptions in `catch` clauses | error | error | ||
no-extend-native | disallow extending native types | error | error | ||
no-extra-bind | disallow unnecessary calls to `.bind()` | error | error | ||
no-extra-boolean-cast | disallow unnecessary boolean casts | error | error | ||
no-extra-label | disallow unnecessary labels | undefined | error |
undefined |
|
no-extra-parens | disallow unnecessary parentheses | error | undefined |
[ "functions" ] |
undefined |
no-extra-semi | disallow unnecessary semicolons | undefined | error |
undefined |
|
no-fallthrough | disallow fallthrough of `case` statements | error | error | ||
no-floating-decimal | disallow leading or trailing decimal points in numeric literals | error | error | ||
no-func-assign | disallow reassigning `function` declarations | error | error | ||
no-global-assign | disallow assignments to native objects or read-only global variables | error | error | ||
no-implicit-coercion | disallow shorthand type conversions | undefined | error |
undefined |
|
no-implicit-globals | disallow variable and `function` declarations in the global scope | undefined | error |
undefined |
|
no-implied-eval | disallow the use of `eval()`-like methods | error | error | ||
no-inline-comments | disallow inline comments after code | undefined | undefined |
undefined |
undefined |
no-inner-declarations | disallow variable or `function` declarations in nested blocks | error | error |
[ "functions" ] |
|
no-invalid-regexp | disallow invalid regular expression strings in `RegExp` constructors | error | error | ||
no-invalid-this | disallow `this` keywords outside of classes or class-like objects | undefined | undefined |
undefined |
undefined |
no-irregular-whitespace | disallow irregular whitespace outside of strings and comments | error | error | ||
no-iterator | disallow the use of the `__iterator__` property | error | error | ||
no-label-var | disallow labels that share a name with a variable | error | error | ||
no-labels | disallow labeled statements | error | error |
[ { "allowLoop": false, "allowSwitch": false } ] |
|
no-lone-blocks | disallow unnecessary nested blocks | error | error | ||
no-lonely-if | disallow `if` statements as the only statement in `else` blocks | undefined | error |
undefined |
|
no-loop-func | disallow `function` declarations and expressions inside loop statements | undefined | undefined |
undefined |
undefined |
no-magic-numbers | disallow magic numbers | undefined | undefined |
undefined |
undefined |
no-misleading-character-class | disallow characters which are made with multiple code points in character class syntax | undefined | error |
undefined |
|
no-mixed-operators | disallow mixed binary operators | error | error |
[ { "groups": [ [ "==", "!=", "===", "!==", ">", ">=", "<", "<=" ], [ "&&", "||" ], [ "in", "instanceof" ] ], "allowSamePrecedence": true } ] |
|
no-mixed-requires | disallow `require` calls to be mixed with regular variable declarations | undefined | error |
undefined |
[ { "grouping": true, "allowCall": true } ] |
no-mixed-spaces-and-tabs | disallow mixed spaces and tabs for indentation | error | error | ||
no-multi-assign | disallow use of chained assignment expressions | undefined | error |
undefined |
|
no-multi-spaces | disallow multiple spaces | error | error | ||
no-multi-str | disallow multiline strings | error | error | ||
no-multiple-empty-lines | disallow multiple empty lines | error | error |
[ { "max": 1, "maxEOF": 0 } ] |
[ { "max": 1 } ] |
no-native-reassign | disallow assignments to native objects or read-only global variables | undefined | undefined |
undefined |
undefined |
no-negated-condition | disallow negated conditions | undefined | error |
undefined |
|
no-negated-in-lhs | disallow negating the left operand in `in` expressions | error | undefined |
undefined |
|
no-nested-ternary | disallow nested ternary expressions | undefined | undefined |
undefined |
undefined |
no-new-func | disallow `new` operators with the `Function` object | error | error | ||
no-new-object | disallow `Object` constructors | error | error | ||
no-new-require | disallow `new` operators with calls to `require` | error | error | ||
no-new-symbol | disallow `new` operators with the `Symbol` object | error | error | ||
no-new-wrappers | disallow `new` operators with the `String`, `Number`, and `Boolean` objects | error | error | ||
no-new | disallow `new` operators outside of assignments or comparisons | error | error | ||
no-obj-calls | disallow calling global object properties as functions | error | error | ||
no-octal-escape | disallow octal escape sequences in string literals | error | error | ||
no-octal | disallow octal literals | error | error | ||
no-param-reassign | disallow reassigning `function` parameters | undefined | undefined |
undefined |
undefined |
no-path-concat | disallow string concatenation with `__dirname` and `__filename` | error | error | ||
no-plusplus | disallow the unary operators `++` and `--` | undefined | undefined |
undefined |
undefined |
no-process-env | disallow the use of `process.env` | undefined | undefined |
undefined |
undefined |
no-process-exit | disallow the use of `process.exit()` | undefined | undefined |
undefined |
undefined |
no-proto | disallow the use of the `__proto__` property | error | error | ||
no-prototype-builtins | disallow calling some `Object.prototype` methods directly on objects | undefined | error |
undefined |
|
no-redeclare | disallow variable redeclaration | error | error | ||
no-regex-spaces | disallow multiple spaces in regular expressions | error | error | ||
no-restricted-globals | disallow specified global variables | undefined | error |
undefined |
[ "event" ] |
no-restricted-imports | disallow specified modules when loaded by `import` | undefined | error |
undefined |
[ "domain", "freelist", "smalloc", "sys", "colors" ] |
no-restricted-modules | disallow specified modules when loaded by `require` | undefined | error |
undefined |
[ "domain", "freelist", "smalloc", "sys", "colors" ] |
no-restricted-properties | disallow certain properties on certain objects | undefined | undefined |
undefined |
undefined |
no-restricted-syntax | disallow specified syntax | undefined | error |
undefined |
[ "WithStatement" ] |
no-return-assign | disallow assignment operators in `return` statements | error | error |
[ "except-parens" ] |
[ "always" ] |
no-return-await | disallow unnecessary `return await` | error | error | ||
no-script-url | disallow `javascript:` urls | undefined | error |
undefined |
|
no-self-assign | disallow assignments where both sides are exactly the same | error | error |
[ { "props": true } ] |
|
no-self-compare | disallow comparisons where both sides are exactly the same | error | error | ||
no-sequences | disallow comma operators | error | error | ||
no-shadow-restricted-names | disallow identifiers from shadowing restricted names | error | error | ||
no-shadow | disallow variable declarations from shadowing variables declared in the outer scope | undefined | undefined |
undefined |
undefined |
no-spaced-func | disallow spacing between function identifiers and their applications (deprecated) | undefined | undefined |
undefined |
undefined |
no-sparse-arrays | disallow sparse arrays | error | error | ||
no-sync | disallow synchronous methods | undefined | undefined |
undefined |
undefined |
no-tabs | disallow all tabs | error | undefined |
undefined |
|
no-template-curly-in-string | disallow template literal placeholder syntax in regular strings | error | error | ||
no-ternary | disallow ternary operators | undefined | undefined |
undefined |
undefined |
no-this-before-super | disallow `this`/`super` before calling `super()` in constructors | error | error | ||
no-throw-literal | disallow throwing literals as exceptions | error | error | ||
no-trailing-spaces | disallow trailing whitespace at the end of lines | error | error | ||
no-undef-init | disallow initializing variables to `undefined` | error | error | ||
no-undef | disallow the use of undeclared variables unless mentioned in `/*global */` comments | error | error |
[ { "typeof": true } ] |
|
no-undefined | disallow the use of `undefined` as an identifier | undefined | undefined |
undefined |
undefined |
no-underscore-dangle | disallow dangling underscores in identifiers | undefined | undefined |
undefined |
undefined |
no-unexpected-multiline | disallow confusing multiline expressions | error | error | ||
no-unmodified-loop-condition | disallow unmodified loop conditions | error | error | ||
no-unneeded-ternary | disallow ternary operators when simpler alternatives exist | error | error |
[ { "defaultAssignment": false } ] |
|
no-unreachable | disallow unreachable code after `return`, `throw`, `continue`, and `break` statements | error | error | ||
no-unsafe-finally | disallow control flow statements in `finally` blocks | error | error | ||
no-unsafe-negation | disallow negating the left operand of relational operators | error | error | ||
no-unused-expressions | disallow unused expressions | error | error |
[ { "allowShortCircuit": true, "allowTernary": true, "allowTaggedTemplates": true } ] |
|
no-unused-labels | disallow unused labels | undefined | error |
undefined |
|
no-unused-vars | disallow unused variables | error | error |
[ { "vars": "all", "args": "none", "ignoreRestSiblings": true } ] |
[ { "ignoreRestSiblings": true, "argsIgnorePattern": "^_$" } ] |
no-use-before-define | disallow the use of variables before they are defined | error | error |
[ { "functions": false, "classes": false, "variables": false } ] |
[ "nofunc" ] |
no-useless-call | disallow unnecessary calls to `.call()` and `.apply()` | error | error | ||
no-useless-computed-key | disallow unnecessary computed property keys in object literals | error | error | ||
no-useless-concat | disallow unnecessary concatenation of literals or template literals | undefined | error |
undefined |
|
no-useless-constructor | disallow unnecessary constructors | error | error | ||
no-useless-escape | disallow unnecessary escape characters | error | error | ||
no-useless-rename | disallow renaming import, export, and destructured assignments to the same name | error | error | ||
no-useless-return | disallow redundant return statements | error | error | ||
no-var | require `let` or `const` instead of `var` | undefined | undefined |
undefined |
undefined |
no-void | disallow `void` operators | undefined | error |
undefined |
|
no-warning-comments | disallow specified warning terms in comments | undefined | warn |
undefined |
|
no-whitespace-before-property | disallow whitespace before properties | error | error | ||
no-with | disallow `with` statements | error | error | ||
nonblock-statement-body-position | enforce the location of single-line statements | undefined | undefined |
undefined |
undefined |
object-curly-newline | enforce consistent line breaks inside braces | undefined | undefined |
undefined |
undefined |
object-curly-spacing | enforce consistent spacing inside braces | undefined | error |
undefined |
[ "never" ] |
object-property-newline | enforce placing object properties on separate lines | error | undefined |
[ { "allowMultiplePropertiesPerLine": true } ] |
undefined |
object-shorthand | require or disallow method and property shorthand syntax for object literals | undefined | undefined |
undefined |
undefined |
one-var-declaration-per-line | require or disallow newlines around variable declarations | undefined | error |
undefined |
|
one-var | enforce variables to be declared either together or separately in functions | error | error |
[ { "initialized": "never" } ] |
[ "never" ] |
operator-assignment | require or disallow assignment operator shorthand where possible | undefined | error |
undefined |
[ "always" ] |
operator-linebreak | enforce consistent linebreak style for operators | error | error |
[ "after", { "overrides": { "?": "before", ":": "before" } } ] |
[ "after" ] |
padded-blocks | require or disallow padding within blocks | error | error |
[ { "blocks": "never", "switches": "never", "classes": "never" } ] |
[ "never" ] |
padding-line-between-statements | require or disallow padding lines between statements | undefined | undefined |
undefined |
undefined |
prefer-arrow-callback | require using arrow functions for callbacks | undefined | undefined |
undefined |
undefined |
prefer-const | require `const` declarations for variables that are never reassigned after declared | undefined | undefined |
undefined |
undefined |
prefer-destructuring | require destructuring from arrays and/or objects | undefined | undefined |
undefined |
undefined |
prefer-numeric-literals | disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals | undefined | undefined |
undefined |
undefined |
prefer-object-spread | disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead. | undefined | undefined |
undefined |
undefined |
prefer-promise-reject-errors | require using Error objects as Promise rejection reasons | error | error |
[ { "allowEmptyReject": true } ] |
|
prefer-reflect | require `Reflect` methods where applicable | undefined | undefined |
undefined |
undefined |
prefer-rest-params | require rest parameters instead of `arguments` | undefined | undefined |
undefined |
undefined |
prefer-spread | require spread operators instead of `.apply()` | undefined | undefined |
undefined |
undefined |
prefer-template | require template literals instead of string concatenation | undefined | undefined |
undefined |
undefined |
quote-props | require quotes around object literal property names | undefined | error |
undefined |
[ "as-needed" ] |
quotes | enforce the consistent use of either backticks, double, or single quotes | error | error |
[ "single", { "avoidEscape": true, "allowTemplateLiterals": true } ] |
[ "single", { "allowTemplateLiterals": true } ] |
radix | enforce the consistent use of the radix argument when using `parseInt()` | undefined | error |
undefined |
|
require-atomic-updates | disallow assignments that can lead to race conditions due to usage of `await` or `yield` | undefined | error |
undefined |
|
require-await | disallow async functions which have no `await` expression | undefined | undefined |
undefined |
undefined |
require-jsdoc | require JSDoc comments | undefined | undefined |
undefined |
undefined |
require-unicode-regexp | enforce the use of `u` flag on RegExp | undefined | undefined |
undefined |
undefined |
require-yield | require generator functions to contain `yield` | undefined | error |
undefined |
|
rest-spread-spacing | enforce spacing between rest and spread operators and their expressions | error | error |
Both are set to:
[ "never" ] |
|
semi-spacing | enforce consistent spacing before and after semicolons | error | error |
Both are set to:
[ { "before": false, "after": true } ] |
|
semi-style | enforce location of semicolons | undefined | error |
undefined |
[ "last" ] |
semi | require or disallow semicolons instead of ASI | error | error |
[ "never" ] |
[ "always" ] |
sort-imports | enforce sorted import declarations within modules | undefined | undefined |
undefined |
undefined |
sort-keys | require object keys to be sorted | undefined | undefined |
undefined |
undefined |
sort-vars | require variables within the same declaration block to be sorted | undefined | undefined |
undefined |
undefined |
space-before-blocks | enforce consistent spacing before blocks | error | error |
Both are set to:
[ "always" ] |
|
space-before-function-paren | enforce consistent spacing before `function` definition opening parenthesis | error | error |
[ "always" ] |
[ { "anonymous": "always", "named": "never", "asyncArrow": "always" } ] |
space-in-parens | enforce consistent spacing inside parentheses | error | error |
Both are set to:
[ "never" ] |
|
space-infix-ops | require spacing around infix operators | error | error | ||
space-unary-ops | enforce consistent spacing before or after unary operators | error | error |
[ { "words": true, "nonwords": false } ] |
|
spaced-comment | enforce consistent spacing after the `//` or `/*` in a comment | error | error |
[ "always", { "line": { "markers": [ "*package", "!", "/", ",", "=" ] }, "block": { "balanced": true, "markers": [ "*package", "!", ",", ":", "::", "flow-include" ], "exceptions": [ "*" ] } } ] |
[ "always", { "line": { "exceptions": [ "-", "+", "*" ], "markers": [ "!", "/" ] }, "block": { "exceptions": [ "-", "+", "*" ], "markers": [ "!", "*" ], "balanced": true } } ] |
strict | require or disallow strict mode directives | undefined | undefined |
undefined |
undefined |
switch-colon-spacing | enforce spacing around colons of switch statements | undefined | error |
undefined |
[ { "after": true, "before": false } ] |
symbol-description | require symbol descriptions | error | error | ||
template-curly-spacing | require or disallow spacing around embedded expressions of template strings | error | error |
[ "never" ] |
|
template-tag-spacing | require or disallow spacing between template tags and their literals | error | error |
Both are set to:
[ "never" ] |
|
unicode-bom | require or disallow Unicode byte order mark (BOM) | error | error |
Both are set to:
[ "never" ] |
|
use-isnan | require calls to `isNaN()` when checking for `NaN` | error | error | ||
valid-jsdoc | enforce valid JSDoc comments | undefined | warn |
undefined |
[ { "requireReturn": false, "requireParamDescription": true, "requireReturnDescription": true } ] |
valid-typeof | enforce comparing `typeof` expressions against valid strings | error | error |
[ { "requireStringLiterals": true } ] |
[ { "requireStringLiterals": false } ] |
vars-on-top | require `var` declarations be placed at the top of their containing scope | undefined | undefined |
undefined |
undefined |
wrap-iife | require parentheses around immediate `function` invocations | error | error |
[ "any", { "functionPrototypeMethods": true } ] |
[ "inside", { "functionPrototypeMethods": true } ] |
wrap-regex | require parenthesis around regex literals | undefined | undefined |
undefined |
undefined |
yield-star-spacing | require or disallow spacing around the `*` in `yield*` expressions | error | error |
Both are set to:
[ "both" ] |
|
yoda | require or disallow "Yoda" conditions | error | error |
[ "never" ] |