@isentinel/eslint-config 6.0.0-beta.37 → 6.0.0-beta.39
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/dist/cli.mjs +1 -1
- package/dist/index.d.mts +106 -1
- package/dist/index.mjs +1 -0
- package/dist/lint-cli.mjs +1 -1
- package/dist/oxlint.d.mts +106 -1
- package/package.json +3 -3
package/dist/cli.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import path from "node:path";
|
|
|
9
9
|
import { existsSync, readFileSync } from "fs";
|
|
10
10
|
import { execSync } from "node:child_process";
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "6.0.0-beta.
|
|
12
|
+
var version = "6.0.0-beta.39";
|
|
13
13
|
var package_default = {
|
|
14
14
|
name: "@isentinel/eslint-config",
|
|
15
15
|
version,
|
package/dist/index.d.mts
CHANGED
|
@@ -10976,399 +10976,502 @@ interface RuleOptions {
|
|
|
10976
10976
|
'sentinel/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
10977
10977
|
/**
|
|
10978
10978
|
* Disallow bracket array type syntax and require Array<T> / ReadonlyArray<T>.
|
|
10979
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/array-type-generic/
|
|
10979
10980
|
*/
|
|
10980
10981
|
'small-rules/array-type-generic'?: Linter.RuleEntry<[]>;
|
|
10981
10982
|
/**
|
|
10982
10983
|
* Ban specified Roblox Instance classes and configured Instance properties.
|
|
10984
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/ban-instances/
|
|
10983
10985
|
*/
|
|
10984
10986
|
'small-rules/ban-instances'?: Linter.RuleEntry<SmallRulesBanInstances>;
|
|
10985
10987
|
/**
|
|
10986
10988
|
* Ban React.FC and similar component type annotations. Use explicit function declarations instead.
|
|
10989
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/ban-react-fc/
|
|
10987
10990
|
*/
|
|
10988
10991
|
'small-rules/ban-react-fc'?: Linter.RuleEntry<[]>;
|
|
10989
10992
|
/**
|
|
10990
10993
|
* Ban configured TypeScript utility types, defaulting to Omit in favor of Except.
|
|
10994
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/ban-types/
|
|
10991
10995
|
*/
|
|
10992
10996
|
'small-rules/ban-types'?: Linter.RuleEntry<SmallRulesBanTypes>;
|
|
10993
10997
|
/**
|
|
10994
10998
|
* Enforce consistent spelling of compound words in identifiers.
|
|
10999
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/consistent-compound-words/
|
|
10995
11000
|
*/
|
|
10996
11001
|
'small-rules/consistent-compound-words'?: Linter.RuleEntry<SmallRulesConsistentCompoundWords>;
|
|
10997
11002
|
/**
|
|
10998
11003
|
* Require a matching enable comment for every `oxlint-disable` or `eslint-disable` block directive.
|
|
11004
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-disable-enable-pair/
|
|
10999
11005
|
*/
|
|
11000
11006
|
'small-rules/directive-disable-enable-pair'?: Linter.RuleEntry<SmallRulesDirectiveDisableEnablePair>;
|
|
11001
11007
|
/**
|
|
11002
11008
|
* Disallow aggregating `oxlint-enable` or `eslint-enable` comments across multiple disable directives.
|
|
11009
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-no-aggregating-enable/
|
|
11003
11010
|
*/
|
|
11004
11011
|
'small-rules/directive-no-aggregating-enable'?: Linter.RuleEntry<[]>;
|
|
11005
11012
|
/**
|
|
11006
11013
|
* Disallow duplicate `oxlint-disable` or `eslint-disable` comments.
|
|
11014
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-no-duplicate-disable/
|
|
11007
11015
|
*/
|
|
11008
11016
|
'small-rules/directive-no-duplicate-disable'?: Linter.RuleEntry<[]>;
|
|
11009
11017
|
/**
|
|
11010
11018
|
* Disallow `oxlint-disable` or `eslint-disable` comments for configured rules.
|
|
11019
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-no-restricted-disable/
|
|
11011
11020
|
*/
|
|
11012
11021
|
'small-rules/directive-no-restricted-disable'?: Linter.RuleEntry<SmallRulesDirectiveNoRestrictedDisable>;
|
|
11013
11022
|
/**
|
|
11014
11023
|
* Disallow `oxlint-disable` or `eslint-disable` comments without rule names.
|
|
11024
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-no-unlimited-disable/
|
|
11015
11025
|
*/
|
|
11016
11026
|
'small-rules/directive-no-unlimited-disable'?: Linter.RuleEntry<[]>;
|
|
11017
11027
|
/**
|
|
11018
11028
|
* Disallow unused `oxlint-enable` or `eslint-enable` comments.
|
|
11029
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-no-unused-enable/
|
|
11019
11030
|
*/
|
|
11020
11031
|
'small-rules/directive-no-unused-enable'?: Linter.RuleEntry<[]>;
|
|
11021
11032
|
/**
|
|
11022
11033
|
* Disallow block ESLint/Oxlint directive comments.
|
|
11034
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-no-use/
|
|
11023
11035
|
*/
|
|
11024
11036
|
'small-rules/directive-no-use'?: Linter.RuleEntry<SmallRulesDirectiveNoUse>;
|
|
11025
11037
|
/**
|
|
11026
11038
|
* Require descriptions for `oxlint` and `eslint` disable/enable directives.
|
|
11039
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-require-description/
|
|
11027
11040
|
*/
|
|
11028
11041
|
'small-rules/directive-require-description'?: Linter.RuleEntry<SmallRulesDirectiveRequireDescription>;
|
|
11029
11042
|
/**
|
|
11030
11043
|
* Enforce Ianitor.Check<T> type annotations on complex TypeScript types
|
|
11044
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/enforce-ianitor-check-type/
|
|
11031
11045
|
*/
|
|
11032
11046
|
'small-rules/enforce-ianitor-check-type'?: Linter.RuleEntry<SmallRulesEnforceIanitorCheckType>;
|
|
11033
11047
|
/**
|
|
11034
11048
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
11049
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/isolated-functions/
|
|
11035
11050
|
*/
|
|
11036
11051
|
'small-rules/isolated-functions'?: Linter.RuleEntry<SmallRulesIsolatedFunctions>;
|
|
11037
11052
|
/**
|
|
11038
11053
|
* Flags effect dependencies that are not memoized. Unmemoized dependencies can cause unnecessary re-renders or infinite loops.
|
|
11054
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/memoized-effect-dependencies/
|
|
11039
11055
|
*/
|
|
11040
11056
|
'small-rules/memoized-effect-dependencies'?: Linter.RuleEntry<SmallRulesMemoizedEffectDependencies>;
|
|
11041
11057
|
/**
|
|
11042
11058
|
* Disallow array constructor element forms and enforce roblox-ts-aware constructor patterns.
|
|
11059
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-array-constructor-elements/
|
|
11043
11060
|
*/
|
|
11044
11061
|
'small-rules/no-array-constructor-elements'?: Linter.RuleEntry<SmallRulesNoArrayConstructorElements>;
|
|
11045
11062
|
/**
|
|
11046
11063
|
* Disallow new Array<T>() followed by contiguous index assignments; use an array literal instead.
|
|
11064
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-array-constructor-index-assignment/
|
|
11047
11065
|
*/
|
|
11048
11066
|
'small-rules/no-array-constructor-index-assignment'?: Linter.RuleEntry<[]>;
|
|
11049
11067
|
/**
|
|
11050
11068
|
* Disallow array append assignments using array[array.size()] = value (roblox-ts) or array[array.length] = value (standard) and prefer push-based appends.
|
|
11069
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-array-size-assignment/
|
|
11051
11070
|
*/
|
|
11052
11071
|
'small-rules/no-array-size-assignment'?: Linter.RuleEntry<SmallRulesNoArraySizeAssignment>;
|
|
11053
11072
|
/**
|
|
11054
11073
|
* Disallow asynchronous operations inside class constructors. Constructors return immediately, so async work causes race conditions, unhandled rejections, and incomplete object states.
|
|
11074
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-async-constructor/
|
|
11055
11075
|
*/
|
|
11056
11076
|
'small-rules/no-async-constructor'?: Linter.RuleEntry<[]>;
|
|
11057
11077
|
/**
|
|
11058
11078
|
* Disallow yielding Roblox API calls in synchronous Planck system execution.
|
|
11079
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-async-in-system/
|
|
11059
11080
|
*/
|
|
11060
11081
|
'small-rules/no-async-in-system'?: Linter.RuleEntry<SmallRulesNoAsyncInSystem>;
|
|
11061
11082
|
/**
|
|
11062
11083
|
* Disallow effect hooks with many cascading state updates.
|
|
11084
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-cascading-set-state/
|
|
11063
11085
|
*/
|
|
11064
11086
|
'small-rules/no-cascading-set-state'?: Linter.RuleEntry<[]>;
|
|
11065
11087
|
/**
|
|
11066
11088
|
* Ban new Color3(...) except new Color3() or new Color3(0, 0, 0). Use Color3.fromRGB() instead.
|
|
11089
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-color3-constructor/
|
|
11067
11090
|
*/
|
|
11068
11091
|
'small-rules/no-color3-constructor'?: Linter.RuleEntry<SmallRulesNoColor3Constructor>;
|
|
11069
11092
|
/**
|
|
11070
11093
|
* Disallow commented-out code
|
|
11094
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-commented-code/
|
|
11071
11095
|
*/
|
|
11072
11096
|
'small-rules/no-commented-code'?: Linter.RuleEntry<SmallRulesNoCommentedCode>;
|
|
11073
11097
|
/**
|
|
11074
11098
|
* Disallow constant conditions, but allow constant loops that include loop exits such as break, return, or configured calls.
|
|
11099
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-constant-condition-with-break/
|
|
11075
11100
|
*/
|
|
11076
11101
|
'small-rules/no-constant-condition-with-break'?: Linter.RuleEntry<SmallRulesNoConstantConditionWithBreak>;
|
|
11077
11102
|
/**
|
|
11078
11103
|
* Disallow assignments whose value is never read.
|
|
11104
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-dead-store/
|
|
11079
11105
|
*/
|
|
11080
11106
|
'small-rules/no-dead-store'?: Linter.RuleEntry<[]>;
|
|
11081
11107
|
/**
|
|
11082
11108
|
* Use throw instead of error().
|
|
11109
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-error/
|
|
11083
11110
|
*/
|
|
11084
11111
|
'small-rules/no-error'?: Linter.RuleEntry<[]>;
|
|
11085
11112
|
/**
|
|
11086
11113
|
* Disallow sending Events back to the same player inside an Events.connect callback; use Functions for request/response.
|
|
11114
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-events-in-events-callback/
|
|
11087
11115
|
*/
|
|
11088
11116
|
'small-rules/no-events-in-events-callback'?: Linter.RuleEntry<SmallRulesNoEventsInEventsCallback>;
|
|
11089
11117
|
/**
|
|
11090
11118
|
* Disallow map(...) directly after filter(...).
|
|
11119
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-filter-map-chain/
|
|
11091
11120
|
*/
|
|
11092
11121
|
'small-rules/no-filter-map-chain'?: Linter.RuleEntry<[]>;
|
|
11093
11122
|
/**
|
|
11094
11123
|
* Disallow exact comparisons involving inexact floating-point values.
|
|
11124
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-floating-point-equality/
|
|
11095
11125
|
*/
|
|
11096
11126
|
'small-rules/no-floating-point-equality'?: Linter.RuleEntry<[]>;
|
|
11097
11127
|
/**
|
|
11098
11128
|
* Report React components whose bodies exceed 300 lines.
|
|
11129
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-giant-component/
|
|
11099
11130
|
*/
|
|
11100
11131
|
'small-rules/no-giant-component'?: Linter.RuleEntry<[]>;
|
|
11101
11132
|
/**
|
|
11102
11133
|
* Enforce React component size and complexity limits inspired by the 'Refactor God Component' checklist.
|
|
11134
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-god-components/
|
|
11103
11135
|
*/
|
|
11104
11136
|
'small-rules/no-god-components'?: Linter.RuleEntry<SmallRulesNoGodComponents>;
|
|
11105
11137
|
/**
|
|
11106
11138
|
* Disallow Ianitor validator creation inside function bodies. Hoist to module scope to avoid recreating validators on every call.
|
|
11139
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-ianitor-in-function-body/
|
|
11107
11140
|
*/
|
|
11108
11141
|
'small-rules/no-ianitor-in-function-body'?: Linter.RuleEntry<[]>;
|
|
11109
11142
|
/**
|
|
11110
11143
|
* Disallow accessing `.success` on Ianitor check results when the full result object is not needed.
|
|
11144
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-ianitor-success-access/
|
|
11111
11145
|
*/
|
|
11112
11146
|
'small-rules/no-ianitor-success-access'?: Linter.RuleEntry<[]>;
|
|
11113
11147
|
/**
|
|
11114
11148
|
* Disallow pointless identity `.map()` calls that return the parameter unchanged
|
|
11149
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-identity-map/
|
|
11115
11150
|
*/
|
|
11116
11151
|
'small-rules/no-identity-map'?: Linter.RuleEntry<SmallRulesNoIdentityMap>;
|
|
11117
11152
|
/**
|
|
11118
11153
|
* Disallow standalone `++` and `--` statements and for-loop update clauses.
|
|
11154
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-increment-decrement/
|
|
11119
11155
|
*/
|
|
11120
11156
|
'small-rules/no-increment-decrement'?: Linter.RuleEntry<SmallRulesNoIncrementDecrement>;
|
|
11121
11157
|
/**
|
|
11122
11158
|
* Prevent inline properties from being passed to memoized components.
|
|
11159
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-inline-property-on-memo-component/
|
|
11123
11160
|
*/
|
|
11124
11161
|
'small-rules/no-inline-property-on-memo-component'?: Linter.RuleEntry<[]>;
|
|
11125
11162
|
/**
|
|
11126
11163
|
* Detect instance methods that do not use 'this' and suggest converting them to standalone functions for better performance in roblox-ts.
|
|
11164
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-instance-methods-without-this/
|
|
11127
11165
|
*/
|
|
11128
11166
|
'small-rules/no-instance-methods-without-this'?: Linter.RuleEntry<SmallRulesNoInstanceMethodsWithoutThis>;
|
|
11129
11167
|
/**
|
|
11130
11168
|
* Disallow mutating a loop iterable during iteration.
|
|
11169
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-loop-iterable-mutation/
|
|
11131
11170
|
*/
|
|
11132
11171
|
'small-rules/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
11133
11172
|
/**
|
|
11134
11173
|
* Disallow spreading static property bags into nativeProperties/*NativeProperties props and onto JSX elements via intermediate objects, because the spread creates a new copied table every render.
|
|
11174
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-native-properties-spread/
|
|
11135
11175
|
*/
|
|
11136
11176
|
'small-rules/no-native-properties-spread'?: Linter.RuleEntry<[]>;
|
|
11137
11177
|
/**
|
|
11138
11178
|
* Disallow configured constructor calls (default: new Instance) inside React useMemo callbacks.
|
|
11179
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-new-instance-in-use-memo/
|
|
11139
11180
|
*/
|
|
11140
11181
|
'small-rules/no-new-instance-in-use-memo'?: Linter.RuleEntry<SmallRulesNoNewInstanceInUseMemo>;
|
|
11141
11182
|
/**
|
|
11142
11183
|
* Use Log instead of print().
|
|
11184
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-print/
|
|
11143
11185
|
*/
|
|
11144
11186
|
'small-rules/no-print'?: Linter.RuleEntry<[]>;
|
|
11187
|
+
/**
|
|
11188
|
+
* Disallow recursive function calls to prevent stack overflow.
|
|
11189
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-recursive/
|
|
11190
|
+
*/
|
|
11145
11191
|
'small-rules/no-recursive'?: Linter.RuleEntry<SmallRulesNoRecursive>;
|
|
11146
11192
|
/**
|
|
11147
11193
|
* Disallow redundant uiaspectratioconstraint children inside components that already manage their own aspect ratio internally.
|
|
11194
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-redundant-aspect-ratio-constraint/
|
|
11148
11195
|
*/
|
|
11149
11196
|
'small-rules/no-redundant-aspect-ratio-constraint'?: Linter.RuleEntry<[]>;
|
|
11150
11197
|
/**
|
|
11151
11198
|
* Disallow non-component functions that return JSX or React elements.
|
|
11199
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-render-helper-functions/
|
|
11152
11200
|
*/
|
|
11153
11201
|
'small-rules/no-render-helper-functions'?: Linter.RuleEntry<[]>;
|
|
11154
11202
|
/**
|
|
11155
11203
|
* Disallow assignment to restricted object properties.
|
|
11204
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-restricted-property-assignment/
|
|
11156
11205
|
*/
|
|
11157
11206
|
'small-rules/no-restricted-property-assignment'?: Linter.RuleEntry<SmallRulesNoRestrictedPropertyAssignment>;
|
|
11158
11207
|
/**
|
|
11159
11208
|
* Disallow the .spec.{ts,tsx} file extension for test files. Use .test.{ts,tsx} instead.
|
|
11209
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/no-spec-file-extension/
|
|
11160
11210
|
*/
|
|
11161
11211
|
'small-rules/no-spec-file-extension'?: Linter.RuleEntry<[]>;
|
|
11162
11212
|
/**
|
|
11163
11213
|
* Require JSX for static React.createElement calls.
|
|
11214
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-static-react-create-element/
|
|
11164
11215
|
*/
|
|
11165
11216
|
'small-rules/no-static-react-create-element'?: Linter.RuleEntry<SmallRulesNoStaticReactCreateElement>;
|
|
11166
11217
|
/**
|
|
11167
11218
|
* Disallow map(...) directly on table.create(...) and new Array(...) constructor patterns in roblox-ts.
|
|
11219
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-table-create-map/
|
|
11168
11220
|
*/
|
|
11169
11221
|
'small-rules/no-table-create-map'?: Linter.RuleEntry<[]>;
|
|
11170
11222
|
/**
|
|
11171
11223
|
* Disallow task.wait() and Promise.delay(...).await() calls.
|
|
11224
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-task-wait/
|
|
11172
11225
|
*/
|
|
11173
11226
|
'small-rules/no-task-wait'?: Linter.RuleEntry<[]>;
|
|
11174
11227
|
/**
|
|
11175
11228
|
* Disallow assertions that always succeed or compare against freshly created values.
|
|
11229
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-trivial-assertions/
|
|
11176
11230
|
*/
|
|
11177
11231
|
'small-rules/no-trivial-assertions'?: Linter.RuleEntry<[]>;
|
|
11178
11232
|
/**
|
|
11179
11233
|
* Ban React property names that begin with an underscore in JSX.
|
|
11234
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-underscore-react-props/
|
|
11180
11235
|
*/
|
|
11181
11236
|
'small-rules/no-underscore-react-props'?: Linter.RuleEntry<[]>;
|
|
11182
11237
|
/**
|
|
11183
11238
|
* Disallow unused imports
|
|
11239
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-unused-imports/
|
|
11184
11240
|
*/
|
|
11185
11241
|
'small-rules/no-unused-imports'?: Linter.RuleEntry<SmallRulesNoUnusedImports>;
|
|
11186
11242
|
/**
|
|
11187
11243
|
* Disallow standalone useMemo calls that ignore the memoized value.
|
|
11244
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-unused-use-memo/
|
|
11188
11245
|
*/
|
|
11189
11246
|
'small-rules/no-unused-use-memo'?: Linter.RuleEntry<SmallRulesNoUnusedUseMemo>;
|
|
11190
11247
|
/**
|
|
11191
11248
|
* Disallow useMemo for expressions that are already trivial to compute.
|
|
11249
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-use-memo-simple-expression/
|
|
11192
11250
|
*/
|
|
11193
11251
|
'small-rules/no-use-memo-simple-expression'?: Linter.RuleEntry<[]>;
|
|
11194
11252
|
/**
|
|
11195
11253
|
* Disallow using the return value of functions that do not return anything.
|
|
11254
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-use-of-empty-return-value/
|
|
11196
11255
|
*/
|
|
11197
11256
|
'small-rules/no-use-of-empty-return-value'?: Linter.RuleEntry<[]>;
|
|
11198
11257
|
/**
|
|
11199
11258
|
* Disallow constants that do not add value.
|
|
11259
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-useless-constants/
|
|
11200
11260
|
*/
|
|
11201
11261
|
'small-rules/no-useless-constants'?: Linter.RuleEntry<SmallRulesNoUselessConstants>;
|
|
11202
11262
|
/**
|
|
11203
11263
|
* Disallow Roblox JSX properties whose values already match the class defaults.
|
|
11264
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-useless-default/
|
|
11204
11265
|
*/
|
|
11205
11266
|
'small-rules/no-useless-default'?: Linter.RuleEntry<[]>;
|
|
11206
11267
|
/**
|
|
11207
11268
|
* Disallow empty effects, duplicate dependencies, effect chains, log-only effects, derived state, external-store state sync, state initialization, reset effects, parent notifications, parent ref callbacks, and event side effects routed through state.
|
|
11269
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-useless-use-effect/
|
|
11208
11270
|
*/
|
|
11209
11271
|
'small-rules/no-useless-use-effect'?: Linter.RuleEntry<SmallRulesNoUselessUseEffect>;
|
|
11210
11272
|
/**
|
|
11211
11273
|
* Disallow useMemo calls that only wrap values static enough to live at module scope.
|
|
11274
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-useless-use-memo/
|
|
11212
11275
|
*/
|
|
11213
11276
|
'small-rules/no-useless-use-memo'?: Linter.RuleEntry<SmallRulesNoUselessUseMemo>;
|
|
11214
11277
|
/**
|
|
11215
11278
|
* Disallow useSpring hooks whose config and dependencies are entirely static
|
|
11279
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-useless-use-spring/
|
|
11216
11280
|
*/
|
|
11217
11281
|
'small-rules/no-useless-use-spring'?: Linter.RuleEntry<SmallRulesNoUselessUseSpring>;
|
|
11218
11282
|
/**
|
|
11219
11283
|
* Disallow spreading a potentially unbounded array into a variadic call, because every element becomes a stack-allocated argument.
|
|
11284
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-variadic-spread/
|
|
11220
11285
|
*/
|
|
11221
11286
|
'small-rules/no-variadic-spread'?: Linter.RuleEntry<[]>;
|
|
11222
11287
|
/**
|
|
11223
11288
|
* Use Log instead of warn().
|
|
11289
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-warn/
|
|
11224
11290
|
*/
|
|
11225
11291
|
'small-rules/no-warn'?: Linter.RuleEntry<[]>;
|
|
11226
11292
|
/**
|
|
11227
11293
|
* Require all imports to be type-only imports. Benchmarks cannot import non-types because the benchmarker plugin will throw an error.
|
|
11294
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/only-type-imports/
|
|
11228
11295
|
*/
|
|
11229
11296
|
'small-rules/only-type-imports'?: Linter.RuleEntry<[]>;
|
|
11230
11297
|
/**
|
|
11231
11298
|
* Prefer class properties to assignment of literals in constructors.
|
|
11299
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/prefer-class-properties/
|
|
11232
11300
|
*/
|
|
11233
11301
|
'small-rules/prefer-class-properties'?: Linter.RuleEntry<SmallRulesPreferClassProperties>;
|
|
11234
11302
|
/**
|
|
11235
11303
|
* Disallow inline useReducer action objects that could be module-level constants.
|
|
11304
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-constant-dispatch/
|
|
11236
11305
|
*/
|
|
11237
11306
|
'small-rules/prefer-constant-dispatch'?: Linter.RuleEntry<[]>;
|
|
11238
11307
|
/**
|
|
11239
11308
|
* Prefer a local ContextStack component over directly nesting multiple context providers.
|
|
11309
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-context-stack/
|
|
11240
11310
|
*/
|
|
11241
11311
|
'small-rules/prefer-context-stack'?: Linter.RuleEntry<[]>;
|
|
11242
11312
|
/**
|
|
11243
11313
|
* Prefer importing React hooks directly instead of calling them via the React namespace.
|
|
11314
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-direct-hook-imports/
|
|
11244
11315
|
*/
|
|
11245
11316
|
'small-rules/prefer-direct-hook-imports'?: Linter.RuleEntry<SmallRulesPreferDirectHookImports>;
|
|
11246
11317
|
/**
|
|
11247
11318
|
* Prefer early returns over full-body conditional wrapping.
|
|
11319
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/prefer-early-return/
|
|
11248
11320
|
*/
|
|
11249
11321
|
'small-rules/prefer-early-return'?: Linter.RuleEntry<SmallRulesPreferEarlyReturn>;
|
|
11250
11322
|
/**
|
|
11251
11323
|
* Enforce expect assertion guards in tests and prefer expect.assertions(n) over expect.hasAssertions() when the count is known.
|
|
11324
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/prefer-expect-assertions/
|
|
11252
11325
|
*/
|
|
11253
11326
|
'small-rules/prefer-expect-assertions'?: Linter.RuleEntry<SmallRulesPreferExpectAssertions>;
|
|
11254
11327
|
/**
|
|
11255
11328
|
* Prefer extracting static JSX elements to module-level constants.
|
|
11329
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-hoisted-jsx-elements/
|
|
11256
11330
|
*/
|
|
11257
11331
|
'small-rules/prefer-hoisted-jsx-elements'?: Linter.RuleEntry<SmallRulesPreferHoistedJsxElements>;
|
|
11258
11332
|
/**
|
|
11259
11333
|
* Prefer extracting inline JSX object props to module-level constants when the entire object is statically hoistable.
|
|
11334
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-hoisted-jsx-object-properties/
|
|
11260
11335
|
*/
|
|
11261
11336
|
'small-rules/prefer-hoisted-jsx-object-properties'?: Linter.RuleEntry<[]>;
|
|
11262
11337
|
/**
|
|
11263
|
-
* Prefer .idiv() for integer division instead of math.floor(x / y).
|
|
11338
|
+
* Prefer .idiv() for integer division instead of math.floor(x / y) or math.floor(x * 0.5).
|
|
11339
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/prefer-idiv/
|
|
11264
11340
|
*/
|
|
11265
11341
|
'small-rules/prefer-idiv'?: Linter.RuleEntry<[]>;
|
|
11266
11342
|
/**
|
|
11267
11343
|
* Prefer a local Portal component over direct createPortal calls when the project already defines one.
|
|
11344
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-local-portal-component/
|
|
11268
11345
|
*/
|
|
11269
11346
|
'small-rules/prefer-local-portal-component'?: Linter.RuleEntry<[]>;
|
|
11270
11347
|
/**
|
|
11271
11348
|
* Prefer math.min() and math.max() over simple clamp-like ternaries.
|
|
11349
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/prefer-math-min-max/
|
|
11272
11350
|
*/
|
|
11273
11351
|
'small-rules/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
11274
11352
|
/**
|
|
11275
11353
|
* Prefer Modding.inspect over manually enumerating every enum member in a Record<Enum, true>.
|
|
11354
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/prefer-modding-inspect/
|
|
11276
11355
|
*/
|
|
11277
11356
|
'small-rules/prefer-modding-inspect'?: Linter.RuleEntry<[]>;
|
|
11278
11357
|
/**
|
|
11279
11358
|
* Prefer screaming snake case constants at module scope or the allowed top-level wrapper scope.
|
|
11359
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/prefer-module-scope-constants/
|
|
11280
11360
|
*/
|
|
11281
11361
|
'small-rules/prefer-module-scope-constants'?: Linter.RuleEntry<[]>;
|
|
11282
11362
|
/**
|
|
11283
11363
|
* Prefer local EqualPadding and DirectionalPadding components over matching <uipadding /> declarations.
|
|
11364
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-padding-components/
|
|
11284
11365
|
*/
|
|
11285
11366
|
'small-rules/prefer-padding-components'?: Linter.RuleEntry<[]>;
|
|
11286
11367
|
/**
|
|
11287
11368
|
* Enforce PascalCase names for enums and enum members.
|
|
11369
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/prefer-pascal-case-enums/
|
|
11288
11370
|
*/
|
|
11289
11371
|
'small-rules/prefer-pascal-case-enums'?: Linter.RuleEntry<[]>;
|
|
11290
11372
|
/**
|
|
11291
11373
|
* Prefer direct ColorSequence and NumberSequence overloads over identical direct arguments and two-keypoint arrays.
|
|
11374
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/prefer-sequence-overloads/
|
|
11292
11375
|
*/
|
|
11293
11376
|
'small-rules/prefer-sequence-overloads'?: Linter.RuleEntry<[]>;
|
|
11294
11377
|
/**
|
|
11295
11378
|
* Enforce combining multiple world.get() or world.has() calls into a single call for better Jecs performance.
|
|
11379
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/prefer-single-world-query/
|
|
11296
11380
|
*/
|
|
11297
11381
|
'small-rules/prefer-single-world-query'?: Linter.RuleEntry<[]>;
|
|
11298
11382
|
/**
|
|
11299
11383
|
* Prefer singular naming for enums.
|
|
11384
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/prefer-singular-enums/
|
|
11300
11385
|
*/
|
|
11301
11386
|
'small-rules/prefer-singular-enums'?: Linter.RuleEntry<[]>;
|
|
11302
11387
|
/**
|
|
11303
11388
|
* Prefer ternary expressions over complementary JSX && branches.
|
|
11389
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-ternary-conditional-rendering/
|
|
11304
11390
|
*/
|
|
11305
11391
|
'small-rules/prefer-ternary-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
11306
11392
|
/**
|
|
11307
11393
|
* Prefer UDim2.fromScale() or UDim2.fromOffset() over new UDim2() when all offsets or all scales are zero.
|
|
11394
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/prefer-udim2-shorthand/
|
|
11308
11395
|
*/
|
|
11309
11396
|
'small-rules/prefer-udim2-shorthand'?: Linter.RuleEntry<[]>;
|
|
11310
11397
|
/**
|
|
11311
11398
|
* Suggest using useReducer for related state updates instead of multiple useState calls.
|
|
11399
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-use-reducer/
|
|
11312
11400
|
*/
|
|
11313
11401
|
'small-rules/prefer-use-reducer'?: Linter.RuleEntry<[]>;
|
|
11314
11402
|
/**
|
|
11315
11403
|
* Prevent abbreviations.
|
|
11404
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/prevent-abbreviations/
|
|
11316
11405
|
*/
|
|
11317
11406
|
'small-rules/prevent-abbreviations'?: Linter.RuleEntry<SmallRulesPreventAbbreviations>;
|
|
11318
11407
|
/**
|
|
11319
11408
|
* Restrict React hooks to object returns or short tuples.
|
|
11409
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/react-hooks-strict-return/
|
|
11320
11410
|
*/
|
|
11321
11411
|
'small-rules/react-hooks-strict-return'?: Linter.RuleEntry<[]>;
|
|
11322
11412
|
/**
|
|
11323
11413
|
* Require async function names to end with Async.
|
|
11414
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/require-async-suffix/
|
|
11324
11415
|
*/
|
|
11325
11416
|
'small-rules/require-async-suffix'?: Linter.RuleEntry<SmallRulesRequireAsyncSuffix>;
|
|
11326
11417
|
/**
|
|
11327
11418
|
* Require configured classes to be instantiated at module level only.
|
|
11419
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/require-module-level-instantiation/
|
|
11328
11420
|
*/
|
|
11329
11421
|
'small-rules/require-module-level-instantiation'?: Linter.RuleEntry<SmallRulesRequireModuleLevelInstantiation>;
|
|
11330
11422
|
/**
|
|
11331
11423
|
* Enforce named effect functions for better debuggability. Prevents inline arrow functions in useEffect and similar hooks.
|
|
11424
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/require-named-effect-functions/
|
|
11332
11425
|
*/
|
|
11333
11426
|
'small-rules/require-named-effect-functions'?: Linter.RuleEntry<SmallRulesRequireNamedEffectFunctions>;
|
|
11334
11427
|
/**
|
|
11335
11428
|
* Enforces balanced opener/closer function calls across all execution paths
|
|
11429
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/require-paired-calls/
|
|
11336
11430
|
*/
|
|
11337
11431
|
'small-rules/require-paired-calls'?: Linter.RuleEntry<SmallRulesRequirePairedCalls>;
|
|
11338
11432
|
/**
|
|
11339
11433
|
* Require keys on nested React JSX children, fragments, and configured iteration or memoization contexts.
|
|
11434
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/require-react-component-keys/
|
|
11340
11435
|
*/
|
|
11341
11436
|
'small-rules/require-react-component-keys'?: Linter.RuleEntry<SmallRulesRequireReactComponentKeys>;
|
|
11342
11437
|
/**
|
|
11343
11438
|
* Require displayName on exported memo components and contexts.
|
|
11439
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/require-react-display-names/
|
|
11344
11440
|
*/
|
|
11345
11441
|
'small-rules/require-react-display-names'?: Linter.RuleEntry<SmallRulesRequireReactDisplayNames>;
|
|
11346
11442
|
/**
|
|
11347
11443
|
* Require braces around switch case bodies selected by line span or statement count.
|
|
11444
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/require-switch-case-braces/
|
|
11348
11445
|
*/
|
|
11349
11446
|
'small-rules/require-switch-case-braces'?: Linter.RuleEntry<SmallRulesRequireSwitchCaseBraces>;
|
|
11350
11447
|
/**
|
|
11351
11448
|
* Require 'Error.captureStackTrace' before directly throwing new Error instances in named functions.
|
|
11449
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/require-throw-error-capture/
|
|
11352
11450
|
*/
|
|
11353
11451
|
'small-rules/require-throw-error-capture'?: Linter.RuleEntry<SmallRulesRequireThrowErrorCapture>;
|
|
11354
11452
|
/**
|
|
11355
11453
|
* Require the 'u' or 'v' unicode flag on calls named regex().
|
|
11454
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/require-unicode-regex/
|
|
11356
11455
|
*/
|
|
11357
11456
|
'small-rules/require-unicode-regex'?: Linter.RuleEntry<[]>;
|
|
11358
11457
|
/**
|
|
11359
11458
|
* Prevent inline empty object and array defaults in component prop destructuring.
|
|
11459
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/rerender-memo-with-default-value/
|
|
11360
11460
|
*/
|
|
11361
11461
|
'small-rules/rerender-memo-with-default-value'?: Linter.RuleEntry<[]>;
|
|
11362
11462
|
/**
|
|
11363
11463
|
* Prevent imports that reach into another component's nested modules.
|
|
11464
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/strict-component-boundaries/
|
|
11364
11465
|
*/
|
|
11365
11466
|
'small-rules/strict-component-boundaries'?: Linter.RuleEntry<SmallRulesStrictComponentBoundaries>;
|
|
11366
11467
|
/**
|
|
11367
11468
|
* Enforce exhaustive and correct dependency specification in React hooks to prevent stale closures and unnecessary re-renders
|
|
11469
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/use-exhaustive-dependencies/
|
|
11368
11470
|
*/
|
|
11369
11471
|
'small-rules/use-exhaustive-dependencies'?: Linter.RuleEntry<SmallRulesUseExhaustiveDependencies>;
|
|
11370
11472
|
/**
|
|
11371
11473
|
* Enforce that React hooks are only called at the top level of components or custom hooks, never conditionally or in nested functions
|
|
11474
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/use-hook-at-top-level/
|
|
11372
11475
|
*/
|
|
11373
11476
|
'small-rules/use-hook-at-top-level'?: Linter.RuleEntry<SmallRulesUseHookAtTopLevel>;
|
|
11374
11477
|
/**
|
|
@@ -23387,6 +23490,8 @@ type SmallRulesRequireNamedEffectFunctions = [] | [{
|
|
|
23387
23490
|
allowAsync: boolean;
|
|
23388
23491
|
name: string;
|
|
23389
23492
|
}[];
|
|
23493
|
+
inlineFunctionDeclarations?: boolean;
|
|
23494
|
+
sloptor?: boolean;
|
|
23390
23495
|
}];
|
|
23391
23496
|
// ----- small-rules/require-paired-calls -----
|
|
23392
23497
|
type SmallRulesRequirePairedCalls = [] | [{
|
package/dist/index.mjs
CHANGED
|
@@ -15505,6 +15505,7 @@ const FUNCTIONALLY_TYPE_AWARE_RULES = /* @__PURE__ */ new Set([
|
|
|
15505
15505
|
...typeAwareJsPluginRules,
|
|
15506
15506
|
...optionallyTypeAwareRules,
|
|
15507
15507
|
"flawless/prefer-read-only-props",
|
|
15508
|
+
"vitest/prefer-describe-function-title",
|
|
15508
15509
|
"vitest/valid-title"
|
|
15509
15510
|
]);
|
|
15510
15511
|
/**
|
package/dist/lint-cli.mjs
CHANGED
|
@@ -38,7 +38,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
38
38
|
}) : target, mod));
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region package.json
|
|
41
|
-
var version = "6.0.0-beta.
|
|
41
|
+
var version = "6.0.0-beta.39";
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/lint-cli/lib/cli/types.ts
|
|
44
44
|
/**
|
package/dist/oxlint.d.mts
CHANGED
|
@@ -8380,399 +8380,502 @@ interface RuleOptions {
|
|
|
8380
8380
|
'sentinel/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8381
8381
|
/**
|
|
8382
8382
|
* Disallow bracket array type syntax and require Array<T> / ReadonlyArray<T>.
|
|
8383
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/array-type-generic/
|
|
8383
8384
|
*/
|
|
8384
8385
|
'small-rules/array-type-generic'?: Linter.RuleEntry<[]>;
|
|
8385
8386
|
/**
|
|
8386
8387
|
* Ban specified Roblox Instance classes and configured Instance properties.
|
|
8388
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/ban-instances/
|
|
8387
8389
|
*/
|
|
8388
8390
|
'small-rules/ban-instances'?: Linter.RuleEntry<SmallRulesBanInstances>;
|
|
8389
8391
|
/**
|
|
8390
8392
|
* Ban React.FC and similar component type annotations. Use explicit function declarations instead.
|
|
8393
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/ban-react-fc/
|
|
8391
8394
|
*/
|
|
8392
8395
|
'small-rules/ban-react-fc'?: Linter.RuleEntry<[]>;
|
|
8393
8396
|
/**
|
|
8394
8397
|
* Ban configured TypeScript utility types, defaulting to Omit in favor of Except.
|
|
8398
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/ban-types/
|
|
8395
8399
|
*/
|
|
8396
8400
|
'small-rules/ban-types'?: Linter.RuleEntry<SmallRulesBanTypes>;
|
|
8397
8401
|
/**
|
|
8398
8402
|
* Enforce consistent spelling of compound words in identifiers.
|
|
8403
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/consistent-compound-words/
|
|
8399
8404
|
*/
|
|
8400
8405
|
'small-rules/consistent-compound-words'?: Linter.RuleEntry<SmallRulesConsistentCompoundWords>;
|
|
8401
8406
|
/**
|
|
8402
8407
|
* Require a matching enable comment for every `oxlint-disable` or `eslint-disable` block directive.
|
|
8408
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-disable-enable-pair/
|
|
8403
8409
|
*/
|
|
8404
8410
|
'small-rules/directive-disable-enable-pair'?: Linter.RuleEntry<SmallRulesDirectiveDisableEnablePair>;
|
|
8405
8411
|
/**
|
|
8406
8412
|
* Disallow aggregating `oxlint-enable` or `eslint-enable` comments across multiple disable directives.
|
|
8413
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-no-aggregating-enable/
|
|
8407
8414
|
*/
|
|
8408
8415
|
'small-rules/directive-no-aggregating-enable'?: Linter.RuleEntry<[]>;
|
|
8409
8416
|
/**
|
|
8410
8417
|
* Disallow duplicate `oxlint-disable` or `eslint-disable` comments.
|
|
8418
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-no-duplicate-disable/
|
|
8411
8419
|
*/
|
|
8412
8420
|
'small-rules/directive-no-duplicate-disable'?: Linter.RuleEntry<[]>;
|
|
8413
8421
|
/**
|
|
8414
8422
|
* Disallow `oxlint-disable` or `eslint-disable` comments for configured rules.
|
|
8423
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-no-restricted-disable/
|
|
8415
8424
|
*/
|
|
8416
8425
|
'small-rules/directive-no-restricted-disable'?: Linter.RuleEntry<SmallRulesDirectiveNoRestrictedDisable>;
|
|
8417
8426
|
/**
|
|
8418
8427
|
* Disallow `oxlint-disable` or `eslint-disable` comments without rule names.
|
|
8428
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-no-unlimited-disable/
|
|
8419
8429
|
*/
|
|
8420
8430
|
'small-rules/directive-no-unlimited-disable'?: Linter.RuleEntry<[]>;
|
|
8421
8431
|
/**
|
|
8422
8432
|
* Disallow unused `oxlint-enable` or `eslint-enable` comments.
|
|
8433
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-no-unused-enable/
|
|
8423
8434
|
*/
|
|
8424
8435
|
'small-rules/directive-no-unused-enable'?: Linter.RuleEntry<[]>;
|
|
8425
8436
|
/**
|
|
8426
8437
|
* Disallow block ESLint/Oxlint directive comments.
|
|
8438
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-no-use/
|
|
8427
8439
|
*/
|
|
8428
8440
|
'small-rules/directive-no-use'?: Linter.RuleEntry<SmallRulesDirectiveNoUse>;
|
|
8429
8441
|
/**
|
|
8430
8442
|
* Require descriptions for `oxlint` and `eslint` disable/enable directives.
|
|
8443
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/directive-require-description/
|
|
8431
8444
|
*/
|
|
8432
8445
|
'small-rules/directive-require-description'?: Linter.RuleEntry<SmallRulesDirectiveRequireDescription>;
|
|
8433
8446
|
/**
|
|
8434
8447
|
* Enforce Ianitor.Check<T> type annotations on complex TypeScript types
|
|
8448
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/enforce-ianitor-check-type/
|
|
8435
8449
|
*/
|
|
8436
8450
|
'small-rules/enforce-ianitor-check-type'?: Linter.RuleEntry<SmallRulesEnforceIanitorCheckType>;
|
|
8437
8451
|
/**
|
|
8438
8452
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
8453
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/isolated-functions/
|
|
8439
8454
|
*/
|
|
8440
8455
|
'small-rules/isolated-functions'?: Linter.RuleEntry<SmallRulesIsolatedFunctions>;
|
|
8441
8456
|
/**
|
|
8442
8457
|
* Flags effect dependencies that are not memoized. Unmemoized dependencies can cause unnecessary re-renders or infinite loops.
|
|
8458
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/memoized-effect-dependencies/
|
|
8443
8459
|
*/
|
|
8444
8460
|
'small-rules/memoized-effect-dependencies'?: Linter.RuleEntry<SmallRulesMemoizedEffectDependencies>;
|
|
8445
8461
|
/**
|
|
8446
8462
|
* Disallow array constructor element forms and enforce roblox-ts-aware constructor patterns.
|
|
8463
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-array-constructor-elements/
|
|
8447
8464
|
*/
|
|
8448
8465
|
'small-rules/no-array-constructor-elements'?: Linter.RuleEntry<SmallRulesNoArrayConstructorElements>;
|
|
8449
8466
|
/**
|
|
8450
8467
|
* Disallow new Array<T>() followed by contiguous index assignments; use an array literal instead.
|
|
8468
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-array-constructor-index-assignment/
|
|
8451
8469
|
*/
|
|
8452
8470
|
'small-rules/no-array-constructor-index-assignment'?: Linter.RuleEntry<[]>;
|
|
8453
8471
|
/**
|
|
8454
8472
|
* Disallow array append assignments using array[array.size()] = value (roblox-ts) or array[array.length] = value (standard) and prefer push-based appends.
|
|
8473
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-array-size-assignment/
|
|
8455
8474
|
*/
|
|
8456
8475
|
'small-rules/no-array-size-assignment'?: Linter.RuleEntry<SmallRulesNoArraySizeAssignment>;
|
|
8457
8476
|
/**
|
|
8458
8477
|
* Disallow asynchronous operations inside class constructors. Constructors return immediately, so async work causes race conditions, unhandled rejections, and incomplete object states.
|
|
8478
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-async-constructor/
|
|
8459
8479
|
*/
|
|
8460
8480
|
'small-rules/no-async-constructor'?: Linter.RuleEntry<[]>;
|
|
8461
8481
|
/**
|
|
8462
8482
|
* Disallow yielding Roblox API calls in synchronous Planck system execution.
|
|
8483
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-async-in-system/
|
|
8463
8484
|
*/
|
|
8464
8485
|
'small-rules/no-async-in-system'?: Linter.RuleEntry<SmallRulesNoAsyncInSystem>;
|
|
8465
8486
|
/**
|
|
8466
8487
|
* Disallow effect hooks with many cascading state updates.
|
|
8488
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-cascading-set-state/
|
|
8467
8489
|
*/
|
|
8468
8490
|
'small-rules/no-cascading-set-state'?: Linter.RuleEntry<[]>;
|
|
8469
8491
|
/**
|
|
8470
8492
|
* Ban new Color3(...) except new Color3() or new Color3(0, 0, 0). Use Color3.fromRGB() instead.
|
|
8493
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-color3-constructor/
|
|
8471
8494
|
*/
|
|
8472
8495
|
'small-rules/no-color3-constructor'?: Linter.RuleEntry<SmallRulesNoColor3Constructor>;
|
|
8473
8496
|
/**
|
|
8474
8497
|
* Disallow commented-out code
|
|
8498
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-commented-code/
|
|
8475
8499
|
*/
|
|
8476
8500
|
'small-rules/no-commented-code'?: Linter.RuleEntry<SmallRulesNoCommentedCode>;
|
|
8477
8501
|
/**
|
|
8478
8502
|
* Disallow constant conditions, but allow constant loops that include loop exits such as break, return, or configured calls.
|
|
8503
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-constant-condition-with-break/
|
|
8479
8504
|
*/
|
|
8480
8505
|
'small-rules/no-constant-condition-with-break'?: Linter.RuleEntry<SmallRulesNoConstantConditionWithBreak>;
|
|
8481
8506
|
/**
|
|
8482
8507
|
* Disallow assignments whose value is never read.
|
|
8508
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-dead-store/
|
|
8483
8509
|
*/
|
|
8484
8510
|
'small-rules/no-dead-store'?: Linter.RuleEntry<[]>;
|
|
8485
8511
|
/**
|
|
8486
8512
|
* Use throw instead of error().
|
|
8513
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-error/
|
|
8487
8514
|
*/
|
|
8488
8515
|
'small-rules/no-error'?: Linter.RuleEntry<[]>;
|
|
8489
8516
|
/**
|
|
8490
8517
|
* Disallow sending Events back to the same player inside an Events.connect callback; use Functions for request/response.
|
|
8518
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-events-in-events-callback/
|
|
8491
8519
|
*/
|
|
8492
8520
|
'small-rules/no-events-in-events-callback'?: Linter.RuleEntry<SmallRulesNoEventsInEventsCallback>;
|
|
8493
8521
|
/**
|
|
8494
8522
|
* Disallow map(...) directly after filter(...).
|
|
8523
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-filter-map-chain/
|
|
8495
8524
|
*/
|
|
8496
8525
|
'small-rules/no-filter-map-chain'?: Linter.RuleEntry<[]>;
|
|
8497
8526
|
/**
|
|
8498
8527
|
* Disallow exact comparisons involving inexact floating-point values.
|
|
8528
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-floating-point-equality/
|
|
8499
8529
|
*/
|
|
8500
8530
|
'small-rules/no-floating-point-equality'?: Linter.RuleEntry<[]>;
|
|
8501
8531
|
/**
|
|
8502
8532
|
* Report React components whose bodies exceed 300 lines.
|
|
8533
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-giant-component/
|
|
8503
8534
|
*/
|
|
8504
8535
|
'small-rules/no-giant-component'?: Linter.RuleEntry<[]>;
|
|
8505
8536
|
/**
|
|
8506
8537
|
* Enforce React component size and complexity limits inspired by the 'Refactor God Component' checklist.
|
|
8538
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-god-components/
|
|
8507
8539
|
*/
|
|
8508
8540
|
'small-rules/no-god-components'?: Linter.RuleEntry<SmallRulesNoGodComponents>;
|
|
8509
8541
|
/**
|
|
8510
8542
|
* Disallow Ianitor validator creation inside function bodies. Hoist to module scope to avoid recreating validators on every call.
|
|
8543
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-ianitor-in-function-body/
|
|
8511
8544
|
*/
|
|
8512
8545
|
'small-rules/no-ianitor-in-function-body'?: Linter.RuleEntry<[]>;
|
|
8513
8546
|
/**
|
|
8514
8547
|
* Disallow accessing `.success` on Ianitor check results when the full result object is not needed.
|
|
8548
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-ianitor-success-access/
|
|
8515
8549
|
*/
|
|
8516
8550
|
'small-rules/no-ianitor-success-access'?: Linter.RuleEntry<[]>;
|
|
8517
8551
|
/**
|
|
8518
8552
|
* Disallow pointless identity `.map()` calls that return the parameter unchanged
|
|
8553
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-identity-map/
|
|
8519
8554
|
*/
|
|
8520
8555
|
'small-rules/no-identity-map'?: Linter.RuleEntry<SmallRulesNoIdentityMap>;
|
|
8521
8556
|
/**
|
|
8522
8557
|
* Disallow standalone `++` and `--` statements and for-loop update clauses.
|
|
8558
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-increment-decrement/
|
|
8523
8559
|
*/
|
|
8524
8560
|
'small-rules/no-increment-decrement'?: Linter.RuleEntry<SmallRulesNoIncrementDecrement>;
|
|
8525
8561
|
/**
|
|
8526
8562
|
* Prevent inline properties from being passed to memoized components.
|
|
8563
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-inline-property-on-memo-component/
|
|
8527
8564
|
*/
|
|
8528
8565
|
'small-rules/no-inline-property-on-memo-component'?: Linter.RuleEntry<[]>;
|
|
8529
8566
|
/**
|
|
8530
8567
|
* Detect instance methods that do not use 'this' and suggest converting them to standalone functions for better performance in roblox-ts.
|
|
8568
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-instance-methods-without-this/
|
|
8531
8569
|
*/
|
|
8532
8570
|
'small-rules/no-instance-methods-without-this'?: Linter.RuleEntry<SmallRulesNoInstanceMethodsWithoutThis>;
|
|
8533
8571
|
/**
|
|
8534
8572
|
* Disallow mutating a loop iterable during iteration.
|
|
8573
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-loop-iterable-mutation/
|
|
8535
8574
|
*/
|
|
8536
8575
|
'small-rules/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
8537
8576
|
/**
|
|
8538
8577
|
* Disallow spreading static property bags into nativeProperties/*NativeProperties props and onto JSX elements via intermediate objects, because the spread creates a new copied table every render.
|
|
8578
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-native-properties-spread/
|
|
8539
8579
|
*/
|
|
8540
8580
|
'small-rules/no-native-properties-spread'?: Linter.RuleEntry<[]>;
|
|
8541
8581
|
/**
|
|
8542
8582
|
* Disallow configured constructor calls (default: new Instance) inside React useMemo callbacks.
|
|
8583
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-new-instance-in-use-memo/
|
|
8543
8584
|
*/
|
|
8544
8585
|
'small-rules/no-new-instance-in-use-memo'?: Linter.RuleEntry<SmallRulesNoNewInstanceInUseMemo>;
|
|
8545
8586
|
/**
|
|
8546
8587
|
* Use Log instead of print().
|
|
8588
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-print/
|
|
8547
8589
|
*/
|
|
8548
8590
|
'small-rules/no-print'?: Linter.RuleEntry<[]>;
|
|
8591
|
+
/**
|
|
8592
|
+
* Disallow recursive function calls to prevent stack overflow.
|
|
8593
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-recursive/
|
|
8594
|
+
*/
|
|
8549
8595
|
'small-rules/no-recursive'?: Linter.RuleEntry<SmallRulesNoRecursive>;
|
|
8550
8596
|
/**
|
|
8551
8597
|
* Disallow redundant uiaspectratioconstraint children inside components that already manage their own aspect ratio internally.
|
|
8598
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-redundant-aspect-ratio-constraint/
|
|
8552
8599
|
*/
|
|
8553
8600
|
'small-rules/no-redundant-aspect-ratio-constraint'?: Linter.RuleEntry<[]>;
|
|
8554
8601
|
/**
|
|
8555
8602
|
* Disallow non-component functions that return JSX or React elements.
|
|
8603
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-render-helper-functions/
|
|
8556
8604
|
*/
|
|
8557
8605
|
'small-rules/no-render-helper-functions'?: Linter.RuleEntry<[]>;
|
|
8558
8606
|
/**
|
|
8559
8607
|
* Disallow assignment to restricted object properties.
|
|
8608
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-restricted-property-assignment/
|
|
8560
8609
|
*/
|
|
8561
8610
|
'small-rules/no-restricted-property-assignment'?: Linter.RuleEntry<SmallRulesNoRestrictedPropertyAssignment>;
|
|
8562
8611
|
/**
|
|
8563
8612
|
* Disallow the .spec.{ts,tsx} file extension for test files. Use .test.{ts,tsx} instead.
|
|
8613
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/no-spec-file-extension/
|
|
8564
8614
|
*/
|
|
8565
8615
|
'small-rules/no-spec-file-extension'?: Linter.RuleEntry<[]>;
|
|
8566
8616
|
/**
|
|
8567
8617
|
* Require JSX for static React.createElement calls.
|
|
8618
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-static-react-create-element/
|
|
8568
8619
|
*/
|
|
8569
8620
|
'small-rules/no-static-react-create-element'?: Linter.RuleEntry<SmallRulesNoStaticReactCreateElement>;
|
|
8570
8621
|
/**
|
|
8571
8622
|
* Disallow map(...) directly on table.create(...) and new Array(...) constructor patterns in roblox-ts.
|
|
8623
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-table-create-map/
|
|
8572
8624
|
*/
|
|
8573
8625
|
'small-rules/no-table-create-map'?: Linter.RuleEntry<[]>;
|
|
8574
8626
|
/**
|
|
8575
8627
|
* Disallow task.wait() and Promise.delay(...).await() calls.
|
|
8628
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-task-wait/
|
|
8576
8629
|
*/
|
|
8577
8630
|
'small-rules/no-task-wait'?: Linter.RuleEntry<[]>;
|
|
8578
8631
|
/**
|
|
8579
8632
|
* Disallow assertions that always succeed or compare against freshly created values.
|
|
8633
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-trivial-assertions/
|
|
8580
8634
|
*/
|
|
8581
8635
|
'small-rules/no-trivial-assertions'?: Linter.RuleEntry<[]>;
|
|
8582
8636
|
/**
|
|
8583
8637
|
* Ban React property names that begin with an underscore in JSX.
|
|
8638
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-underscore-react-props/
|
|
8584
8639
|
*/
|
|
8585
8640
|
'small-rules/no-underscore-react-props'?: Linter.RuleEntry<[]>;
|
|
8586
8641
|
/**
|
|
8587
8642
|
* Disallow unused imports
|
|
8643
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-unused-imports/
|
|
8588
8644
|
*/
|
|
8589
8645
|
'small-rules/no-unused-imports'?: Linter.RuleEntry<SmallRulesNoUnusedImports>;
|
|
8590
8646
|
/**
|
|
8591
8647
|
* Disallow standalone useMemo calls that ignore the memoized value.
|
|
8648
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-unused-use-memo/
|
|
8592
8649
|
*/
|
|
8593
8650
|
'small-rules/no-unused-use-memo'?: Linter.RuleEntry<SmallRulesNoUnusedUseMemo>;
|
|
8594
8651
|
/**
|
|
8595
8652
|
* Disallow useMemo for expressions that are already trivial to compute.
|
|
8653
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-use-memo-simple-expression/
|
|
8596
8654
|
*/
|
|
8597
8655
|
'small-rules/no-use-memo-simple-expression'?: Linter.RuleEntry<[]>;
|
|
8598
8656
|
/**
|
|
8599
8657
|
* Disallow using the return value of functions that do not return anything.
|
|
8658
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-use-of-empty-return-value/
|
|
8600
8659
|
*/
|
|
8601
8660
|
'small-rules/no-use-of-empty-return-value'?: Linter.RuleEntry<[]>;
|
|
8602
8661
|
/**
|
|
8603
8662
|
* Disallow constants that do not add value.
|
|
8663
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-useless-constants/
|
|
8604
8664
|
*/
|
|
8605
8665
|
'small-rules/no-useless-constants'?: Linter.RuleEntry<SmallRulesNoUselessConstants>;
|
|
8606
8666
|
/**
|
|
8607
8667
|
* Disallow Roblox JSX properties whose values already match the class defaults.
|
|
8668
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-useless-default/
|
|
8608
8669
|
*/
|
|
8609
8670
|
'small-rules/no-useless-default'?: Linter.RuleEntry<[]>;
|
|
8610
8671
|
/**
|
|
8611
8672
|
* Disallow empty effects, duplicate dependencies, effect chains, log-only effects, derived state, external-store state sync, state initialization, reset effects, parent notifications, parent ref callbacks, and event side effects routed through state.
|
|
8673
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-useless-use-effect/
|
|
8612
8674
|
*/
|
|
8613
8675
|
'small-rules/no-useless-use-effect'?: Linter.RuleEntry<SmallRulesNoUselessUseEffect>;
|
|
8614
8676
|
/**
|
|
8615
8677
|
* Disallow useMemo calls that only wrap values static enough to live at module scope.
|
|
8678
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-useless-use-memo/
|
|
8616
8679
|
*/
|
|
8617
8680
|
'small-rules/no-useless-use-memo'?: Linter.RuleEntry<SmallRulesNoUselessUseMemo>;
|
|
8618
8681
|
/**
|
|
8619
8682
|
* Disallow useSpring hooks whose config and dependencies are entirely static
|
|
8683
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/no-useless-use-spring/
|
|
8620
8684
|
*/
|
|
8621
8685
|
'small-rules/no-useless-use-spring'?: Linter.RuleEntry<SmallRulesNoUselessUseSpring>;
|
|
8622
8686
|
/**
|
|
8623
8687
|
* Disallow spreading a potentially unbounded array into a variadic call, because every element becomes a stack-allocated argument.
|
|
8688
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/no-variadic-spread/
|
|
8624
8689
|
*/
|
|
8625
8690
|
'small-rules/no-variadic-spread'?: Linter.RuleEntry<[]>;
|
|
8626
8691
|
/**
|
|
8627
8692
|
* Use Log instead of warn().
|
|
8693
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/no-warn/
|
|
8628
8694
|
*/
|
|
8629
8695
|
'small-rules/no-warn'?: Linter.RuleEntry<[]>;
|
|
8630
8696
|
/**
|
|
8631
8697
|
* Require all imports to be type-only imports. Benchmarks cannot import non-types because the benchmarker plugin will throw an error.
|
|
8698
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/only-type-imports/
|
|
8632
8699
|
*/
|
|
8633
8700
|
'small-rules/only-type-imports'?: Linter.RuleEntry<[]>;
|
|
8634
8701
|
/**
|
|
8635
8702
|
* Prefer class properties to assignment of literals in constructors.
|
|
8703
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/prefer-class-properties/
|
|
8636
8704
|
*/
|
|
8637
8705
|
'small-rules/prefer-class-properties'?: Linter.RuleEntry<SmallRulesPreferClassProperties>;
|
|
8638
8706
|
/**
|
|
8639
8707
|
* Disallow inline useReducer action objects that could be module-level constants.
|
|
8708
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-constant-dispatch/
|
|
8640
8709
|
*/
|
|
8641
8710
|
'small-rules/prefer-constant-dispatch'?: Linter.RuleEntry<[]>;
|
|
8642
8711
|
/**
|
|
8643
8712
|
* Prefer a local ContextStack component over directly nesting multiple context providers.
|
|
8713
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-context-stack/
|
|
8644
8714
|
*/
|
|
8645
8715
|
'small-rules/prefer-context-stack'?: Linter.RuleEntry<[]>;
|
|
8646
8716
|
/**
|
|
8647
8717
|
* Prefer importing React hooks directly instead of calling them via the React namespace.
|
|
8718
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-direct-hook-imports/
|
|
8648
8719
|
*/
|
|
8649
8720
|
'small-rules/prefer-direct-hook-imports'?: Linter.RuleEntry<SmallRulesPreferDirectHookImports>;
|
|
8650
8721
|
/**
|
|
8651
8722
|
* Prefer early returns over full-body conditional wrapping.
|
|
8723
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/prefer-early-return/
|
|
8652
8724
|
*/
|
|
8653
8725
|
'small-rules/prefer-early-return'?: Linter.RuleEntry<SmallRulesPreferEarlyReturn>;
|
|
8654
8726
|
/**
|
|
8655
8727
|
* Enforce expect assertion guards in tests and prefer expect.assertions(n) over expect.hasAssertions() when the count is known.
|
|
8728
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/prefer-expect-assertions/
|
|
8656
8729
|
*/
|
|
8657
8730
|
'small-rules/prefer-expect-assertions'?: Linter.RuleEntry<SmallRulesPreferExpectAssertions>;
|
|
8658
8731
|
/**
|
|
8659
8732
|
* Prefer extracting static JSX elements to module-level constants.
|
|
8733
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-hoisted-jsx-elements/
|
|
8660
8734
|
*/
|
|
8661
8735
|
'small-rules/prefer-hoisted-jsx-elements'?: Linter.RuleEntry<SmallRulesPreferHoistedJsxElements>;
|
|
8662
8736
|
/**
|
|
8663
8737
|
* Prefer extracting inline JSX object props to module-level constants when the entire object is statically hoistable.
|
|
8738
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-hoisted-jsx-object-properties/
|
|
8664
8739
|
*/
|
|
8665
8740
|
'small-rules/prefer-hoisted-jsx-object-properties'?: Linter.RuleEntry<[]>;
|
|
8666
8741
|
/**
|
|
8667
|
-
* Prefer .idiv() for integer division instead of math.floor(x / y).
|
|
8742
|
+
* Prefer .idiv() for integer division instead of math.floor(x / y) or math.floor(x * 0.5).
|
|
8743
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/prefer-idiv/
|
|
8668
8744
|
*/
|
|
8669
8745
|
'small-rules/prefer-idiv'?: Linter.RuleEntry<[]>;
|
|
8670
8746
|
/**
|
|
8671
8747
|
* Prefer a local Portal component over direct createPortal calls when the project already defines one.
|
|
8748
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-local-portal-component/
|
|
8672
8749
|
*/
|
|
8673
8750
|
'small-rules/prefer-local-portal-component'?: Linter.RuleEntry<[]>;
|
|
8674
8751
|
/**
|
|
8675
8752
|
* Prefer math.min() and math.max() over simple clamp-like ternaries.
|
|
8753
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/prefer-math-min-max/
|
|
8676
8754
|
*/
|
|
8677
8755
|
'small-rules/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8678
8756
|
/**
|
|
8679
8757
|
* Prefer Modding.inspect over manually enumerating every enum member in a Record<Enum, true>.
|
|
8758
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/prefer-modding-inspect/
|
|
8680
8759
|
*/
|
|
8681
8760
|
'small-rules/prefer-modding-inspect'?: Linter.RuleEntry<[]>;
|
|
8682
8761
|
/**
|
|
8683
8762
|
* Prefer screaming snake case constants at module scope or the allowed top-level wrapper scope.
|
|
8763
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/prefer-module-scope-constants/
|
|
8684
8764
|
*/
|
|
8685
8765
|
'small-rules/prefer-module-scope-constants'?: Linter.RuleEntry<[]>;
|
|
8686
8766
|
/**
|
|
8687
8767
|
* Prefer local EqualPadding and DirectionalPadding components over matching <uipadding /> declarations.
|
|
8768
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-padding-components/
|
|
8688
8769
|
*/
|
|
8689
8770
|
'small-rules/prefer-padding-components'?: Linter.RuleEntry<[]>;
|
|
8690
8771
|
/**
|
|
8691
8772
|
* Enforce PascalCase names for enums and enum members.
|
|
8773
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/prefer-pascal-case-enums/
|
|
8692
8774
|
*/
|
|
8693
8775
|
'small-rules/prefer-pascal-case-enums'?: Linter.RuleEntry<[]>;
|
|
8694
8776
|
/**
|
|
8695
8777
|
* Prefer direct ColorSequence and NumberSequence overloads over identical direct arguments and two-keypoint arrays.
|
|
8778
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/prefer-sequence-overloads/
|
|
8696
8779
|
*/
|
|
8697
8780
|
'small-rules/prefer-sequence-overloads'?: Linter.RuleEntry<[]>;
|
|
8698
8781
|
/**
|
|
8699
8782
|
* Enforce combining multiple world.get() or world.has() calls into a single call for better Jecs performance.
|
|
8783
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/prefer-single-world-query/
|
|
8700
8784
|
*/
|
|
8701
8785
|
'small-rules/prefer-single-world-query'?: Linter.RuleEntry<[]>;
|
|
8702
8786
|
/**
|
|
8703
8787
|
* Prefer singular naming for enums.
|
|
8788
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/prefer-singular-enums/
|
|
8704
8789
|
*/
|
|
8705
8790
|
'small-rules/prefer-singular-enums'?: Linter.RuleEntry<[]>;
|
|
8706
8791
|
/**
|
|
8707
8792
|
* Prefer ternary expressions over complementary JSX && branches.
|
|
8793
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-ternary-conditional-rendering/
|
|
8708
8794
|
*/
|
|
8709
8795
|
'small-rules/prefer-ternary-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
8710
8796
|
/**
|
|
8711
8797
|
* Prefer UDim2.fromScale() or UDim2.fromOffset() over new UDim2() when all offsets or all scales are zero.
|
|
8798
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/prefer-udim2-shorthand/
|
|
8712
8799
|
*/
|
|
8713
8800
|
'small-rules/prefer-udim2-shorthand'?: Linter.RuleEntry<[]>;
|
|
8714
8801
|
/**
|
|
8715
8802
|
* Suggest using useReducer for related state updates instead of multiple useState calls.
|
|
8803
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/prefer-use-reducer/
|
|
8716
8804
|
*/
|
|
8717
8805
|
'small-rules/prefer-use-reducer'?: Linter.RuleEntry<[]>;
|
|
8718
8806
|
/**
|
|
8719
8807
|
* Prevent abbreviations.
|
|
8808
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/prevent-abbreviations/
|
|
8720
8809
|
*/
|
|
8721
8810
|
'small-rules/prevent-abbreviations'?: Linter.RuleEntry<SmallRulesPreventAbbreviations>;
|
|
8722
8811
|
/**
|
|
8723
8812
|
* Restrict React hooks to object returns or short tuples.
|
|
8813
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/react-hooks-strict-return/
|
|
8724
8814
|
*/
|
|
8725
8815
|
'small-rules/react-hooks-strict-return'?: Linter.RuleEntry<[]>;
|
|
8726
8816
|
/**
|
|
8727
8817
|
* Require async function names to end with Async.
|
|
8818
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/naming/require-async-suffix/
|
|
8728
8819
|
*/
|
|
8729
8820
|
'small-rules/require-async-suffix'?: Linter.RuleEntry<SmallRulesRequireAsyncSuffix>;
|
|
8730
8821
|
/**
|
|
8731
8822
|
* Require configured classes to be instantiated at module level only.
|
|
8823
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/roblox/require-module-level-instantiation/
|
|
8732
8824
|
*/
|
|
8733
8825
|
'small-rules/require-module-level-instantiation'?: Linter.RuleEntry<SmallRulesRequireModuleLevelInstantiation>;
|
|
8734
8826
|
/**
|
|
8735
8827
|
* Enforce named effect functions for better debuggability. Prevents inline arrow functions in useEffect and similar hooks.
|
|
8828
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/require-named-effect-functions/
|
|
8736
8829
|
*/
|
|
8737
8830
|
'small-rules/require-named-effect-functions'?: Linter.RuleEntry<SmallRulesRequireNamedEffectFunctions>;
|
|
8738
8831
|
/**
|
|
8739
8832
|
* Enforces balanced opener/closer function calls across all execution paths
|
|
8833
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/require-paired-calls/
|
|
8740
8834
|
*/
|
|
8741
8835
|
'small-rules/require-paired-calls'?: Linter.RuleEntry<SmallRulesRequirePairedCalls>;
|
|
8742
8836
|
/**
|
|
8743
8837
|
* Require keys on nested React JSX children, fragments, and configured iteration or memoization contexts.
|
|
8838
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/require-react-component-keys/
|
|
8744
8839
|
*/
|
|
8745
8840
|
'small-rules/require-react-component-keys'?: Linter.RuleEntry<SmallRulesRequireReactComponentKeys>;
|
|
8746
8841
|
/**
|
|
8747
8842
|
* Require displayName on exported memo components and contexts.
|
|
8843
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/require-react-display-names/
|
|
8748
8844
|
*/
|
|
8749
8845
|
'small-rules/require-react-display-names'?: Linter.RuleEntry<SmallRulesRequireReactDisplayNames>;
|
|
8750
8846
|
/**
|
|
8751
8847
|
* Require braces around switch case bodies selected by line span or statement count.
|
|
8848
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/require-switch-case-braces/
|
|
8752
8849
|
*/
|
|
8753
8850
|
'small-rules/require-switch-case-braces'?: Linter.RuleEntry<SmallRulesRequireSwitchCaseBraces>;
|
|
8754
8851
|
/**
|
|
8755
8852
|
* Require 'Error.captureStackTrace' before directly throwing new Error instances in named functions.
|
|
8853
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/require-throw-error-capture/
|
|
8756
8854
|
*/
|
|
8757
8855
|
'small-rules/require-throw-error-capture'?: Linter.RuleEntry<SmallRulesRequireThrowErrorCapture>;
|
|
8758
8856
|
/**
|
|
8759
8857
|
* Require the 'u' or 'v' unicode flag on calls named regex().
|
|
8858
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/general/require-unicode-regex/
|
|
8760
8859
|
*/
|
|
8761
8860
|
'small-rules/require-unicode-regex'?: Linter.RuleEntry<[]>;
|
|
8762
8861
|
/**
|
|
8763
8862
|
* Prevent inline empty object and array defaults in component prop destructuring.
|
|
8863
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/rerender-memo-with-default-value/
|
|
8764
8864
|
*/
|
|
8765
8865
|
'small-rules/rerender-memo-with-default-value'?: Linter.RuleEntry<[]>;
|
|
8766
8866
|
/**
|
|
8767
8867
|
* Prevent imports that reach into another component's nested modules.
|
|
8868
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/strict-component-boundaries/
|
|
8768
8869
|
*/
|
|
8769
8870
|
'small-rules/strict-component-boundaries'?: Linter.RuleEntry<SmallRulesStrictComponentBoundaries>;
|
|
8770
8871
|
/**
|
|
8771
8872
|
* Enforce exhaustive and correct dependency specification in React hooks to prevent stale closures and unnecessary re-renders
|
|
8873
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/use-exhaustive-dependencies/
|
|
8772
8874
|
*/
|
|
8773
8875
|
'small-rules/use-exhaustive-dependencies'?: Linter.RuleEntry<SmallRulesUseExhaustiveDependencies>;
|
|
8774
8876
|
/**
|
|
8775
8877
|
* Enforce that React hooks are only called at the top level of components or custom hooks, never conditionally or in nested functions
|
|
8878
|
+
* @see https://docs.howmanysmall.com/small-rules/rules/react/use-hook-at-top-level/
|
|
8776
8879
|
*/
|
|
8777
8880
|
'small-rules/use-hook-at-top-level'?: Linter.RuleEntry<SmallRulesUseHookAtTopLevel>;
|
|
8778
8881
|
/**
|
|
@@ -20791,6 +20894,8 @@ type SmallRulesRequireNamedEffectFunctions = [] | [{
|
|
|
20791
20894
|
allowAsync: boolean;
|
|
20792
20895
|
name: string;
|
|
20793
20896
|
}[];
|
|
20897
|
+
inlineFunctionDeclarations?: boolean;
|
|
20898
|
+
sloptor?: boolean;
|
|
20794
20899
|
}];
|
|
20795
20900
|
// ----- small-rules/require-paired-calls -----
|
|
20796
20901
|
type SmallRulesRequirePairedCalls = [] | [{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isentinel/eslint-config",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.39",
|
|
4
4
|
"description": "iSentinel's ESLint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint-config",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@isentinel/dict-rbxts": "latest",
|
|
63
63
|
"@isentinel/dict-roblox": "latest",
|
|
64
64
|
"@oxlint/plugins": "1.74.0",
|
|
65
|
-
"@pobammer-ts/small-rules": "2.
|
|
65
|
+
"@pobammer-ts/small-rules": "2.14.0",
|
|
66
66
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
67
67
|
"@typescript-eslint/eslint-plugin": "8.65.0",
|
|
68
68
|
"@typescript-eslint/parser": "8.65.0",
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
"typescript": "6.0.3",
|
|
144
144
|
"unplugin-unused": "0.5.7",
|
|
145
145
|
"vitest": "4.1.10",
|
|
146
|
-
"@isentinel/eslint-config": "6.0.0-beta.
|
|
146
|
+
"@isentinel/eslint-config": "6.0.0-beta.39"
|
|
147
147
|
},
|
|
148
148
|
"peerDependencies": {
|
|
149
149
|
"@vitest/eslint-plugin": "^1.6.4",
|