Socket
Socket
Sign inDemoInstall

stylelint-scss

Package Overview
Dependencies
Maintainers
3
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylelint-scss

A collection of SCSS-specific rules for Stylelint


Version published
Weekly downloads
2.7M
decreased by-4.43%
Maintainers
3
Weekly downloads
 
Created

What is stylelint-scss?

The stylelint-scss npm package is a plugin for stylelint that provides linting rules specific to SCSS syntax. It helps enforce consistent conventions and avoid errors in your SCSS files.

What are stylelint-scss's main functionalities?

Linting SCSS-specific syntax

This feature allows you to lint SCSS-specific syntax such as @rules, $variables, and nesting. The code sample shows how to enable rules in a stylelint configuration file to disallow unknown @rules, enforce a naming pattern for $variables, and prevent redundant nesting selectors.

"rules": {
  "scss/at-rule-no-unknown": true,
  "scss/dollar-variable-pattern": "^foo-",
  "scss/selector-no-redundant-nesting-selector": true
}

Enforcing best practices

This feature helps enforce best practices in SCSS by preventing common mistakes. The code sample demonstrates enabling rules that ensure placeholders are used with @extend, discourage the use of leading underscores in partial names on @import, and prevent duplicate $variable declarations.

"rules": {
  "scss/at-extend-no-missing-placeholder": true,
  "scss/at-import-no-partial-leading-underscore": true,
  "scss/no-duplicate-dollar-variables": true
}

Customizable rules for SCSS

This feature provides customizable rules tailored for SCSS, allowing you to enforce specific stylistic decisions or prevent certain patterns. The code sample shows rules that enforce no spaces around operators, disallow nested properties, and ensure that dimensions only contain numeric values.

"rules": {
  "scss/operator-no-unspaced": true,
  "scss/declaration-nested-properties": "never",
  "scss/dimension-no-non-numeric-values": true
}

Other packages similar to stylelint-scss

Keywords

FAQs

Package last updated on 18 Sep 2024

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