quick-lint-js

Find bugs in JavaScript programs.

Install for Sublime Text with Nix

Supported operating systems:

Install prerequisites

Install the LSP Sublime Text package:

  1. Open Sublime Text.
  2. Open the Command Palette (press Control-Shift-P) and type "Install Package Control".
  3. Open the Command Palette and type "Package Control: Install Package", then type "LSP".

Install quick-lint-js

In order to install quick-lint-js' Nix package, you must first install Nix or NixOS.

Open a terminal, and run the following command:

nix-env -iA nixpkgs.quick-lint-js

If the above command fails with “error: attribute 'quick-lint-js' in selection path 'nixpkgs.quick-lint-js' not found”, your Nixpkgs is out of date. Either update Nixpkgs, or install from quick-lint-js' repository instead:

nix-env -f https://c.quick-lint-js.com/releases/2.5.0/source/quick-lint-js-2.5.0.tar.gz -iA quick-lint-js

Configure Sublime Text

After installing quick-lint-js, you need to register quick-lint-js in Sublime Text's LSP package:

  1. Open Sublime Text.
  2. Open the Command Palette (press Control-Shift-P) and type "Preferences: LSP Settings".
  3. In the LSP.sublime-settings file which opens, add the following code. If "clients" already exists, add "quick-lint-js" inside the existing { }:
    {
        "clients": {
            "quick-lint-js": {
                "command": ["quick-lint-js", "--lsp-server"],
                "enabled": true,
                "languageId": "javascript",
                "syntaxes": ["Packages/JavaScript/JavaScript.sublime-syntax"]
            }
        }
    }
    
Sublime Text with LSP.sublime-settings open, showing closure-lsp and quick-lint-js settings
Example LSP settings for Sublime Text