Code Monkey home page Code Monkey logo

write-good's Introduction

write good Build Status

Naive linter for English prose for developers who can't write good and wanna learn to do other stuff good too.

Use

npm install write-good

Important: Do not use this tool to be a jerk to other people about their writing.

API

writeGood is a function that takes a string and returns an array of suggestions.

var writeGood = require('write-good');

var suggestions = writeGood('So the cat was stolen.');

// suggestions:
//
// [{
//   suggestion: "omit 'So' from the beginning of sentences",
//   index: 0, offset: 2
// }, {
//   suggestion: "'was stolen' is passive voice",
//   index: 11, offset: 10
// }]

writeGood takes an optional second argument that allows you to disable certain checks.

You can disable checking for passive voice like this:

var writeGood = require('write-good');

var suggestions = writeGood('So the cat was stolen', { passive: false});
// suggestions: []

CLI

You can use write-good as a command-line tool by installing it globally:

npm install -g write-good

write-good takes a glob and prints suggestions to stdout:

$ write-good *.md

In README.md
=============
 = writeGood('So the cat was stolen.');
                         ^^^^^^^^^^
"was stolen" is passive voice on line 20 at column 40
-------------
//   suggestion: "'was stolen' is passive voice",
                   ^^^^^^^^^^
"was stolen" is passive voice on line 28 at column 19

You can run just specific checks like this:

write-good *.md --weasel --so

Or exclude checks like this:

write-good *.md --no-passive

Checks

You can disable any combination of the following by providing a key with value false as the second argument to writeGood.

passive

Checks for passive voice.

illusion

Checks for lexical illusions – cases where a word is repeated.

so

Checks for so at the beginning of the sentence.

thereIs

Checks for there is or there are at the beginning of the sentence.

weasel

Checks for "weasel words."

adverb

Checks for adverbs that can weaken meaning: really, very, extremely, etc.

tooWordy

Checks for wordy phrases and unnecessary words.

cliches

Checks for common cliches.

See also

I came across these resources while doing research to make this module. They might be helpful.

Code

Prose

Apps

This is not an endorsement. These apps have similar functionality that you may find useful.

License

MIT

write-good's People

Contributors

btford avatar duereg avatar richardlitt avatar gepoch avatar andresgottlieb avatar danielnaber avatar ckaznocha avatar engstrom avatar

Stargazers

Michael Anthony avatar

Watchers

James Cloos avatar Michael Anthony avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.