Skip to content

Commit

Permalink
fix: insert position. fix #3.
Browse files Browse the repository at this point in the history
  • Loading branch information
lvjiaxuan committed Nov 8, 2022
1 parent 3cb40d4 commit ccb7594
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ const disposes = [
new Position(selection.start.line, insertIndex),
)
void activeTextEditor.insertSnippet(
new SnippetString(`\n/* eslint-enable \${1|${ [ ...ruleIDSet ].join('\\, ') }|} */\n`),
new Position(selection.end.line + 1, insertIndex),
new SnippetString(`${ ' '.repeat(insertIndex) }/* eslint-enable \${1|${ [ ...ruleIDSet ].join('\\, ') }|} */\n`),
new Position(selection.end.line + 2, 0),
)
}
})
Expand Down

0 comments on commit ccb7594

Please sign in to comment.