Code Monkey home page Code Monkey logo

linter-write-good's Introduction

linter-write-good

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

A Linter interface for the write-good library.

This provides a variety of english usage text tips when writing documentation and commit messages.

This package requires Linter.

See it on atom.io

See it on github.com

Configuration

In the package settings, you can use a custom node binary, a custom write-good script, and pass arguments to the write good command. See write-good for possible arguments to the command.

Moreover, you can set the severity level of this linter. The default level is Error. Setting the severity level to Warning or Info helps distinguish write-good highlighting from the highlighting of an ordinary spell checker, or higher priority linters.

Note: Additional Linting

E-Prime

The Write-Good library implements a linter for E-Prime which is off by default. To enable E-Prime linting, you'll need to add the --yes-eprime flag to the extra arguments input under this package's settings page.

linter-write-good's People

Contributors

afontaine avatar arcanemagus avatar davidlday avatar gepoch avatar keplersj avatar lfkeitel avatar renovate-bot avatar semantic-release-bot avatar steelbrain avatar timkam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

linter-write-good's Issues

Failed to activate the linter-write-good package

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.16.0 x64
Electron: 1.3.13
OS: Unknown Windows version
Thrown From: linter-write-good package 0.9.0

Stack Trace

Failed to activate the linter-write-good package

At (0 , (_nuclideDiagnosticsCommon || _load_nuclideDiagnosticsCommon(...)).observeTextEditorEvents) is not a function

TypeError: (0 , (_nuclideDiagnosticsCommon || _load_nuclideDiagnosticsCommon(...)).observeTextEditorEvents) is not a function
  at /packages/nuclide/pkg/nuclide-diagnostics-store/lib/LinterAdapter.js:130:183)
  at createSingleAdapter (/packages/nuclide/pkg/nuclide-diagnostics-store/lib/LinterAdapterFactory.js:28:12)
  at addSingleAdapter (/packages/nuclide/pkg/nuclide-diagnostics-store/lib/LinterAdapterFactory.js:39:19)
  at createAdapters (/packages/nuclide/pkg/nuclide-diagnostics-store/lib/LinterAdapterFactory.js:52:5)
  at Activation.consumeLinterProvider (/packages/nuclide/pkg/nuclide-diagnostics-store/lib/main.js:126:100)
  at /packages/nuclide/pkg/commons-atom/createPackage.js:51:34)
  at Provider.module.exports.Provider.provide (/app.asar/node_modules/service-hub/lib/provider.js:34:52)
  at ServiceHub.module.exports.ServiceHub.provide (/app.asar/node_modules/service-hub/lib/service-hub.js:30:20)
  at Package.module.exports.Package.activateServices (/app.asar/src/package.js:396:71)
  at Package.module.exports.Package.activateNow (/app.asar/src/package.js:221:16)
  at /app.asar/src/package.js:190:32
  at Package.module.exports.Package.measure (/app.asar/src/package.js:96:15)
  at /app.asar/src/package.js:183:26
  at Package.module.exports.Package.activate (/app.asar/src/package.js:180:34)
  at PackageManager.module.exports.PackageManager.activatePackage (/app.asar/src/package-manager.js:550:34)
  at /app.asar/node_modules/settings-view/lib/package-manager.js:484:29
  at exit (/app.asar/node_modules/settings-view/lib/package-manager.js:99:16)
  at triggerExitCallback (/app.asar/src/buffered-process.js:322:11)
  at /app.asar/src/buffered-process.js:352:11)
  at emitTwo (events.js:106:13)
  at ChildProcess.emit (events.js:191:7)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

Commands

  3x -0:45.8.0 core:delete (input.hidden-input)
     -0:18.2.0 core:confirm (atom-workspace.workspace.scrollbars-visible-always.theme-chester-atom-syntax.theme-one-dark-ui)

Non-Core Packages

an-old-hope-syntax 1.0.4 
atom-beautify 0.29.22 
atom-bootstrap4 1.4.0 
atom-dark-fusion-syntax 2.2.0 
atom-material-syntax 1.0.2 
atom-material-ui 1.3.9 
atom-monokai 0.10.9 
autoclose-html 0.23.0 
autocomplete-html-entities 0.1.0 
chester-atom-syntax 0.1.1 
color-picker 2.2.5 
emmet 2.4.3 
file-icons 2.1.3 
haskell-grammar 0.4.0 
highlight-selected 0.13.1 
language-babel 2.57.3 
language-graphql 0.8.0 
language-ini 1.19.0 
language-lua 0.9.11 
language-ocaml 1.8.0 
language-swift 0.5.0 
language-thrift 1.0.2 
linter-write-good 0.9.0 
MagicPython 1.0.9 
materialize-css 0.1.0 
merge-conflicts 1.4.4 
monokai 0.22.0 
nuclide 0.218.0 
nuclide-format-js 0.0.36 
pigments 0.39.1 
set-syntax 0.3.2 
sort-lines 0.14.0 
spacegray-atom-dark-syntax 1.3.2 
tool-bar 1.1.0 

