-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
81 lines (80 loc) · 5.31 KB
/
.eslintrc.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"indent": ["error", 4],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"accessor-pairs": "error", // Enforce getter and setter pairs in objects
"class-methods-use-this": "error", // Enforce that class methods utilize 'this'
"complexity": ["error", 10], // Enforce a maximum cyclomatic complexity allowed in a program
"consistent-return": "error", // Require return statements to either always or never specify values
"curly": "error", // Enforce consistent brace style for all control statements
"default-case": "error", // Require default cases in switch statements
"dot-location": ["error", "property"], // Enforce consistent newlines before and after dots
"dot-notation": "error", // Enforce dot notation whenever possible
"guard-for-in": "error", // Require for-in loops to include an if statement
"no-alert": "error", // Disallow the use of alert, confirm, and prompt
"no-caller": "error", // Disallow the use of arguments.caller or arguments.callee
"no-case-declarations": "error", // Disallow lexical declarations in case clauses
"no-div-regex": "error", // Disallow division operators explicitly at the beginning of regular expressions
"no-else-return": "error", // Disallow else blocks after return statements in if statements
"no-empty-function": "error", // Disallow empty functions
"no-empty-pattern": "error", // Disallow empty destructuring patterns
"no-eq-null": "error", // Disallow null comparisons without type-checking operators
"no-extend-native": "error", // Disallow extending native types
"no-extra-bind": "error", // Disallow unnecessary calls to .bind()
"no-extra-label": "error", // Disallow unnecessary labels
"no-fallthrough": "error", // Disallow fallthrough of case statements
"no-floating-decimal": "error", // Disallow leading or trailing decimal points in numeric literals
"no-global-assign": "error", // Disallow assignments to native objects or read-only global variables
"no-implicit-coercion": "error", // Disallow shorthand type conversions
"no-implicit-globals": "error", // Disallow variable and function declarations in the global scope
"no-implied-eval": "error", // Disallow the use of eval()-like methods
"no-invalid-this": "error", // Disallow this keywords outside of classes or class-like objects
"no-iterator": "error", // Disallow the use of the __iterator__ property
"no-labels": "error", // Disallow labeled statements
"no-lone-blocks": "error", // Disallow unnecessary nested blocks
"no-loop-func": "error", // Disallow function declarations and expressions inside loop statements
"no-multi-spaces": "error", // Disallow multiple spaces
"no-multi-str": "error", // Disallow multiline strings
"no-new": "error", // Disallow new operators outside of assignments or comparisons
"no-new-func": "error", // Disallow new operators with the Function object
"no-new-wrappers": "error", // Disallow new operators with the String, Number, and Boolean objects
"no-octal": "error", // Disallow octal literals
"no-octal-escape": "error", // Disallow octal escape sequences in string literals
"no-param-reassign": "error", // Disallow reassigning function parameters
"no-proto": "error", // Disallow the use of the __proto__ property
"no-redeclare": "error", // Disallow variable redeclaration
"no-restricted-properties": "error", // Disallow certain properties on certain objects
"no-return-assign": "error", // Disallow assignment operators in return statements
"no-return-await": "error", // Disallow unnecessary return await
"no-script-url": "error", // Disallow javascript: urls
"no-self-assign": "error", // Disallow assignments where both sides are exactly the same
"no-self-compare": "error", // Disallow comparisons where both sides are exactly the same
"no-sequences": "error", // Disallow comma operators
"no-throw-literal": "error", // Disallow throwing literals as exceptions
"no-unmodified-loop-condition": "error", // Disallow unmodified loop conditions
"no-unused-expressions": "error", // Disallow unused expressions
"no-unused-labels": "error", // Disallow unused labels
"no-useless-call": "error", // Disallow unnecessary calls to .call() and .apply()
"no-useless-concat": "error", // Disallow unnecessary concatenation of literals or template literals
"no-useless-return": "error", // Disallow redundant return statements
"no-void": "error", // Disallow void operators
"no-warning-comments": "warn", // Disallow specified warning terms in comments
"no-with": "error", // Disallow with statements
"prefer-promise-reject-errors": "error", // Require using Error objects as Promise rejection reasons
"radix": "error", // Enforce the consistent use of the radix argument when using parseInt()
"require-await": "error", // Disallow async functions which have no await expression
"vars-on-top": "error", // Require var declarations be placed at the top of their containing scope
"wrap-iife": ["error", "inside"] // Require parentheses around immediate function invocations
}
}