textlint / editor

textlint editor project.
https://textlint-editor.netlify.app/
MIT License
134 stars 8 forks source link

feat(compiler): support to inline prh.yml #47

Closed azu closed 3 years ago

azu commented 3 years ago

Add @textlint/config-inliner for inlining prh configration.

For example, @textlint/config-inliner convert prh's options like following:

        const prhOptions = await prh({
            rulePaths: [path.join(__dirname, "fixtures/prh/prh.yml")]
        });
        assert.deepStrictEqual(prhOptions, {
            rulePaths: [],
            ruleContents: [fs.readFileSync(path.join(__dirname, "fixtures/prh/prh.yml"), "utf-8")]
        });

fix #29