Failed to load the linter-write-good package

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.20.1 x64
Electron: 1.6.9
OS: Mac OS X 10.10.5
Thrown From: linter-write-good package 0.9.0

Stack Trace

Failed to load the linter-write-good package

At Cannot find module 'xregexp'

Error: Cannot find module 'xregexp'
    at Module._resolveFilename (module.js:470:15)
    at Module._resolveFilename (/Applications/Atom.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app/src/module-cache.js:354:58)
    at Module.require (Applications/Atom.app/Contents/Resources/app/static/index.js:40:43)
    at require (/Applications/Atom.app/Contents/Resources/app/src/native-compile-cache.js:66:33)
    at /packages/linter-write-good/lib/init.coffee:2:13)
    at /packages/linter-write-good/lib/init.coffee:1:1)
    at /packages/linter-write-good/lib/init.coffee:1:1)
    at Module.get_Module._compile (/Applications/Atom.app/Contents/Resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .coffee] (/Applications/Atom.app/Contents/Resources/app/src/compile-cache.js:239:29)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (Applications/Atom.app/Contents/Resources/app/static/index.js:47:45)
    at require (internal/module.js:20:19)
    at customRequire (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:96:26)
    at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app/src/package.js:887:35)
    at /Applications/Atom.app/Contents/Resources/app/src/package.js:158:34
    at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:99:21)
    at Package.module.exports.Package.load (/Applications/Atom.app/Contents/Resources/app/src/package.js:144:18)
    at PackageManager.module.exports.PackageManager.loadAvailablePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:565:22)
    at /Applications/Atom.app/Contents/Resources/app/src/package-manager.js:479:25
    at Config.module.exports.Config.transact (/Applications/Atom.app/Contents/Resources/app/src/config.js:342:22)
    at PackageManager.module.exports.PackageManager.loadPackages (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:473:25)
    at /Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:810:34

Commands

Non-Core Packages

atom-beautify 0.30.5 
atom-material-syntax 1.0.6 
atom-material-syntax-dark 1.0.0 
atom-material-syntax-light 0.4.6 
atom-material-ui 2.0.4 
atomic-chrome 0.3.2 
auto-detect-indentation 1.3.0 
autoclose-html 0.23.0 
busy-signal 1.4.3 
color-picker 2.2.5 
file-icons 2.1.12 
fonts 3.0.3 
highlight-selected 0.13.1 
intentions 1.1.5 
language-latex 1.1.1 
language-lisp 0.2.0 
language-viml 1.1.5 
linter 2.2.0 
linter-clang 4.1.2 
linter-ui-default 1.6.10 
linter-write-good 0.9.0 
minimap 4.29.7 
open-recent 5.0.0 
pigments 0.40.2 

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • write-good 1.0.2
  • xregexp 2.0.0
  • @commitlint/cli 8.3.5
  • @commitlint/config-conventional 8.3.4
  • @commitlint/travis-cli 8.3.5
  • @semantic-release/apm-config 8.0.0
  • husky 4.2.3
  • jasmine-fix 1.3.1
  • semantic-release 17.0.4

  • Check this box to trigger a request for Renovate to run again on this repository

Pass custom checks

I've written a custom check that lives in my global node_modules home that works fine via command line:

write-good test.txt --checks=my-custom-check

However, if I add:

--checks=my-custom-check

To the arguments in this plugin, it does not work (seems to kill write-good entirely).

Exclude for code blocks

It is a bit annoying that code blocks are also linted as prose. Is there an option to exclude this?

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

File: package.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid regExp for packageRules[0].packagePatterns: ^eslint``

Lint comments

Is there any way to lint comments? Except from copy and pasting them into the readme file?

Best Regards
SlieT

Upgrade write-good package

Can you release a new build using an updated version write-good? I'm looking for e-prime support that was just added.

Give better error message than "failed to run undefined undefined" if node unavailable

When node is unavailable, the error that is presented is really unclear:

failed to run undefined undefined
spawn /usr/lib/node_modules/atom-package-manager/bin/node ENOENT

It isn't even obvious that the error is caused by the linter-write-good plugin - I only knew because I had just installed it when getting this message. Can you implement this failure in a more graceful way with a useful error message suggesting that the user alters their configuration?

For reference, node is not available at /usr/lib/node_modules/atom-package-manager/bin/node when atom is installed using the atom package for Arch Linux.

Toggling plugin on/off

I'm new to atom, and Linter, but toggling individual Linter plugins on/off does not appear common. I'm not sure why that is but this is a request for easy linter-write-good toggling.

At present, it seems we must either disable Linter (which I assume means disabling all Linter plugins), or disable an individual Linter plugin in the Package manager. Seems a simpler way would exist.

If the ability to easily enable/disable this plugin at runtime won't be added then please expand the README to explain how we enable/disable this plugin, and how to know if it's enabled or disabled for the current document. Thanks :)

Uncaught TypeError: Cannot read property 'start' of null

Atom Version: 0.202.0
System: Microsoft Windows 8.1 Pro
Thrown From: linter package, v0.12.6

Stack Trace

Uncaught TypeError: Cannot read property 'start' of null

At C:\Users\Nolen\AppData\Local\atom\app-0.202.0\resources\app.asar\node_modules\text-buffer\lib\range.js:35

TypeError: Cannot read property 'start' of null
  at Function.module.exports.Range.fromObject (C:\Users\Nolen\AppData\Local\atom\app-0.202.0\resources\app.asar\node_modules\text-buffer\lib\range.js:35:31)
  at TextBuffer.module.exports.TextBuffer.clipRange (C:\Users\Nolen\AppData\Local\atom\app-0.202.0\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:980:21)
  at TextBuffer.module.exports.TextBuffer.markRange (C:\Users\Nolen\AppData\Local\atom\app-0.202.0\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:672:46)
  at DisplayBuffer.module.exports.DisplayBuffer.markBufferRange (C:\Users\Nolen\AppData\Local\atom\app-0.202.0\resources\app.asar\src\display-buffer.js:1297:41)
  at TextEditor.module.exports.TextEditor.markBufferRange (C:\Users\Nolen\AppData\Local\atom\app-0.202.0\resources\app.asar\src\text-editor.js:1249:59)
  at LinterView.createMarker (C:\Users\Nolen\.atom\packages\linter\lib\linter-view.coffee:190:22)
  at LinterView.display (C:\Users\Nolen\.atom\packages\linter\lib\linter-view.coffee:227:17)
  at LinterView.processMessage (C:\Users\Nolen\.atom\packages\linter\lib\linter-view.coffee:178:8)
  at LinterView.processMessage (C:\Users\Nolen\.atom\packages\linter\lib\linter-view.coffee:1:1)
  at C:\Users\Nolen\.atom\packages\linter\lib\linter-view.coffee:164:14
  at LinterWriteGood.processMessage (C:\Users\Nolen\.atom\packages\linter-write-good\lib\linter-write-good.coffee:50:5)
  at C:\Users\Nolen\.atom\packages\linter\lib\linter.coffee:173:8
  at triggerExitCallback (C:\Users\Nolen\AppData\Local\atom\app-0.202.0\resources\app.asar\src\buffered-process.js:213:47)
  at C:\Users\Nolen\AppData\Local\atom\app-0.202.0\resources\app.asar\src\buffered-process.js:227:18
  at Socket.<anonymous> (C:\Users\Nolen\AppData\Local\atom\app-0.202.0\resources\app.asar\src\buffered-process.js:98:18)
  at emitOne (events.js:82:20)
  at Socket.emit (events.js:166:7)
  at Pipe.close (net.js:464:12)

Commands

  7x -0:45.9.0 core:select-right (atom-text-editor.editor.is-focused)
     -0:44.8.0 core:select-left (atom-text-editor.editor.is-focused)
  9x -0:43.1.0 core:move-down (atom-text-editor.editor.is-focused.autocomplete-active)
  2x -0:39.4.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:38.3.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:36.8.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
     -0:36.5.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:36 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
 69x -0:35.5.0 core:move-right (atom-text-editor.editor.is-focused)
 31x -0:31.9.0 core:select-left (atom-text-editor.editor.is-focused)
     -0:14.9.0 core:move-right (atom-text-editor.editor.is-focused)
 19x -0:14.7.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:09.9.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
  2x -0:09.6.0 core:delete (atom-text-editor.editor.is-focused)
     -0:08.1.0 core:save (atom-text-editor.editor.is-focused)
     -0:07.1.0 latex:build (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "jekyll"
    ]
  },
  "linter": {}
}

