How to use the @textlint/module-interop.moduleInterop function in @textlint/module-interop

To help you get started, we’ve selected a few @textlint/module-interop examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github textlint-ja / textlint-rule-preset-ja-technical-writing / lib / textlint-rule-preset-ja-technical-writing.js View on Github external
"no-mix-dearu-desumasu": moduleInterop(require("textlint-rule-no-mix-dearu-desumasu")),
        "ja-no-mixed-period": moduleInterop(require("textlint-rule-ja-no-mixed-period")),
        "arabic-kanji-numbers": jtfRules["2.2.2.算用数字と漢数字の使い分け"],
        "no-doubled-conjunction": moduleInterop(require("textlint-rule-no-doubled-conjunction")),
        "no-doubled-conjunctive-particle-ga": moduleInterop(require("textlint-rule-no-doubled-conjunctive-particle-ga")),
        "no-double-negative-ja": moduleInterop(require("textlint-rule-no-double-negative-ja")),
        "no-doubled-joshi": moduleInterop(require("textlint-rule-no-doubled-joshi")),
        "no-dropping-the-ra": moduleInterop(require("textlint-rule-no-dropping-the-ra")),
        "no-nfd": moduleInterop(require("textlint-rule-no-nfd")),
        "no-exclamation-question-mark": moduleInterop(require("textlint-rule-no-exclamation-question-mark")),
        "no-hankaku-kana": moduleInterop(require("textlint-rule-no-hankaku-kana")),
        "no-invalid-control-character": moduleInterop(require("@textlint-rule/textlint-rule-no-invalid-control-character")),
        "ja-no-weak-phrase": moduleInterop(require("textlint-rule-ja-no-weak-phrase")),
        "ja-no-successive-word": moduleInterop(require("textlint-rule-ja-no-successive-word")),
        "ja-no-abusage": moduleInterop(require("textlint-rule-ja-no-abusage")),
        "ja-no-redundant-expression": moduleInterop(require("textlint-rule-ja-no-redundant-expression")),
        "ja-unnatural-alphabet": moduleInterop(require("textlint-rule-ja-unnatural-alphabet")),
        "no-unmatched-pair": moduleInterop(require("@textlint-rule/textlint-rule-no-unmatched-pair"))
    },
    rulesConfig: {
        // # 1文の長さは100文字以下とする
        // https://github.com/azu/textlint-rule-sentence-length
        "sentence-length": {
            max: 100
        },
        // # コンマは1文中に3つまで
        // https://github.com/azu/textlint-rule-max-comma
        "max-comma": {
            max: 3
        },
        // # 読点は1文中に3つまで
        // https://github.com/azu/textlint-rule-max-ten
github textlint-ja / textlint-rule-preset-japanese / lib / textlint-rule-preset-japanese.js View on Github external
"use strict";
const {moduleInterop} = require("@textlint/module-interop");
module.exports = {
    "rules": {
        "max-ten": moduleInterop(require("textlint-rule-max-ten")),
        "no-doubled-conjunctive-particle-ga": moduleInterop(require("textlint-rule-no-doubled-conjunctive-particle-ga")),
        "no-doubled-conjunction": moduleInterop(require("textlint-rule-no-doubled-conjunction")),
        "no-double-negative-ja": moduleInterop(require("textlint-rule-no-double-negative-ja")),
        "no-doubled-joshi": moduleInterop(require("textlint-rule-no-doubled-joshi")),
        "sentence-length": moduleInterop(require("textlint-rule-sentence-length")),
        "no-dropping-the-ra": moduleInterop(require("textlint-rule-no-dropping-the-ra")),
        "no-mix-dearu-desumasu": moduleInterop(require("textlint-rule-no-mix-dearu-desumasu")),
        "no-nfd": moduleInterop(require("textlint-rule-no-nfd")),
        "no-invalid-control-character": moduleInterop(require("@textlint-rule/textlint-rule-no-invalid-control-character"))
    },
    "rulesConfig": {
        // https://github.com/textlint-ja/textlint-rule-max-ten
        // 一文で使える"、"の数
        "max-ten": {
            "max": 3
        },
        // https://github.com/takahashim/textlint-rule-no-doubled-conjunctive-particle-ga
        // 逆接の接続助詞「が」が、同一文中に複数回出現していないかどうか
        // e.g.) 今日は早朝から出発したが、定刻には間に合わなかったが、無事会場に到着した。
        "no-doubled-conjunctive-particle-ga": true,
        // https://github.com/takahashim/textlint-rule-no-doubled-conjunction
        // 同じ接続詞が連続して出現していないかどうか
        "no-doubled-conjunction": true,
github textlint-ja / textlint-rule-preset-ja-technical-writing / lib / textlint-rule-preset-ja-technical-writing.js View on Github external
"max-comma": moduleInterop(require("textlint-rule-max-comma")),
        "max-ten": moduleInterop(require("textlint-rule-max-ten")),
        "max-kanji-continuous-len": moduleInterop(require("textlint-rule-max-kanji-continuous-len")),
        "no-mix-dearu-desumasu": moduleInterop(require("textlint-rule-no-mix-dearu-desumasu")),
        "ja-no-mixed-period": moduleInterop(require("textlint-rule-ja-no-mixed-period")),
        "arabic-kanji-numbers": jtfRules["2.2.2.算用数字と漢数字の使い分け"],
        "no-doubled-conjunction": moduleInterop(require("textlint-rule-no-doubled-conjunction")),
        "no-doubled-conjunctive-particle-ga": moduleInterop(require("textlint-rule-no-doubled-conjunctive-particle-ga")),
        "no-double-negative-ja": moduleInterop(require("textlint-rule-no-double-negative-ja")),
        "no-doubled-joshi": moduleInterop(require("textlint-rule-no-doubled-joshi")),
        "no-dropping-the-ra": moduleInterop(require("textlint-rule-no-dropping-the-ra")),
        "no-nfd": moduleInterop(require("textlint-rule-no-nfd")),
        "no-exclamation-question-mark": moduleInterop(require("textlint-rule-no-exclamation-question-mark")),
        "no-hankaku-kana": moduleInterop(require("textlint-rule-no-hankaku-kana")),
        "no-invalid-control-character": moduleInterop(require("@textlint-rule/textlint-rule-no-invalid-control-character")),
        "ja-no-weak-phrase": moduleInterop(require("textlint-rule-ja-no-weak-phrase")),
        "ja-no-successive-word": moduleInterop(require("textlint-rule-ja-no-successive-word")),
        "ja-no-abusage": moduleInterop(require("textlint-rule-ja-no-abusage")),
        "ja-no-redundant-expression": moduleInterop(require("textlint-rule-ja-no-redundant-expression")),
        "ja-unnatural-alphabet": moduleInterop(require("textlint-rule-ja-unnatural-alphabet")),
        "no-unmatched-pair": moduleInterop(require("@textlint-rule/textlint-rule-no-unmatched-pair"))
    },
    rulesConfig: {
        // # 1文の長さは100文字以下とする
        // https://github.com/azu/textlint-rule-sentence-length
        "sentence-length": {
            max: 100
        },
        // # コンマは1文中に3つまで
        // https://github.com/azu/textlint-rule-max-comma
        "max-comma": {
            max: 3
github textlint-ja / textlint-rule-preset-ja-technical-writing / lib / textlint-rule-preset-ja-technical-writing.js View on Github external
"use strict";
const {moduleInterop} = require("@textlint/module-interop");
const jtfRules = moduleInterop(require("textlint-rule-preset-jtf-style")).rules;
module.exports = {
    rules: {
        "sentence-length": moduleInterop(require("textlint-rule-sentence-length")),
        "max-comma": moduleInterop(require("textlint-rule-max-comma")),
        "max-ten": moduleInterop(require("textlint-rule-max-ten")),
        "max-kanji-continuous-len": moduleInterop(require("textlint-rule-max-kanji-continuous-len")),
        "no-mix-dearu-desumasu": moduleInterop(require("textlint-rule-no-mix-dearu-desumasu")),
        "ja-no-mixed-period": moduleInterop(require("textlint-rule-ja-no-mixed-period")),
        "arabic-kanji-numbers": jtfRules["2.2.2.算用数字と漢数字の使い分け"],
        "no-doubled-conjunction": moduleInterop(require("textlint-rule-no-doubled-conjunction")),
        "no-doubled-conjunctive-particle-ga": moduleInterop(require("textlint-rule-no-doubled-conjunctive-particle-ga")),
        "no-double-negative-ja": moduleInterop(require("textlint-rule-no-double-negative-ja")),
        "no-doubled-joshi": moduleInterop(require("textlint-rule-no-doubled-joshi")),
        "no-dropping-the-ra": moduleInterop(require("textlint-rule-no-dropping-the-ra")),
        "no-nfd": moduleInterop(require("textlint-rule-no-nfd")),
        "no-exclamation-question-mark": moduleInterop(require("textlint-rule-no-exclamation-question-mark")),
        "no-hankaku-kana": moduleInterop(require("textlint-rule-no-hankaku-kana")),
        "no-invalid-control-character": moduleInterop(require("@textlint-rule/textlint-rule-no-invalid-control-character")),
        "ja-no-weak-phrase": moduleInterop(require("textlint-rule-ja-no-weak-phrase")),
        "ja-no-successive-word": moduleInterop(require("textlint-rule-ja-no-successive-word")),
        "ja-no-abusage": moduleInterop(require("textlint-rule-ja-no-abusage")),
        "ja-no-redundant-expression": moduleInterop(require("textlint-rule-ja-no-redundant-expression")),
        "ja-unnatural-alphabet": moduleInterop(require("textlint-rule-ja-unnatural-alphabet")),
        "no-unmatched-pair": moduleInterop(require("@textlint-rule/textlint-rule-no-unmatched-pair"))
    },
    rulesConfig: {
        // # 1文の長さは100文字以下とする
        // https://github.com/azu/textlint-rule-sentence-length
github textlint / textlint / packages / textlint / src / config / preset-loader.ts View on Github external
presetNames.forEach(presetName => {
        const pkgPath = moduleResolver.resolvePresetPackageName(presetName);
        const preset = moduleInterop(require(pkgPath));
        if (!preset.hasOwnProperty("rules")) {
            throw new Error(`${presetName} has not rules`);
        }
        if (!preset.hasOwnProperty("rulesConfig")) {
            throw new Error(`${presetName} has not rulesConfig`);
        }
        // set config of  to "/"
        Object.assign(
            presetRulesConfig,
            createFlatPresetRulesConfigFromRawPresetRuleConfig(preset.rulesConfig, presetName)
        );
    });
    return presetRulesConfig;
github textlint-ja / textlint-rule-preset-japanese / lib / textlint-rule-preset-japanese.js View on Github external
"use strict";
const {moduleInterop} = require("@textlint/module-interop");
module.exports = {
    "rules": {
        "max-ten": moduleInterop(require("textlint-rule-max-ten")),
        "no-doubled-conjunctive-particle-ga": moduleInterop(require("textlint-rule-no-doubled-conjunctive-particle-ga")),
        "no-doubled-conjunction": moduleInterop(require("textlint-rule-no-doubled-conjunction")),
        "no-double-negative-ja": moduleInterop(require("textlint-rule-no-double-negative-ja")),
        "no-doubled-joshi": moduleInterop(require("textlint-rule-no-doubled-joshi")),
        "sentence-length": moduleInterop(require("textlint-rule-sentence-length")),
        "no-dropping-the-ra": moduleInterop(require("textlint-rule-no-dropping-the-ra")),
        "no-mix-dearu-desumasu": moduleInterop(require("textlint-rule-no-mix-dearu-desumasu")),
        "no-nfd": moduleInterop(require("textlint-rule-no-nfd")),
        "no-invalid-control-character": moduleInterop(require("@textlint-rule/textlint-rule-no-invalid-control-character"))
    },
    "rulesConfig": {
        // https://github.com/textlint-ja/textlint-rule-max-ten
        // 一文で使える"、"の数
        "max-ten": {
            "max": 3
        },
        // https://github.com/takahashim/textlint-rule-no-doubled-conjunctive-particle-ga
        // 逆接の接続助詞「が」が、同一文中に複数回出現していないかどうか
github textlint-ja / textlint-rule-preset-ja-technical-writing / lib / textlint-rule-preset-ja-technical-writing.js View on Github external
module.exports = {
    rules: {
        "sentence-length": moduleInterop(require("textlint-rule-sentence-length")),
        "max-comma": moduleInterop(require("textlint-rule-max-comma")),
        "max-ten": moduleInterop(require("textlint-rule-max-ten")),
        "max-kanji-continuous-len": moduleInterop(require("textlint-rule-max-kanji-continuous-len")),
        "no-mix-dearu-desumasu": moduleInterop(require("textlint-rule-no-mix-dearu-desumasu")),
        "ja-no-mixed-period": moduleInterop(require("textlint-rule-ja-no-mixed-period")),
        "arabic-kanji-numbers": jtfRules["2.2.2.算用数字と漢数字の使い分け"],
        "no-doubled-conjunction": moduleInterop(require("textlint-rule-no-doubled-conjunction")),
        "no-doubled-conjunctive-particle-ga": moduleInterop(require("textlint-rule-no-doubled-conjunctive-particle-ga")),
        "no-double-negative-ja": moduleInterop(require("textlint-rule-no-double-negative-ja")),
        "no-doubled-joshi": moduleInterop(require("textlint-rule-no-doubled-joshi")),
        "no-dropping-the-ra": moduleInterop(require("textlint-rule-no-dropping-the-ra")),
        "no-nfd": moduleInterop(require("textlint-rule-no-nfd")),
        "no-exclamation-question-mark": moduleInterop(require("textlint-rule-no-exclamation-question-mark")),
        "no-hankaku-kana": moduleInterop(require("textlint-rule-no-hankaku-kana")),
        "no-invalid-control-character": moduleInterop(require("@textlint-rule/textlint-rule-no-invalid-control-character")),
        "ja-no-weak-phrase": moduleInterop(require("textlint-rule-ja-no-weak-phrase")),
        "ja-no-successive-word": moduleInterop(require("textlint-rule-ja-no-successive-word")),
        "ja-no-abusage": moduleInterop(require("textlint-rule-ja-no-abusage")),
        "ja-no-redundant-expression": moduleInterop(require("textlint-rule-ja-no-redundant-expression")),
        "ja-unnatural-alphabet": moduleInterop(require("textlint-rule-ja-unnatural-alphabet")),
        "no-unmatched-pair": moduleInterop(require("@textlint-rule/textlint-rule-no-unmatched-pair"))
    },
    rulesConfig: {
        // # 1文の長さは100文字以下とする
        // https://github.com/azu/textlint-rule-sentence-length
        "sentence-length": {
            max: 100
        },
        // # コンマは1文中に3つまで
github textlint-ja / textlint-rule-preset-japanese / lib / textlint-rule-preset-japanese.js View on Github external
"use strict";
const {moduleInterop} = require("@textlint/module-interop");
module.exports = {
    "rules": {
        "max-ten": moduleInterop(require("textlint-rule-max-ten")),
        "no-doubled-conjunctive-particle-ga": moduleInterop(require("textlint-rule-no-doubled-conjunctive-particle-ga")),
        "no-doubled-conjunction": moduleInterop(require("textlint-rule-no-doubled-conjunction")),
        "no-double-negative-ja": moduleInterop(require("textlint-rule-no-double-negative-ja")),
        "no-doubled-joshi": moduleInterop(require("textlint-rule-no-doubled-joshi")),
        "sentence-length": moduleInterop(require("textlint-rule-sentence-length")),
        "no-dropping-the-ra": moduleInterop(require("textlint-rule-no-dropping-the-ra")),
        "no-mix-dearu-desumasu": moduleInterop(require("textlint-rule-no-mix-dearu-desumasu")),
        "no-nfd": moduleInterop(require("textlint-rule-no-nfd")),
        "no-invalid-control-character": moduleInterop(require("@textlint-rule/textlint-rule-no-invalid-control-character"))
    },
    "rulesConfig": {
        // https://github.com/textlint-ja/textlint-rule-max-ten
        // 一文で使える"、"の数
        "max-ten": {
            "max": 3
        },
        // https://github.com/takahashim/textlint-rule-no-doubled-conjunctive-particle-ga
        // 逆接の接続助詞「が」が、同一文中に複数回出現していないかどうか
        // e.g.) 今日は早朝から出発したが、定刻には間に合わなかったが、無事会場に到着した。
        "no-doubled-conjunctive-particle-ga": true,
        // https://github.com/takahashim/textlint-rule-no-doubled-conjunction
        // 同じ接続詞が連続して出現していないかどうか
github textlint-ja / textlint-rule-preset-ja-technical-writing / lib / textlint-rule-preset-ja-technical-writing.js View on Github external
"use strict";
const {moduleInterop} = require("@textlint/module-interop");
const jtfRules = moduleInterop(require("textlint-rule-preset-jtf-style")).rules;
module.exports = {
    rules: {
        "sentence-length": moduleInterop(require("textlint-rule-sentence-length")),
        "max-comma": moduleInterop(require("textlint-rule-max-comma")),
        "max-ten": moduleInterop(require("textlint-rule-max-ten")),
        "max-kanji-continuous-len": moduleInterop(require("textlint-rule-max-kanji-continuous-len")),
        "no-mix-dearu-desumasu": moduleInterop(require("textlint-rule-no-mix-dearu-desumasu")),
        "ja-no-mixed-period": moduleInterop(require("textlint-rule-ja-no-mixed-period")),
        "arabic-kanji-numbers": jtfRules["2.2.2.算用数字と漢数字の使い分け"],
        "no-doubled-conjunction": moduleInterop(require("textlint-rule-no-doubled-conjunction")),
        "no-doubled-conjunctive-particle-ga": moduleInterop(require("textlint-rule-no-doubled-conjunctive-particle-ga")),
        "no-double-negative-ja": moduleInterop(require("textlint-rule-no-double-negative-ja")),
        "no-doubled-joshi": moduleInterop(require("textlint-rule-no-doubled-joshi")),
        "no-dropping-the-ra": moduleInterop(require("textlint-rule-no-dropping-the-ra")),
        "no-nfd": moduleInterop(require("textlint-rule-no-nfd")),
        "no-exclamation-question-mark": moduleInterop(require("textlint-rule-no-exclamation-question-mark")),
        "no-hankaku-kana": moduleInterop(require("textlint-rule-no-hankaku-kana")),
        "no-invalid-control-character": moduleInterop(require("@textlint-rule/textlint-rule-no-invalid-control-character")),
        "ja-no-weak-phrase": moduleInterop(require("textlint-rule-ja-no-weak-phrase")),
github textlint-ja / textlint-rule-preset-ja-technical-writing / lib / textlint-rule-preset-ja-technical-writing.js View on Github external
"use strict";
const {moduleInterop} = require("@textlint/module-interop");
const jtfRules = moduleInterop(require("textlint-rule-preset-jtf-style")).rules;
module.exports = {
    rules: {
        "sentence-length": moduleInterop(require("textlint-rule-sentence-length")),
        "max-comma": moduleInterop(require("textlint-rule-max-comma")),
        "max-ten": moduleInterop(require("textlint-rule-max-ten")),
        "max-kanji-continuous-len": moduleInterop(require("textlint-rule-max-kanji-continuous-len")),
        "no-mix-dearu-desumasu": moduleInterop(require("textlint-rule-no-mix-dearu-desumasu")),
        "ja-no-mixed-period": moduleInterop(require("textlint-rule-ja-no-mixed-period")),
        "arabic-kanji-numbers": jtfRules["2.2.2.算用数字と漢数字の使い分け"],
        "no-doubled-conjunction": moduleInterop(require("textlint-rule-no-doubled-conjunction")),
        "no-doubled-conjunctive-particle-ga": moduleInterop(require("textlint-rule-no-doubled-conjunctive-particle-ga")),
        "no-double-negative-ja": moduleInterop(require("textlint-rule-no-double-negative-ja")),
        "no-doubled-joshi": moduleInterop(require("textlint-rule-no-doubled-joshi")),
        "no-dropping-the-ra": moduleInterop(require("textlint-rule-no-dropping-the-ra")),
        "no-nfd": moduleInterop(require("textlint-rule-no-nfd")),
        "no-exclamation-question-mark": moduleInterop(require("textlint-rule-no-exclamation-question-mark")),

@textlint/module-interop

ECMAScript module interop library

MIT
Latest version published 12 days ago

Package Health Score

89 / 100
Full package analysis

Popular @textlint/module-interop functions