File tree Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 41
41
"glob" : " ^7.0.0" ,
42
42
"mocha" : " ^2.3.3" ,
43
43
"textlint" : " ^5.5.2-0" ,
44
- "textlint-tester" : " ^0.5.1 "
44
+ "textlint-tester" : " ^1.0.0 "
45
45
},
46
46
"dependencies" : {
47
47
"analyze-desumasu-dearu" : " ^2.1.2" ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ function reporter(context) {
20
20
return ;
21
21
}
22
22
const text = getSource ( node ) ;
23
- const matchRegExp = / ( [ 0 - 9 ] + ) /
23
+ const matchRegExp = / ( [ 0 - 9 ] + ) / ;
24
24
matchCaptureGroupAll ( text , matchRegExp ) . forEach ( match => {
25
25
const { index, text} = match ;
26
26
report ( node , {
Original file line number Diff line number Diff line change @@ -20,7 +20,37 @@ tester.run("3.3.かっこ類と隣接する文字の間のスペースの有無"
20
20
text : "これは 「ダメ」です" ,
21
21
output : "これは「ダメ」です" ,
22
22
errors : [
23
- { message : "かっこの外側、内側ともにスペースを入れません。" }
23
+ {
24
+ message : "かっこの外側、内側ともにスペースを入れません。" ,
25
+ line : 1 ,
26
+ column : 4
27
+ }
28
+ ]
29
+ } ,
30
+ {
31
+ text : // 改行はスペースではないとする
32
+ `
33
+ 実装をみてもらうと分かりますが、JavaScriptの\`prototype\`の仕組みをそのまま利用しています。
34
+ そのため、特別な実装は必要なく
35
+ 「拡張する時は\`calculator.prototype\`の代わりに\`calculator.fn\`を拡張してください」
36
+ というルールがあるだけとも言えます。
37
+ ` ,
38
+ output : `
39
+ 実装をみてもらうと分かりますが、JavaScriptの\`prototype\`の仕組みをそのまま利用しています。
40
+ そのため、特別な実装は必要なく「拡張する時は\`calculator.prototype\`の代わりに\`calculator.fn\`を拡張してください」というルールがあるだけとも言えます。
41
+ ` ,
42
+ errors : [
43
+ {
44
+ message : "かっこの外側、内側ともにスペースを入れません。" ,
45
+ line : 2 ,
46
+ column : 15
47
+ } ,
48
+ {
49
+ message : "かっこの外側、内側ともにスペースを入れません。" ,
50
+ line : 4 ,
51
+ column : 15
52
+ }
53
+
24
54
]
25
55
}
26
56
]
You can’t perform that action at this time.
0 commit comments