Installed Packages

# User
atom-pair, v1.1.6
column-select, v0.2.0
file-icons, v1.5.5
git-tab-status, v1.9.2
language-latex, v0.6.1
language-reg, v0.0.0
latex, v0.24.0
linter, v0.12.6
linter-chktex, v0.3.0
linter-write-good, v0.4.3
minimap, v4.9.0
pdf-view, v0.22.0
script, v2.23.0
symbols-tree-view, v0.9.3
wordcount, v2.2.2

# Dev
latex, v0.23.4
linter-chktex, v0.3.0

Screenshot

would be nice to see how this looks in action

activate linter-write-good message in console

I think you probably want to remove the console.log in the activate method.

I do however keep a log when a particular action is made in my package. I took this a bit from some sublime packages that left some log lines in. I don't think we should leave lines on activation though.

(I realize this is mostly only for package developers of course, but less noise is better)
Hope this helps...

How to set up?

Hey, this is a really cool package, but it would be really awesome if you could actually explain how to set it up correctly in the Readme.

How do I refresh the linting?

After I follow suggestions given to me by linter-write-good, they still appear in the bottom pane of Atom.How to re-scan, or make them go away?

E-prime linting doesn’t support smart quotes

E-prime linting doesn’t report errors for words including to be that use contractions containing curly/smart/typographer’s quotations marks.

To reproduce:

  1. enable E-prime linting (Settings / Additional arguments / --yes-eprime)
  2. save a document containing the words isn’t isn't

Expected: both words trigger the is a form of 'to be' linting error/warning.

Observed: isn’t doesn’t result in an error.

Stopped working

I LOVE this package, but for some reason it seems to have stopped working for me, and I'm not quite sure why. No bottom panel, no highlighted words.

What sort of debug information do you need to figure what's happened? I am frequently enabling and disabling all sorts of things, so there might have been some affect.

Config.unobserve is deprecated.

Config::unobserve no longer does anything. Call .dispose() on the object returned by Config::observe instead.

Config.unobserve (/Applications/Atom.app/Contents/Resources/app/src/config.js:374:19)
LinterWriteGood.destroy (/Users/kepler/.atom/packages/linter-write-good/lib/linter-write-good.coffee:52:16)

Sorry about the cookie-cutter issue, just updated the package to 0.3.0 and this popped up at startup.

Usage

I must be missing something very obvious, but I've been at this for a while, and have searched all the doc and asked Google, so I'll try here.

How do I use this? I have it enabled, set to "info", on the right "quick navigation" lines list, I get plenty of lines higlighted in blue. Now what? I can't find anything to left or right click anywhere that would allow me to get suggestions or apply fixes. What's going on? ( I restarted the whole machine too )

Thanks to anyone who has any idea.

Support Asciidoc

We use Asciidoc rather extensively for our docs and I'm not sure how I can turn on this plugin on Asciidoc. I know write-good doesn't support asciidoc properly but it's still better than nothing.

Is there some configuration file I can hack to get it to work?

Object.activate is deprecated.

AtomLinter v0.X.Y API has been deprecated. Please refer to the Linter docs to update and the latest API: https://github.com/AtomLinter/Linter/wiki/Migrating-to-the-new-API

Object.activate (/home/gmarchin/.atom/packages/linter/lib/main.coffee:57:8)
Package.activateNow (/usr/share/atom/resources/app.asar/src/package.js:240:19)
<unknown> (/usr/share/atom/resources/app.asar/src/package.js:221:30)
Package.measure (/usr/share/atom/resources/app.asar/src/package.js:165:15)
Package.activate (/usr/share/atom/resources/app.asar/src/package.js:213:14)
PackageManager.activatePackage (/usr/share/atom/resources/app.asar/src/package-manager.js:452:21)

Request: Configurable grammer scope

Love the package. I needed to customiz the grammar list in init.coffee. It would be good to make this configurable. If I get some extra time I'll try to submit a PR.

Make severity level configurable

It would be great to have the severity level configurable.
Then, writers who use a common spell checker in addition to good-write can easily distinguish good-write suggestions from spelling errors.

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.