Contributing
March 9, 2026 ยท View on GitHub
Hi there, I really appreciate you considering contributing to this repository! This readme hopefully contains what you need to get started. If you have any questions please open an issue or PM me on twitter @RuneMehlsen.
- Clone the monorepo:
git clone https://github.com/JackRobards/lit-analyzer.git - Install dependencies:
pnpm install - Run tests:
pnpm test - When you are ready to create a PR with any changes, please run
npx @changesets/cliin order to generate a changesets file describing what it is you changed. This is only needed if you are updating the source code, not for things like documentation or tests.
Contributing to documentation
Documentation can be edited directly in the README.md files for each package. The shared rules documentation is in /docs/rules.md - if you update any rules, please update this file as well.
Contributing to lit-analyzer or ts-lit-plugin
Debugging the CLI
You can always try out the CLI by running ./cli.mjs path-to-a-file.js from packages/lit-analyzer.
Debugging the language service
You can try out changes to lit-analyzer and/or ts-lit-plugin directly from the Typescript Language Service in VS Code:
- Run
pnpm run devfrom/to open a playground in VS Code (lit-plugin is disabled in that session to prevent interference). - Run
pnpm run dev:logsfrom/to watch logs in real time.
pnpm run watch / pnpm run build
You can run either pnpm run watch or pnpm run build from the repository root or from any subpackage.
Contributing to vscode-lit-plugin
Debugging
In order to debug vscode-lit-plugin you can open vscode from packages/vscode-lit-plugin and press the start debugging button in vscode.
pnpm run package
You can use this script if you want to generate an installable package of vscode-lit-plugin. Afterwards, run code --install-extension ./packages/vscode-lit-plugin/out/packaged.vsix to install it.
Syntaxes
All syntaxes originally came from vscode-lit-html and vscode-styled-components. They are copied here and bundled as part of the VSCode extension.
The text.html.lit-template syntax is based on the text.html.ember-handlebars one for vsc-ember-syntax, but modified and simplified to fit Lit.
Big thanks and credit to the original authors for these syntaxes!