Skip to content

Commit bc88cdf

Browse files
committed
fix to use uniq
1 parent 794c366 commit bc88cdf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@
5151
"babel-preset-latest": "^6.24.0",
5252
"clone": "^2.1.1",
5353
"concat-stream": "^1.6.0",
54-
"lodash.union": "^4.6.0"
54+
"lodash.uniq": "^4.5.0"
5555
}
5656
}

src/create-textlint-rule-example.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// MIT © 2017 azu
22
"use strict";
33
const getRuleTest = require("./get-rule-test");
4-
const union = require("lodash.union");
4+
const unique = require("lodash.uniq");
55
const defaultOptions = {
66
prependValidExample: "**OK**:",
77
prependInValidExample: "**NG**:",
@@ -26,12 +26,12 @@ module.exports = function(content, options = {}) {
2626

2727
const validExample = `
2828
\`\`\`
29-
${union(plainValid).join(exampleSeparator)}
29+
${unique(plainValid).join(exampleSeparator)}
3030
\`\`\`
3131
`;
3232
const invalidExample = `
3333
\`\`\`
34-
${union(plainInvalid.map(test => test.text)).join(exampleSeparator)}
34+
${unique(plainInvalid.map(test => test.text)).join(exampleSeparator)}
3535
\`\`\`
3636
`;
3737

0 commit comments

Comments
 (0)