Skip to content

Commit d1644df

Browse files
authored
Revert "feat: implement '@typescript/no-non-null-assertion'" (#218)
1 parent c854ced commit d1644df

File tree

9 files changed

+1
-336
lines changed

9 files changed

+1
-336
lines changed

cmd/rslint/api.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import (
3434
"github.com/web-infra-dev/rslint/internal/rules/no_misused_spread"
3535
"github.com/web-infra-dev/rslint/internal/rules/no_mixed_enums"
3636
"github.com/web-infra-dev/rslint/internal/rules/no_namespace"
37-
"github.com/web-infra-dev/rslint/internal/rules/no_non_null_assertion"
3837
"github.com/web-infra-dev/rslint/internal/rules/no_redundant_type_constituents"
3938
"github.com/web-infra-dev/rslint/internal/rules/no_require_imports"
4039
"github.com/web-infra-dev/rslint/internal/rules/no_unnecessary_boolean_literal_compare"
@@ -127,7 +126,6 @@ func (h *IPCHandler) HandleLint(req api.LintRequest) (*api.LintResponse, error)
127126
no_misused_spread.NoMisusedSpreadRule,
128127
no_mixed_enums.NoMixedEnumsRule,
129128
no_namespace.NoNamespaceRule,
130-
no_non_null_assertion.NoNonNullAssertionRule,
131129
no_redundant_type_constituents.NoRedundantTypeConstituentsRule,
132130
no_require_imports.NoRequireImportsRule,
133131
no_unnecessary_boolean_literal_compare.NoUnnecessaryBooleanLiteralCompareRule,

internal/config/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
"github.com/web-infra-dev/rslint/internal/rules/no_misused_spread"
2626
"github.com/web-infra-dev/rslint/internal/rules/no_mixed_enums"
2727
"github.com/web-infra-dev/rslint/internal/rules/no_namespace"
28-
"github.com/web-infra-dev/rslint/internal/rules/no_non_null_assertion"
2928
"github.com/web-infra-dev/rslint/internal/rules/no_redundant_type_constituents"
3029
"github.com/web-infra-dev/rslint/internal/rules/no_require_imports"
3130
"github.com/web-infra-dev/rslint/internal/rules/no_unnecessary_boolean_literal_compare"
@@ -287,7 +286,6 @@ func RegisterAllTypeScriptEslintPluginRules() {
287286
GlobalRuleRegistry.Register("@typescript-eslint/no-misused-spread", no_misused_spread.NoMisusedSpreadRule)
288287
GlobalRuleRegistry.Register("@typescript-eslint/no-mixed-enums", no_mixed_enums.NoMixedEnumsRule)
289288
GlobalRuleRegistry.Register("@typescript-eslint/no-namespace", no_namespace.NoNamespaceRule)
290-
GlobalRuleRegistry.Register("@typescript-eslint/no-non-null-assertion", no_non_null_assertion.NoNonNullAssertionRule)
291289
GlobalRuleRegistry.Register("@typescript-eslint/no-redundant-type-constituents", no_redundant_type_constituents.NoRedundantTypeConstituentsRule)
292290
GlobalRuleRegistry.Register("@typescript-eslint/no-require-imports", no_require_imports.NoRequireImportsRule)
293291
GlobalRuleRegistry.Register("@typescript-eslint/no-unnecessary-boolean-literal-compare", no_unnecessary_boolean_literal_compare.NoUnnecessaryBooleanLiteralCompareRule)

internal/rules/no_non_null_assertion/no_non_null_assertion.go

Lines changed: 0 additions & 102 deletions
This file was deleted.

internal/rules/no_non_null_assertion/no_non_null_assertion_test.go

Lines changed: 0 additions & 224 deletions
This file was deleted.

packages/rslint-test-tools/rstest.config.mts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ export default defineConfig({
1515
'./tests/typescript-eslint/rules/no-require-imports.test.ts',
1616
'./tests/typescript-eslint/rules/no-duplicate-type-constituents.test.ts',
1717
'./tests/typescript-eslint/rules/no_namespace.test.ts',
18-
'./tests/typescript-eslint/rules/no_non_null_assertion.test.ts',
1918
],
2019
});

packages/rslint/fixtures/rslint.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"@typescript-eslint/no-empty-function": "error",
2020
"@typescript-eslint/no-empty-interface": "error",
2121
"@typescript-eslint/no-require-imports": "error",
22-
"@typescript-eslint/no-namespace": "error",
23-
"@typescript-eslint/no-non-null-assertion": "error"
22+
"@typescript-eslint/no-namespace": "error"
2423
},
2524
"plugins": ["@typescript-eslint"]
2625
}

packages/vscode-extension/src/Extension.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ export class Extension implements Disposable {
5858
): Rslint {
5959
if (this.rslintInstances.has(id)) {
6060
this.logger.warn(`Rslint instance with id '${id}' already exists`);
61-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
6261
return this.rslintInstances.get(id)!;
6362
}
6463

packages/vscode-extension/src/Rslint.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ export class Rslint implements Disposable {
293293
}
294294

295295
this.logger.debug('Final Rslint binary path:', finalBinPath);
296-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
297296
return finalBinPath!;
298297
}
299298
}

0 commit comments

Comments
 (0)