fix(linter): change no-var to restriction

This commit is contained in:
Boshen 2024-01-06 21:01:34 +08:00
parent 8e4b6d9d7c
commit bb6128bfa8
No known key found for this signature in database
GPG key ID: 9C7A8C8AB22BEBD1

View file

@ -22,7 +22,7 @@ pub struct NoVar;
declare_oxc_lint!(
/// ### What it does
/// ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the `let` and `const` keywords.
/// ECMAScript 6 allows programmers to create variables with block scope instead of function scope using the `let` and `const` keywords.
/// Block scope is common in many other programming languages and helps programmers avoid mistakes
///
/// ### Why is this bad?
@ -39,7 +39,7 @@ declare_oxc_lint!(
/// const CONFIG = {};
/// ```
NoVar,
correctness
restriction
);
impl Rule for NoVar {