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

Commit44a81c6

Browse files
authored
chore: upgrade knip (#18272)
* chore: upgrade knip* chore: refactor default vs named exports/imports
1 parent94178ad commit44a81c6

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

‎lib/source-code/token-store/backward-token-cursor.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//------------------------------------------------------------------------------
1010

1111
constCursor=require("./cursor");
12-
constutils=require("./utils");
12+
const{ getLastIndex, getFirstIndex}=require("./utils");
1313

1414
//------------------------------------------------------------------------------
1515
// Exports
@@ -31,8 +31,8 @@ module.exports = class BackwardTokenCursor extends Cursor {
3131
constructor(tokens,comments,indexMap,startLoc,endLoc){
3232
super();
3333
this.tokens=tokens;
34-
this.index=utils.getLastIndex(tokens,indexMap,endLoc);
35-
this.indexEnd=utils.getFirstIndex(tokens,indexMap,startLoc);
34+
this.index=getLastIndex(tokens,indexMap,endLoc);
35+
this.indexEnd=getFirstIndex(tokens,indexMap,startLoc);
3636
}
3737

3838
/**@inheritdoc */

‎lib/source-code/token-store/cursors.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,7 @@ class CursorFactory {
8686
// Exports
8787
//------------------------------------------------------------------------------
8888

89-
exports.forward=newCursorFactory(ForwardTokenCursor,ForwardTokenCommentCursor);
90-
exports.backward=newCursorFactory(BackwardTokenCursor,BackwardTokenCommentCursor);
89+
module.exports={
90+
forward:newCursorFactory(ForwardTokenCursor,ForwardTokenCommentCursor),
91+
backward:newCursorFactory(BackwardTokenCursor,BackwardTokenCommentCursor)
92+
};

‎lib/source-code/token-store/forward-token-comment-cursor.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//------------------------------------------------------------------------------
1010

1111
constCursor=require("./cursor");
12-
constutils=require("./utils");
12+
const{ getFirstIndex, search}=require("./utils");
1313

1414
//------------------------------------------------------------------------------
1515
// Exports
@@ -32,8 +32,8 @@ module.exports = class ForwardTokenCommentCursor extends Cursor {
3232
super();
3333
this.tokens=tokens;
3434
this.comments=comments;
35-
this.tokenIndex=utils.getFirstIndex(tokens,indexMap,startLoc);
36-
this.commentIndex=utils.search(comments,startLoc);
35+
this.tokenIndex=getFirstIndex(tokens,indexMap,startLoc);
36+
this.commentIndex=search(comments,startLoc);
3737
this.border=endLoc;
3838
}
3939

‎lib/source-code/token-store/forward-token-cursor.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//------------------------------------------------------------------------------
1010

1111
constCursor=require("./cursor");
12-
constutils=require("./utils");
12+
const{ getFirstIndex, getLastIndex}=require("./utils");
1313

1414
//------------------------------------------------------------------------------
1515
// Exports
@@ -31,8 +31,8 @@ module.exports = class ForwardTokenCursor extends Cursor {
3131
constructor(tokens,comments,indexMap,startLoc,endLoc){
3232
super();
3333
this.tokens=tokens;
34-
this.index=utils.getFirstIndex(tokens,indexMap,startLoc);
35-
this.indexEnd=utils.getLastIndex(tokens,indexMap,endLoc);
34+
this.index=getFirstIndex(tokens,indexMap,startLoc);
35+
this.indexEnd=getLastIndex(tokens,indexMap,endLoc);
3636
}
3737

3838
/**@inheritdoc */

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
"got":"^11.8.3",
136136
"gray-matter":"^4.0.3",
137137
"js-yaml":"^4.1.0",
138-
"knip":"^5.0.1",
138+
"knip":"^5.8.0",
139139
"lint-staged":"^11.0.0",
140140
"load-perf":"^0.2.0",
141141
"markdown-it":"^12.2.0",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp