From f7519e7567b743fa06dd75580045fc2b06b10c7c Mon Sep 17 00:00:00 2001 From: "Matthew \"strager\" Glazar" Date: Sat, 28 Sep 2024 13:40:44 -0400 Subject: [PATCH] fix(docs): refactor and improve README Improvements: * Add links. * Don't mark quick-lint-js up as code. Style refactors: * Word wrap at 80 columns. * Add blank line after headings. --- README.md | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c263d8fcc..97b7edfe1 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,8 @@ quick-lint-js finds many bugs, including: ## Installing -There are many ways to install `quick-lint-js`, depending on how you prefer to work! Here are the environments we support: +There are many ways to install quick-lint-js, depending on how you prefer to +work! Here are the environments we support: - CLI (Command-Line Interface) - LSP (Language Server Protocol) @@ -25,12 +26,15 @@ There are many ways to install `quick-lint-js`, depending on how you prefer to w - Emacs - Kate -For detailed installation instructions, visit the [quick-lint-js installation guide](https://quick-lint-js.com/install/). +For detailed installation instructions, visit the [quick-lint-js installation +guide](https://quick-lint-js.com/install/). ## Examples -Here are some common bugs that `quick-lint-js` can catch: + +Here are some common bugs that quick-lint-js can catch: ### Example 1: Undefined Variable + ```js const occupation = "Engineer"; console.log("Welcome, " + ocupation); // Typo: 'ocupation' should be 'occupation' @@ -38,6 +42,7 @@ console.log("Welcome, " + ocupation); // Typo: 'ocupation' should be 'occupation Output: `use of undeclared variable: ocupation` ### Example 2: Reassigning a const variable + ```js const name = "John"; name = "Doe"; // Error: Cannot reassign a constant @@ -45,6 +50,7 @@ name = "Doe"; // Error: Cannot reassign a constant Output: `assignment to const variable: name` ### Example 3: Using await in a non-async function + ```js function getData() { await fetch("/data"); @@ -52,17 +58,25 @@ function getData() { ``` Output: `await used in non-async function` -These are just a few examples of how `quick-lint-js` can help identify common issues in your JavaScript code. +These are just a few examples of how quick-lint-js can help identify common +issues in your JavaScript code. ## Contributing -We’re always happy to welcome new contributors! If you’d like to contribute to `quick-lint-js`, please refer to the contributing guide on our website for all the details. +We’re always happy to welcome new contributors! If you’d like to contribute to +quick-lint-js, please refer to the contributing guide on our website for all the +details. Check out the [contributing guide here](https://quick-lint-js.com/contribute/). ## Contact + If you have any questions or feedback, feel free to reach out: - **Bugs and feature requests**: File an issue on GitHub. -- **IRC**: Ask questions in the quick-lint-js channel on Libera.Chat. -- **Security bug reports** (private disclosure): Email us at strager.nds@gmail.com +- **IRC**: Ask questions in the [#quick-lint-js][quick-lint-js-irc-web] channel + on Libera.Chat. +- **Security bug reports** (private disclosure): Email us at + [strager.nds@gmail.com](mailto:strager.nds@gmail.com). + +[quick-lint-js-irc-web]: https://kiwiirc.com/nextclient/irc.libera.chat/#quick-lint-js