btford/write-good — dự án mã nguồn mở — đang có 5.1k sao GitHub. Naive linter for English prose
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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:
//
// [{
// reason: "omit 'So' from the beginning of sentences",
// index: 0, offset: 2
// }, {
// reason: "'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: []
You can use the second argument's checks property to pass in custom checks instead of write-good's default linting configuration.
Like this, you can check non-English documents, for example with the linter extension for German, schreib-gut:
var schreibGut = require('schreib-gut');
writeGood('Aller Wahrscheinlichkeit nach können Entwickler nicht gut schreiben', { weasel-words: false, checks: schreibGut });
// suggestions
// [{index : 0, offset : 29, reason : '"Aller Wahrscheinlichkeit nach" is wordy or unneeded' }]
You can use the second argument's whitelist property to pass in a list of strings to whitelist from suggestions.
For example, normally only would be picked up as a bad word to use, but you might want to exempt read-only from that:
var writeGood = require('write-good');
var suggestions = writeGood('Never write read-only sentences.');
// suggestions: [{ index: 17, offset: 4, reason: '"only" can weaken meaning' }]
var filtered = writeGood('Never write read-only sentences.', { whitelist: ['read-only'] });
// filtered: []
CLI
You can use write-good as a command-line tool by installing it globally:
npm install -g write-good
If you have npm version 5.2.0 or later installed, you can use npx to run write-good without installing it:
npx write-good *.md
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
Or include checks like this:
# E-Prime is disabled by default.
write-good *.md --yes-eprime
Note: The --yes prefix only works for E-Prime, because the other checks are included by default, anyway.
You can run just with text without supplying files:
write-good --text="It should have been defined there."
You can even supply multi-line text:
write-good --text="I can't see a problem there that's not been defined yet.
Should be defined again."
You can also pass other arguments:
write-good --text="It should have been defined there." --no-passive
To view all available options use the --help option:
write-good --help
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.
eprime
Checks for "to-be" verbs. Disabled by default
Extensions
Users can create their own write-good language checks. As described above,
you can specify such extensions when running write-good on the command line
or calling it in your JavaScript code.
The following 3rd-party write-good extensions are available:
schreib-gut: A basic extension for
the German language
If you know of any write-good extensions that are not in this list, please open a pull request!
Interface
An extension is a Node.js module that exposes an object containing a check
function (fn) and an explanation string for each new check:
btford/write-good có 5.1k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/btford/write-good. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
btford/write-good có phải mã nguồn mở không?
Có — btford/write-good phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/btford/write-good.
btford/write-good còn đang phát triển không?
Commit gần nhất trên btford/write-good là 1.7 năm trước (theo timestamp GitHub). Repo có 190 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
btford/write-good dùng license gì?
btford/write-good phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
btford/write-good là gì?
btford/write-good (btford/write-good) là dự án JavaScript trên GitHub. Theo mô tả gốc: Naive linter for English prose
btford/write-good viết bằng ngôn ngữ gì?
btford/write-good chủ yếu viết bằng JavaScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc thêm về btford/write-good ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/btford/write-good là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
write-good có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về write-good.