sl
stylelint-lsp
npm i stylelint-lsp
sl

stylelint-lsp

A stylelint Language Server

by Bob Matcuk

1.2.4 (see all)License:MITTypeScript:Not Found
npm i stylelint-lsp
Readme

Release Build Status codecov.io

stylelint-lsp

stylelint-lsp is an implementation of the Language Server Protocol for stylelint. It supports the following features:

  • Document formatting, like running stylelint --fix on the file.
  • Commands to disable stylelint rules inline, above the line, for the entire file, or surrounding a block.
  • Linting on change or on save

Formatting (ie, stylelint --fix) can be configured to run automatically on save, in response to format requests, or run manually using a command.

Client Implementations

Settings

  • autoFixOnFormat (default false) - automatically apply fixes in response to format requests.
  • autoFixOnSave (default false) - automatically apply fixes on save.
  • config (default null) - stylelint config to use.
  • configFile (default null) - path to stylelint config file.
  • configOverrides (default null) - stylelint config overrides.
  • enable (default true) - if false, disable linting and auto-formatting.
  • validateOnSave (default false) - lint on save.
  • validateOnType (default true) - lint after changes.

If neither config nor configFile are specified, stylelint will attempt to automatically find a config file based on the location of the file you are editing.

If both validateOnSave and validateOnType are set to false, no linting will occur but auto-fixes can still be applied if you have it enabled. validateOnSave is automatically enabled if you enable autoFixOnSave because revalidation must occur after fixes are applied. You may wish to explicitly turn on validateOnSave if you are using another editor extension that will make changes to the file on save, otherwise, diagnostic messages from stylelint may be out-of-date after a save (ie, may point to the wrong line or may have been fixed by the automatic changes on save, etc).

Inspiration

Some ideas were borrowed from vscode-eslint and coc-eslint.

Downloads/wk

181

GitHub Stars

20

LAST COMMIT

2yrs ago

MAINTAINERS

1

CONTRIBUTORS

7

OPEN ISSUES

1

OPEN PRs

7
VersionTagPublished
1.2.4
latest
2yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate