@wildpastry/eslint-config 1.8.4 → 1.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +158 -157
- package/package.json +4 -4
- package/.eslintrc +0 -397
package/index.js
CHANGED
|
@@ -37,158 +37,159 @@ export default [
|
|
|
37
37
|
},
|
|
38
38
|
rules: {
|
|
39
39
|
// Modern Code Quality Rules
|
|
40
|
-
'array-callback-return': 1, // enforce `return` statements in callbacks of array methods - ENABLED
|
|
41
|
-
'no-await-in-loop': 1, // disallow `await` inside of loops - ENABLED
|
|
42
|
-
'no-constructor-return': 1, // disallow returning value from constructor - ENABLED
|
|
43
|
-
'no-duplicate-imports': 1, // disallow duplicate module imports
|
|
44
|
-
'no-promise-executor-return': 1, // disallow returning values from Promise executor functions - ENABLED
|
|
45
|
-
'no-self-compare': 1, // disallow comparisons where both sides are exactly the same
|
|
46
|
-
'no-template-curly-in-string': 1, // disallow template literal placeholder syntax in regular strings - ENABLED
|
|
47
|
-
'no-unmodified-loop-condition': 1, // disallow unmodified loop conditions
|
|
48
|
-
'no-unreachable-loop': 1, // disallow loops with a body that allows only one iteration
|
|
49
|
-
'no-use-before-define': 1, // disallow the use of variables before they are defined - ENABLED
|
|
50
|
-
'require-atomic-updates': 1, // disallow assignments that can lead to race conditions due to usage of `await` or `yield`
|
|
40
|
+
'array-callback-return': 1, // enforce `return` statements in callbacks of array methods - ENABLED
|
|
41
|
+
'no-await-in-loop': 1, // disallow `await` inside of loops - ENABLED
|
|
42
|
+
'no-constructor-return': 1, // disallow returning value from constructor - ENABLED
|
|
43
|
+
'no-duplicate-imports': 1, // disallow duplicate module imports - ENABLED
|
|
44
|
+
'no-promise-executor-return': 1, // disallow returning values from Promise executor functions - ENABLED
|
|
45
|
+
'no-self-compare': 1, // disallow comparisons where both sides are exactly the same - ENABLED
|
|
46
|
+
'no-template-curly-in-string': 1, // disallow template literal placeholder syntax in regular strings - ENABLED
|
|
47
|
+
'no-unmodified-loop-condition': 1, // disallow unmodified loop conditions - ENABLED
|
|
48
|
+
'no-unreachable-loop': 1, // disallow loops with a body that allows only one iteration - ENABLED
|
|
49
|
+
'no-use-before-define': 1, // disallow the use of variables before they are defined - ENABLED
|
|
50
|
+
'require-atomic-updates': 1, // disallow assignments that can lead to race conditions due to usage of `await` or `yield` - ENABLED
|
|
51
51
|
|
|
52
52
|
// Additional Strict Rules
|
|
53
53
|
'complexity': [1, 10], // enforce a maximum cyclomatic complexity - ENABLED with limit of 10
|
|
54
|
-
'no-magic-numbers': [1, { ignore: [0, 1, -1], ignoreArrayIndexes: true }], // disallow magic numbers with exceptions
|
|
54
|
+
'no-magic-numbers': [1, { ignore: [0, 1, -1], ignoreArrayIndexes: true }], // disallow magic numbers - ENABLED with exceptions
|
|
55
55
|
'id-length': [
|
|
56
56
|
1,
|
|
57
57
|
{ min: 2, exceptions: ['i', 'j', 'k', 'x', 'y', 'z', '_'] }
|
|
58
|
-
], // enforce minimum identifier lengths
|
|
58
|
+
], // enforce minimum identifier lengths - ENABLED with exceptions
|
|
59
59
|
'accessor-pairs': 0, // enforce getter and setter pairs in objects and classes - OFF
|
|
60
60
|
'arrow-body-style': 0, // require braces around arrow function bodies - OFF
|
|
61
|
-
'block-scoped-var': 1, // enforce the use of variables within the scope they are defined
|
|
62
|
-
'camelcase': 1, // enforce camelcase naming convention
|
|
63
|
-
'capitalized-comments':
|
|
61
|
+
'block-scoped-var': 1, // enforce the use of variables within the scope they are defined - ENABLED
|
|
62
|
+
'camelcase': 1, // enforce camelcase naming convention - ENABLED
|
|
63
|
+
'capitalized-comments': 1, // enforce or disallow capitalization of the first letter of a comment - ENABLED
|
|
64
64
|
'class-methods-use-this': 0, // enforce that class methods utilize `this` - OFF
|
|
65
|
-
'consistent-return': 1, // require `return` statements to either always or never specify values
|
|
66
|
-
'consistent-this': 1, // enforce consistent naming when capturing the current execution context
|
|
67
|
-
'default-case': 1, // require `default` cases in `switch` statements
|
|
68
|
-
'default-case-last': 1, // enforce default clauses in switch statements to be last
|
|
69
|
-
'default-param-last': 1, // enforce default parameters to be last - ENABLED
|
|
70
|
-
'dot-notation': 1, // enforce dot notation whenever possible
|
|
71
|
-
'eqeqeq': 1, // require the use of `===` and `!==`
|
|
72
|
-
'func-name-matching': 1, // require function names to match the name of the variable or property to which they are assigned
|
|
73
|
-
'func-names': 0, // require or disallow named `function` expressions - OFF
|
|
65
|
+
'consistent-return': 1, // require `return` statements to either always or never specify values - ENABLED
|
|
66
|
+
'consistent-this': 1, // enforce consistent naming when capturing the current execution context - ENABLED
|
|
67
|
+
'default-case': 1, // require `default` cases in `switch` statements - ENABLED
|
|
68
|
+
'default-case-last': 1, // enforce default clauses in switch statements to be last - ENABLED
|
|
69
|
+
'default-param-last': 1, // enforce default parameters to be last - ENABLED
|
|
70
|
+
'dot-notation': 1, // enforce dot notation whenever possible - ENABLED
|
|
71
|
+
'eqeqeq': 1, // require the use of `===` and `!==` - ENABLED
|
|
72
|
+
'func-name-matching': 1, // require function names to match the name of the variable or property to which they are assigned - ENABLED
|
|
73
|
+
'func-names': 0, // require or disallow named `function` expressions - OFF
|
|
74
74
|
'func-style': 0, // enforce the consistent use of either `function` declarations or expressions - OFF
|
|
75
|
-
'grouped-accessor-pairs': 1, // require grouped accessor pairs in object literals and classes
|
|
76
|
-
'guard-for-in': 1, // require `for-in` loops to include an `if` statement
|
|
75
|
+
'grouped-accessor-pairs': 1, // require grouped accessor pairs in object literals and classes - ENABLED
|
|
76
|
+
'guard-for-in': 1, // require `for-in` loops to include an `if` statement - ENABLED
|
|
77
77
|
'id-denylist': 0, // disallow specified identifiers - OFF
|
|
78
78
|
'id-match': 0, // require identifiers to match a specified regular expression - OFF
|
|
79
79
|
'init-declarations': 0, // require or disallow initialization in variable declarations - OFF
|
|
80
|
-
'max-classes-per-file': 1, // enforce a maximum number of classes per file
|
|
81
|
-
'max-depth': [1, 4], // enforce a maximum depth that blocks can be nested -
|
|
82
|
-
'max-lines': [1, { max: 1000, skipBlankLines: true }], // enforce a maximum number of lines per file -
|
|
83
|
-
'max-lines-per-function': [1, { max: 300 }], // enforce a maximum number of lines of code in a function -
|
|
84
|
-
'max-nested-callbacks': [1, 4], // enforce a maximum depth that callbacks can be nested -
|
|
85
|
-
'max-params': [1, { max: 5 }], // enforce a maximum number of parameters in function definitions -
|
|
86
|
-
'max-statements': [1, { max: 30 }], // enforce a maximum number of statements allowed in function blocks -
|
|
87
|
-
'multiline-comment-style':
|
|
80
|
+
'max-classes-per-file': 1, // enforce a maximum number of classes per file - ENABLED
|
|
81
|
+
'max-depth': [1, 4], // enforce a maximum depth that blocks can be nested - ENABLED with limit of 4
|
|
82
|
+
'max-lines': [1, { max: 1000, skipBlankLines: true }], // enforce a maximum number of lines per file - ENABLED with limit of 1000
|
|
83
|
+
'max-lines-per-function': [1, { max: 300 }], // enforce a maximum number of lines of code in a function - ENABLED with limit of 300
|
|
84
|
+
'max-nested-callbacks': [1, 4], // enforce a maximum depth that callbacks can be nested - ENABLED with limit of 4
|
|
85
|
+
'max-params': [1, { max: 5 }], // enforce a maximum number of parameters in function definitions - ENABLED with limit of 5
|
|
86
|
+
'max-statements': [1, { max: 30 }], // enforce a maximum number of statements allowed in function blocks - ENABLED with limit of 30
|
|
87
|
+
'multiline-comment-style': 1, // enforce a particular style for multiline comments - ENABLED
|
|
88
88
|
'new-cap': 0, // require constructor names to begin with a capital letter - OFF
|
|
89
|
-
'no-alert': 1, // disallow the use of `alert`, `confirm`, and `prompt`
|
|
90
|
-
'no-array-constructor': 1, // disallow `Array` constructors
|
|
91
|
-
'no-bitwise': 1, // disallow bitwise operators
|
|
92
|
-
'no-caller': 1, // disallow the use of `arguments.caller` or `arguments.callee`
|
|
93
|
-
'no-case-declarations': 1, // disallow lexical declarations in case clauses
|
|
94
|
-
'no-console': 1, // disallow the use of `console`
|
|
95
|
-
'no-continue': 1, // disallow `continue` statements
|
|
96
|
-
'no-delete-var': 1, // disallow deleting variables
|
|
97
|
-
'no-div-regex': 1, // disallow division operators explicitly at the beginning of regular expressions
|
|
98
|
-
'no-else-return': 1, // disallow `else` blocks after `return` statements in `if` statements
|
|
99
|
-
'no-empty': 1, // disallow empty block statements
|
|
100
|
-
'no-empty-function': [1, { allow: ['constructors'] }], // disallow empty functions
|
|
101
|
-
'no-eq-null': 1, // disallow `null` comparisons without type-checking operators
|
|
102
|
-
'no-eval': 1, // disallow the use of `eval()`
|
|
103
|
-
'no-extend-native': 1, // disallow extending native types
|
|
104
|
-
'no-extra-bind': 1, // disallow unnecessary calls to `.bind()`
|
|
105
|
-
'no-extra-boolean-cast': 1, // disallow unnecessary boolean casts
|
|
106
|
-
'no-extra-label': 1, // disallow unnecessary labels
|
|
107
|
-
'no-global-assign': 1, // disallow assignments to native objects or read-only global variables
|
|
108
|
-
'no-implicit-coercion': 1, // disallow shorthand type conversions
|
|
109
|
-
'no-implicit-globals': 1, // disallow declarations in the global scope
|
|
110
|
-
'no-implied-eval': 1, // disallow the use of `eval()`-like methods
|
|
111
|
-
'no-inline-comments':
|
|
112
|
-
'no-invalid-this': 1, // disallow `this` keywords outside of classes or class-like objects
|
|
113
|
-
'no-iterator': 1, // disallow the use of the `__iterator__` property
|
|
114
|
-
'no-label-var': 1, // disallow labels that share a name with a variable
|
|
115
|
-
'no-labels': 1, // disallow labeled statements
|
|
116
|
-
'no-lone-blocks': 1, // disallow unnecessary nested blocks
|
|
117
|
-
'no-lonely-if': 1, // disallow `if` statements as the only statement in `else` blocks
|
|
118
|
-
'no-loop-func': 1, // disallow function declarations that contain unsafe references inside loop statements
|
|
119
|
-
'no-multi-assign': 1, // disallow use of chained assignment expressions
|
|
120
|
-
'no-multi-str': 1, // disallow multiline strings
|
|
121
|
-
'no-negated-condition': 1, // disallow negated conditions
|
|
122
|
-
'no-nested-ternary': 1, // disallow nested ternary expressions
|
|
123
|
-
'no-new': 1, // disallow `new` operators outside of assignments or comparisons
|
|
124
|
-
'no-new-func': 1, // disallow `new` operators with the `Function` object
|
|
125
|
-
'no-new-object': 1, // disallow `Object` constructors
|
|
126
|
-
'no-new-wrappers': 1, // disallow `new` operators with the `String`, `Number`, and `Boolean` objects
|
|
127
|
-
'no-nonoctal-decimal-escape': 1, // disallow `\8` and `\9` escape sequences in string literals
|
|
128
|
-
'no-octal': 1, // disallow octal literals
|
|
129
|
-
'no-octal-escape': 1, // disallow octal escape sequences in string literals
|
|
130
|
-
'no-param-reassign': 1, // disallow reassigning `function` parameters
|
|
131
|
-
'no-plusplus': 1, // disallow the unary operators `++` and `--`
|
|
132
|
-
'no-
|
|
133
|
-
'no-
|
|
134
|
-
'no-
|
|
135
|
-
'no-restricted-
|
|
136
|
-
'no-restricted-
|
|
137
|
-
'no-restricted-
|
|
138
|
-
'no-restricted-
|
|
139
|
-
'no-
|
|
140
|
-
'no-return-
|
|
141
|
-
'no-
|
|
142
|
-
'no-
|
|
143
|
-
'no-
|
|
144
|
-
'no-shadow
|
|
145
|
-
'no-
|
|
146
|
-
'no-
|
|
147
|
-
'no-
|
|
148
|
-
'no-
|
|
149
|
-
'no-
|
|
89
|
+
'no-alert': 1, // disallow the use of `alert`, `confirm`, and `prompt` - ENABLED
|
|
90
|
+
'no-array-constructor': 1, // disallow `Array` constructors - ENABLED
|
|
91
|
+
'no-bitwise': 1, // disallow bitwise operators - ENABLED
|
|
92
|
+
'no-caller': 1, // disallow the use of `arguments.caller` or `arguments.callee` - ENABLED
|
|
93
|
+
'no-case-declarations': 1, // disallow lexical declarations in case clauses - ENABLED
|
|
94
|
+
'no-console': 1, // disallow the use of `console` - ENABLED
|
|
95
|
+
'no-continue': 1, // disallow `continue` statements - ENABLED
|
|
96
|
+
'no-delete-var': 1, // disallow deleting variables - ENABLED
|
|
97
|
+
'no-div-regex': 1, // disallow division operators explicitly at the beginning of regular expressions - ENABLED
|
|
98
|
+
'no-else-return': 1, // disallow `else` blocks after `return` statements in `if` statements - ENABLED
|
|
99
|
+
'no-empty': 1, // disallow empty block statements - ENABLED
|
|
100
|
+
'no-empty-function': [1, { allow: ['constructors'] }], // disallow empty functions - ENABLED with exceptions
|
|
101
|
+
'no-eq-null': 1, // disallow `null` comparisons without type-checking operators - ENABLED
|
|
102
|
+
'no-eval': 1, // disallow the use of `eval()` - ENABLED
|
|
103
|
+
'no-extend-native': 1, // disallow extending native types - ENABLED
|
|
104
|
+
'no-extra-bind': 1, // disallow unnecessary calls to `.bind()` - ENABLED
|
|
105
|
+
'no-extra-boolean-cast': 1, // disallow unnecessary boolean casts - ENABLED
|
|
106
|
+
'no-extra-label': 1, // disallow unnecessary labels - ENABLED
|
|
107
|
+
'no-global-assign': 1, // disallow assignments to native objects or read-only global variables - ENABLED
|
|
108
|
+
'no-implicit-coercion': 1, // disallow shorthand type conversions - ENABLED
|
|
109
|
+
'no-implicit-globals': 1, // disallow declarations in the global scope - ENABLED
|
|
110
|
+
'no-implied-eval': 1, // disallow the use of `eval()`-like methods - ENABLED
|
|
111
|
+
'no-inline-comments': 0, // disallow inline comments after code - OFF
|
|
112
|
+
'no-invalid-this': 1, // disallow `this` keywords outside of classes or class-like objects - ENABLED
|
|
113
|
+
'no-iterator': 1, // disallow the use of the `__iterator__` property - ENABLED
|
|
114
|
+
'no-label-var': 1, // disallow labels that share a name with a variable - ENABLED
|
|
115
|
+
'no-labels': 1, // disallow labeled statements - ENABLED
|
|
116
|
+
'no-lone-blocks': 1, // disallow unnecessary nested blocks - ENABLED
|
|
117
|
+
'no-lonely-if': 1, // disallow `if` statements as the only statement in `else` blocks - ENABLED
|
|
118
|
+
'no-loop-func': 1, // disallow function declarations that contain unsafe references inside loop statements - ENABLED
|
|
119
|
+
'no-multi-assign': 1, // disallow use of chained assignment expressions - ENABLED
|
|
120
|
+
'no-multi-str': 1, // disallow multiline strings - ENABLED
|
|
121
|
+
'no-negated-condition': 1, // disallow negated conditions - ENABLED
|
|
122
|
+
'no-nested-ternary': 1, // disallow nested ternary expressions - ENABLED
|
|
123
|
+
'no-new': 1, // disallow `new` operators outside of assignments or comparisons - ENABLED
|
|
124
|
+
'no-new-func': 1, // disallow `new` operators with the `Function` object - ENABLED
|
|
125
|
+
'no-new-object': 1, // disallow `Object` constructors - ENABLED
|
|
126
|
+
'no-new-wrappers': 1, // disallow `new` operators with the `String`, `Number`, and `Boolean` objects - ENABLED
|
|
127
|
+
'no-nonoctal-decimal-escape': 1, // disallow `\8` and `\9` escape sequences in string literals - ENABLED
|
|
128
|
+
'no-octal': 1, // disallow octal literals - ENABLED
|
|
129
|
+
'no-octal-escape': 1, // disallow octal escape sequences in string literals - ENABLED
|
|
130
|
+
'no-param-reassign': 1, // disallow reassigning `function` parameters - ENABLED
|
|
131
|
+
'no-plusplus': 1, // disallow the unary operators `++` and `--` - ENABLED
|
|
132
|
+
'no-proto': 1, // disallow the use of the `__proto__` property - ENABLED
|
|
133
|
+
'no-redeclare': 1, // disallow variable redeclaration - ENABLED
|
|
134
|
+
'no-regex-spaces': 1, // disallow multiple spaces in regular expressions - ENABLED
|
|
135
|
+
'no-restricted-exports': 1, // disallow specified names in exports - ENABLED
|
|
136
|
+
'no-restricted-globals': 1, // disallow specified global variables - ENABLED
|
|
137
|
+
'no-restricted-imports': 1, // disallow specified modules when loaded by `import` - ENABLED
|
|
138
|
+
'no-restricted-properties': 1, // disallow certain properties on certain objects - ENABLED
|
|
139
|
+
'no-restricted-syntax': 1, // disallow specified syntax - ENABLED
|
|
140
|
+
'no-return-assign': 1, // disallow assignment operators in `return` statements - ENABLED
|
|
141
|
+
'no-return-await': 1, // disallow unnecessary `return await` - ENABLED
|
|
142
|
+
'no-script-url': 1, // disallow `javascript:` urls - ENABLED
|
|
143
|
+
'no-sequences': 1, // disallow comma operators - ENABLED
|
|
144
|
+
'no-shadow': 1, // disallow variable declarations from shadowing variables declared in the outer scope - ENABLED
|
|
145
|
+
'no-shadow-restricted-names': 0, // disallow identifiers from shadowing restricted names - OFF
|
|
146
|
+
'no-ternary': 0, // disallow ternary operators - OFF
|
|
147
|
+
'no-throw-literal': 1, // disallow throwing literals as exceptions - ENABLED
|
|
148
|
+
'no-undef-init': 1, // disallow initializing variables to `undefined` - ENABLED
|
|
149
|
+
'no-undefined': 0, // disallow the use of `undefined` as an identifier - OFF
|
|
150
|
+
'no-underscore-dangle': 1, // disallow dangling underscores in identifiers - ENABLED
|
|
150
151
|
'no-unneeded-ternary': 1, // disallow ternary operators when simpler alternatives exist - ENABLED
|
|
151
|
-
'no-unused-expressions': 1, // disallow unused expressions
|
|
152
|
-
'no-unused-labels': 1, // disallow unused labels
|
|
153
|
-
'no-useless-call': 1, // disallow unnecessary calls to `.call()` and `.apply()`
|
|
154
|
-
'no-useless-catch': 1, // disallow unnecessary `catch` clauses
|
|
155
|
-
'no-useless-computed-key': 1, // disallow unnecessary computed property keys in objects and classes
|
|
156
|
-
'no-useless-concat': 1, // disallow unnecessary concatenation of literals or template literals
|
|
152
|
+
'no-unused-expressions': 1, // disallow unused expressions - ENABLED
|
|
153
|
+
'no-unused-labels': 1, // disallow unused labels - ENABLED
|
|
154
|
+
'no-useless-call': 1, // disallow unnecessary calls to `.call()` and `.apply()` - ENABLED
|
|
155
|
+
'no-useless-catch': 1, // disallow unnecessary `catch` clauses - ENABLED
|
|
156
|
+
'no-useless-computed-key': 1, // disallow unnecessary computed property keys in objects and classes - ENABLED
|
|
157
|
+
'no-useless-concat': 1, // disallow unnecessary concatenation of literals or template literals - ENABLED
|
|
157
158
|
'no-useless-constructor': 1, // disallow unnecessary constructors - ENABLED
|
|
158
|
-
'no-useless-escape': 1, // disallow unnecessary escape characters
|
|
159
|
-
'no-useless-rename': 1, // disallow renaming import, export, and destructured assignments to the same name
|
|
160
|
-
'no-useless-return': 1, // disallow redundant return statements
|
|
161
|
-
'no-var': 1, // require `let` or `const` instead of `var`
|
|
162
|
-
'no-void': [1, { allowAsStatement: true }], // disallow `void` operators
|
|
163
|
-
'no-warning-comments': 1, // disallow specified warning terms in comments
|
|
164
|
-
'no-with': 1, // disallow `with` statements
|
|
159
|
+
'no-useless-escape': 1, // disallow unnecessary escape characters - ENABLED
|
|
160
|
+
'no-useless-rename': 1, // disallow renaming import, export, and destructured assignments to the same name - ENABLED
|
|
161
|
+
'no-useless-return': 1, // disallow redundant return statements - ENABLED
|
|
162
|
+
'no-var': 1, // require `let` or `const` instead of `var` - ENABLED
|
|
163
|
+
'no-void': [1, { allowAsStatement: true }], // disallow `void` operators - ENABLED with exceptions
|
|
164
|
+
'no-warning-comments': 1, // disallow specified warning terms in comments - ENABLED
|
|
165
|
+
'no-with': 1, // disallow `with` statements - ENABLED
|
|
165
166
|
'object-shorthand': 1, // require or disallow method and property shorthand syntax for object literals - ENABLED
|
|
166
|
-
'one-var':
|
|
167
|
-
'operator-assignment': 1, // require or disallow assignment operator shorthand where possible
|
|
168
|
-
'prefer-arrow-callback': 1, // require using arrow functions for callbacks
|
|
169
|
-
'prefer-const': 1, // require `const` declarations for variables that are never reassigned after declared
|
|
170
|
-
'prefer-destructuring': 1, // require destructuring from arrays and/or objects
|
|
171
|
-
'prefer-exponentiation-operator': 1, // disallow the use of `Math.pow` in favor of the `**` operator
|
|
172
|
-
'prefer-named-capture-group': 1, // enforce using named capture group in regular expression
|
|
173
|
-
'prefer-numeric-literals': 1, // disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals
|
|
174
|
-
'prefer-object-spread': 1, // disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead
|
|
175
|
-
'prefer-promise-reject-errors': 1, // require using Error objects as Promise rejection reasons
|
|
176
|
-
'prefer-regex-literals': 1, // disallow use of the `RegExp` constructor in favor of regular expression literals
|
|
177
|
-
'prefer-rest-params': 1, // require rest parameters instead of `arguments`
|
|
178
|
-
'prefer-spread': 1, // require spread operators instead of `.apply()`
|
|
179
|
-
'prefer-template': 1, // require template literals instead of string concatenation
|
|
180
|
-
'radix': 1, // enforce the consistent use of the radix argument when using `parseInt()`
|
|
181
|
-
'require-await': 1, // disallow async functions which have no `await` expression
|
|
182
|
-
'require-unicode-regexp': 1, // enforce the use of `u` flag on RegExp
|
|
183
|
-
'require-yield': 1, // require generator functions to contain `yield`
|
|
184
|
-
'sort-imports': 1, // enforce sorted import declarations within modules
|
|
185
|
-
'sort-keys': 1, // require object keys to be sorted
|
|
186
|
-
'sort-vars': 1, // require variables within the same declaration block to be sorted
|
|
187
|
-
'spaced-comment': 1, // enforce consistent spacing after the `//` or `/*` in a comment
|
|
188
|
-
'strict': 1, // require or disallow strict mode directives
|
|
189
|
-
'symbol-description': 1, // require symbol descriptions
|
|
190
|
-
'vars-on-top': 1, // require `var` declarations be placed at the top of their containing scope
|
|
191
|
-
'yoda': 1, // require or disallow "Yoda" conditions
|
|
167
|
+
'one-var': 0, // enforce variables to be declared either together or separately in functions - OFF
|
|
168
|
+
'operator-assignment': 1, // require or disallow assignment operator shorthand where possible - ENABLED
|
|
169
|
+
'prefer-arrow-callback': 1, // require using arrow functions for callbacks - ENABLED
|
|
170
|
+
'prefer-const': 1, // require `const` declarations for variables that are never reassigned after declared - ENABLED
|
|
171
|
+
'prefer-destructuring': 1, // require destructuring from arrays and/or objects - ENABLED
|
|
172
|
+
'prefer-exponentiation-operator': 1, // disallow the use of `Math.pow` in favor of the `**` operator - ENABLED
|
|
173
|
+
'prefer-named-capture-group': 1, // enforce using named capture group in regular expression - ENABLED
|
|
174
|
+
'prefer-numeric-literals': 1, // disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals - ENABLED
|
|
175
|
+
'prefer-object-spread': 1, // disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead - ENABLED
|
|
176
|
+
'prefer-promise-reject-errors': 1, // require using Error objects as Promise rejection reasons - ENABLED
|
|
177
|
+
'prefer-regex-literals': 1, // disallow use of the `RegExp` constructor in favor of regular expression literals - ENABLED
|
|
178
|
+
'prefer-rest-params': 1, // require rest parameters instead of `arguments` - ENABLED
|
|
179
|
+
'prefer-spread': 1, // require spread operators instead of `.apply()` - ENABLED
|
|
180
|
+
'prefer-template': 1, // require template literals instead of string concatenation - ENABLED
|
|
181
|
+
'radix': 1, // enforce the consistent use of the radix argument when using `parseInt()` - ENABLED
|
|
182
|
+
'require-await': 1, // disallow async functions which have no `await` expression - ENABLED
|
|
183
|
+
'require-unicode-regexp': 1, // enforce the use of `u` flag on RegExp - ENABLED
|
|
184
|
+
'require-yield': 1, // require generator functions to contain `yield` - ENABLED
|
|
185
|
+
'sort-imports': 1, // enforce sorted import declarations within modules - ENABLED
|
|
186
|
+
'sort-keys': 1, // require object keys to be sorted - ENABLED
|
|
187
|
+
'sort-vars': 1, // require variables within the same declaration block to be sorted - ENABLED
|
|
188
|
+
'spaced-comment': 1, // enforce consistent spacing after the `//` or `/*` in a comment - ENABLED
|
|
189
|
+
'strict': 1, // require or disallow strict mode directives - ENABLED
|
|
190
|
+
'symbol-description': 1, // require symbol descriptions - ENABLED
|
|
191
|
+
'vars-on-top': 1, // require `var` declarations be placed at the top of their containing scope - ENABLED
|
|
192
|
+
'yoda': 1, // require or disallow "Yoda" conditions - ENABLED
|
|
192
193
|
|
|
193
194
|
// Formatting Rules (Disabled - handled by Prettier)
|
|
194
195
|
'curly': 0, // enforce consistent brace style for all control statements - OFF
|
|
@@ -291,18 +292,18 @@ export default [
|
|
|
291
292
|
'array-bracket-spacing': 0, // enforce consistent spacing inside array brackets - OFF
|
|
292
293
|
|
|
293
294
|
// TypeScript ESLint Rules
|
|
294
|
-
'@typescript-eslint/no-unused-vars': [1, { argsIgnorePattern: '^_' }], // disallow unused variables with underscore
|
|
295
|
-
'@typescript-eslint/no-explicit-any': 1, // disallow usage of the any type - ENABLED
|
|
296
|
-
'@typescript-eslint/prefer-nullish-coalescing': 1, // prefer nullish coalescing operator - ENABLED
|
|
297
|
-
'@typescript-eslint/prefer-optional-chain': 1, // prefer optional chaining - ENABLED
|
|
298
|
-
'@typescript-eslint/no-non-null-assertion': 1, // disallow non-null assertions - ENABLED
|
|
295
|
+
'@typescript-eslint/no-unused-vars': [1, { argsIgnorePattern: '^_' }], // disallow unused variables - ENABLED with underscore exception
|
|
296
|
+
'@typescript-eslint/no-explicit-any': 1, // disallow usage of the any type - ENABLED
|
|
297
|
+
'@typescript-eslint/prefer-nullish-coalescing': 1, // prefer nullish coalescing operator - ENABLED
|
|
298
|
+
'@typescript-eslint/prefer-optional-chain': 1, // prefer optional chaining - ENABLED
|
|
299
|
+
'@typescript-eslint/no-non-null-assertion': 1, // disallow non-null assertions - ENABLED
|
|
299
300
|
'@typescript-eslint/consistent-type-imports': 1, // enforce consistent usage of type imports - ENABLED
|
|
300
|
-
'@typescript-eslint/no-floating-promises': 1, // require Promise-like statements to be handled appropriately
|
|
301
|
-
'@typescript-eslint/await-thenable': 1, // disallow awaiting a value that is not a Thenable
|
|
302
|
-
'@typescript-eslint/no-misused-promises': 1, // avoid using promises in places not designed to handle them
|
|
303
|
-
'@typescript-eslint/prefer-readonly': 1, // require private members to be marked as readonly if they're never modified
|
|
304
|
-
'@typescript-eslint/prefer-readonly-parameter-types': 0, // require function parameters to be typed as readonly - OFF
|
|
305
|
-
'@typescript-eslint/strict-boolean-expressions': 1, // restrict the types allowed in boolean expressions
|
|
301
|
+
'@typescript-eslint/no-floating-promises': 1, // require Promise-like statements to be handled appropriately - ENABLED
|
|
302
|
+
'@typescript-eslint/await-thenable': 1, // disallow awaiting a value that is not a Thenable - ENABLED
|
|
303
|
+
'@typescript-eslint/no-misused-promises': 1, // avoid using promises in places not designed to handle them - ENABLED
|
|
304
|
+
'@typescript-eslint/prefer-readonly': 1, // require private members to be marked as readonly if they're never modified - ENABLED
|
|
305
|
+
'@typescript-eslint/prefer-readonly-parameter-types': 0, // require function parameters to be typed as readonly - OFF
|
|
306
|
+
'@typescript-eslint/strict-boolean-expressions': 1, // restrict the types allowed in boolean expressions - ENABLED
|
|
306
307
|
// TypeScript formatting rules (disabled - handled by Prettier)
|
|
307
308
|
'@typescript-eslint/brace-style': 0, // OFF
|
|
308
309
|
'@typescript-eslint/comma-dangle': 0, // OFF
|
|
@@ -323,17 +324,17 @@ export default [
|
|
|
323
324
|
|
|
324
325
|
// React Rules
|
|
325
326
|
'react/display-name': 0, // prevent missing displayName in a React component definition - OFF
|
|
326
|
-
'react/jsx-no-undef': 1, // disallow undeclared variables in JSX
|
|
327
|
-
'react/jsx-sort-props': 1, // enforce props alphabetical sorting -
|
|
328
|
-
'react/jsx-uses-react': 0, // prevent React to be incorrectly marked as unused - OFF
|
|
329
|
-
'react/jsx-uses-vars': 1, // prevent variables used in JSX to be incorrectly marked as unused
|
|
330
|
-
'react/no-did-mount-set-state': 0, // prevent usage of setState in componentDidMount - OFF
|
|
331
|
-
'react/no-did-update-set-state': 0, // prevent usage of setState in componentDidUpdate - OFF
|
|
327
|
+
'react/jsx-no-undef': 1, // disallow undeclared variables in JSX - ENABLED
|
|
328
|
+
'react/jsx-sort-props': 1, // enforce props alphabetical sorting - ENABLED
|
|
329
|
+
'react/jsx-uses-react': 0, // prevent React to be incorrectly marked as unused - OFF
|
|
330
|
+
'react/jsx-uses-vars': 1, // prevent variables used in JSX to be incorrectly marked as unused - ENABLED
|
|
331
|
+
'react/no-did-mount-set-state': 0, // prevent usage of setState in componentDidMount - OFF
|
|
332
|
+
'react/no-did-update-set-state': 0, // prevent usage of setState in componentDidUpdate - OFF
|
|
332
333
|
'react/no-multi-comp': 0, // prevent multiple component definition per file - OFF
|
|
333
|
-
'react/no-unknown-property': 1, // prevent usage of unknown DOM property
|
|
334
|
-
'react/prop-types': 0, // prevent missing props validation in a React component definition - OFF
|
|
335
|
-
'react/react-in-jsx-scope': 0, // prevent missing React when using JSX - OFF
|
|
336
|
-
'react/self-closing-comp': 1, // prevent extra closing tags for components without children
|
|
334
|
+
'react/no-unknown-property': 1, // prevent usage of unknown DOM property - ENABLED
|
|
335
|
+
'react/prop-types': 0, // prevent missing props validation in a React component definition - OFF
|
|
336
|
+
'react/react-in-jsx-scope': 0, // prevent missing React when using JSX - OFF
|
|
337
|
+
'react/self-closing-comp': 1, // prevent extra closing tags for components without children - ENABLED
|
|
337
338
|
'react/hook-use-state': 1, // enforce destructuring and symmetric naming of useState hook value and setter variables - ENABLED
|
|
338
339
|
'react/jsx-no-leaked-render': 1, // prevent problematic leaked values from being rendered - ENABLED
|
|
339
340
|
'react/jsx-no-useless-fragment': 1, // disallow unnecessary fragments - ENABLED
|
|
@@ -355,7 +356,7 @@ export default [
|
|
|
355
356
|
'react/jsx-wrap-multilines': 0, // OFF
|
|
356
357
|
|
|
357
358
|
// Prettier specific
|
|
358
|
-
'prettier/prettier': 1
|
|
359
|
+
'prettier/prettier': 1 // enforce Prettier formatting - ENABLED
|
|
359
360
|
}
|
|
360
361
|
}
|
|
361
362
|
];
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildpastry/eslint-config",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.6",
|
|
4
4
|
"description": "ESLint configuration file",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "types.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"index.js",
|
|
9
|
-
".eslintrc",
|
|
10
9
|
".prettierrc",
|
|
11
10
|
"types.d.ts",
|
|
12
11
|
"README.md"
|
|
13
12
|
],
|
|
14
13
|
"scripts": {
|
|
15
|
-
"deploy": "npm publish --access public"
|
|
14
|
+
"deploy": "npm publish --access public",
|
|
15
|
+
"login": "npm login"
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"author": "WildPastry",
|
|
27
27
|
"license": "UNLICENSED",
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"eslint": ">=
|
|
29
|
+
"eslint": ">= 9"
|
|
30
30
|
},
|
|
31
31
|
"type": "module"
|
|
32
32
|
}
|
package/.eslintrc
DELETED
|
@@ -1,397 +0,0 @@
|
|
|
1
|
-
/* KEY:
|
|
2
|
-
* DONE = Checked and accepted rule
|
|
3
|
-
* DONE - CUSTOMISED = Accepted rule but changed default behaviour
|
|
4
|
-
* DONE - OFF = Disabled rule
|
|
5
|
-
*/
|
|
6
|
-
{
|
|
7
|
-
"root": true,
|
|
8
|
-
|
|
9
|
-
"ignorePatterns": "*.html",
|
|
10
|
-
|
|
11
|
-
"env": {
|
|
12
|
-
"browser": true,
|
|
13
|
-
"node": true,
|
|
14
|
-
"es6": true
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
"settings": {
|
|
18
|
-
"react": {
|
|
19
|
-
"createClass": "createReactClass",
|
|
20
|
-
"pragma": "React",
|
|
21
|
-
"version": "detect"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
"parser": "@typescript-eslint/parser",
|
|
26
|
-
|
|
27
|
-
"plugins": ["@typescript-eslint", "react", "prettier"],
|
|
28
|
-
|
|
29
|
-
"parserOptions": {
|
|
30
|
-
"ecmaFeatures": {
|
|
31
|
-
"arrowFunctions": true,
|
|
32
|
-
"binaryLiterals": true,
|
|
33
|
-
"blockBindings": true,
|
|
34
|
-
"classes": true,
|
|
35
|
-
"defaultParams": true,
|
|
36
|
-
"destructuring": true,
|
|
37
|
-
"forOf": true,
|
|
38
|
-
"generators": true,
|
|
39
|
-
"modules": true,
|
|
40
|
-
"objectLiteralComputedProperties": true,
|
|
41
|
-
"objectLiteralDuplicateProperties": true,
|
|
42
|
-
"objectLiteralShorthandMethods": true,
|
|
43
|
-
"objectLiteralShorthandProperties": true,
|
|
44
|
-
"octalLiterals": true,
|
|
45
|
-
"regexUFlag": true,
|
|
46
|
-
"regexYFlag": true,
|
|
47
|
-
"spread": true,
|
|
48
|
-
"superInFunctions": true,
|
|
49
|
-
"templateStrings": true,
|
|
50
|
-
"unicodeCodePointEscapes": true,
|
|
51
|
-
"globalReturn": true,
|
|
52
|
-
"jsx": true
|
|
53
|
-
},
|
|
54
|
-
"requireConfigFile": false,
|
|
55
|
-
"sourceType": "module"
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
"rules": {
|
|
59
|
-
// Modern Code Quality Rules
|
|
60
|
-
"array-callback-return": 1, // enforce `return` statements in callbacks of array methods - ENABLED for better code quality
|
|
61
|
-
"no-await-in-loop": 1, // disallow `await` inside of loops - ENABLED to prevent performance issues
|
|
62
|
-
"no-constructor-return": 1, // disallow returning value from constructor - ENABLED for correctness
|
|
63
|
-
"no-duplicate-imports": 1, // disallow duplicate module imports
|
|
64
|
-
"no-promise-executor-return": 1, // disallow returning values from Promise executor functions - ENABLED for correctness
|
|
65
|
-
"no-self-compare": 1, // disallow comparisons where both sides are exactly the same
|
|
66
|
-
"no-template-curly-in-string": 1, // disallow template literal placeholder syntax in regular strings - ENABLED to catch common mistakes
|
|
67
|
-
"no-unmodified-loop-condition": 1, // disallow unmodified loop conditions
|
|
68
|
-
"no-unreachable-loop": 1, // disallow loops with a body that allows only one iteration
|
|
69
|
-
"no-use-before-define": 1, // disallow the use of variables before they are defined - ENABLED for stricter code
|
|
70
|
-
"require-atomic-updates": 1, // disallow assignments that can lead to race conditions due to usage of `await` or `yield`
|
|
71
|
-
|
|
72
|
-
// Additional Strict Rules
|
|
73
|
-
"complexity": [1, 10], // enforce a maximum cyclomatic complexity - ENABLED with limit of 10
|
|
74
|
-
"no-magic-numbers": [
|
|
75
|
-
1,
|
|
76
|
-
{ "ignore": [0, 1, -1], "ignoreArrayIndexes": true }
|
|
77
|
-
], // disallow magic numbers with exceptions
|
|
78
|
-
"id-length": [
|
|
79
|
-
1,
|
|
80
|
-
{ "min": 2, "exceptions": ["i", "j", "k", "x", "y", "z", "_"] }
|
|
81
|
-
], // enforce minimum identifier lengths
|
|
82
|
-
"accessor-pairs": 0, // enforce getter and setter pairs in objects and classes - OFF
|
|
83
|
-
"arrow-body-style": 0, // require braces around arrow function bodies - OFF
|
|
84
|
-
"block-scoped-var": 1, // enforce the use of variables within the scope they are defined
|
|
85
|
-
"camelcase": 1, // enforce camelcase naming convention
|
|
86
|
-
"capitalized-comments": 0, // enforce or disallow capitalization of the first letter of a comment - OFF for flexibility
|
|
87
|
-
"class-methods-use-this": 0, // enforce that class methods utilize `this` - OFF
|
|
88
|
-
"consistent-return": 1, // require `return` statements to either always or never specify values
|
|
89
|
-
"consistent-this": 1, // enforce consistent naming when capturing the current execution context
|
|
90
|
-
"default-case": 1, // require `default` cases in `switch` statements
|
|
91
|
-
"default-case-last": 1, // enforce default clauses in switch statements to be last
|
|
92
|
-
"default-param-last": 1, // enforce default parameters to be last - ENABLED for modern practices
|
|
93
|
-
"dot-notation": 1, // enforce dot notation whenever possible
|
|
94
|
-
"eqeqeq": 1, // require the use of `===` and `!==`
|
|
95
|
-
"func-name-matching": 1, // require function names to match the name of the variable or property to which they are assigned
|
|
96
|
-
"func-names": 0, // require or disallow named `function` expressions - OFF for flexibility
|
|
97
|
-
"func-style": 0, // enforce the consistent use of either `function` declarations or expressions - OFF
|
|
98
|
-
"grouped-accessor-pairs": 1, // require grouped accessor pairs in object literals and classes
|
|
99
|
-
"guard-for-in": 1, // require `for-in` loops to include an `if` statement
|
|
100
|
-
"id-denylist": 0, // disallow specified identifiers - OFF
|
|
101
|
-
"id-match": 0, // require identifiers to match a specified regular expression - OFF
|
|
102
|
-
"init-declarations": 0, // require or disallow initialization in variable declarations - OFF
|
|
103
|
-
"max-classes-per-file": 1, // enforce a maximum number of classes per file
|
|
104
|
-
"max-depth": [1, 4], // enforce a maximum depth that blocks can be nested - UPDATED to 4 for modern practices
|
|
105
|
-
"max-lines": [1, { "max": 1000, "skipBlankLines": true }], // enforce a maximum number of lines per file - UPDATED to 1000
|
|
106
|
-
"max-lines-per-function": [1, { "max": 300 }], // enforce a maximum number of lines of code in a function - UPDATED to 300
|
|
107
|
-
"max-nested-callbacks": [1, 4], // enforce a maximum depth that callbacks can be nested - UPDATED to 4
|
|
108
|
-
"max-params": [1, { "max": 5 }], // enforce a maximum number of parameters in function definitions - UPDATED to 5
|
|
109
|
-
"max-statements": [1, { "max": 30 }], // enforce a maximum number of statements allowed in function blocks - UPDATED to 30
|
|
110
|
-
"multiline-comment-style": 0, // enforce a particular style for multiline comments - OFF
|
|
111
|
-
"new-cap": 0, // require constructor names to begin with a capital letter - OFF
|
|
112
|
-
"no-alert": 1, // disallow the use of `alert`, `confirm`, and `prompt`
|
|
113
|
-
"no-array-constructor": 1, // disallow `Array` constructors
|
|
114
|
-
"no-bitwise": 1, // disallow bitwise operators
|
|
115
|
-
"no-caller": 1, // disallow the use of `arguments.caller` or `arguments.callee`
|
|
116
|
-
"no-case-declarations": 1, // disallow lexical declarations in case clauses
|
|
117
|
-
"no-console": 1, // disallow the use of `console`
|
|
118
|
-
"no-continue": 1, // disallow `continue` statements
|
|
119
|
-
"no-delete-var": 1, // disallow deleting variables
|
|
120
|
-
"no-div-regex": 1, // disallow division operators explicitly at the beginning of regular expressions
|
|
121
|
-
"no-else-return": 1, // disallow `else` blocks after `return` statements in `if` statements
|
|
122
|
-
"no-empty": 1, // disallow empty block statements
|
|
123
|
-
"no-empty-function": [1, { "allow": ["constructors"] }], // disallow empty functions
|
|
124
|
-
"no-eq-null": 1, // disallow `null` comparisons without type-checking operators
|
|
125
|
-
"no-eval": 1, // disallow the use of `eval()`
|
|
126
|
-
"no-extend-native": 1, // disallow extending native types
|
|
127
|
-
"no-extra-bind": 1, // disallow unnecessary calls to `.bind()`
|
|
128
|
-
"no-extra-boolean-cast": 1, // disallow unnecessary boolean casts
|
|
129
|
-
"no-extra-label": 1, // disallow unnecessary labels
|
|
130
|
-
"no-global-assign": 1, // disallow assignments to native objects or read-only global variables
|
|
131
|
-
"no-implicit-coercion": 1, // disallow shorthand type conversions
|
|
132
|
-
"no-implicit-globals": 1, // disallow declarations in the global scope
|
|
133
|
-
"no-implied-eval": 1, // disallow the use of `eval()`-like methods
|
|
134
|
-
"no-inline-comments": 1, // disallow inline comments after code
|
|
135
|
-
"no-invalid-this": 1, // disallow `this` keywords outside of classes or class-like objects
|
|
136
|
-
"no-iterator": 1, // disallow the use of the `__iterator__` property
|
|
137
|
-
"no-label-var": 1, // disallow labels that share a name with a variable
|
|
138
|
-
"no-labels": 1, // disallow labeled statements
|
|
139
|
-
"no-lone-blocks": 1, // disallow unnecessary nested blocks
|
|
140
|
-
"no-lonely-if": 1, // disallow `if` statements as the only statement in `else` blocks
|
|
141
|
-
"no-loop-func": 1, // disallow function declarations that contain unsafe references inside loop statements
|
|
142
|
-
"no-multi-assign": 1, // disallow use of chained assignment expressions
|
|
143
|
-
"no-multi-str": 1, // disallow multiline strings
|
|
144
|
-
"no-negated-condition": 1, // disallow negated conditions
|
|
145
|
-
"no-nested-ternary": 1, // disallow nested ternary expressions
|
|
146
|
-
"no-new": 1, // disallow `new` operators outside of assignments or comparisons
|
|
147
|
-
"no-new-func": 1, // disallow `new` operators with the `Function` object, // disallow `new` operators with the `Function` object // DONE
|
|
148
|
-
"no-new-object": 1, // disallow `Object` constructors
|
|
149
|
-
"no-new-wrappers": 1, // disallow `new` operators with the `String`, `Number`, and `Boolean` objects
|
|
150
|
-
"no-nonoctal-decimal-escape": 1, // disallow `\8` and `\9` escape sequences in string literals
|
|
151
|
-
"no-octal": 1, // disallow octal literals
|
|
152
|
-
"no-octal-escape": 1, // disallow octal escape sequences in string literals
|
|
153
|
-
"no-param-reassign": 1, // disallow reassigning `function` parameters
|
|
154
|
-
"no-plusplus": 1, // disallow the unary operators `++` and `--`
|
|
155
|
-
"no-proto": 1, // disallow the use of the `__proto__` property
|
|
156
|
-
"no-redeclare": 1, // disallow variable redeclaration
|
|
157
|
-
"no-regex-spaces": 1, // disallow multiple spaces in regular expressions
|
|
158
|
-
"no-restricted-exports": 1, // disallow specified names in exports
|
|
159
|
-
"no-restricted-globals": 1, // disallow specified global variables
|
|
160
|
-
"no-restricted-imports": 1, // disallow specified modules when loaded by `import`
|
|
161
|
-
"no-restricted-properties": 1, // disallow certain properties on certain objects
|
|
162
|
-
"no-restricted-syntax": 1, // disallow specified syntax
|
|
163
|
-
"no-return-assign": 1, // disallow assignment operators in `return` statements
|
|
164
|
-
"no-return-await": 1, // disallow unnecessary `return await`
|
|
165
|
-
"no-script-url": 1, // disallow `javascript:` urls
|
|
166
|
-
"no-sequences": 1, // disallow comma operators
|
|
167
|
-
"no-shadow": 1, // disallow variable declarations from shadowing variables declared in the outer scope
|
|
168
|
-
"no-shadow-restricted-names": 1, // disallow identifiers from shadowing restricted names
|
|
169
|
-
"no-ternary": 1, // disallow ternary operators
|
|
170
|
-
"no-throw-literal": 1, // disallow throwing literals as exceptions
|
|
171
|
-
"no-undef-init": 1, // disallow initializing variables to `undefined`
|
|
172
|
-
"no-undefined": 1, // disallow the use of `undefined` as an identifier
|
|
173
|
-
"no-underscore-dangle": 1, // disallow dangling underscores in identifiers
|
|
174
|
-
"no-unneeded-ternary": 1, // disallow ternary operators when simpler alternatives exist - ENABLED
|
|
175
|
-
"no-unused-expressions": 1, // disallow unused expressions
|
|
176
|
-
"no-unused-labels": 1, // disallow unused labels
|
|
177
|
-
"no-useless-call": 1, // disallow unnecessary calls to `.call()` and `.apply()`
|
|
178
|
-
"no-useless-catch": 1, // disallow unnecessary `catch` clauses
|
|
179
|
-
"no-useless-computed-key": 1, // disallow unnecessary computed property keys in objects and classes
|
|
180
|
-
"no-useless-concat": 1, // disallow unnecessary concatenation of literals or template literals
|
|
181
|
-
"no-useless-constructor": 1, // disallow unnecessary constructors - ENABLED
|
|
182
|
-
"no-useless-escape": 1, // disallow unnecessary escape characters
|
|
183
|
-
"no-useless-rename": 1, // disallow renaming import, export, and destructured assignments to the same name
|
|
184
|
-
"no-useless-return": 1, // disallow redundant return statements
|
|
185
|
-
"no-var": 1, // require `let` or `const` instead of `var`
|
|
186
|
-
"no-void": [1, { "allowAsStatement": true }], // disallow `void` operators
|
|
187
|
-
"no-warning-comments": 1, // disallow specified warning terms in comments
|
|
188
|
-
"no-with": 1, // disallow `with` statements
|
|
189
|
-
"object-shorthand": 1, // require or disallow method and property shorthand syntax for object literals - ENABLED
|
|
190
|
-
"one-var": 1, // enforce variables to be declared either together or separately in functions
|
|
191
|
-
"operator-assignment": 1, // require or disallow assignment operator shorthand where possible
|
|
192
|
-
"prefer-arrow-callback": 1, // require using arrow functions for callbacks
|
|
193
|
-
"prefer-const": 1, // require `const` declarations for variables that are never reassigned after declared
|
|
194
|
-
"prefer-destructuring": 1, // require destructuring from arrays and/or objects
|
|
195
|
-
"prefer-exponentiation-operator": 1, // disallow the use of `Math.pow` in favor of the `**` operator
|
|
196
|
-
"prefer-named-capture-group": 1, // enforce using named capture group in regular expression
|
|
197
|
-
"prefer-numeric-literals": 1, // disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals
|
|
198
|
-
"prefer-object-spread": 1, // disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead
|
|
199
|
-
"prefer-promise-reject-errors": 1, // require using Error objects as Promise rejection reasons
|
|
200
|
-
"prefer-regex-literals": 1, // disallow use of the `RegExp` constructor in favor of regular expression literals
|
|
201
|
-
"prefer-rest-params": 1, // require rest parameters instead of `arguments`
|
|
202
|
-
"prefer-spread": 1, // require spread operators instead of `.apply()`
|
|
203
|
-
"prefer-template": 1, // require template literals instead of string concatenation
|
|
204
|
-
"radix": 1, // enforce the consistent use of the radix argument when using `parseInt()`
|
|
205
|
-
"require-await": 1, // disallow async functions which have no `await` expression
|
|
206
|
-
"require-unicode-regexp": 1, // enforce the use of `u` flag on RegExp
|
|
207
|
-
"require-yield": 1, // require generator functions to contain `yield`
|
|
208
|
-
"sort-imports": 1, // enforce sorted import declarations within modules
|
|
209
|
-
"sort-keys": 1, // require object keys to be sorted
|
|
210
|
-
"sort-vars": 1, // require variables within the same declaration block to be sorted
|
|
211
|
-
"spaced-comment": 1, // enforce consistent spacing after the `//` or `/*` in a comment
|
|
212
|
-
"strict": 1, // require or disallow strict mode directives
|
|
213
|
-
"symbol-description": 1, // require symbol descriptions
|
|
214
|
-
"vars-on-top": 1, // require `var` declarations be placed at the top of their containing scope
|
|
215
|
-
"yoda": 1, // require or disallow "Yoda" conditions
|
|
216
|
-
|
|
217
|
-
// Top level formatting (These rules are turned off in eslint because they are still being applied using [prettier/prettier])
|
|
218
|
-
"curly": 0, // enforce consistent brace style for all control statements // DONE - OFF
|
|
219
|
-
"lines-around-comment": 0, // require empty lines around comments // DONE - OFF
|
|
220
|
-
"no-confusing-arrow": 0, // disallowarrow functions where they could be confused with comparisons // DONE - OFF
|
|
221
|
-
"no-mixed-operators": 0, // disallow mixed binary operators // DONE - OFF
|
|
222
|
-
"no-tabs": 0, // disallow all tabs // DONE - OFF
|
|
223
|
-
"no-unexpected-multiline": 0, // disallow confusing multiline expressions // DONE - OFF
|
|
224
|
-
"quotes": 0, // enforce the consistent use of either backticks, double, or single quotes // DONE - OFF
|
|
225
|
-
|
|
226
|
-
// Formatting (These rules are turned off in eslint because they are still being applied using [prettier/prettier])
|
|
227
|
-
"array-bracket-newline": 0, // enforce linebreaks after opening and before closing array brackets // DONE - OFF
|
|
228
|
-
"array-element-newline": 0, // enforce line breaks after each array element // DONE - OFF
|
|
229
|
-
"arrow-parens": 0, // require parentheses around arrow function arguments // DONE - OFF
|
|
230
|
-
"arrow-spacing": 0, // enforce consistent spacing before and after the arrow in arrow functions // DONE - OFF
|
|
231
|
-
"block-spacing": 0, // disallow or enforce spaces inside of blocks after opening block and before closing block // DONE - OFF
|
|
232
|
-
"brace-style": 0, // enforce consistent brace style for blocks // DONE - OFF
|
|
233
|
-
"comma-dangle": 0, // require or disallow trailing commas // DONE - OFF
|
|
234
|
-
"comma-spacing": 0, // enforce consistent spacing before and after commas // DONE - OFF
|
|
235
|
-
"comma-style": 0, // enforce consistent comma style // DONE - OFF
|
|
236
|
-
"computed-property-spacing": 0, // enforce consistent spacing inside computed property brackets // DONE - OFF
|
|
237
|
-
"dot-location": 0, // enforce consistent newlines before and after dots // DONE - OFF
|
|
238
|
-
"eol-last": 0, // require or disallow newline at the end of files // DONE - OFF
|
|
239
|
-
"func-call-spacing": 0, // require or disallow spacing between function identifiers and their invocations // DONE - OFF
|
|
240
|
-
"function-call-argument-newline": 0, // enforce line breaks between arguments of a function call // DONE - OFF
|
|
241
|
-
"function-paren-newline": 0, // enforce consistent line breaks inside function parentheses // DONE - OFF
|
|
242
|
-
"generator-star": 0, // enforce consistent spacing around `*` operators in generator functions // DONE - OFF
|
|
243
|
-
"generator-star-spacing": 0, // enforce consistent spacing around `*` operators in generator functions // DONE - OFF
|
|
244
|
-
"implicit-arrow-linebreak": 0, // enforce the location of arrow function bodies // DONE - OFF
|
|
245
|
-
"indent": 0, // enforce consistent indentation. second value is number of spaces // DONE - OFF
|
|
246
|
-
"jsx-quotes": 0, // enforce the consistent use of either double or single quotes in JSX attributes // DONE - OFF
|
|
247
|
-
"key-spacing": 0, // enforce consistent spacing between keys and values in object literal properties // DONE - OFF
|
|
248
|
-
"keyword-spacing": 0, // This rule enforces consistent spacing around keywords and keyword-like tokens // DONE - OFF
|
|
249
|
-
"linebreak-style": 0, // enforce consistent linebreak style // OFF - OFF
|
|
250
|
-
"multiline-ternary": 0, // enforce newlines between operands of ternary expressions // DONE - OFF
|
|
251
|
-
"newline-per-chained-call": 0, // require a newline after each call in a method chain // DONE - OFF
|
|
252
|
-
"new-parens": 0, // enforce or disallow parentheses when invoking a constructor with no arguments // DONE - OFF
|
|
253
|
-
"no-arrow-condition": 0, // disallows arrow functions where test conditions are expected // DONE - OFF
|
|
254
|
-
"no-comma-dangle": 0, // disallows trailing commas in object and array literals // DONE - OFF
|
|
255
|
-
"no-extra-parens": 0, // disallow unnecessary parentheses // DONE - OFF
|
|
256
|
-
"no-extra-semi": 1, // disallow unnecessary semicolons // DONE - OFF
|
|
257
|
-
"no-floating-decimal": 0, // disallow leading or trailing decimal points in numeric literals // DONE - OFF
|
|
258
|
-
"no-mixed-spaces-and-tabs": 0, // disallow mixed spaces and tabs for indentation // DONE - OFF
|
|
259
|
-
"no-multi-spaces": 0, // disallow multiple spaces // DONE - OFF
|
|
260
|
-
"no-multiple-empty-lines": 0, // disallow multiple empty lines // DONE - OFF
|
|
261
|
-
"no-reserved-keys": 0, // disallows unquoted reserved words as property names in object literals // DONE - OFF
|
|
262
|
-
"no-space-before-semi": 0, // disallows spaces before semicolons // DONE - OFF
|
|
263
|
-
"no-trailing-spaces": 0, // disallow trailing whitespace at the end of lines // DONE - OFF
|
|
264
|
-
"no-whitespace-before-property": 0, // disallow whitespace before properties // DONE - OFF
|
|
265
|
-
"no-wrap-func": 0, // disallows unnecessary parentheses around function expressions // DONE - OFF
|
|
266
|
-
"nonblock-statement-body-position": 0, // enforce the location of single-line statements // DONE - OFF
|
|
267
|
-
"object-curly-newline": 0, // enforce consistent line breaks after opening and before closing braces // DONE - OFF
|
|
268
|
-
"object-curly-spacing": 0, // enforce consistent spacing inside braces // DONE - OFF
|
|
269
|
-
"object-property-newline": 0, // enforce placing object properties on separate lines // DONE - OFF
|
|
270
|
-
"one-var-declaration-per-line": 0, // require or disallow newlines around variable declarations // DONE - OFF
|
|
271
|
-
"operator-linebreak": 0, // enforce consistent linebreak style for operators // DONE - OFF
|
|
272
|
-
"padded-blocks": 0, // require or disallow padding within blocks // DONE - OFF
|
|
273
|
-
"quote-props": 0, // require quotes around object literal property names // DONE - OFF
|
|
274
|
-
"rest-spread-spacing": 0, // enforce spacing between rest and spread operators and their expressions // DONE - OFF
|
|
275
|
-
"semi": 0, // require or disallow semicolons instead of ASI // DONE - OFF
|
|
276
|
-
"semi-spacing": 0, // enforce consistent spacing before and after semicolons // DONE - OFF
|
|
277
|
-
"semi-style": 0, // enforce location of semicolons // DONE - OFF
|
|
278
|
-
"space-after-function-name": 0, // enforces consistent spacing after name in function definitions // DONE - OFF
|
|
279
|
-
"space-after-keywords": 0, // enforces consistent spacing after keywords // DONE - OFF
|
|
280
|
-
"space-before-blocks": 0, // enforce consistent spacing before blocks // DONE - OFF
|
|
281
|
-
"space-before-function-paren": 0, // enforce consistent spacing before `function` definition opening parenthesis // DONE - OFF
|
|
282
|
-
"space-before-keywords": 0, // enforces consistent spacing before keywords // DONE - OFF
|
|
283
|
-
"space-in-brackets": 0, // enforces consistent spacing inside braces of object literals and brackets of array literals // DONE - OFF
|
|
284
|
-
"space-in-parens": 0, // enforce consistent spacing inside parentheses // DONE - OFF
|
|
285
|
-
"space-infix-ops": 0, // require spacing around infix operators // DONE - OFF
|
|
286
|
-
"space-return-throw-case": 0, // requires spaces after return, throw, and case keywords // DONE - OFF
|
|
287
|
-
"space-unary-ops": 0, // enforce consistent spacing before or after unary operators // DONE - OFF
|
|
288
|
-
"switch-colon-spacing": 0, // enforce spacing around colons of switch statements // DONE - OFF
|
|
289
|
-
"template-curly-spacing": 0, // require or disallow spacing around embedded expressions of template strings // DONE - OFF
|
|
290
|
-
"template-tag-spacing": 0, // require or disallow spacing between template tags and their literals // DONE - OFF
|
|
291
|
-
"unicode-bom": 0, // require or disallow Unicode byte order mark (BOM) // DONE - OFF
|
|
292
|
-
"wrap-iife": 0, // require parentheses around immediate `function` invocations // DONE - OFF
|
|
293
|
-
"wrap-regex": 0, // require parenthesis around regex literals // DONE - OFF
|
|
294
|
-
"yield-star-spacing": 0, // require or disallow spacing around the `*` in `yield*` expressions // DONE - OFF
|
|
295
|
-
|
|
296
|
-
// Core ESLint Rules
|
|
297
|
-
"line-comment-position": 0, // enforce position of line comments - OFF
|
|
298
|
-
"lines-between-class-members": 0, // require or disallow an empty line between class members - OFF
|
|
299
|
-
"max-len": [
|
|
300
|
-
1,
|
|
301
|
-
{
|
|
302
|
-
"code": 100,
|
|
303
|
-
"ignoreUrls": true,
|
|
304
|
-
"ignoreComments": true,
|
|
305
|
-
"ignorePattern": "^.*['\"].{10,}['\"].*$"
|
|
306
|
-
}
|
|
307
|
-
], // enforce a maximum line length - UPDATED to 100
|
|
308
|
-
"max-statements-per-line": 1, // enforce a maximum number of statements allowed per line
|
|
309
|
-
"padding-line-between-statements": 0, // require or disallow padding lines between statements - OFF
|
|
310
|
-
"no-cond-assign": 1, // disallow assignment in conditional expressions
|
|
311
|
-
"no-constant-condition": 1, // disallow use of constant expressions in conditions
|
|
312
|
-
"no-control-regex": 1, // disallow control characters in regular expressions
|
|
313
|
-
"no-debugger": 1, // disallow use of debugger - ENABLED for production
|
|
314
|
-
"no-dupe-args": 1, // disallow duplicate arguments in functions
|
|
315
|
-
"no-dupe-keys": 1, // disallow duplicate keys when creating object literals
|
|
316
|
-
"no-duplicate-case": 1, // disallow a duplicate case label
|
|
317
|
-
"no-ex-assign": 1, // disallow assigning to the exception in a catch block
|
|
318
|
-
"no-func-assign": 1, // disallow overwriting functions written as function declarations
|
|
319
|
-
"no-inner-declarations": 1, // disallow function or variable declarations in nested blocks
|
|
320
|
-
"no-invalid-regexp": 1, // disallow invalid regular expression strings in the RegExp constructor
|
|
321
|
-
"no-irregular-whitespace": 1, // disallow irregular whitespace outside of strings and comments
|
|
322
|
-
"no-obj-calls": 1, // disallow the use of object properties of the global object (Math and JSON) as functions
|
|
323
|
-
"no-sparse-arrays": 1, // disallow sparse arrays
|
|
324
|
-
"no-unreachable": 1, // disallow unreachable statements after a return, throw, continue, or break statement
|
|
325
|
-
"use-isnan": 1, // disallow comparisons with the value NaN
|
|
326
|
-
"valid-typeof": 1, // ensure that the results of typeof are compared against a valid string
|
|
327
|
-
"no-unused-vars": 1, // disallow declaration of variables that are not used in the code
|
|
328
|
-
"array-bracket-spacing": 0, // enforce consistent spacing inside array brackets - OFF
|
|
329
|
-
|
|
330
|
-
// TypeScript ESLint Rules
|
|
331
|
-
"@typescript-eslint/no-unused-vars": [1, { "argsIgnorePattern": "^_" }], // disallow unused variables with underscore prefix exception
|
|
332
|
-
"@typescript-eslint/no-explicit-any": 1, // disallow usage of the any type - ENABLED for better type safety
|
|
333
|
-
"@typescript-eslint/prefer-nullish-coalescing": 1, // prefer nullish coalescing operator - ENABLED for modern practices
|
|
334
|
-
"@typescript-eslint/prefer-optional-chain": 1, // prefer optional chaining - ENABLED for modern practices
|
|
335
|
-
"@typescript-eslint/no-non-null-assertion": 1, // disallow non-null assertions - ENABLED for safety
|
|
336
|
-
"@typescript-eslint/consistent-type-imports": 1, // enforce consistent usage of type imports - ENABLED
|
|
337
|
-
"@typescript-eslint/no-floating-promises": 1, // require Promise-like statements to be handled appropriately
|
|
338
|
-
"@typescript-eslint/await-thenable": 1, // disallow awaiting a value that is not a Thenable
|
|
339
|
-
"@typescript-eslint/no-misused-promises": 1, // avoid using promises in places not designed to handle them
|
|
340
|
-
"@typescript-eslint/prefer-readonly": 1, // require private members to be marked as readonly if they're never modified
|
|
341
|
-
"@typescript-eslint/prefer-readonly-parameter-types": 0, // require function parameters to be typed as readonly - OFF as it can be too restrictive
|
|
342
|
-
"@typescript-eslint/strict-boolean-expressions": 1, // restrict the types allowed in boolean expressions
|
|
343
|
-
// TypeScript formatting rules (disabled - handled by Prettier)
|
|
344
|
-
"@typescript-eslint/brace-style": 0, // OFF
|
|
345
|
-
"@typescript-eslint/comma-dangle": 0, // OFF
|
|
346
|
-
"@typescript-eslint/comma-spacing": 0, // OFF
|
|
347
|
-
"@typescript-eslint/func-call-spacing": 0, // OFF
|
|
348
|
-
"@typescript-eslint/indent": 0, // OFF
|
|
349
|
-
"@typescript-eslint/keyword-spacing": 0, // OFF
|
|
350
|
-
"@typescript-eslint/member-delimiter-style": 0, // OFF
|
|
351
|
-
"@typescript-eslint/no-extra-parens": 0, // OFF
|
|
352
|
-
"@typescript-eslint/no-extra-semi": 0, // OFF
|
|
353
|
-
"@typescript-eslint/object-curly-spacing": 0, // OFF
|
|
354
|
-
"@typescript-eslint/semi": 0, // OFF
|
|
355
|
-
"@typescript-eslint/space-before-blocks": 0, // OFF
|
|
356
|
-
"@typescript-eslint/space-before-function-paren": 0, // OFF
|
|
357
|
-
"@typescript-eslint/space-infix-ops": 0, // OFF
|
|
358
|
-
"@typescript-eslint/type-annotation-spacing": 0, // OFF
|
|
359
|
-
"@typescript-eslint/quotes": 0, // OFF
|
|
360
|
-
|
|
361
|
-
// React Rules
|
|
362
|
-
"react/display-name": 0, // prevent missing displayName in a React component definition - OFF
|
|
363
|
-
"react/jsx-no-undef": 1, // disallow undeclared variables in JSX
|
|
364
|
-
"react/jsx-sort-props": 1, // enforce props alphabetical sorting - ON
|
|
365
|
-
"react/jsx-uses-react": 0, // prevent React to be incorrectly marked as unused - OFF for React 17+
|
|
366
|
-
"react/jsx-uses-vars": 1, // prevent variables used in JSX to be incorrectly marked as unused
|
|
367
|
-
"react/no-did-mount-set-state": 0, // prevent usage of setState in componentDidMount - OFF (deprecated)
|
|
368
|
-
"react/no-did-update-set-state": 0, // prevent usage of setState in componentDidUpdate - OFF (deprecated)
|
|
369
|
-
"react/no-multi-comp": 0, // prevent multiple component definition per file - OFF
|
|
370
|
-
"react/no-unknown-property": 1, // prevent usage of unknown DOM property
|
|
371
|
-
"react/prop-types": 0, // prevent missing props validation in a React component definition - OFF for TypeScript projects
|
|
372
|
-
"react/react-in-jsx-scope": 0, // prevent missing React when using JSX - OFF for React 17+
|
|
373
|
-
"react/self-closing-comp": 1, // prevent extra closing tags for components without children
|
|
374
|
-
"react/hook-use-state": 1, // enforce destructuring and symmetric naming of useState hook value and setter variables - ENABLED
|
|
375
|
-
"react/jsx-no-leaked-render": 1, // prevent problematic leaked values from being rendered - ENABLED
|
|
376
|
-
"react/jsx-no-useless-fragment": 1, // disallow unnecessary fragments - ENABLED
|
|
377
|
-
// React formatting rules (disabled - handled by Prettier)
|
|
378
|
-
"react/jsx-child-element-spacing": 0, // OFF
|
|
379
|
-
"react/jsx-closing-bracket-location": 0, // OFF
|
|
380
|
-
"react/jsx-closing-tag-location": 0, // OFF
|
|
381
|
-
"react/jsx-curly-newline": 0, // OFF
|
|
382
|
-
"react/jsx-curly-spacing": 0, // OFF
|
|
383
|
-
"react/jsx-equals-spacing": 0, // OFF
|
|
384
|
-
"react/jsx-first-prop-new-line": 0, // OFF
|
|
385
|
-
"react/jsx-indent": 0, // OFF
|
|
386
|
-
"react/jsx-indent-props": 0, // OFF
|
|
387
|
-
"react/jsx-max-props-per-line": 0, // OFF
|
|
388
|
-
"react/jsx-newline": 0, // OFF
|
|
389
|
-
"react/jsx-one-expression-per-line": 0, // OFF
|
|
390
|
-
"react/jsx-props-no-multi-spaces": 0, // OFF
|
|
391
|
-
"react/jsx-tag-spacing": 0, // OFF
|
|
392
|
-
"react/jsx-wrap-multilines": 0, // OFF
|
|
393
|
-
|
|
394
|
-
// Prettier specific
|
|
395
|
-
"prettier/prettier": 1
|
|
396
|
-
}
|
|
397
|
-
}
|