Skip to content

Commit dda73e9

Browse files
committed
fix(rule): min_interval default value is 1
1 parent 5fdc643 commit dda73e9

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/no-doubled-joshi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function matchExceptionRule(tokens) {
3333
return false;
3434
}
3535
const defaultOptions = {
36-
min_interval: 2,
36+
min_interval: 1,
3737
strict: false
3838
};
3939
export default function (context, options = {}) {

test/no-doubled-joshi-test.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@ tester.run("no-double-joshi", rule, {
77
"私は彼が好きだ",
88
"既存のコードの利用", // "の" の例外
99
"オブジェクトを返す関数を公開した", // "を" の例外
10-
{
11-
text: "私は彼の鼻は好きだ",
12-
options: {
13-
"min_interval": 1
14-
}
15-
}
10+
"私は彼の鼻は好きだ"
1611
],
1712
invalid: [
1813
{
@@ -48,6 +43,9 @@ tester.run("no-double-joshi", rule, {
4843
},
4944
{
5045
text: "洋服をドラム式洗濯機でお湯と洗剤で洗い、乾燥機で素早く乾燥させる。",
46+
options: {
47+
"min_interval": 2
48+
},
5149
errors: [
5250
{
5351
message: `一文に二回以上利用されている助詞 "で" がみつかりました。`,
@@ -83,6 +81,9 @@ tester.run("no-double-joshi", rule, {
8381
},
8482
{
8583
text: "白装束で重力のない足どりでやってくる",
84+
options: {
85+
"min_interval": 2
86+
},
8687
errors: [
8788
{
8889
message: `一文に二回以上利用されている助詞 "で" がみつかりました。`,

0 commit comments

Comments
 (0)