Skip to content

Commit

Permalink
fix message.
Browse files Browse the repository at this point in the history
  • Loading branch information
danishi committed May 5, 2024
1 parent a64fc07 commit a82a427
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0.0",
"version": "1.0.1",
"name": "textlint-rule-gc-product-name",
"description": "This rule checks Google Cloud product names.",
"author": "danishi",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = function(context) {
while ((match = correctRegExp.exec(text)) !== null) {
// Check if it is written with accurate capitalization.
if (match[0] !== term.correct) {
const ruleError = new RuleError(`It is correct to write "${term.correct}" exactly, with proper capitalization.`, {
const ruleError = new RuleError(`Correct to write "${term.correct}" exactly, with proper capitalization.`, {
index: match.index
});
report(node, ruleError);
Expand All @@ -24,7 +24,7 @@ module.exports = function(context) {
term.incorrect.forEach(incorrectTerm => {
const incorrectRegExp = new RegExp(`\\b${incorrectTerm}\\b`, 'g');
while ((match = incorrectRegExp.exec(text)) !== null) {
const ruleError = new RuleError(`It is correct to write "${term.correct}".`, {
const ruleError = new RuleError(`Correct to write "${term.correct}".`, {
index: match.index
});
report(node, ruleError);
Expand Down
4 changes: 2 additions & 2 deletions test/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tester.run("rule", rule, {
text: `ComputeEngine is a product of Google Cloud.`,
errors: [
{
message: 'It is correct to write "Compute Engine".',
message: 'Correct to write "Compute Engine".',
range: [0, 1]
}
]
Expand All @@ -27,7 +27,7 @@ tester.run("rule", rule, {
of Google cloud.`,
errors: [
{
message: 'It is correct to write "Google Cloud" exactly, with proper capitalization.',
message: 'Correct to write "Google Cloud" exactly, with proper capitalization.',
range: [32, 33]
}
]
Expand Down

0 comments on commit a82a427

Please sign in to comment.