quick-lint-js

Find bugs in JavaScript program
GitHub
1.55k
Created 5 years ago, last commit 3 months ago
84 contributors
6.31k commits
Stars added on GitHub, month by month
N/A
12
1
2
3
4
5
6
7
8
9
10
11
2023
2024
Stars added on GitHub, per day, on average
Yesterday
=
Last week
-0.1
/day
Last month
0.0
/day
npmPackage on NPM
Monthly downloads on NPM
12
1
2
3
4
5
6
7
8
9
10
11
2023
2024
No dependencies
README

quick-lint-js

quick-lint-js finds bugs in JavaScript programs.

quick-lint-js finds many bugs, including:

  • Using a variable which does not exist
  • Assigning to a const variable
  • Using await in a non-async function
  • Syntax errors

Demonstration of quick-lint-js in Visual Studio Code

Installing

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)
  • Editor Plugins for:
    • Visual Studio Code (VSCode)
    • VSCodium
    • Vim/Neovim
    • Sublime Text
    • Emacs
    • Kate

For detailed installation instructions, visit the quick-lint-js installation guide.

Examples

Here are some common bugs that quick-lint-js can catch:

Example 1: Undefined Variable

const occupation = "Engineer";
console.log("Welcome, " + ocupation); // Typo: 'ocupation' should be 'occupation'

Output: use of undeclared variable: ocupation

Example 2: Reassigning a const variable

const name = "John";
name = "Doe"; // Error: Cannot reassign a constant

Output: assignment to const variable: name

Example 3: Using await in a non-async function

function getData() {
  await fetch("/data");
}

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.

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.

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.