Skip to content

Commit 18b50a3

Browse files
committed
chore(src): use const insteadof let
1 parent c6fc90b commit 18b50a3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/no-doubled-joshi.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,17 @@ export default function (context, options = {}) {
129129
// if found differenceIndex less than
130130
// tokes are sorted ascending order
131131
tokens.reduce((prev, current) => {
132-
let startPosition = countableTokens.indexOf(prev);
133-
let otherPosition = countableTokens.indexOf(current);
134-
// if difference
135-
let differenceIndex = otherPosition - startPosition;
132+
const startPosition = countableTokens.indexOf(prev);
133+
const otherPosition = countableTokens.indexOf(current);
134+
// 助詞token同士の距離が設定値以下ならエラーを報告する
135+
const differenceIndex = otherPosition - startPosition;
136136
if (differenceIndex <= minInterval) {
137-
let originalPosition = source.originalPositionFor({
137+
const originalPosition = source.originalPositionFor({
138138
line: sentence.loc.start.line,
139139
column: sentence.loc.start.column + (current.word_position - 1)
140140
});
141-
// padding position
142-
var padding = {
141+
// padding positionを計算する
142+
const padding = {
143143
line: originalPosition.line - 1,
144144
// matchLastToken.word_position start with 1
145145
// this is padding column start with 0 (== -1)

0 commit comments

Comments
 (0)