-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
enhancement: plugin rule optionNew rule option for an existing eslint-plugin ruleNew rule option for an existing eslint-plugin rulehas prthere is a PR raised to close thisthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
Repro
{
"rules": {
"@typescript-eslint/strict-boolean-expressions": "error"
}
}
// OR
function valueOrDefault(a?: string) {
return a || "the default";
}
// AND
const condition = true;
condition && valueOrDefault();
Expected Result
No error (with an option or options).
Actual Result
Error: Unexpected non-boolean in conditional.
(twice)
Additional Info
TSLint has an ignore-rhs
option (see documentation).
It might make sense to also consider this issue.
#698 would also be required (at least for the first example).
Other links:
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
1.13.0 |
@typescript-eslint/parser |
1.13.0 |
TypeScript |
3.4.5 |
ESLint |
6.1.0 |
node |
10.16.0 |
npm |
6.9.0 |
Metadata
Metadata
Assignees
Labels
enhancement: plugin rule optionNew rule option for an existing eslint-plugin ruleNew rule option for an existing eslint-plugin rulehas prthere is a PR raised to close thisthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin