📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP →

@typescript-eslint/eslint-plugin

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typescript-eslint/eslint-plugin - npm Package Compare versions

Comparing version

to
8.31.1-alpha.2

@@ -10,5 +10,5 @@ type LegacyAllowConstantLoopConditions = boolean;

];
export type MessageId = 'alwaysFalsy' | 'alwaysFalsyFunc' | 'alwaysNullish' | 'alwaysTruthy' | 'alwaysTruthyFunc' | 'comparisonBetweenLiteralTypes' | 'never' | 'neverNullish' | 'neverOptionalChain' | 'noOverlapBooleanExpression' | 'noStrictNullCheck' | 'typeGuardAlreadyIsType';
export type MessageId = 'alwaysFalsy' | 'alwaysFalsyFunc' | 'alwaysNullish' | 'alwaysTruthy' | 'alwaysTruthyFunc' | 'comparisonBetweenLiteralTypes' | 'never' | 'neverNullish' | 'neverOptionalChain' | 'noOverlapBooleanExpression' | 'noStrictNullCheck' | 'suggestRemoveOptionalChain' | 'typeGuardAlreadyIsType';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageId, Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
//# sourceMappingURL=no-unnecessary-condition.d.ts.map

@@ -126,3 +126,3 @@ "use strict";

},
fixable: 'code',
hasSuggestions: true,
messages: {

@@ -140,2 +140,3 @@ alwaysFalsy: 'Unnecessary conditional, value is always falsy.',

noStrictNullCheck: 'This rule requires the `strictNullChecks` compiler option to be turned on to function correctly.',
suggestRemoveOptionalChain: 'Remove unnecessary optional chain',
typeGuardAlreadyIsType: 'Unnecessary conditional, expression already has the type being checked by the {{typeGuardOrAssertionFunction}}.',

@@ -617,5 +618,10 @@ },

messageId: 'neverOptionalChain',
fix(fixer) {
return fixer.replaceText(questionDotOperator, fix);
},
suggest: [
{
messageId: 'suggestRemoveOptionalChain',
fix(fixer) {
return fixer.replaceText(questionDotOperator, fix);
},
},
],
});

@@ -622,0 +628,0 @@ }

{
"name": "@typescript-eslint/eslint-plugin",
"version": "8.31.1-alpha.1",
"version": "8.31.1-alpha.2",
"description": "TypeScript plugin for ESLint",

@@ -65,6 +65,6 @@ "files": [

"@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "8.31.1-alpha.1",
"@typescript-eslint/type-utils": "8.31.1-alpha.1",
"@typescript-eslint/utils": "8.31.1-alpha.1",
"@typescript-eslint/visitor-keys": "8.31.1-alpha.1",
"@typescript-eslint/scope-manager": "8.31.1-alpha.2",
"@typescript-eslint/type-utils": "8.31.1-alpha.2",
"@typescript-eslint/utils": "8.31.1-alpha.2",
"@typescript-eslint/visitor-keys": "8.31.1-alpha.2",
"graphemer": "^1.4.0",

@@ -79,4 +79,4 @@ "ignore": "^5.3.1",

"@types/natural-compare": "*",
"@typescript-eslint/rule-schema-to-typescript-types": "8.31.1-alpha.1",
"@typescript-eslint/rule-tester": "8.31.1-alpha.1",
"@typescript-eslint/rule-schema-to-typescript-types": "8.31.1-alpha.2",
"@typescript-eslint/rule-tester": "8.31.1-alpha.2",
"@vitest/coverage-v8": "^3.1.1",

@@ -83,0 +83,0 @@ "ajv": "^6.12.6",

Sorry, the diff of this file is not supported yet