Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita987e22

Browse files
committed
moar feedback
1 parent9abf816 commita987e22

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎src/rules/no-duplicates.js‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ function checkImports(imported, context) {
3333
}
3434

3535
functioncheckTypeImports(imported,context){
36-
for(const[module,nodes]ofimported.entries()){
36+
Array.from(imported).forEach(([module,nodes])=>{
3737
consttypeImports=nodes.filter((node)=>node.importKind==='type');
3838
if(nodes.length>1){
39-
constsomeInlineTypeImports=nodes.filter((node)=>node.specifiers.some((spec)=>spec.importKind==='type'));
40-
if(typeImports.length>0&&someInlineTypeImports.length>0){
39+
constsomeInlineTypeImports=nodes.some((node)=>node.specifiers.some((spec)=>spec.importKind==='type'));
40+
if(typeImports.length>0&&someInlineTypeImports){
4141
constmessage=`'${module}' imported multiple times.`;
4242
constsourceCode=context.getSourceCode();
4343
constfix=getTypeFix(nodes,sourceCode,context);
@@ -57,11 +57,11 @@ function checkTypeImports(imported, context) {
5757
});
5858
}
5959
}
60-
}
60+
});
6161
}
6262

6363
functioncheckInlineTypeImports(imported,context){
64-
for(const[module,nodes]ofimported.entries()){
64+
Array.from(imported).forEach(([module,nodes])=>{
6565
if(nodes.length>1){
6666
constmessage=`'${module}' imported multiple times.`;
6767
constsourceCode=context.getSourceCode();
@@ -81,7 +81,7 @@ function checkInlineTypeImports(imported, context) {
8181
});
8282
});
8383
}
84-
}
84+
});
8585
}
8686

8787
functionisComma(token){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp