@pobammer-ts/eslint-cease-nonsense-rules 1.12.0 → 1.13.0

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "commit": "0c941c22d06cca23db96491078c85d1b80fb0191",
3
- "time": "2026-01-01T05:26:31.863Z",
4
- "version": "1.12.0"
2
+ "commit": "f33c0a297afd84a62ae94883352f3473b4ff25de",
3
+ "time": "2026-01-01T07:48:21.692Z",
4
+ "version": "1.13.0"
5
5
  }
package/dist/index.js CHANGED
@@ -16350,7 +16350,7 @@ var ban_instances_default = createRule({
16350
16350
  description: "Ban specified Roblox Instance classes in new Instance() calls and JSX elements."
16351
16351
  },
16352
16352
  messages: {
16353
- bannedInstance: "Instance class '{{className}}' is banned.",
16353
+ bannedInstance: "Instance class '{{className}}' is banned by project configuration. This class may cause performance issues, is deprecated, or has a better alternative. Check project guidelines for the recommended replacement.",
16354
16354
  bannedInstanceCustom: "{{customMessage}}"
16355
16355
  },
16356
16356
  schema: [
@@ -18176,7 +18176,7 @@ var noCommentedCode = {
18176
18176
  },
18177
18177
  hasSuggestions: true,
18178
18178
  messages: {
18179
- commentedCode: "Remove this commented out code."
18179
+ commentedCode: "Commented-out code creates confusion about intent and clutters the codebase. Version control preserves history, making dead code comments unnecessary. Delete the commented code entirely. If needed later, retrieve it from git history."
18180
18180
  },
18181
18181
  schema: [],
18182
18182
  type: "suggestion"
@@ -18833,7 +18833,7 @@ var no_print_default = createRule({
18833
18833
  description: "Ban print() function calls. Use Log instead."
18834
18834
  },
18835
18835
  messages: {
18836
- useLog: "Use Log instead of print()"
18836
+ useLog: "print() is a raw output function lacking log levels, timestamps, and filtering. Production systems require structured logging for debugging and monitoring. Replace print(...) with something from the logging package."
18837
18837
  },
18838
18838
  schema: [],
18839
18839
  type: "problem"
@@ -19129,7 +19129,7 @@ var noShorthandNames = {
19129
19129
  recommended: true
19130
19130
  },
19131
19131
  messages: {
19132
- useReplacement: "Use '{{replacement}}' instead of '{{shorthand}}' shorthand"
19132
+ useReplacement: "'{{shorthand}}' is a shorthand abbreviation that reduces code readability. Abbreviated names force readers to mentally expand them and can mean different things in different contexts. Rename to '{{replacement}}' for clarity and self-documenting code."
19133
19133
  },
19134
19134
  schema: [
19135
19135
  {
@@ -19561,7 +19561,7 @@ var no_warn_default = createRule({
19561
19561
  description: "Ban warn() function calls. Use Log instead."
19562
19562
  },
19563
19563
  messages: {
19564
- useLog: "Use Log instead of warn()"
19564
+ useLog: "warn() is a raw output function lacking log levels, timestamps, and filtering. Production systems require structured logging for debugging and monitoring. Replace warn(...) with something from the logging package."
19565
19565
  },
19566
19566
  schema: [],
19567
19567
  type: "problem"
@@ -19670,8 +19670,8 @@ var prefer_class_properties_default = createRule({
19670
19670
  description: "Prefer class properties to assignment of literals in constructors."
19671
19671
  },
19672
19672
  messages: {
19673
- unexpectedAssignment: "Unexpected assignment of literal instance member.",
19674
- unexpectedClassProperty: "Unexpected class property."
19673
+ unexpectedAssignment: "Constructor assigns a literal value to this.property. Literals are static and known at class definition time. Move to a class property declaration: propertyName = value; at class level. This clarifies intent and reduces constructor complexity.",
19674
+ unexpectedClassProperty: "Class property declarations are disabled by rule configuration (mode: 'never'). Move initialization into the constructor: this.propertyName = value; inside constructor()."
19675
19675
  },
19676
19676
  schema: [{ enum: ["always", "never"], type: "string" }],
19677
19677
  type: "suggestion"
@@ -19722,7 +19722,7 @@ var prefer_early_return_default = createRule({
19722
19722
  description: "Prefer early returns over full-body conditional wrapping in function declarations."
19723
19723
  },
19724
19724
  messages: {
19725
- preferEarlyReturn: "Prefer an early return to a conditionally-wrapped function body"
19725
+ preferEarlyReturn: "Function body is wrapped in a single conditional without an else branch. This increases nesting depth and cognitive load. Invert the condition and return early: if (!condition) return; then place the main logic at the top level."
19726
19726
  },
19727
19727
  schema: [
19728
19728
  {
@@ -19876,7 +19876,7 @@ var prefer_pascal_case_enums_default = createRule({
19876
19876
  description: "Enforce Pascal case when naming enums."
19877
19877
  },
19878
19878
  messages: {
19879
- notPascalCase: "Enum '{{ identifier }}' should use Pascal case."
19879
+ notPascalCase: "Enum '{{ identifier }}' uses non-standard casing. TypeScript convention requires PascalCase for enum names and members to distinguish them from variables (camelCase) and constants (UPPER_CASE). Rename to PascalCase: capitalize first letter of each word, no underscores."
19880
19880
  },
19881
19881
  schema: [],
19882
19882
  type: "suggestion"
@@ -20541,7 +20541,7 @@ var prefer_singular_enums_default = createRule({
20541
20541
  description: "Prefer singular TypeScript enums."
20542
20542
  },
20543
20543
  messages: {
20544
- notSingular: "Enum '{{ name }}' should be singular."
20544
+ notSingular: "Enum '{{ name }}' uses plural naming. Enums define a type of which only ONE value is selected at a time, so singular naming is semantically correct. Use 'Status' not 'Statuses', 'Color' not 'Colors'. Rename the enum to its singular form."
20545
20545
  },
20546
20546
  schema: [],
20547
20547
  type: "suggestion"
@@ -20838,7 +20838,7 @@ var react_hooks_strict_return_default = createRule({
20838
20838
  description: "Restrict the number of returned items from React hooks."
20839
20839
  },
20840
20840
  messages: {
20841
- hooksStrictReturn: "React hooks must return a tuple of two or fewer values or a single object."
20841
+ hooksStrictReturn: "Hook returns more than 2 tuple elements. Destructuring large tuples causes positional errors and breaks when adding values. Return an object with named properties instead: `return { value, setValue, isLoading };`"
20842
20842
  },
20843
20843
  schema: [],
20844
20844
  type: "suggestion"
@@ -21126,17 +21126,17 @@ var requireNamedEffectFunctions = {
21126
21126
  recommended: false
21127
21127
  },
21128
21128
  messages: {
21129
- anonymousFunction: "Use a named function instead of an anonymous function for better debuggability",
21130
- arrowFunction: "Use a named function instead of an arrow function for better debuggability",
21131
- asyncAnonymousFunction: "Async anonymous functions are not allowed in {{ hook }}. Use an async function declaration instead",
21132
- asyncArrowFunction: "Async arrow functions are not allowed in {{ hook }}. Use an async function declaration instead",
21133
- asyncFunctionDeclaration: "Async function declarations are not allowed in {{ hook }}. Set allowAsync: true for this hook to enable",
21134
- asyncFunctionExpression: "Async function expressions are not allowed in {{ hook }}. Use an async function declaration instead",
21135
- functionExpression: "Use a named function reference instead of a function expression for better debuggability",
21136
- identifierReferencesArrow: "{{ hook }} called with identifier that references an arrow function. Use a named function declaration instead",
21137
- identifierReferencesAsyncArrow: "{{ hook }} called with identifier that references an async arrow function. Set allowAsync: true for this hook to enable",
21138
- identifierReferencesAsyncFunction: "{{ hook }} called with identifier that references an async function. Set allowAsync: true for this hook to enable",
21139
- identifierReferencesCallback: "{{ hook }} called with identifier that references a useCallback/useMemo result. Use a named function declaration instead"
21129
+ anonymousFunction: "Anonymous function passed to {{hook}}. debug.info returns empty string for anonymous functions, making stack traces useless for debugging. Extract to: function effectName() { ... } then pass effectName.",
21130
+ arrowFunction: "Arrow function passed to {{hook}}. Arrow functions have no debug name and create new instances each render. Extract to: function effectName() { ... } then pass effectName.",
21131
+ asyncAnonymousFunction: "Async anonymous function in {{hook}}. Two issues: (1) no debug name makes stack traces useless, (2) async effects require cancellation logic for unmount. Extract to: async function effectName() { ... } with cleanup.",
21132
+ asyncArrowFunction: "Async arrow function in {{hook}}. Two issues: (1) arrow functions have no debug name, (2) async effects require cancellation logic. Extract to: async function effectName() { ... } with cleanup.",
21133
+ asyncFunctionDeclaration: "Async function declaration passed to {{hook}}. Async effects require cancellation logic to handle component unmount. Implement cleanup or set allowAsync: true if cancellation is handled.",
21134
+ asyncFunctionExpression: "Async function expression in {{hook}}. Async effects require cancellation logic for unmount. Extract to a named async function declaration with cleanup, then pass the reference.",
21135
+ functionExpression: "Function expression passed to {{hook}}. Function expressions create new instances each render, breaking referential equality. Extract to: function effectName() { ... } at module or component top-level.",
21136
+ identifierReferencesArrow: "{{hook}} receives identifier pointing to arrow function. Arrow functions have no debug name and lack referential stability. Convert to: function effectName() { ... } then pass effectName.",
21137
+ identifierReferencesAsyncArrow: "{{hook}} receives identifier pointing to async arrow function. Two issues: (1) no debug name, (2) async effects require cancellation logic. Convert to: async function effectName() { ... } with cleanup.",
21138
+ identifierReferencesAsyncFunction: "{{hook}} receives identifier pointing to async function. Async effects require cancellation logic for unmount. Implement cleanup or set allowAsync: true if cancellation is handled.",
21139
+ identifierReferencesCallback: "{{hook}} receives identifier from useCallback/useMemo. These hooks return new references when dependencies change, causing unexpected effect re-runs. Use a stable function declaration: function effectName() { ... }"
21140
21140
  },
21141
21141
  schema: [
21142
21142
  {
@@ -22318,8 +22318,8 @@ var require_react_component_keys_default = createRule({
22318
22318
  description: "Require keys on React components when used in lists or iteration."
22319
22319
  },
22320
22320
  messages: {
22321
- missingKey: "All React elements except top-level returns require a key prop",
22322
- rootComponentWithKey: "Root component returns should not have key props"
22321
+ missingKey: "JSX element in list/callback lacks key prop. React Luau warns about missing keys in _G.__DEV__ mode. Add a unique `key` prop using a stable identifier (not array index).",
22322
+ rootComponentWithKey: "Root return has unnecessary key prop. The key gets overwritten by the parent anyway. Remove the `key` prop."
22323
22323
  },
22324
22324
  schema: [
22325
22325
  {
@@ -23946,4 +23946,4 @@ export {
23946
23946
  createBanInstancesOptions
23947
23947
  };
23948
23948
 
23949
- //# debugId=A19451816DAA8A5E64756E2164756E21
23949
+ //# debugId=2B2944174D0F631464756E2164756E21