SoFunction
Updated on 2025-04-12

Vscode turns off Eslint syntax checking in various ways (guaranteed to be valid)

"no-alert": 0,//Unable to use alert confirm prompt
"no-array-constructor": 2,//The use of array constructor is prohibited
"no-bitwise": 0,//The use of bitwise operators is prohibited
"no-caller": 1,//No use or
"no-catch-shadow": 2,//Suppress the catch clause parameter and external scope variable to be the same name
"no-class-assign": 2,//Prohibit assignment of values ​​to classes
"no-cond-assign": 2,//Unable the use of assignment statements in conditional expressions
"no-console": 2,//Console is prohibited
"no-const-assign": 2,//Disable the variables declared by const are not modified
"no-constant-condition": 2,//Unable the use of constant expressions in conditions if(true) if(1)
"no-continue": 0,//Unable to continue
"no-control-regex": 2,//Forbid the use of control characters in regular expressions
"no-debugger": 2,//Unable to use debugger
"no-delete-var": 2,// Cannot use delete operator for variables declared by var
"no-div-regex": 1,//Cannot use regular expressions that look like division/=foo/
"no-dupe-keys": 2,//Don't allow key duplication when creating object literals {a:1,a:1}
"no-dupe-args": 2,//Function parameters cannot be repeated
"no-duplicate-case": 2, //The case tag in switch cannot be repeated
"no-else-return": 2,//If there is return in the if statement, the else statement cannot be followed by it
"no-empty": 2,//The content in the block statement cannot be empty
"no-empty-character-class": 2,//The content of [] in the regular expression cannot be empty
"no-empty-label": 2,//Unable use of empty labels
"no-eq-null": 2,//Unable the use of the == or != operator for null
"no-eval": 1,//Use eval is prohibited
"no-ex-assign": 2,//Suppresses the assignment of values ​​to exception parameters in catch statements
"no-extend-native": 2,//Disable to extend native objects
"no-extra-bind": 2,//Prohibit unnecessary function binding
"no-extra-boolean-cast": 2,//Unnecessary bool conversion is prohibited
"no-extra-parens": 2,//No non-essential brackets are prohibited
"no-extra-semi": 2,//No extra colons
"no-fallthrough": 1,//No switch penetration
"no-floating-decimal": 2,//The omission of 0.5 in floating point numbers is prohibited.
"no-func-assign": 2,//Disable duplicate function declarations
"no-implicit-coercion": 1,//Disable implicit conversion
"no-implied-eval": 2,//Unable use of implicit eval
"no-inline-comments": 0,//No in-line notes
"no-inner-declarations": [2, "functions"],//Unable the use of declarations (variables or functions) in block statements
"no-invalid-regexp": 2,//Shield invalid regular expressions
"no-invalid-this": 2,//Invalid this is prohibited, it can only be used in constructors, classes, and object literals
"no-irregular-whitespace": 2,//No irregular spaces
"no-iterator": 2,//Unable to use the __iterator__ attribute
"no-label-var": 2, //label name cannot be the same as the variable name declared by var
"no-labels": 2,//Disable label declaration
"no-lone-blocks": 2,//Unnecessary nested blocks are prohibited
"no-lonely-if": 2,//Only if statements are prohibited
"no-loop-func": 1,//Forbidden to use functions in loops (if external variables are not referenced, it is OK to not form a closure)
"no-mixed-requires": [0, false],//The declaration type cannot be mixed when declaring
"no-mixed-spaces-and-tabs": [2, false], //Don't mix tabs and spaces
"linebreak-style": [0, "windows"],//Line break style
"no-multi-spaces": 1,//No extra spaces can be used
"no-multi-str": 2,//String cannot be used\line wrappers
"no-multiple-empty-lines": [1, {"max": 2}],//The blank line cannot exceed 2 lines at most
"no-native-reassign": 2,//Cannot rewrite native objects
"no-negated-in-lhs": 2,//The left side of the in operator cannot be there!
"no-nested-ternary": 0,//Nested three-item operation is prohibited
"no-new": 1,//Not assigning values ​​after using new to construct an instance
"no-new-func": 1,//Unable new Function
"no-new-object": 2,//Unable new Object()
"no-new-require": 2,//Unable new requirement
"no-new-wrappers": 2,//Unable to use new to create wrapper instances, new String new Boolean new Number
"no-obj-calls": 2,//Cannot call built-in global objects, such as Math() JSON()
"no-octal": 2,//Unable octal numbers
"no-octal-escape": 2,//Unable octal escape sequences
"no-param-reassign": 2,//Reassign parameters to be reassigned
"no-path-concat": 0, //Node cannot use __dirname or __filename for path stitching
"no-plusplus": 0,//No use of ++,--
"no-process-env": 0,//No use
"no-process-exit": 0,//Unable to use()
"no-proto": 2,//Unable to use the __proto__ attribute
"no-redeclare": 2,//Disable repeated declaration of variables
"no-regex-spaces": 2,//Forbidden to use multiple spaces in regular expression literals /foo bar/
"no-restricted-modules": 0,//If the specified module is disabled, an error will be reported when using it
"no-return-assign": 1,//Therefore statement cannot have assignment expressions
"no-script-url": 0,//Unable javascript:void(0)
"no-self-compare": 2,//You can't compare yourself
"no-sequences": 0,//The comma operator is prohibited
"no-shadow": 2,//Variables in the external scope cannot be the same as variables or parameters in the scope it contains
"no-shadow-restricted-names": 2,//The restriction identifier specified in strict mode cannot be used as variable names when declared
"no-spaced-func": 2,//There cannot be spaced between the function name and () when calling
"no-sparse-arrays": 2,//Sparse arrays are forbidden, [1,,2]
"no-sync": 0,//nodejs sync method is prohibited
"no-ternary": 0,//The use of trinocular operator is prohibited
"no-trailing-spaces": 1,//No spaces after the end of a line
"no-this-before-super": 0,//This or super cannot be used before calling super()
"no-throw-literal": 2,//Disable throw literal error throw "error";
"no-undef": 1,//No undefined variables
"no-undef-init": 2,// When the variable is initialized, you cannot directly assign it to undefined
"no-undefined": 2,//Undefined cannot be used
"no-unexpected-multiline": 2,//Avoid multi-line expressions
"no-underscore-dangle": 1,//Identifier cannot start or end with _
"no-unneeded-ternary": 2,//Unnecessary nesting var isYes = answer === 1 ? true : false;
"no-unreachable": 2,//There is no code that cannot be executed
"no-unused-expressions": 2,//No useless expressions
"no-unused-vars": [2, {"vars": "all", "args": "after-used"}],//There cannot be variables or parameters that have not been used after declaration
"no-use-before-define": 2,//Not used until undefined
"no-useless-call": 2,//Unnecessary calls and apply are prohibited
"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 notes
"no-with": 2,//Disable with
 
