Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A linter for prose.

License

NotificationsYou must be signed in to change notification settings

dan-han-101/proselint

 
 

Repository files navigation

proselint logo

Build StatusCode ClimateCoverage StatusLint scoreDependency Status

Writing is notoriously hard, even for the best writers. Yet there is a tremendous amount of knowledge about the discipline strewn across usage guides, dictionaries, technical manuals, essays, pamphlets, websites, and the hearts and minds of great authors and editors. But poring over Strunk & White hardly makes one a better writer — it turns you into neither Strunk nor White. And nobody has the capacity to apply all the advice fromGarner’s Modern American Usage, a 975-page usage guide, to everything they write. In fact, the whole notion that one becomes a better writer by reading advice on writing rests on untenable assumptions about learning and memory. The traditional formats of knowledge about writing are thus essentially inert, waiting to be transformed.

We devised a simple solution:proselint, a linter for prose. (A linter is a computer program that, like a spell checker, scans through a document and analyzes it.)

proselint places the world’s greatest writers and editors by your side, where they whisper suggestions on how to improve your prose. You’ll be guided by advice inspired by Bryan Garner, David Foster Wallace, Chuck Palahniuk, Steve Pinker, Mary Norris, Mark Twain, Elmore Leonard, George Orwell, Matthew Butterick, William Strunk, E.B. White, Philip Corbett, Ernest Gowers, and the editorial staff of the world’s finest literary magazines and newspapers, among others. Our goal is to aggregate knowledge about best practices in writing and to make that knowledge immediately accessible to all authors in the form of a linter for prose.

proselint is a command-line utility that can be integrated into existing tools.

Installation

To get this up and running, install it using pip:pip install proselint.

Usage

You can runproselint on a document:

❯ proselint text.md

This prints a list of suggestions to stdout, one per line. Each suggestion will have the form:

text.md:<line>:<column>:<check_name><message>

For example,

text.md:0:10: wallace.uncomparables Comparison of an uncomparable:'unique' can not be compared.

The command-line utility can also print the list of suggestions in JSON using the--json flag. In this case, the output is considerably richer:

{// Type of check that output this suggestion.check:"wallace.uncomparables",// Message to describe the suggestion.message:"Comparison of an uncomparable: 'unique' can not be compared.",// The person or organization giving the suggestion.source:"David Foster Wallace"// URL pointing to the source material.source_url:"http://www.telegraph.co.uk/a/9715551"// Line where the error starts.line:0,// Column where the error starts.column:10,// Index in the text where the error starts.start:10,// Index in the text where the error ends.end:21,// start - endextent:11,// How important is this? Can be "suggestion", "warning", or "error".severity:"warning",// Possible replacements.replacements:[{value:"unique"}]}

Available plugins for text editors

proselint is available on:

Checks

You can disable any of the checks by modifying.proselintrc.

IDDescription
butterick.symbolsUsing the right symbol
carlin.filthWords to avoid
consistency.spacingConsistent sentence spacing
consistency.spellingConsistent use of British vs. American spelling
garner.airlineseAvoiding jargon of the airline industry
garner.am_pmUsing the right form for the time of day
garner.animal_labelsLikening things to animals using fun words
garner.archaismAvoiding archaic forms
garner.back_formationsAvoiding needless backformations
garner.capitalizationCaptializing what ought to be capitalized
garner.clichesAvoiding cliché
garner.commercialeseAvoiding jargon of the commercial world
garner.datesStylish formatting of dates
garner.denizen_labelsCalling people the right names
garner.diacritical_marksUsing dïacríticâl marks
garner.illogicAvoiding illogical forms
garner.jargonAvoiding miscellaneous jargon
garner.malapropismsAvoiding common malapropisms
garner.many_aMany a singular
garner.misspellingAvoiding common misspellings missed by spell-check
garner.mixed_metaphorsNot mixing metaphors
garner.mondegreensAvoiding mondegreens
garner.needless_variantsUsing the preferred form
garner.oxymoronsAvoiding oxymorons
garner.preferred_formsMiscellaneous preferred forms
garner.punctuationUsing the right punctuation
garner.redundancyAvoiding redundancy
garner.sexismAvoiding sexist language
gowers.overworked_metaphorsOverworked metaphors
inc.corporate_speakAvoiding corporate buzzwords
leonard.exclamationAvoiding hyperbolic use of exclamation
leonard.hellAvoiding a common cliché
lilienfeld.terms_to_avoidAvoiding misused psychological terms
misc.annotationsCatching annotations left in the text
misc.chatspeakAvoiding lolling and other chatspeak
misc.credit_cardKeeping credit card numbers secret
misc.currencyAvoiding redundant currency symbols
misc.hyperbolicNot being hyperbolic
misc.link_checkerLinking only to existing sites
misc.passwordKeeping passwords secret
misc.whenceUsage of the word "whence"
nfl.naughty_wordsAvoiding words banned by the NFL
nordquist.redundancyAvoiding redundancy and saying things twice
norris.denizen_labelsUsing the right denizen label
ogilvy.pretensionAvoiding being pretentious
orwell.debasedAvoiding debased language
oxford.venery_termsCall groups of animals by the right name
palahniuk.suddenlyAvoiding the word suddenly
pinker.apologizingBeing confident
pinker.hedgingNot hedging
pinker.latinAvoiding overuse of Latin phrases
pinker.metaconceptsAvoiding overuse of metaconcepts
pinker.narcisissmTalking about the subject, not its study
pinker.scare_quotesUsing scare quotes only when needed
strunk_white.compositionAvoiding wordy phrases
strunk_white.greylistWords to avoid
strunk_white.usageMisc. usage recommendations
twain.damnAvoiding the word "very"
wallace.tense_presentMisc. advice
wallace.uncomparablesNot comparing uncomparables
write_good.clichesAvoiding cliches
write_good.lexical_illusionsAvoiding lexical illusions
write_good.weasel_wordsAvoiding weasel words
wsj.athletesSpelling the names of athletes correctly

Contributing

Interested in contributing toproselint? Great — there are plenty of ways you can help. Read more onour website, where we describe how you can help us buildproselint into the greatest writing tool in the world.

Packages

No packages published

Languages

  • JavaScript33.0%
  • HTML31.9%
  • Python30.2%
  • CSS4.4%
  • Other0.5%

[8]ページ先頭

©2009-2025 Movatter.jp