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

@lego/stylelint-config

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lego/stylelint-config

LEGO shareable stylelint config for css and scss projects

  • 1.8.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-92.68%
Maintainers
2
Weekly downloads
 
Created
Source

@lego/stylelint-config

Prerequisites

  • Don't use @lego/stylelint-config as a globally installed module

Installation

  1. Install this config package:
$ npm install --save-dev @lego/stylelint-config

Usage

Full Configurations

This package includes the following complete and ready to use configurations:

  • @lego/stylelint-config - Base config
  • @lego/stylelint-config/src/configurations/css - Base config + css specific rules
  • @lego/stylelint-config/src/configurations/scss - Base config + scss specific rules

add any above configuration in your stylelint.config.js file

module.exports = {
  extends: '@lego/stylelint-config/src/configurations/scss.js',
  rules: {
    // your overrides or custom rules here
  },
};

or if you prefer the json formatted .stylelintrc file:

{
  "extends": "@lego/stylelint-config/src/configurations/scss.js",
  "rules": {
    // your overrides or custom rules here
  }
}

NOTE: Avoid extending multiple complete configs as it can cause unexpected results, if you need to do this you should consider a piecemeal config as explained below.

Piecemeal Configurations

Stylelint configuration is broken apart in the ./src/rules folder, containing Stylelint's rules and rules for specific Stylelint plugins.

f.ex: the full set of Stylelint rules (./src/rules/eslint) are broken into categories that mirror Stylelint's documentation.

|-- src
|   |-- configurations
|   |   |-- base.js
|   |   |-- css.js
|   |   |-- scss.js
|   |-- rules
|   |   |-- stylelint-declaration-block-no-ignored-properties.js
|   |   |-- stylelint-no-unsupported-browser-features.js
|   |   |-- stylelint-order.js
|   |   |-- stylelint-scss.js
|   |   |-- stylelint
|   |       |-- limit-language-features.js
|   |       |-- possible-errors.js
|   |       |-- stylistic-issues.js

Limitations

Due to an issue with Stylelint, config extension cannot be called from a globally installed (npm install -g stylelint) stylelint.

Included Plugins

stylelint-declaration-block-no-ignored-properties

Disallow property values that are ignored due to another property value in the same rule.

  • https://github.com/kristerkari/stylelint-declaration-block-no-ignored-properties

stylelint-no-unsupported-browser-features

disallow features that aren't supported by your target browser audience

stylelint-order

A plugin pack of order related linting rules for stylelint. Every rule support autofixing (stylelint --fix).

Keywords

FAQs

Package last updated on 06 Jan 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