Skip to content

Commit 109588f

Browse files
authored
refactor: update to check-ends-with-period@4 (#10)
BRAKING CHANGE: require Node.js 16
1 parent 370bf90 commit 109588f

File tree

3 files changed

+246
-694
lines changed

3 files changed

+246
-694
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@
3535
],
3636
"devDependencies": {
3737
"lint-staged": "^13.1.0",
38-
"prettier": "^2.8.1",
38+
"prettier": "^2.8.3",
3939
"textlint-plugin-review": "^0.4.1",
40-
"textlint-scripts": "^12.2.4",
41-
"textlint-tester": "^12.2.4"
40+
"textlint-scripts": "^12.5.0",
41+
"textlint-tester": "^12.5.0"
4242
},
4343
"dependencies": {
44-
"check-ends-with-period": "^1.0.1",
45-
"textlint-rule-helper": "^2.2.3"
44+
"check-ends-with-period": "^3.0.0",
45+
"textlint-rule-helper": "^2.2.4"
4646
},
4747
"prettier": {
4848
"singleQuote": false,

src/textlint-rule-ja-no-mixed-period.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// LICENSE : MIT
22
"use strict";
3-
const RuleHelper = require("textlint-rule-helper").RuleHelper;
3+
import { checkEndsWithPeriod } from "check-ends-with-period";
4+
import { RuleHelper } from "textlint-rule-helper";
5+
46
const japaneseRegExp =
57
/(?:[\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF]|[\uD840-\uD87F][\uDC00-\uDFFF]|[--])/;
68
/***
@@ -9,7 +11,7 @@ const japaneseRegExp =
911
* @type {RegExp}
1012
*/
1113
const classicPeriodMarkPattern = /[\.]/;
12-
const checkEndsWithPeriod = require("check-ends-with-period");
14+
1315
const defaultOptions = {
1416
// 優先する句点文字
1517
periodMark: "。",
@@ -128,7 +130,7 @@ const reporter = (context, options = {}) => {
128130
};
129131
};
130132

131-
module.exports = {
133+
export default {
132134
linter: reporter,
133135
fixer: reporter
134136
};

0 commit comments

Comments
 (0)