How to use write-good - 2 common examples

To help you get started, we’ve selected a few write-good 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 johannth / google-docs-writing-companion / src / analyzers.js View on Github external
textElements.map(element => {
      const results = writeGood(element.text);
      return results.map(result => {
        return Promise.resolve(
          createSuggestion({
            id: uuid(),
            description: result.reason,
            context: element.text,
            startIndex: result.index,
            endIndex: result.index + result.offset,
            element: element,
            replacement: null,
            color: "#ff0000",
          })
        );
      });
    })
  );
github textlint-rule / textlint-rule-write-good / src / write-good.js View on Github external
[Syntax.Str](node) {
      if (helper.isChildNode(node, [Syntax.BlockQuote])) {
        return;
      }

      const text = getSource(node);
      const suggestions = writeGood(text, options);

      suggestions.forEach((suggestion) => {
        const { index, reason: message } = suggestion;

        report(node, new RuleError(message, { index }));
      });
    },
  };

write-good

Naive linter for English prose

MIT
Latest version published 4 years ago

Package Health Score

66 / 100
Full package analysis

Popular write-good functions