@@ -46,21 +46,19 @@ declare_oxc_lint!(
46
46
/// A variable is _not_ considered to be used if it is only ever declared
47
47
/// (`var foo = 5`) or assigned to (`foo = 7`).
48
48
///
49
- /// #### Exported
50
- ///
51
- /// In environments outside of CommonJS or ECMAScript modules, you may use
52
- /// `var` to create a global variable that may be used by other scripts. You
53
- /// can use the `/* exported variableName */` comment block to indicate that
54
- /// this variable is being exported and therefore should not be considered
55
- /// unused.
49
+ /// #### Ignored Files
50
+ /// This rule ignores `.d.ts` files and `.vue` files entirely. Variables,
51
+ /// classes, interfaces, and types declared in `.d.ts` files are generally
52
+ /// used by other files, which are not checked by Oxlint. Since Oxlint does
53
+ /// not support parsing Vue templates, this rule cannot tell if a variable
54
+ /// is used or unused in a Vue file.
56
55
///
57
- /// Note that `/* exported */` has no effect for any of the following:
58
- /// * when the environment is `node` or `commonjs`
59
- /// * when `parserOptions.sourceType` is `module`
60
- /// * when `ecmaFeatures.globalReturn` is `true`
56
+ /// #### Exported
61
57
///
62
- /// The line comment `//exported variableName` will not work as `exported`
63
- /// is not line-specific.
58
+ /// The original ESLint rule recognizes `/* exported variableName */`
59
+ /// comments as a way to indicate that a variable is used in another script
60
+ /// and should not be considered unused. Since ES6 modules are now a TC39
61
+ /// standard, Oxlint does not support this feature.
64
62
///
65
63
/// ### Example
66
64
///
@@ -129,10 +127,11 @@ declare_oxc_lint!(
129
127
/// }
130
128
/// ```
131
129
///
132
- /// Examples of **correct ** code for `/* exported variableName */` operation:
130
+ /// Examples of **incorrect ** code for `/* exported variableName */` operation:
133
131
/// ```javascript
134
132
/// /* exported global_var */
135
133
///
134
+ /// // Not respected, use ES6 modules instead.
136
135
/// var global_var = 42;
137
136
/// ```
138
137
NoUnusedVars ,
0 commit comments