From 501231725a6e9194e468d6221271c2adfe4c1ffd Mon Sep 17 00:00:00 2001 From: Andres <116681169+andjimenezuf@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:30:20 -0400 Subject: [PATCH] Improve installation section in README --- README.md | 62 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 347eb9015e..c263d8fcc6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # quick-lint-js -[quick-lint-js][] finds bugs in JavaScript programs. +quick-lint-js finds bugs in JavaScript programs. quick-lint-js finds many bugs, including: @@ -13,24 +13,56 @@ quick-lint-js finds many bugs, including: ## Installing -See [installation instructions](https://quick-lint-js.com/install/) for how -to install quick-lint-js' CLI, LSP server, and editor plugins. +There are many ways to install `quick-lint-js`, depending on how you prefer to work! Here are the environments we support: -## Contributing +- CLI (Command-Line Interface) +- LSP (Language Server Protocol) +- Editor Plugins for: + - Visual Studio Code (VSCode) + - VSCodium + - Vim/Neovim + - Sublime Text + - Emacs + - Kate -If you want to make quick-lint-js better, see our -[contributing guides](https://quick-lint-js.com/contribute/). +For detailed installation instructions, visit the [quick-lint-js installation guide](https://quick-lint-js.com/install/). -## Contact +## Examples +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' +``` +Output: `use of undeclared variable: ocupation` -**Bugs and feature requests**: [file an issue on GitHub](https://github.com/quick-lint/quick-lint-js/issues) +### Example 2: Reassigning a const variable +```js +const name = "John"; +name = "Doe"; // Error: Cannot reassign a constant +``` +Output: `assignment to const variable: name` -**IRC**: ask questions in [#quick-lint-js][quick-lint-js-irc-web] on -[Libera.Chat][] +### Example 3: Using await in a non-async function +```js +function getData() { + await fetch("/data"); +} +``` +Output: `await used in non-async function` -**Security bug reports (private disclosure)**: email -[strager.nds@gmail.com](mailto:strager.nds@gmail.com) +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. + +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: -[Libera.Chat]: https://libera.chat/ -[quick-lint-js-irc-web]: https://kiwiirc.com/nextclient/irc.libera.chat/#quick-lint-js -[quick-lint-js]: https://quick-lint-js.com/ +- **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