Skip to content

Commit 8097322

Browse files
committed
feat(rule): 漢字表記に対応
1 parent 2cf4a1f commit 8097322

File tree

4 files changed

+42
-6
lines changed

4 files changed

+42
-6
lines changed

src/rules/ないことは-ない.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function (context) {
1212
"basic_form": "ない"
1313
},
1414
{
15-
"surface_form": "こと",
15+
"reading": "コト",// 漢字に対応するため
1616
"pos": "名詞"
1717
},
1818
{
@@ -29,7 +29,7 @@ export default function (context) {
2929
"basic_form": "ない"
3030
},
3131
{
32-
"surface_form": "こと",
32+
"reading": "コト",// 漢字に対応するため
3333
"pos": "名詞"
3434
},
3535
{

src/rules/ないものでは-ない.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function (context) {
1212
"basic_form": "ない"
1313
},
1414
{
15-
"surface_form": "もの",
15+
"reading": "モノ",// 漢字に対応するため
1616
"pos": "名詞"
1717
},
1818
{
@@ -33,7 +33,7 @@ export default function (context) {
3333
"basic_form": "ない"
3434
},
3535
{
36-
"surface_form": "もの",
36+
"reading": "モノ",// 漢字に対応するため
3737
"pos": "名詞"
3838
},
3939
{

src/rules/ないわけでは-ない.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default function (context) {
1111
"basic_form": "ない"
1212
},
1313
{
14-
"surface_form": "わけ",
14+
"reading": "ワケ",// 漢字に対応するため
1515
"pos": "名詞"
1616
},
1717
{
@@ -32,7 +32,7 @@ export default function (context) {
3232
"basic_form": "ない"
3333
},
3434
{
35-
"surface_form": "わけ",
35+
"reading": "ワケ",// 漢字に対応するため
3636
"pos": "名詞"
3737
},
3838
{

test/no-doubled-negative-ja-test.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ tester.run("no-doubled-negative", rule, {
7171
}
7272
]
7373
},
74+
{
75+
text: "確かにそういった懸念はない事はない。",
76+
errors: [
77+
{
78+
message: "二重否定: 〜ないことはない",
79+
column: 16
80+
}
81+
]
82+
},
7483
{
7584
text: "憂鬱でないこともない。",
7685
errors: [
@@ -80,6 +89,15 @@ tester.run("no-doubled-negative", rule, {
8089
}
8190
]
8291
},
92+
{
93+
text: "憂鬱でないコトもない。",
94+
errors: [
95+
{
96+
message: "二重否定: 〜ないこともない",
97+
column: 9
98+
}
99+
]
100+
},
83101
{
84102
text: "そういえないこともないですが......",
85103
errors: [
@@ -99,6 +117,15 @@ tester.run("no-doubled-negative", rule, {
99117
}
100118
]
101119
},
120+
{
121+
text: "ない訳でもないですが",
122+
errors: [
123+
{
124+
message: "二重否定: 〜ないわけでもない",
125+
column: 6
126+
}
127+
]
128+
},
102129
{
103130
text: "ないわけではないですが",
104131
errors: [
@@ -107,6 +134,15 @@ tester.run("no-doubled-negative", rule, {
107134
column: 7
108135
}
109136
]
137+
},
138+
{
139+
text: "ない訳ではないですが",
140+
errors: [
141+
{
142+
message: "二重否定: 〜ないわけではない",
143+
column: 6
144+
}
145+
]
110146
}
111147
]
112148
});

0 commit comments

Comments
 (0)