@wildpastry/eslint-config 1.7.9 → 1.8.1

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.
Files changed (5) hide show
  1. package/.eslintrc +230 -228
  2. package/.prettierrc +19 -0
  3. package/README.md +121 -29
  4. package/index.js +294 -305
  5. package/package.json +1 -1
package/.eslintrc CHANGED
@@ -56,158 +56,155 @@
56
56
  },
57
57
 
58
58
  "rules": {
59
- // Code
60
- "no-inferrable-types": 0, // disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean // DONE - OFF
61
- "no-unsafe-assignment": 0, // disallow assigning a value with type any to variables and properties // DONE - OFF
62
- "no-unsafe-member-access": 0, //disallow member access on a value with type any // DONE - OFF
63
- "array-callback-return": 0, // enforce `return` statements in callbacks of array methods // DONE - OFF
64
- "no-await-in-loop": 0, // disallow `await` inside of loops // DONE - OFF
65
- "no-constructor-return": 0, // disallow returning value from constructor // DONE - OFF
66
- "no-duplicate-imports": 1, // disallow duplicate module imports // DONE
67
- "no-promise-executor-return": 0, // disallow returning values from Promise executor functions // DONE - OFF
68
- "no-self-compare": 1, // disallow comparisons where both sides are exactly the same // DONE
69
- "no-template-curly-in-string": 0, // disallow template literal placeholder syntax in regular strings // DONE - OFF
70
- "no-unmodified-loop-condition": 1, // disallow unmodified loop conditions // DONE
71
- "no-unreachable-loop": 1, // disallow loops with a body that allows only one iteration // DONE
72
- "no-use-before-define": 0, // disallow the use of variables before they are defined // DONE - OFF
73
- "require-atomic-updates": 1, // disallow assignments that can lead to race conditions due to usage of `await` or `yield` // DONE
74
- "accessor-pairs": 0, // enforce getter and setter pairs in objects and classes // DONE - OFF
75
- "arrow-body-style": 0, // require braces around arrow function bodies // DONE - OFF
76
- "block-scoped-var": 1, // enforce the use of variables within the scope they are defined // DONE
77
- "camelcase": 1, // enforce camelcase naming convention // DONE
78
- "capitalized-comments": 1, // enforce or disallow capitalization of the first letter of a comment // DONE
79
- "class-methods-use-this": 0, // enforce that class methods utilize `this` // DONE - OFF
80
- "complexity": 0, // enforce a maximum cyclomatic complexity allowed in a program // DONE - OFF
81
- "consistent-return": 1, // require `return` statements to either always or never specify values // DONE
82
- "consistent-this": 1, // enforce consistent naming when capturing the current execution context // DONE
83
- "default-case": 1, // require `default` cases in `switch` statements // DONE
84
- "default-case-last": 1, // enforce default clauses in switch statements to be last // DONE
85
- "default-param-last": 0, // enforce default parameters to be last // DONE - OFF
86
- "dot-notation": 1, // enforce dot notation whenever possible // DONE
87
- "eqeqeq": 1, // require the use of `===` and `!==` // DONE
88
- "func-name-matching": 1, // require function names to match the name of the variable or property to which they are assigned // DONE
89
- "func-names": 1, // require or disallow named `function` expressions // DONE
90
- "func-style": 0, // enforce the consistent use of either `function` declarations or expressions // DONE - OFF
91
- "grouped-accessor-pairs": 1, // require grouped accessor pairs in object literals and classes // DONE
92
- "guard-for-in": 1, // require `for-in` loops to include an `if` statement // DONE
93
- "id-denylist": 1, // disallow specified identifiers // DONE
94
- "id-length": 0, // enforce minimum and maximum identifier lengths // DONE - OFF
95
- "id-match": 1, // require identifiers to match a specified regular expression // DONE
96
- "init-declarations": 0, // require or disallow initialization in variable declarations // DONE - OFF
97
- "max-classes-per-file": 1, // enforce a maximum number of classes per file // DONE
98
- "max-depth": [1, 3], // enforce a maximum depth that blocks can be nested // DONE
99
- "max-lines": [1, { "max": 800, "skipBlankLines": true }], // enforce a maximum number of lines per file // DONE - CUSTOMISED
100
- "max-lines-per-function": [1, { "max": 200 }], // enforce a maximum number of lines of code in a function // DONE - CUSTOMISED
101
- "max-nested-callbacks": 1, // enforce a maximum depth that callbacks can be nested // DONE
102
- "max-params": [1, { "max": 7 }], // enforce a maximum number of parameters in function definitions // DONE - CUSTOMISED
103
- "max-statements": [1, { "max": 20 }], // enforce a maximum number of statements allowed in function blocks // DONE - CUSTOMISED
104
- "multiline-comment-style": 1, // enforce a particular style for multiline comments // DONE
105
- "new-cap": 0, // require constructor names to begin with a capital letter // DONE - OFF
106
- "no-alert": 1, // disallow the use of `alert`, `confirm`, and `prompt` // DONE
107
- "no-array-constructor": 1, // disallow `Array` constructors // DONE
108
- "no-bitwise": 1, // disallow bitwise operators // DONE
109
- "no-caller": 1, // disallow the use of `arguments.caller` or `arguments.callee` // DONE
110
- "no-case-declarations": 1, // disallow lexical declarations in case clauses // DONE
111
- "no-console": 1, // disallow the use of `console` // DONE
112
- "no-continue": 1, // disallow `continue` statements // DONE
113
- "no-delete-var": 1, // disallow deleting variables // DONE
114
- "no-div-regex": 1, // disallow division operators explicitly at the beginning of regular expressions // DONE
115
- "no-else-return": 1, // disallow `else` blocks after `return` statements in `if` statements // DONE
116
- "no-empty": 1, // disallow empty block statements // DONE
117
- "no-empty-function": [1, { "allow": ["constructors"] }], // disallow empty functions // DONE - CUSTOMISED
118
- "no-eq-null": 1, // disallow `null` comparisons without type-checking operators // DONE
119
- "no-eval": 1, // disallow the use of `eval()` // DONE
120
- "no-extend-native": 1, // disallow extending native types // DONE
121
- "no-extra-bind": 1, // disallow unnecessary calls to `.bind()` // DONE
122
- "no-extra-boolean-cast": 1, // disallow unnecessary boolean casts // DONE
123
- "no-extra-label": 1, // disallow unnecessary labels // DONE
124
- "no-global-assign": 1, // disallow assignments to native objects or read-only global variables // DONE
125
- "no-implicit-coercion": 1, // disallow shorthand type conversions // DONE
126
- "no-implicit-globals": 1, // disallow declarations in the global scope // DONE
127
- "no-implied-eval": 1, // disallow the use of `eval()`-like methods // DONE
128
- "no-inline-comments": 1, // disallow inline comments after code // DONE
129
- "no-invalid-this": 1, // disallow `this` keywords outside of classes or class-like objects // DONE
130
- "no-iterator": 1, // disallow the use of the `__iterator__` property // DONE
131
- "no-label-var": 1, // disallow labels that share a name with a variable // DONE
132
- "no-labels": 1, // disallow labeled statements // DONE
133
- "no-lone-blocks": 1, // disallow unnecessary nested blocks // DONE
134
- "no-lonely-if": 1, // disallow `if` statements as the only statement in `else` blocks // DONE
135
- "no-loop-func": 1, // disallow function declarations that contain unsafe references inside loop statements // DONE
136
- "no-magic-numbers": 0, // disallow magic numbers // Comment, this rule seems to be hard to satisfy. // DONE - OFF
137
- "no-multi-assign": 1, // disallow use of chained assignment expressions // DONE
138
- "no-multi-str": 1, // disallow multiline strings // DONE
139
- "no-negated-condition": 1, // disallow negated conditions // DONE
140
- "no-nested-ternary": 1, // disallow nested ternary expressions // DONE
141
- "no-new": 1, // disallow `new` operators outside of assignments or comparisons // DONE
142
- "no-new-func": 1, // disallow `new` operators with the `Function` object // DONE
143
- "no-new-object": 1, // disallow `Object` constructors // DONE
144
- "no-new-wrappers": 1, // disallow `new` operators with the `String`, `Number`, and `Boolean` objects // DONE
145
- "no-nonoctal-decimal-escape": 1, // disallow `\8` and `\9` escape sequences in string literals // DONE
146
- "no-octal": 1, // disallow octal literals // DONE
147
- "no-octal-escape": 1, // disallow octal escape sequences in string literals // DONE
148
- "no-param-reassign": 1, // disallow reassigning `function` parameters // DONE
149
- "no-plusplus": 0, // disallow the unary operators `++` and `--` // DONE - OFF
150
- "no-proto": 1, // disallow the use of the `__proto__` property // DONE
151
- "no-redeclare": 1, // disallow variable redeclaration // DONE
152
- "no-regex-spaces": 1, // disallow multiple spaces in regular expressions // DONE
153
- "no-restricted-exports": 1, // disallow specified names in exports // DONE
154
- "no-restricted-globals": 1, // disallow specified global variables // DONE
155
- "no-restricted-imports": 1, // disallow specified modules when loaded by `import` // DONE
156
- "no-restricted-properties": 1, // disallow certain properties on certain objects // DONE
157
- "no-restricted-syntax": 1, // disallow specified syntax // DONE
158
- "no-return-assign": 1, // disallow assignment operators in `return` statements // DONE
159
- "no-return-await": 1, // disallow unnecessary `return await` // DONE
160
- "no-script-url": 1, // disallow `javascript:` urls // DONE
161
- "no-sequences": 1, // disallow comma operators // DONE
162
- "no-shadow": 0, // disallow variable declarations from shadowing variables declared in the outer scope // DONE - OFF
163
- "no-shadow-restricted-names": 1, // disallow identifiers from shadowing restricted names // DONE
164
- "no-ternary": 0, // disallow ternary operators // DONE - OFF
165
- "no-throw-literal": 1, // disallow throwing literals as exceptions // DONE
166
- "no-undef-init": 1, // disallow initializing variables to `undefined` // DONE
167
- "no-undefined": 0, // disallow the use of `undefined` as an identifier // DONE - OFF
168
- "no-underscore-dangle": 0, // disallow dangling underscores in identifiers // DONE - OFF
169
- "no-unneeded-ternary": 0, // disallow ternary operators when simpler alternatives exist // DONE - OFF
170
- "no-unused-expressions": 0, // disallow unused expressions // DONE - OFF
171
- "no-unused-labels": 1, // disallow unused labels // DONE
172
- "no-useless-call": 1, // disallow unnecessary calls to `.call()` and `.apply()` // DONE
173
- "no-useless-catch": 1, // disallow unnecessary `catch` clauses // DONE
174
- "no-useless-computed-key": 1, // disallow unnecessary computed property keys in objects and classes // DONE
175
- "no-useless-concat": 1, // disallow unnecessary concatenation of literals or template literals // DONE
176
- "no-useless-constructor": 0, // disallow unnecessary constructors // DONE - OFF
177
- "no-useless-escape": 1, // disallow unnecessary escape characters // DONE
178
- "no-useless-rename": 1, // disallow renaming import, export, and destructured assignments to the same name // DONE
179
- "no-useless-return": 1, // disallow redundant return statements // DONE
180
- "no-var": 1, // require `let` or `const` instead of `var` // DONE
181
- "no-void": [1, { "allowAsStatement": true }], // disallow `void` operators // DONE - CUSTOMISED
182
- "no-warning-comments": 1, // disallow specified warning terms in comments // DONE
183
- "no-with": 1, // disallow `with` statements // DONE
184
- "object-shorthand": 0, // require or disallow method and property shorthand syntax for object literals // DONE - OFF
185
- "one-var": 0, // enforce variables to be declared either together or separately in functions // DONE - OFF
186
- "operator-assignment": 1, // require or disallow assignment operator shorthand where possible // DONE
187
- "prefer-arrow-callback": 1, // require using arrow functions for callbacks // DONE
188
- "prefer-const": 1, // require `const` declarations for variables that are never reassigned after declared // DONE
189
- "prefer-destructuring": 0, // require destructuring from arrays and/or objects // DONE - OFF
190
- "prefer-exponentiation-operator": 1, // disallow the use of `Math.pow` in favor of the `**` operator // DONE
191
- "prefer-named-capture-group": 1, // enforce using named capture group in regular expression // DONE
192
- "prefer-numeric-literals": 1, // disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals // DONE
193
- "prefer-object-spread": 1, // disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead. // DONE
194
- "prefer-promise-reject-errors": 1, // require using Error objects as Promise rejection reasons // DONE
195
- "prefer-regex-literals": 1, // disallow use of the `RegExp` constructor in favor of regular expression literals // DONE
196
- "prefer-rest-params": 1, // require rest parameters instead of `arguments` // DONE
197
- "prefer-spread": 1, // require spread operators instead of `.apply()` // DONE
198
- "prefer-template": 1, // require template literals instead of string concatenation // DONE
199
- "radix": 1, // enforce the consistent use of the radix argument when using `parseInt()` // DONE
200
- "require-await": 1, // disallow async functions which have no `await` expression // DONE
201
- "require-unicode-regexp": 1, // enforce the use of `u` flag on RegExp // DONE
202
- "require-yield": 1, // require generator functions to contain `yield` // DONE
203
- "sort-imports": 1, // enforce sorted import declarations within modules // DONE
204
- "sort-keys": 0, // require object keys to be sorted // DONE - OFF
205
- "sort-vars": 1, // require variables within the same declaration block to be sorted // DONE
206
- "spaced-comment": 1, // enforce consistent spacing after the `//` or `/*` in a comment // DONE
207
- "strict": 0, // require or disallow strict mode directives // DONE - OFF
208
- "symbol-description": 1, // require symbol descriptions // DONE
209
- "vars-on-top": 1, // require `var` declarations be placed at the top of their containing scope // DONE
210
- "yoda": 1, // require or disallow "Yoda" conditions // DONE
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": 0, // disallow the use of variables before they are defined - OFF for hoisting flexibility
70
+ "require-atomic-updates": 1, // disallow assignments that can lead to race conditions due to usage of `await` or `yield`
71
+ "accessor-pairs": 0, // enforce getter and setter pairs in objects and classes - OFF
72
+ "arrow-body-style": 0, // require braces around arrow function bodies - OFF
73
+ "block-scoped-var": 1, // enforce the use of variables within the scope they are defined
74
+ "camelcase": 1, // enforce camelcase naming convention
75
+ "capitalized-comments": 0, // enforce or disallow capitalization of the first letter of a comment - OFF for flexibility
76
+ "class-methods-use-this": 0, // enforce that class methods utilize `this` - OFF
77
+ "complexity": 0, // enforce a maximum cyclomatic complexity allowed in a program - OFF
78
+ "consistent-return": 1, // require `return` statements to either always or never specify values
79
+ "consistent-this": 1, // enforce consistent naming when capturing the current execution context
80
+ "default-case": 1, // require `default` cases in `switch` statements
81
+ "default-case-last": 1, // enforce default clauses in switch statements to be last
82
+ "default-param-last": 1, // enforce default parameters to be last - ENABLED for modern practices
83
+ "dot-notation": 1, // enforce dot notation whenever possible
84
+ "eqeqeq": 1, // require the use of `===` and `!==`
85
+ "func-name-matching": 1, // require function names to match the name of the variable or property to which they are assigned
86
+ "func-names": 0, // require or disallow named `function` expressions - OFF for flexibility
87
+ "func-style": 0, // enforce the consistent use of either `function` declarations or expressions - OFF
88
+ "grouped-accessor-pairs": 1, // require grouped accessor pairs in object literals and classes
89
+ "guard-for-in": 1, // require `for-in` loops to include an `if` statement
90
+ "id-denylist": 0, // disallow specified identifiers - OFF
91
+ "id-length": 0, // enforce minimum and maximum identifier lengths - OFF
92
+ "id-match": 0, // require identifiers to match a specified regular expression - OFF
93
+ "init-declarations": 0, // require or disallow initialization in variable declarations - OFF
94
+ "max-classes-per-file": 1, // enforce a maximum number of classes per file
95
+ "max-depth": [1, 4], // enforce a maximum depth that blocks can be nested - UPDATED to 4 for modern practices
96
+ "max-lines": [1, { "max": 1000, "skipBlankLines": true }], // enforce a maximum number of lines per file - UPDATED to 1000
97
+ "max-lines-per-function": [1, { "max": 300 }], // enforce a maximum number of lines of code in a function - UPDATED to 300
98
+ "max-nested-callbacks": [1, 4], // enforce a maximum depth that callbacks can be nested - UPDATED to 4
99
+ "max-params": [1, { "max": 5 }], // enforce a maximum number of parameters in function definitions - UPDATED to 5
100
+ "max-statements": [1, { "max": 30 }], // enforce a maximum number of statements allowed in function blocks - UPDATED to 30
101
+ "multiline-comment-style": 0, // enforce a particular style for multiline comments - OFF
102
+ "new-cap": 0, // require constructor names to begin with a capital letter - OFF
103
+ "no-alert": 1, // disallow the use of `alert`, `confirm`, and `prompt`
104
+ "no-array-constructor": 1, // disallow `Array` constructors
105
+ "no-bitwise": 0, // disallow bitwise operators - OFF for flexibility
106
+ "no-caller": 1, // disallow the use of `arguments.caller` or `arguments.callee`
107
+ "no-case-declarations": 1, // disallow lexical declarations in case clauses
108
+ "no-console": 1, // disallow the use of `console`
109
+ "no-continue": 0, // disallow `continue` statements - OFF for flexibility
110
+ "no-delete-var": 1, // disallow deleting variables
111
+ "no-div-regex": 1, // disallow division operators explicitly at the beginning of regular expressions
112
+ "no-else-return": 1, // disallow `else` blocks after `return` statements in `if` statements
113
+ "no-empty": 1, // disallow empty block statements
114
+ "no-empty-function": [1, { "allow": ["constructors"] }], // disallow empty functions
115
+ "no-eq-null": 1, // disallow `null` comparisons without type-checking operators
116
+ "no-eval": 1, // disallow the use of `eval()`
117
+ "no-extend-native": 1, // disallow extending native types
118
+ "no-extra-bind": 1, // disallow unnecessary calls to `.bind()`
119
+ "no-extra-boolean-cast": 1, // disallow unnecessary boolean casts
120
+ "no-extra-label": 1, // disallow unnecessary labels
121
+ "no-global-assign": 1, // disallow assignments to native objects or read-only global variables
122
+ "no-implicit-coercion": 1, // disallow shorthand type conversions
123
+ "no-implicit-globals": 1, // disallow declarations in the global scope
124
+ "no-implied-eval": 1, // disallow the use of `eval()`-like methods
125
+ "no-inline-comments": 0, // disallow inline comments after code - OFF for flexibility
126
+ "no-invalid-this": 1, // disallow `this` keywords outside of classes or class-like objects
127
+ "no-iterator": 1, // disallow the use of the `__iterator__` property
128
+ "no-label-var": 1, // disallow labels that share a name with a variable
129
+ "no-labels": 1, // disallow labeled statements
130
+ "no-lone-blocks": 1, // disallow unnecessary nested blocks
131
+ "no-lonely-if": 1, // disallow `if` statements as the only statement in `else` blocks
132
+ "no-loop-func": 1, // disallow function declarations that contain unsafe references inside loop statements
133
+ "no-magic-numbers": 0, // disallow magic numbers - OFF as it's often too restrictive
134
+ "no-multi-assign": 1, // disallow use of chained assignment expressions
135
+ "no-multi-str": 1, // disallow multiline strings
136
+ "no-negated-condition": 0, // disallow negated conditions - OFF for flexibility
137
+ "no-nested-ternary": 1, // disallow nested ternary expressions
138
+ "no-new": 1, // disallow `new` operators outside of assignments or comparisons
139
+ "no-new-func": 1, // disallow `new` operators with the `Function` object, // disallow `new` operators with the `Function` object // DONE
140
+ "no-new-object": 1, // disallow `Object` constructors
141
+ "no-new-wrappers": 1, // disallow `new` operators with the `String`, `Number`, and `Boolean` objects
142
+ "no-nonoctal-decimal-escape": 1, // disallow `\8` and `\9` escape sequences in string literals
143
+ "no-octal": 1, // disallow octal literals
144
+ "no-octal-escape": 1, // disallow octal escape sequences in string literals
145
+ "no-param-reassign": 1, // disallow reassigning `function` parameters
146
+ "no-plusplus": 0, // disallow the unary operators `++` and `--` - OFF
147
+ "no-proto": 1, // disallow the use of the `__proto__` property
148
+ "no-redeclare": 1, // disallow variable redeclaration
149
+ "no-regex-spaces": 1, // disallow multiple spaces in regular expressions
150
+ "no-restricted-exports": 0, // disallow specified names in exports - OFF
151
+ "no-restricted-globals": 0, // disallow specified global variables - OFF
152
+ "no-restricted-imports": 0, // disallow specified modules when loaded by `import` - OFF
153
+ "no-restricted-properties": 0, // disallow certain properties on certain objects - OFF
154
+ "no-restricted-syntax": 0, // disallow specified syntax - OFF
155
+ "no-return-assign": 1, // disallow assignment operators in `return` statements
156
+ "no-return-await": 1, // disallow unnecessary `return await`
157
+ "no-script-url": 1, // disallow `javascript:` urls
158
+ "no-sequences": 1, // disallow comma operators
159
+ "no-shadow": 0, // disallow variable declarations from shadowing variables declared in the outer scope - OFF
160
+ "no-shadow-restricted-names": 1, // disallow identifiers from shadowing restricted names
161
+ "no-ternary": 0, // disallow ternary operators - OFF
162
+ "no-throw-literal": 1, // disallow throwing literals as exceptions
163
+ "no-undef-init": 1, // disallow initializing variables to `undefined`
164
+ "no-undefined": 0, // disallow the use of `undefined` as an identifier - OFF
165
+ "no-underscore-dangle": 0, // disallow dangling underscores in identifiers - OFF
166
+ "no-unneeded-ternary": 1, // disallow ternary operators when simpler alternatives exist - ENABLED
167
+ "no-unused-expressions": 0, // disallow unused expressions - OFF
168
+ "no-unused-labels": 1, // disallow unused labels
169
+ "no-useless-call": 1, // disallow unnecessary calls to `.call()` and `.apply()`
170
+ "no-useless-catch": 1, // disallow unnecessary `catch` clauses
171
+ "no-useless-computed-key": 1, // disallow unnecessary computed property keys in objects and classes
172
+ "no-useless-concat": 1, // disallow unnecessary concatenation of literals or template literals
173
+ "no-useless-constructor": 1, // disallow unnecessary constructors - ENABLED
174
+ "no-useless-escape": 1, // disallow unnecessary escape characters
175
+ "no-useless-rename": 1, // disallow renaming import, export, and destructured assignments to the same name
176
+ "no-useless-return": 1, // disallow redundant return statements
177
+ "no-var": 1, // require `let` or `const` instead of `var`
178
+ "no-void": [1, { "allowAsStatement": true }], // disallow `void` operators
179
+ "no-warning-comments": 0, // disallow specified warning terms in comments - OFF
180
+ "no-with": 1, // disallow `with` statements
181
+ "object-shorthand": 1, // require or disallow method and property shorthand syntax for object literals - ENABLED
182
+ "one-var": 0, // enforce variables to be declared either together or separately in functions - OFF
183
+ "operator-assignment": 1, // require or disallow assignment operator shorthand where possible
184
+ "prefer-arrow-callback": 1, // require using arrow functions for callbacks
185
+ "prefer-const": 1, // require `const` declarations for variables that are never reassigned after declared
186
+ "prefer-destructuring": 0, // require destructuring from arrays and/or objects - OFF
187
+ "prefer-exponentiation-operator": 1, // disallow the use of `Math.pow` in favor of the `**` operator
188
+ "prefer-named-capture-group": 0, // enforce using named capture group in regular expression - OFF for flexibility
189
+ "prefer-numeric-literals": 1, // disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals
190
+ "prefer-object-spread": 1, // disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead
191
+ "prefer-promise-reject-errors": 1, // require using Error objects as Promise rejection reasons
192
+ "prefer-regex-literals": 1, // disallow use of the `RegExp` constructor in favor of regular expression literals
193
+ "prefer-rest-params": 1, // require rest parameters instead of `arguments`
194
+ "prefer-spread": 1, // require spread operators instead of `.apply()`
195
+ "prefer-template": 1, // require template literals instead of string concatenation
196
+ "radix": 1, // enforce the consistent use of the radix argument when using `parseInt()`
197
+ "require-await": 1, // disallow async functions which have no `await` expression
198
+ "require-unicode-regexp": 0, // enforce the use of `u` flag on RegExp - OFF for compatibility
199
+ "require-yield": 1, // require generator functions to contain `yield`
200
+ "sort-imports": 0, // enforce sorted import declarations within modules - OFF for flexibility
201
+ "sort-keys": 0, // require object keys to be sorted - OFF
202
+ "sort-vars": 0, // require variables within the same declaration block to be sorted - OFF
203
+ "spaced-comment": 1, // enforce consistent spacing after the `//` or `/*` in a comment
204
+ "strict": 0, // require or disallow strict mode directives - OFF
205
+ "symbol-description": 1, // require symbol descriptions
206
+ "vars-on-top": 0, // require `var` declarations be placed at the top of their containing scope - OFF
207
+ "yoda": 1, // require or disallow "Yoda" conditions
211
208
 
212
209
  // Top level formatting (These rules are turned off in eslint because they are still being applied using [prettier/prettier])
213
210
  "curly": 0, // enforce consistent brace style for all control statements // DONE - OFF
@@ -288,84 +285,89 @@
288
285
  "wrap-regex": 0, // require parenthesis around regex literals // DONE - OFF
289
286
  "yield-star-spacing": 0, // require or disallow spacing around the `*` in `yield*` expressions // DONE - OFF
290
287
 
291
- // Other
292
- "line-comment-position": 1, // enforce position of line comments // DONE
293
- "lines-between-class-members": 0, // require or disallow an empty line between class members // DONE - OFF
294
- "max-len": [1, { "code": 80, "ignoreUrls": true, "ignoreComments": true, "ignorePattern": "^.*['\"].{10,}['\"].*$" }], // enforce a maximum line length // DONE - CUSTOMISED
295
- "max-statements-per-line": 1, // enforce a maximum number of statements allowed per line // DONE
296
- "padding-line-between-statements": 1, // require or disallow padding lines between statements // DONE
297
- "no-cond-assign": 1, // disallow assignment in conditional expressions // DONE
298
- "no-constant-condition": 1, // disallow use of constant expressions in conditions // DONE
299
- "no-control-regex": 1, // disallow control characters in regular expressions // DONE
300
- "no-debugger": 0, // disallow use of debugger // DONE - OFF
301
- "no-dupe-args": 1, // disallow duplicate arguments in functions // DONE
302
- "no-dupe-keys": 1, // disallow duplicate keys when creating object literals // DONE
303
- "no-duplicate-case": 1, // disallow a duplicate case label // DONE
304
- "no-ex-assign": 1, // disallow assigning to the exception in a catch block // DONE
305
- "no-func-assign": 1, // disallow overwriting functions written as function declarations // DONE
306
- "no-inner-declarations": 1, // disallow function or variable declarations in nested blocks // DONE
307
- "no-invalid-regexp": 1, // disallow invalid regular expression strings in the RegExp constructor // DONE
308
- "no-irregular-whitespace": 1, // disallow irregular whitespace outside of strings and comments // DONE
309
- "no-negated-in-lhs": 1, // disallow negation of the left operand of an in expression // DONE
310
- "no-obj-calls": 1, // disallow the use of object properties of the global object (Math and JSON) as functions // DONE
311
- "no-sparse-arrays": 1, // disallow sparse arrays // DONE
312
- "no-unreachable": 1, // disallow unreachable statements after a return, throw, continue, or break statement // DONE
313
- "use-isnan": 1, // disallow comparisons with the value NaN // DONE
314
- "valid-jsdoc": 1, // ensure JSDoc comments are valid // DONE
315
- "valid-typeof": 1, // ensure that the results of typeof are compared against a valid string // DONE
316
- "no-catch-shadow": 1, // disallow the catch clause parameter name being the same as a variable in the outer scope // DONE
317
- "no-unused-vars": 1, // disallow declaration of variables that are not used in the code // DONE
318
- "newline-after-var": 0, // allow/disallow an empty newline after var statement // DONE - OFF
319
- "no-spaced-func": 1, // disallow space between function identifier and application // DONE
320
- "array-bracket-spacing": [0, "always"], // enforces consistent spacing inside array brackets // DONE - CUSTOMISED
288
+ // Core ESLint Rules
289
+ "line-comment-position": 0, // enforce position of line comments - OFF
290
+ "lines-between-class-members": 0, // require or disallow an empty line between class members - OFF
291
+ "max-len": [1, { "code": 100, "ignoreUrls": true, "ignoreComments": true, "ignorePattern": "^.*['\"].{10,}['\"].*$" }], // enforce a maximum line length - UPDATED to 100
292
+ "max-statements-per-line": 1, // enforce a maximum number of statements allowed per line
293
+ "padding-line-between-statements": 0, // require or disallow padding lines between statements - OFF
294
+ "no-cond-assign": 1, // disallow assignment in conditional expressions
295
+ "no-constant-condition": 1, // disallow use of constant expressions in conditions
296
+ "no-control-regex": 1, // disallow control characters in regular expressions
297
+ "no-debugger": 1, // disallow use of debugger - ENABLED for production
298
+ "no-dupe-args": 1, // disallow duplicate arguments in functions
299
+ "no-dupe-keys": 1, // disallow duplicate keys when creating object literals
300
+ "no-duplicate-case": 1, // disallow a duplicate case label
301
+ "no-ex-assign": 1, // disallow assigning to the exception in a catch block
302
+ "no-func-assign": 1, // disallow overwriting functions written as function declarations
303
+ "no-inner-declarations": 1, // disallow function or variable declarations in nested blocks
304
+ "no-invalid-regexp": 1, // disallow invalid regular expression strings in the RegExp constructor
305
+ "no-irregular-whitespace": 1, // disallow irregular whitespace outside of strings and comments
306
+ "no-obj-calls": 1, // disallow the use of object properties of the global object (Math and JSON) as functions
307
+ "no-sparse-arrays": 1, // disallow sparse arrays
308
+ "no-unreachable": 1, // disallow unreachable statements after a return, throw, continue, or break statement
309
+ "use-isnan": 1, // disallow comparisons with the value NaN
310
+ "valid-typeof": 1, // ensure that the results of typeof are compared against a valid string
311
+ "no-unused-vars": 1, // disallow declaration of variables that are not used in the code
312
+ "array-bracket-spacing": 0, // enforce consistent spacing inside array brackets - OFF
321
313
 
322
- // @Typescript specific
323
- "@typescript-eslint/no-unused-vars": [1, { "argsIgnorePattern": "^_" }], // DONE - CUSTOMISED
324
- "@typescript-eslint/brace-style": 0, // DONE - OFF
325
- "@typescript-eslint/comma-dangle": 0, // DONE - OFF
326
- "@typescript-eslint/comma-spacing": 0, // DONE - OFF
327
- "@typescript-eslint/func-call-spacing": 0, // DONE - OFF
328
- "@typescript-eslint/indent": 0, // DONE - OFF
329
- "@typescript-eslint/keyword-spacing": 0, // DONE - OFF
330
- "@typescript-eslint/member-delimiter-style": 0, // DONE - OFF
331
- "@typescript-eslint/no-extra-parens": 0, // DONE - OFF
332
- "@typescript-eslint/no-extra-semi": 0, // DONE - OFF
333
- "@typescript-eslint/object-curly-spacing": 0, // DONE - OFF
334
- "@typescript-eslint/semi": 0, // DONE - OFF
335
- "@typescript-eslint/space-before-blocks": 0, // DONE - OFF
336
- "@typescript-eslint/space-before-function-paren": 0, // DONE - OFF
337
- "@typescript-eslint/space-infix-ops": 0, // DONE - OFF
338
- "@typescript-eslint/type-annotation-spacing": 0, // DONE - OFF
339
- "@typescript-eslint/quotes": 0, // DONE - OFF
314
+ // TypeScript ESLint Rules
315
+ "@typescript-eslint/no-unused-vars": [1, { "argsIgnorePattern": "^_" }], // disallow unused variables with underscore prefix exception
316
+ "@typescript-eslint/no-explicit-any": 1, // disallow usage of the any type - ENABLED for better type safety
317
+ "@typescript-eslint/prefer-nullish-coalescing": 1, // prefer nullish coalescing operator - ENABLED for modern practices
318
+ "@typescript-eslint/prefer-optional-chain": 1, // prefer optional chaining - ENABLED for modern practices
319
+ "@typescript-eslint/no-non-null-assertion": 1, // disallow non-null assertions - ENABLED for safety
320
+ "@typescript-eslint/consistent-type-imports": 1, // enforce consistent usage of type imports - ENABLED
321
+ // TypeScript formatting rules (disabled - handled by Prettier)
322
+ "@typescript-eslint/brace-style": 0, // OFF
323
+ "@typescript-eslint/comma-dangle": 0, // OFF
324
+ "@typescript-eslint/comma-spacing": 0, // OFF
325
+ "@typescript-eslint/func-call-spacing": 0, // OFF
326
+ "@typescript-eslint/indent": 0, // OFF
327
+ "@typescript-eslint/keyword-spacing": 0, // OFF
328
+ "@typescript-eslint/member-delimiter-style": 0, // OFF
329
+ "@typescript-eslint/no-extra-parens": 0, // OFF
330
+ "@typescript-eslint/no-extra-semi": 0, // OFF
331
+ "@typescript-eslint/object-curly-spacing": 0, // OFF
332
+ "@typescript-eslint/semi": 0, // OFF
333
+ "@typescript-eslint/space-before-blocks": 0, // OFF
334
+ "@typescript-eslint/space-before-function-paren": 0, // OFF
335
+ "@typescript-eslint/space-infix-ops": 0, // OFF
336
+ "@typescript-eslint/type-annotation-spacing": 0, // OFF
337
+ "@typescript-eslint/quotes": 0, // OFF
340
338
 
341
- // React specific
342
- "react/display-name": 0, // prevent missing displayName in a React component definition // DONE - OFF
343
- "react/jsx-no-undef": 1, // disallow undeclared variables in JSX // DONE
344
- "react/jsx-sort-props": 0, // enforce props alphabetical sorting // DONE - OFF
345
- "react/jsx-uses-react": 1, // prevent React to be incorrectly marked as unused // DONE
346
- "react/jsx-uses-vars": 1, // prevent variables used in JSX to be incorrectly marked as unused // DONE
347
- "react/no-did-mount-set-state": 1, // prevent usage of setState in componentDidMount // DONE
348
- "react/no-did-update-set-state": 1, // prevent usage of setState in componentDidUpdate // DONE
349
- "react/no-multi-comp": 0, // prevent multiple component definition per file // DONE - OFF
350
- "react/no-unknown-property": 1, // prevent usage of unknown DOM property // DONE
351
- "react/prop-types": 1, // prevent missing props validation in a React component definition // DONE
352
- "react/react-in-jsx-scope": 0, // prevent missing React when using JSX // DONE - OFF
353
- "react/self-closing-comp": 1, // prevent extra closing tags for components without children // DONE
354
- "react/jsx-child-element-spacing": 0, // // DONE - OFF
355
- "react/jsx-closing-bracket-location": 0, // // DONE - OFF
356
- "react/jsx-closing-tag-location": 0, // // DONE - OFF
357
- "react/jsx-curly-newline": 0, // // DONE - OFF
358
- "react/jsx-curly-spacing": 0, // // DONE - OFF
359
- "react/jsx-equals-spacing": 0, // // DONE - OFF
360
- "react/jsx-first-prop-new-line": 0, // // DONE - OFF
361
- "react/jsx-indent": 0, // // DONE - OFF
362
- "react/jsx-indent-props": 0, // // DONE - OFF
363
- "react/jsx-max-props-per-line": 0, // // DONE - OFF
364
- "react/jsx-newline": 0, // // DONE - OFF
365
- "react/jsx-one-expression-per-line": 0, // // DONE - OFF
366
- "react/jsx-props-no-multi-spaces": 0, // // DONE - OFF
367
- "react/jsx-tag-spacing": 0, // // DONE - OFF
368
- "react/jsx-wrap-multilines": 0, // // DONE - OFF
339
+ // React Rules
340
+ "react/display-name": 0, // prevent missing displayName in a React component definition - OFF
341
+ "react/jsx-no-undef": 1, // disallow undeclared variables in JSX
342
+ "react/jsx-sort-props": 0, // enforce props alphabetical sorting - OFF
343
+ "react/jsx-uses-react": 0, // prevent React to be incorrectly marked as unused - OFF for React 17+
344
+ "react/jsx-uses-vars": 1, // prevent variables used in JSX to be incorrectly marked as unused
345
+ "react/no-did-mount-set-state": 0, // prevent usage of setState in componentDidMount - OFF (deprecated)
346
+ "react/no-did-update-set-state": 0, // prevent usage of setState in componentDidUpdate - OFF (deprecated)
347
+ "react/no-multi-comp": 0, // prevent multiple component definition per file - OFF
348
+ "react/no-unknown-property": 1, // prevent usage of unknown DOM property
349
+ "react/prop-types": 0, // prevent missing props validation in a React component definition - OFF for TypeScript projects
350
+ "react/react-in-jsx-scope": 0, // prevent missing React when using JSX - OFF for React 17+
351
+ "react/self-closing-comp": 1, // prevent extra closing tags for components without children
352
+ "react/hook-use-state": 1, // enforce destructuring and symmetric naming of useState hook value and setter variables - ENABLED
353
+ "react/jsx-no-leaked-render": 1, // prevent problematic leaked values from being rendered - ENABLED
354
+ "react/jsx-no-useless-fragment": 1, // disallow unnecessary fragments - ENABLED
355
+ // React formatting rules (disabled - handled by Prettier)
356
+ "react/jsx-child-element-spacing": 0, // OFF
357
+ "react/jsx-closing-bracket-location": 0, // OFF
358
+ "react/jsx-closing-tag-location": 0, // OFF
359
+ "react/jsx-curly-newline": 0, // OFF
360
+ "react/jsx-curly-spacing": 0, // OFF
361
+ "react/jsx-equals-spacing": 0, // OFF
362
+ "react/jsx-first-prop-new-line": 0, // OFF
363
+ "react/jsx-indent": 0, // OFF
364
+ "react/jsx-indent-props": 0, // OFF
365
+ "react/jsx-max-props-per-line": 0, // OFF
366
+ "react/jsx-newline": 0, // OFF
367
+ "react/jsx-one-expression-per-line": 0, // OFF
368
+ "react/jsx-props-no-multi-spaces": 0, // OFF
369
+ "react/jsx-tag-spacing": 0, // OFF
370
+ "react/jsx-wrap-multilines": 0, // OFF
369
371
 
370
372
  // Prettier specific
371
373
  "prettier/prettier": 1
package/.prettierrc ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "arrowParens": "always",
3
+ "bracketSameLine": true,
4
+ "bracketSpacing": true,
5
+ "embeddedLanguageFormatting": "auto",
6
+ "endOfLine": "auto",
7
+ "htmlWhitespaceSensitivity": "strict",
8
+ "insertPragma": false,
9
+ "jsxSingleQuote": true,
10
+ "printWidth": 80,
11
+ "proseWrap": "preserve",
12
+ "quoteProps": "consistent",
13
+ "requirePragma": false,
14
+ "semi": true,
15
+ "singleQuote": true,
16
+ "tabWidth": 2,
17
+ "trailingComma": "none",
18
+ "useTabs": false
19
+ }