1.6.9 • Published 9 days ago

@archoleat/stylelint-config-extended-scss v1.6.9

Weekly downloads
-
License
MIT
Repository
github
Last release
9 days ago

Stylelint Config Extended SCSS

NPM Version NPM Downloads CodeQL Specs Commitlint Editorconfig Prettier ESLint Markdown ESM Only

Table of Contents

This Config

Extends

Plugins

Installation

# pnpm
pnpm i -D @archoleat/stylelint-config-extended-scss
# npm
npm i -D @archoleat/stylelint-config-extended-scss
# yarn
yarn add -D @archoleat/stylelint-config-extended-scss

Usage

[!TIP] We recommend setting stylelint-define-config for property suggestions.

# pnpm
pnpm i -D stylelint-define-config
# npm
npm i -D stylelint-define-config
# yarn
yarn add -D stylelint-define-config
// stylelint.config.js
import { defineConfig } from 'stylelint-define-config';

export default defineConfig({
  extends: '@archoleat/stylelint-config-extended-scss',
});

Extending the Config

// stylelint.config.js
import { defineConfig } from 'stylelint-define-config';

export default defineConfig({
  extends: '@archoleat/stylelint-config-extended-scss',
  rules: {
    'selector-max-compound-selectors': 4,
    'value-no-vendor-prefix': false,
  },
});

Add the Space Between Logical Groups

If you want to add spaces between logical groups, add this rule to your Stylelint config:

// stylelint.config.js
import { defineConfig } from 'stylelint-define-config';

export default defineConfig({
  extends: '@archoleat/stylelint-config-extended-scss',
  rules: {
    'declaration-empty-line-before': null,
  },
});

Before

.popup {
  pointer-events: none;
  opacity: 0;
  position: fixed;
  inset: 0;
}

After

.popup {
  pointer-events: none;

  opacity: 0;

  position: fixed;
  inset: 0;
}

Rules

This is a list of the lints turned on in this configuration, and what they do.

CSS

At-rule

Case

Color

Declaration

Descending

Function

Max & Min

Notation

Pattern

  • selector-class-pattern: BEM naming convention likely enforced, encouraging modularity, maintainability, and clarity in class naming.

Selector

Unknown

SCSS

At-rule

Comment

Declaration

Dollar Variable

Function

  • scss/function-color-relative: Encourages the use of the scale-color() feature instead of deprecated features:
    • darken()
    • desaturate()
    • fade-in()
    • fade-out()
    • lighten()
    • opacify()
    • saturate()
    • transparentize()

Import

Maps

Media

Selector

Unknown

Contributing

Please read CONTRIBUTING to start contributing.

License

This project is licensed under the MIT license.