You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -2617,19 +2617,12 @@ async function handleData(rawData) {
2617
2617
2618
2618
**Rationale**: Neglecting to check or use the return value of a function can lead to silent failures or missed opportunities to act on critical information. For instance, a function that updates a database might return a success/failure status; ignoring this status means the application might proceed unaware of an error. This rule encourages developers to be deliberate about function outcomes, improving code robustness and reliability.
2619
2619
2620
-
**Options**: The rule accepts a single object with the following property:
2621
-
2622
-
#### `requireExplicitIgnore`
2623
-
2624
-
- **Type**: `boolean`
2625
-
- **Description**: If true (default), any function call whose return value is not used must be explicitly marked as ignored (e.g., void func();, \_ = func();, or via a comment // return value intentionally ignored). If false, function calls whose return values are not used will not be flagged, effectively disabling the core check of this rule for explicit ignores.
doSomething(); // OK, explicit ignore not required
2721
-
2722
-
constresult=doSomething(); // Still OK (value used)
2723
-
2724
-
console.warn('Warning message'); // Still OK, console calls are exempt
2725
-
```
2726
-
2727
-
**Note**: When requireExplicitIgnore is false, the rule becomes much less strict. Its primary utility is when requireExplicitIgnore is true, encouraging deliberate handling or acknowledgment of all function return values.
2728
-
2729
2697
### 11. no-build-env-in-source
2730
2698
2731
2699
**Description**: Discourages direct conditional branching (i.e., if statements) on process.env variables that are typically set or controlled by the build process or deployment environment (e.g., NODE_ENV, DEBUG). This rule promotes centralizing environment-specific logic into dedicated configuration modules or using runtime flags, leading to cleaner, more testable, and maintainable code.
0 commit comments