"No-alert": 0, // disable the use of alert confirm prompt
"No-array-constructor": 2, // The array constructor is not allowed.
"No-bitwise": 0, // do not use the bitwise Operator
"No-Caller": 1, // disable the use of arguments. Caller or arguments. callee
"No-catch-Shadow": 2, // The Catch clause parameter has the same name as the external scope variable.
"No-class-assign": 2, // do not assign a value to a class
"No-cond-assign": 2, // do not use the value assignment statement in the conditional expression
"No-console": 2, // Disable Console
"No-const-assign": 2, // do not modify the variable declared by const.
"No-Constant-condition": 2, // do not use the constant expression if (true) if (1) in the condition)
"No-continue": 0, // do not use continue
"No-control-RegEx": 2, // do not use control characters in Regular Expressions
"No-Debugger": 2, // disable the use of Debugger
"No-delete-Var": 2, // The delete operator cannot be used for the variables declared by var.
"No-div-RegEx": 1, // do not use a regular expression that looks like Division/= Foo/
"No-dupe-keys": 2, // duplicate keys are not allowed when the object literal volume is created {A: 1, A: 1}
"No-dupe-ARGs": 2, // function parameters cannot be repeated
"No-duplicate-case": 2, // The case tag in the switch cannot be repeated.
"No-else-return": 2, // If the if statement contains return, it cannot be followed by the else statement
"No-empty": 2, // the content in the block statement cannot be blank
"No-empty-character-class": 2, // The [] content in the regular expression cannot be blank
"No-empty-label": 2, // do not use an empty label
"No-eq-null": 2, // do not use = or for null! = Operator
"No-eval": 1, // disable eval
"No-ex-assign": 2, // do not assign a value to the exception parameter in the catch statement
"No-Extend-native": 2, // disable native object extension
"No-extra-bind": 2, // disable unnecessary function binding
"No-extra-Boolean-cast": 2, // disable unnecessary bool Conversions
"No-extra-Parens": 2, // disable unnecessary parentheses
"No-extra-semi": 2, // disable unnecessary colons
"No-fallthrough": 1, // disable switch penetration
"No-Floating-decimal": 2, // do not omit 0. 5 3.
"No-func-assign": 2, // disable repeated function declaration
"No-implicit-coercion": 1, // disable implicit conversion
"No-implied-eval": 2, // disable the use of implicit eval
"No-inline-Comments": 0, // disable intra-row remarks
"No-inner-declarations": [2, "functions"], // do not use declarations (variables or functions) in block statements)
"No-invalid-Regexp": 2, // disable invalid Regular Expressions
"No-invalid-This": 2, // disable this which is invalid. It can only be used in constructors, classes, and literal objects.
"No-irregular-whitespace": 2, // There cannot be irregular Spaces
"No-iterator": 2, // disable the _ iterator _ attribute
"No-label-Var": 2, // The label name cannot be the same as the variable name declared by var.
"No-labels": 2, // disable label Declaration
"No-lone-blocks": 2, // disable unnecessary nested Blocks
"No-lonely-if": 2, // only the if statement in the else statement is prohibited
"No-loop-func": 1, // do not use a function in a loop (if no external variable is referenced, a closure is not formed)
"No-mixed-requires": [0, false], // The declared type cannot be mixed.
"No-mixed-spaces-and-Tabs": [2, false], // do not mix tabs and spaces.
"Linebreak-style": [0, "Windows"], // line feed Style
"No-Multi-spaces": 1, // no extra space is allowed.
"No-Multi-Str": 2, // The string cannot use \ line feed.
"No-multiple-empty-lines": [1, {"Max": 2}], // empty rows cannot exceed 2
"No-native-reassign": 2, // native objects cannot be rewritten.
"No-negated-in-LHS": 2, // the left of the in operator cannot exist!
"No-nested-ternary": 0, // you cannot use nested three-object operations.
"No-New": 1, // do not assign a value after using new to construct an instance
"No-New-func": 1, // disable the use of new function
"No-New-object": 2, // do not use new object ()
"No-New-require": 2, // do not use new require
"No-New-wrappers": 2, // do not use new to create a wrapper instance. New String new Boolean new number
"No-obj-CILS": 2, // you cannot call a built-in Global object, such as math () JSON ()
"No-octal": 2, // disable the use of Octal numbers
"No-octal-Escape": 2, // do not use the octal escape sequence
"No-param-reassign": 2, // do not assign a value to a parameter.
"No-path-Concat": 0, // The _ dirname or _ filename cannot be used in node for path concatenation.
"No-plusplus": 0, // do not use ++ ,--
"No-process-env": 0, // disable process. Env.
"No-process-Exit": 0, // process. Exit () is disabled ()
"No-Proto": 2, // disable the _ PROTO _ attribute
"No-redeclare": 2, // do not declare variables repeatedly
"No-RegEx-spaces": 2, // do not use multiple spaces in the regular expression literal./Foo bar/
"No-restricted-modules": 0, // if the specified module is disabled, an error is returned.
"No-return-assign": 1, // The return statement cannot contain a value assignment expression.
"No-script-URL": 0, // disable javascript: void (0)
"No-Self-compare": 2, // cannot compare itself
"No-sequences": 0, // do not use the comma Operator
"No-Shadow": 2, // variables in the external scope cannot have the same name as the variables or parameters in the scope it contains.
"No-shadow-restricted-names": 2, // The restriction identifier specified in the strict mode cannot be used as the variable name at the time of declaration
"No-spaced-func": 2, // No space is allowed between the function name and () during function calling.
"No-Sparse-arrays": 2, // sparse array is prohibited, [1, 2]
"No-sync": 0, // nodejs disable Synchronization Method
"No-ternary": 0, // The Three-object operator is not allowed.
"No-trailing-spaces": 1, // do not contain spaces after the end of a row
"No-this-before-Super": 0, // This or super cannot be used before Super () is called.
"No-throw-literal": 2, // do not throw a literal error throw "error ";
"No-UNDEF": 1, // There cannot be undefined Variables
"No-UNDEF-init": 2, // The variable cannot be assigned undefined directly during initialization.
"No-undefined": 2, // undefined cannot be used
"No-unexpected-multiline": 2, // avoid multiple line expressions
"No-underscore-dangle": 1, // The identifier cannot start or end _
"No-unneeded-ternary": 2, // disable unnecessary nested var isyes = answer = 1? True: false;
"No-Unreachable": 2, // No code that cannot be executed
"No-unused-expressions": 2, // disable useless expressions
"No-unused-vars": [2, {"vars": "All", "ARGs": "After-used"}], // variables or parameters that are not used after they are not clear
"No-use-before-Define": 2, // cannot be used before undefined
"No-useless-call": 2, // disable unnecessary call and apply
"No-void": 2, // disable the void Operator
"No-Var": 0, // disable var. Use let and const instead.
"No-warning-Comments": [1, {"Terms": ["Todo", "fixme", "XXX"], "location": "Start"}], // no warning remarks
"No-with": 2, // disable
"Array-bracket-spacing": [2, "never"], // whether redundant spaces are allowed in non-empty Arrays
"Arrow-Parens": 0, // The Arrow function is enclosed in parentheses.
"Arrow-spacing": 0, // => front/back brackets
"Accessor-pairs": 0, // use getter/setter in the object
"Block-scoped-Var": 0, // use VaR in block statements
"Brace-style": [1, "1tbs"], // braces
"Callback-return": 1, // avoid calling the callback multiple times or something
"Camelcase": 2, // name by force camelcase
"Comma-dangle": [2, "never"], // The end of an object literal cannot contain commas
"Comma-spacing": 0, // spaces before and after the comma
"Comma-style": [2, "last"], // comma-style, starting or ending with a line
"Complexity": [0, 11], // cyclic complexity
"Computed-property-spacing": [0, "never"], // whether the calculated key name or something is allowed
"Consistent-return": 0, // whether to omit the content after return
"Consistent-This": [2, "that"], // this alias
"Constructor-Super": 0, // a non-derived class cannot call Super. A derived class must call super.
"Curly": [2, "all"], // you must use {} In if {}
"Default-case": 2, // The switch statement must end with default
"Dot-location": 0, // location of the Object Access character. It is the beginning or end of the line when the line breaks.
"Dot-notation": [0, {"allowkeywords": true}], // avoid unnecessary square brackets
"EOL-last": 0, // end with a single line break
"Eqeqeq": 2, // must use all
"Func-names": 0, // The function expression must have a name.
"Func-style": [0, "Declaration"], // function style, which must be a function declaration or expression
"Generator-star-spacing": 0, // space before and after the generator function *
"Guard-for-in": 0, // For in loop, use the if statement to filter
"Handle-callback-Err": 0, // nodejs processing error
"ID-length": 0, // variable name length
"Indent": [2, 4], // indent Style
"Init-declarations": 0, // The initial value must be assigned during declaration.
"Key-spacing": [0, {"beforecolon": false, "aftercolon": true}], // the leading and trailing spaces of the colon in the object literal
"Lines-around-comment": 0, // remarks before/After a row
"Max-depth": [0, 4], // nested block depth
"Max-len": [0, 80, 4], // maximum String Length
"Max-nested-Callbacks": [0, 2], // callback nested depth
"Max-Params": [0, 3], // a function can have up to three parameters
"Max-statements": [0, 10], // The maximum number of declarations in the function
"New-cap": 2, // the first line of the function name must be called using the new method, and the first line must be called using the new method without the new method.
"New-Parens": 2, // parentheses must be added for new
"Newline-after-Var": 2, // whether a blank line is required after the variable Declaration
"Object-curly-spacing": [0, "never"], // whether unnecessary spaces are allowed in braces
"Object-shorthand": 0, // syntax for force object literal abbreviations
"One-Var": 1, // continuous Declaration
"Operator-assignment": [0, "always"], // value assignment operator + =-= or something
"Operator-linebreak": [2, "after"], // specifies whether the line operator is at the end of a line or at the beginning of a line.
"Padded-blocks": 0, // whether the first line and the end of the block statement must be empty
"Prefer-const": 0, // the first choice of const
"Prefer-spread": 0, // expansion operation is preferred.
"Prefer-reflect": 0, // method of reflect preferred
"Quotes": [1, "single"], // quotation mark type ''""''
"Quote-props": [2, "always"], // whether the attribute name in the object literal is forced double quotation marks
"Radix": 2, // parseint must specify the second parameter
"ID-match": 0, // name Detection
"Require-yield": 0, // The generator function must have yield
"Semi": [2, "always"], // The statement forces the end of a semicolon
"Semi-spacing": [0, {"before": false, "after": true}], // spaces before and after semicolons
"Sort-vars": 0, // sorting when variable Declaration
"Space-after-keywords": [0, "always"], // do you want to leave a space behind the keyword?
"Space-before-blocks": [0, "always"], // block that does not start with a new line {Do You Want To Have spaces before
"Space-before-function-Paren": [0, "always"], // do you need a space before the brackets when defining a function?
"Space-in-Parens": [0, "never"], // do not have spaces in parentheses
"Space-infix-ops": 0, // do not have spaces around the infix Operator
"Space-return-throw-case": 2, // do you want to add a space after return throw case?
"Space-Unary-ops": [0, {"Words": True, "nonwords": false}], // do not add spaces before/after the unary operator
"Spaced-comment": 0, // do you want to leave a space or something in the comment style?
"Strict": 2, // use strict Mode
"Use-isnan": 2, // when comparison is prohibited, Nan can only be used ()
"Valid-jsdoc": 0, // jsdoc rule
"Valid-typeof": 2, // The value of valid typeof must be used.
"Vars-on-top": 2, // var must be placed at the top of the Scope
"Wrap-Iife": [2, "inside"], // parentheses for immediate execution of function expressions
"Wrap-RegEx": 0, // Regular Expression literally wrapped in parentheses
"Yoda": [2, "never"] // you can specify a condition to disable the service.
---------------------
Snow Wolf
Source: csdn
Original: 51507428
Copyright Disclaimer: This article is an original article by the blogger. For more information, see the blog post link!
Eslint Rule Description