Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

textlint-rule-ja-space-after-question

Package Overview
Dependencies
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textlint-rule-ja-space-after-question - npm Package Compare versions

Comparing version 2.2.0 to 2.3.1

13

lib/index.js
// LICENSE : MIT
"use strict";
/*

@@ -8,7 +9,4 @@ 疑問符(?)

*/
var _textlintRuleHelper = require("textlint-rule-helper");
var _matchIndex = require("match-index");
function reporter(context) {

@@ -28,6 +26,5 @@ var {

}
var text = getSource(node); // ?の後ろは全角スペースが推奨
var text = getSource(node);
// ?の後ろは全角スペースが推奨
// 半角スペースである場合はエラーとする
var matchAfter = /?( )[^\n]/;

@@ -38,3 +35,3 @@ (0, _matchIndex.matchCaptureGroupAll)(text, matchAfter).forEach(match => {

} = match;
return report(node, new RuleError("文末に感嘆符を使用し、後に別の文が続く場合は、直後に全角スペースを挿入します。", {
return report(node, new RuleError("文末に疑問符を使用し、後に別の文が続く場合は、直後に全角スペースを挿入します。", {
index: index,

@@ -45,6 +42,4 @@ fix: fixer.replaceTextRange([index, index + 1], " ")

}
};
}
module.exports = {

@@ -51,0 +46,0 @@ linter: reporter,

{
"name": "textlint-rule-ja-space-after-question",
"version": "2.2.0",
"version": "2.3.1",
"description": "疑問符の直後のスペースについてのtexlintルール",

@@ -32,9 +32,9 @@ "main": "lib/index.js",

"devDependencies": {
"textlint-scripts": "^12.0.1"
"textlint-scripts": "^13.3.3"
},
"dependencies": {
"match-index": "^1.0.1",
"textlint-rule-helper": "^2.2.0"
"textlint-rule-helper": "^2.2.4"
},
"gitHead": "15550aca195d434a5d5bb787d47b623585f7e937"
"gitHead": "fdcee300489a613f44215d6a096d240c2336c46a"
}

@@ -24,3 +24,3 @@ // LICENSE : MIT

const {index} = match;
return report(node, new RuleError("文末に感嘆符を使用し、後に別の文が続く場合は、直後に全角スペースを挿入します。", {
return report(node, new RuleError("文末に疑問符を使用し、後に別の文が続く場合は、直後に全角スペースを挿入します。", {
index: index,

@@ -27,0 +27,0 @@ fix: fixer.replaceTextRange([index, index + 1], " ")

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc