Open donganzh-zz opened 5 years ago
Probably, npm run build
has converted export default function (context, options = {}) {
to module.exports.default = function (context, options = {}) {
.
textlint --rulesdir
expected to export module.exports = function (context, options = {}) {
(without .default).
Maybe, rewrite export default function (context, options = {}) {
to module.exports = function (context, options = {}) {
and textlint --rulesdir
can load it.
FYI: You can test the rule via npm test
.
Thanks, even if I rewrite export default function
, it still reports error cannot read property 'fixer'
. But I will go with the npm test
.
Hi, @azu Hope you are having a great day.
I forked this rule and tried to build it on my laptop with some new features. Before I run
npm run build
, I need to install the helper npm packages:then I run
npm run build
andtextlint --rulesdir lib/ example.md -f pretty-error
to test the rule with some sample document, I got this error messageCannot read property 'fixer' of undefined
as output. I don't think there is anything related to the fixer in this rule. Do you know what might cause this problem? Thanks