Skip to content

Commit

Permalink
fix(linter): change typescript-eslint/no-namespace to restriction (#4539
Browse files Browse the repository at this point in the history
)

This rule prevents the usage of typescript language features, which is
what the `restriction` category is intended to handle.
  • Loading branch information
DonIsaac authored Jul 30, 2024
1 parent c9c38a1 commit 72337b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/oxlint/fixtures/typescript_eslint/eslintrc.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
2 changes: 1 addition & 1 deletion crates/oxc_linter/src/rules/typescript/no_namespace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ declare_oxc_lint!(
/// declare namespace foo {}
/// ```
NoNamespace,
correctness
restriction
);

impl Rule for NoNamespace {
Expand Down

0 comments on commit 72337b1

Please sign in to comment.