From 72337b10636f73393f58230ad6d8082f68993cf1 Mon Sep 17 00:00:00 2001 From: Don Isaac Date: Tue, 30 Jul 2024 16:29:27 -0400 Subject: [PATCH] fix(linter): change typescript-eslint/no-namespace to restriction (#4539) This rule prevents the usage of typescript language features, which is what the `restriction` category is intended to handle. --- apps/oxlint/fixtures/typescript_eslint/eslintrc.json | 3 ++- crates/oxc_linter/src/rules/typescript/no_namespace.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/oxlint/fixtures/typescript_eslint/eslintrc.json b/apps/oxlint/fixtures/typescript_eslint/eslintrc.json index 35ed3856d2a6d..c7773313f7cd0 100644 --- a/apps/oxlint/fixtures/typescript_eslint/eslintrc.json +++ b/apps/oxlint/fixtures/typescript_eslint/eslintrc.json @@ -1,6 +1,7 @@ { "rules": { "no-loss-of-precision": "off", - "@typescript-eslint/no-loss-of-precision": "error" + "@typescript-eslint/no-loss-of-precision": "error", + "@typescript-eslint/no-namespace": "warn" } } diff --git a/crates/oxc_linter/src/rules/typescript/no_namespace.rs b/crates/oxc_linter/src/rules/typescript/no_namespace.rs index 2a33a5bbc0e19..5bf15bee26ec1 100644 --- a/crates/oxc_linter/src/rules/typescript/no_namespace.rs +++ b/crates/oxc_linter/src/rules/typescript/no_namespace.rs @@ -37,7 +37,7 @@ declare_oxc_lint!( /// declare namespace foo {} /// ``` NoNamespace, - correctness + restriction ); impl Rule for NoNamespace {