"array-bracket-spacing": [2, "never"], // Is it allowed to have extra spaces in non-empty arrays
"arrow-parens": 0,//The arrow function is enclosed in brackets
"arrow-spacing": 0,//=> front/back brackets
"accessor-pairs": 0,//Use getter/setter in object
"block-scoped-var": 0, // Use var in block statement
"brace-style": [1, "1tbs"],//brace style
"callback-return": 1,//Avoid multiple calls to callbacks
"camelcase": 2,// Forced Camel Law Naming
"comma-dangle": [2, "never"],//The object literal value item cannot have a comma at the end
"comma-spacing": 0,//Spacing spaces before and after commas
"comma-style": [2, "last"], //Comma style, at the beginning or end of the line when a new line is broken
"complexity": [0, 11],//Loop complexity
"computed-property-spacing": [0, "never"], // Is it allowed to calculate the key name or something
"consistent-return": 0,//return Whether omission is allowed afterwards
"consistent-this": [2, "that"],//this alias
"constructor-super": 0,//The non-derived class cannot call super, the derived class must call super
"curly": [2, "all"],//The {} in if(){} must be used
"default-case": 2, //The switch statement must have default at the end
"dot-location": 0,//The location of the object access character, at the beginning or end of the line when a new line is broken
"dot-notation": [0, { "allowKeywords": true }],//Avoid unnecessary square brackets
"eol-last": 0,//The file ends with a single newline character
"eqeqeq": 2,//There must be used in a total
"func-names": 0,//Func expression must have a name
"func-style": [0, "declaration"],//Function style, stipulate that only function declarations/function expressions can be used
"generator-star-spacing": 0,//Before and after spaces of generator function*
"guard-for-in": 0,//For in loops should be filtered with if statement
"handle-callback-err": 0,//nodejs handles error
"id-length": 0,//Variable name length
"indent": [2, 4],//Indent style
"init-declarations": 0,//The initial value must be assigned when declaring
"key-spacing": [0, { "beforeColon": false, "afterColon": true }], //The spaces before and after colons in the object literal
"lines-around-comment": 0, //Before line/after line note
"max-depth": [0, 4],//Nested block depth
"max-len": [0, 80, 4],//Maximum string length
"max-nested-callbacks": [0, 2],//Callback nesting depth
"max-params": [0, 3],//The function can only have 3 parameters at most
"max-statements": [0, 10],//There are at most several declarations in the function
"new-cap": 2,//The first line of the function name must be called in new mode, and the first line of the lowercase must be called in new mode without new mode
"new-parens": 2, //Branch must be added when new
"newline-after-var": 2, // Is it necessary to empty a line after the variable is declared
"object-curly-spacing": [0, "never"], //Is unnecessary spaces allowed in curly braces
"object-shorthand": 0,//Forced object literal abbreviation syntax
"one-var": 1,//Continuous declaration
"operator-assignment": [0, "always"],//Assign operator += -=What's the
"operator-linebreak": [2, "after"], //Or whether the operator is at the end of the line or at the beginning of the line when newline is
"padded-blocks": 0,//Whether to empty lines at the beginning and end of the block statement
"prefer-const": 0,//Preferred const
"prefer-spread": 0,//Preferred to expand operations
"prefer-reflect": 0,//Preferred Reflect method
"quotes": [1, "single"],//quotes type `` "" ''
"quote-props":[2, "always"],//Is the attribute name in the object literal forced double quotes
"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"],//Sentence forced the end of the semicolon
"semi-spacing": [0, {"before": false, "after": true}], //Spaces before and after semicolon
"sort-vars": 0,//Sorting when variable declaration
"space-after-keywords": [0, "always"],//Is there a space after the keyword?
"space-before-blocks": [0, "always"],//Blocks that do not start with new lines {Whether there is a space in front of them
"space-before-function-paren": [0, "always"],//Where should there be spaces before the brackets when defining the function
"space-in-parens": [0, "never"], //Where should there be spaces in brackets
"space-infix-ops": 0,//Whether there are spaces around the infix operator
"space-return-throw-case": 2,//Whether should I add spaces after the return throw case
"space-unary-ops": [0, { "words": true, "nonwords": false }], //Where should I add spaces before and after the unary operator?
"spaced-comment": 0,//Does the comment style have spaces or something?
"strict": 2,//Use strict mode
"use-isnan": 2,//Unable to use NaN during comparison, only isNaN() can be used
"valid-jsdoc": 0,//jsdoc rule
"valid-typeof": 2,//The value of the legal typeof must be used
"vars-on-top": 2, //var must be placed at the top of the scope
"wrap-iife": [2, "inside"],//Immediately execute the bracket style of function expression
"wrap-regex": 0,//The literal of regular expression is wrapped in brackets
"yoda": [2, "never"]//Yoda condition is prohibited