Skip to content

Commit 698b850

Browse files
committed
fix: add assertion
1 parent a4ada89 commit 698b850

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/textlint-rule-morpheme-match.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ const reporter = (context, options) => {
6767
`)
6868
}
6969

70+
if (!Array.isArray(options.dictionaryPathList)) {
71+
throw new Error(`"dictionaryPathList" option should be array.
72+
{
73+
dictionaryPathList: ["./path/to/dictionary.js", "./path/to/dictionary.json"]
74+
}
75+
`)
76+
}
77+
7078
const textlintRcDir = context.getConfigBaseDir() || process.cwd();
7179
const dictionaryList = loadDictionaries(textlintRcDir, options.dictionaryPathList);
7280
const matchAll = createMatchAll(dictionaryList);

0 commit comments

Comments
 (0)