Provides a write-good linter extension for Visual Studio Code.
Press F1 or CTRL+P (or CMD+P) and type out > ext install travisthetechie.write-good-linter. Check out the latest published version on the Visual Studio Marketplace.
write-good.languages defaults to ["markdown", "plaintext"], but it can be overridden to something like ["markdown"] if you would like linting to apply to other filetypes.
write-good.write-good-config is a direct pass through to the underlying write-good engine. To enable eprime check and disable check for so at the start of sentance, add "write-good.write-good-config": { "eprime": true, "so": false } to your settings.
write-good.only-lint-on-save disables linting during editing for large files. A save triggers linting.
write-good.debounce-time-in-ms is the minimum time, in milliseconds, that must wait between linting attempts. Saving ignores the minimum time. Default is 200ms. This is useful if linting causes any performance hit and you want to limit it.
This is licensed under the MIT open source license. Do what you want with this software, just include notice that it orginated with me.
The heavy lifting of this extension is done via Brian Ford's write-good npm module.
Install Node.js & npm install in the project.
Open up the project in Visual Studio Code and hit F5 to open up a developement host version of Visual Studio Code with the extension installed. Open up a Markdown file and write some bad prose to see linter in action.
Check out the Extending Visual Studio Code documentation for more information.
- Install and run:
npm cithennpm test. The first run downloads a VS Code build for testing. - GUI vs headless:
- Local GUI:
npm run test:guiopens an Extension Development Host for visual debugging. - Headless CI:
npm run test:ciforces headless mode (used in GitHub Actions).
- Local GUI:
- Layout: tests live in
test/suite/*.test.ts; fixtures intest/fixtures/ws. The runner istest/runTest.ts(uses@vscode/test-electron). - Covered scenarios: diagnostics on bad Markdown, language filtering, only‑lint‑on‑save, and debounce behavior.
- Tips: if timing is flaky locally, re‑run
npm testor use GUI mode to observe behavior. Tests should not modifyout/.
npm install -g vsce- Visit https://travisthetechie.visualstudio.com/_details/security/tokens for a token (all accounts, all scopes)
vsce login travisthetechievsce publish
Thank you to James Ruskin for enabling settings. PR4