Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Jan 31, 2023
1 parent 9b91293 commit f222453
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/eslint-plugin/src/rules/key-spacing.ts
Expand Up @@ -15,7 +15,7 @@ const baseSchema = Array.isArray(baseRule.meta.schema)
: baseRule.meta.schema;

/**
* To replace with native .at() once Node 14 stops being supported
* TODO: replace with native .at() once Node 14 stops being supported
*/
function at<T>(arr: T[], position: number): T | undefined {
if (position < 0) {
Expand Down Expand Up @@ -51,7 +51,6 @@ export default util.createRule<Options, MessageIds>({
function adjustedColumn(position: TSESTree.Position): number {
const line = position.line - 1; // position.line is 1-indexed
return util.getStringLength(
// use at() just for codecov, so it has a positive position case
at(sourceCode.lines, line)!.slice(0, position.column),
);
}
Expand Down

0 comments on commit f222453

Please sign in to comment.