Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

coc-stylelintplus

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coc-stylelintplus

stylelint extension for coc.nvim supporting additional features

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Release

coc-stylelintplus

coc-stylelintplus is an extension for coc.nvim that supports additional features that coc-stylelint is missing. For example:

  • 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.

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

coc-stylelintplus uses stylelint-lsp as the language server.

Installation

With coc.nvim installed, run the following:

:CocInstall coc-stylelintplus

Alternatively, you can add the following to your init.vim and coc-stylelintplus will be automatically installed the next time you start nvim:

let g:coc_global_extensions = ['coc-stylelintplus']

If you are using coc-stylelintplus with coc-css, you'll want to disable coc-css's validation in your coc-settings.json file, otherwise you'll get duplicated or conflicting errors:

{
  "css.validate": false,
  "less.validate": false,
  "scss.validate": false,
  "wxss.validate": false
}

coc-css still provides some useful functionality with validation disabled, so it makes sense to use it together with coc-stylelintplus.

Settings

  • stylelintplus.autoFixOnFormat (default false) - automatically apply fixes in response to format requests.
  • stylelintplus.autoFixOnSave (default false) - automatically apply fixes on save.
  • stylelintplus.config (default null) - stylelint config to use.
  • stylelintplus.configFile (default null) - path to stylelint config file.
  • stylelintplus.configOverrides (default null) - stylelint config overrides.
  • stylelintplus.enable (default true) - if false, disable linting and auto-formatting.
  • stylelintplus.validateOnSave (default false) - lint on save.
  • stylelintplus.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).

Keywords

FAQs

Package last updated on 25 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc