Skip to content

Commit 54279be

Browse files
committed
fix(rule): exports as node modules
1 parent bd83e39 commit 54279be

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/sentence-length.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { RuleHelper } from "textlint-rule-helper";
77
const defaultOptions = {
88
max: 100
99
};
10-
export default function(context, options = {}) {
10+
module.exports = function(context, options = {}) {
1111
const maxLength = options.max || defaultOptions.max;
1212
const helper = new RuleHelper(context);
1313
const { Syntax, RuleError, report } = context;

test/sentence-length-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// LICENSE : MIT
22
"use strict";
3-
import rule from "../src/sentence-length";
43
import TextLintTester from "textlint-tester";
4+
const rule = require("../src/sentence-length");
55

66
const tester = new TextLintTester();
77
tester.run("textlint-rule-sentence-length", rule, {

0 commit comments

Comments
 (0)