File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ module.exports = {
110
110
"Program:exit" ( ) {
111
111
for ( const { node, moduleStyle } of targets ) {
112
112
if ( ! isEnablingThisRule ( context , moduleStyle ) ) {
113
- return
113
+ continue
114
114
}
115
115
116
116
if ( node . type === "TemplateLiteral" ) {
Original file line number Diff line number Diff line change @@ -228,5 +228,17 @@ new RuleTester({
228
228
output : 'const fs = require("node:fs");' ,
229
229
errors : [ "Prefer `node:fs` over `fs`." ] ,
230
230
} ,
231
+ {
232
+ options : [ { version : "12.20.0" } ] ,
233
+ code : `
234
+ const fs = require("fs");
235
+ import buffer from 'buffer'
236
+ ` ,
237
+ output : `
238
+ const fs = require("fs");
239
+ import buffer from 'node:buffer'
240
+ ` ,
241
+ errors : [ "Prefer `node:buffer` over `buffer`." ] ,
242
+ } ,
231
243
] ,
232
244
} )
You can’t perform that action at this time.
0 commit comments