Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

stylelint-config-maqe

maqe1.2kMIT4.1.1

MAQE's StyleLint config

maqe, stylelint, stylelintconfig, css, lint

readme

MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMmhhhhmMMMMMMNhhhhdMMMMMMMNhhhhhNMMMMMMMMMNNdhhhmNMMMMMMdhhhhhhhhhhhhhmMM
MMo.....sNMMMh-....:MMMMMMM+.....+MMMMMMMmo:......-/yNMMM:.............oMM
MMo......:hN+......:MMMMMMs.......yMMMMMs....-::-....:dMM/.....::::::::sMM
MMo....-...//--....:MMMMMh....-....hMMMy....omMMNd/...-NMNo-...oNMMMMMMMMM
MMo....h+---:yd....:MMMMd-...:d-...-mMM/...-MMMMMMd....hMMMy/.../NMMMMMMMM
MMo....mMmmmmMM....:MMMm-....dMh....:NMy....smMMNd/...-NMNs-:+:oNMMMMMMMMM
MMo....mMMMMMMM....:MMN/....-ho/.....+MMo....-/oo/:..:dMM/....:////////sMM
MMo....mMMMMMMM....:MM+....-sNNy-.....sMMdo:.....--/+dMMM:.............oMM
MMdhhhhNMMMMMMMhhhhdMNhhhhhmMMMMNhhhhhhMMMMNmy+:.....:dMMdhhhhhhhhhhhhhdMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNho:oNMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

stylelint-config-maqe

This package provides MAQE's .stylelintrc as an extensible shared config.


Usage

Using MAQE Boilerplate

If you're using MAQE Boilerplate, then you don't have to do anything! MAQE Boilerplate already has this package as its dependency. Sit back and enjoy!

Using without MAQE Boilerplate

If you don't use MAQE Boilerplate, you'll need to do the following:

  • Install all the peer dependencies

    npm install -D stylelint stylelint-scss postcss postcss-scss @stylistic/stylelint-plugin
  • Install the package

    npm install -D stylelint-config-maqe
  • Create your .stylelintrc file and extend it from this config

    {
      "extends": "stylelint-config-maqe"
    }

    See Stylelint Documentation for more information.


Override stylelint config

You can modify your .stylelintrc in your project as you want. A common override is:

Rules

You can override the default rules by adding "rules" in your .stylelintrc

{
    "rules": {
        "at-rule-empty-line-before": null
    }
}

See Configuring Rules for more information.

See Rules for list of stylelint rules.


Migrating to version 2.0.0

This version contains breaking changes that may affect you.

Support for Node.js 10 was dropped

You should use the following or higher versions of Node.js

  • 12.20.0
  • 14.13.1
  • 16.0.0

Required more dependencies when need to lint anything other than CSS or SCSS

If you use stylelint-config-maqe to lint anything other than CSS or SCSS files, you will need to install and configure these syntaxes.

  • Less language (.less) use postcss-less
  • Sass language (.sass) use postcss-sass
  • CSS-in-JS embeds (.js, .jsx, .ts etc.) use @stylelint/postcss-css-in-js
  • HTML, XML and HTML-like embeds (.html, .xml, .svelte, .vue etc.) use postcss-html
  • Markdown embeds (.md, .markdown etc.) use postcss-markdown

Example for Vue.js

You will need to install

npm install -D postcss-html

and then overrides config in file .stylelintrc

{
    "overrides": [
        {
            "files": ["*.vue", "**/*.vue"],
            "customSyntax": "postcss-html"
        }
    ]
}

Note: If you use NuxtJS with PostCSS version 7 or below, you will get many warning from PostCSS on build time. Migrate to PostCSS version 8 or above to solve this issue.

Example migrate to PostCSS version 8 for NuxtJS

npm install -D @nuxt/postcss8 postcss@8

and then add config to nuxt.config.js

{
    buildModules: [
        '@nuxt/postcss8'
    ]
}

Migrating to version 3.0.0

Before version 3.0.0

We only have one configuration for extending styelint-config-maqe in addition to stylelint rules, our package also automatically adds stylelint-scss plugin and sets it up to support many rules such as scss/at-rule-no-unknown.

{
    "extends": "stylelint-config-maqe"
}

In version 3.0.0

If you extend the same way as previous versions, our package will only include rules from stylelint such as alpha-value-notation

{
    "extends": "stylelint-config-maqe"
}

If you want to use our config rules from stylelint-scss plugin such as scss/at-rule-no-unknown you can use the following configuration

{
    "extends": "stylelint-config-maqe/scss",
    "rules": {
        // override stylelint-scss plugin rules
        "scss/dimension-no-non-numeric-values": true,
    }
}

Migration to version 4.0.0

Removed support for Node.js less than version 18.12.0

Removed stylistic rules from stylelint and use @stylistic/stylelint-plugin plugin instead

Stylelint has removed 76 rules pertaining to stylistic conventions. We employ the @stylistic/stylelint-plugin for maintaining stylistic linting, and you can modify specific rules by prefixed with @stylistic/.

Install a new dependency package

npm i -D @stylistic/stylelint-plugin
{
    "extends": "stylelint-config-maqe",
    "rules": {
        // stylistic rules from @stylistic/stylelint-plugin:
        "@stylistic/color-hex-case": "lower",
    }
}

changelog

v4.1.1 (2025-1-31):

  • Following rules have been changed:
    • @stylistic/named-grid-areas-alignment
      • Change alignQuotes option to false

v4.1.0 (2024-10-10):

  • Bump stylelint version to v16.9.0
  • Bump stylelint-scss version to v6.7.0
  • Bump postcss version to v8.4.47
  • Bump @stylistic/stylelint-plugin version to v3.1.1
  • Following rules have been enabled:
    • @stylistic/named-grid-areas-alignment
    • scss/no-unused-private-members
    • scss/declaration-property-value-no-unknown
    • declaration-no-important
  • Following rules have been changed:
    • declaration-block-no-redundant-longhand-properties
      • Add inset, transition in ignoreShorthands option
  • Following rules have been deprecated:
    • scss/at-import-partial-extension-whitelist
    • scss/at-import-partial-extension-blacklist
    • scss/at-import-partial-extension
  • Following rules have been added, but turned off:
    • scss/at-import-partial-extension-allowed-list
    • scss/at-import-partial-extension-disallowed-list
    • scss/load-partial-extension
    • scss/at-mixin-no-risky-nesting-selector

v4.0.1 (2024-01-05):

  • Turn off media-query-no-invalid rule for scss

v4.0.0 (2024-01-04):

  • Bump stylelint version to v16.1.0
  • Bump stylelint-scss version to v6.0.0
  • Bump postcss version to v8.4.32
  • Bump postcss-scss version to v4.0.9
  • Add @stylistic/stylelint-plugin v2.0.0
  • 76 deprecated rules have been removed and use rules from @stylistic/stylelint-plugin with @stylistic/ prefix instead
  • Following rules have been enabled:
    • declaration-block-no-duplicate-custom-properties
    • declaration-property-value-no-unknown
    • media-feature-name-value-no-unknown
    • media-query-no-invalid
    • selector-anb-no-unmatchable
    • scss/at-use-no-redundant-alias
    • scss/at-root-no-redundant
    • scss/function-calculation-no-interpolation
    • scss/load-no-partial-leading-underscore
    • scss/property-no-unknown
  • Following rules have been changed:
    • color-function-notation change option from legacy to modern
  • Following rules have been added, but turned off:
    • no-unknown-custom-properties
    • scss/block-no-redundant-nesting
    • scss/function-disallowed-list

v3.0.0 (2023-01-25):

  • Bump stylelint version to v14.16.1
  • Bump stylelint-scss version to v4.3.0
  • Bump postcss version to v8.4.21
  • Bump postcss-scss version to v4.0.6
  • Update the config to be able to extend separate lint rules:
    • "extends": "stylelint-config-maqe" to extend CSS rules
    • "extends": "stylelint-config-maqe/scss" to extend CSS and SCSS rules
  • Following rules have been enabled:
    • media-feature-range-notation

v2.1.0 (2022-08-15):

  • Bump stylelint version to v14.10.1
  • Following rules have been enabled:
    • keyframe-block-no-duplicate-selectors
    • selector-not-notation
  • Following rules have been added, but turned off:
    • declaration-property-max-values
    • function-no-unknown
    • import-notation
  • Following rule have been added secondary option:
    • value-keyword-case add camelCaseSvgKeywords option and set true

v2.0.0 (2022-03-16):

  • Migrate stylelint version to 14
  • Bump stylelint dependency to >= 14.1.0
  • Add new dependencies
    • postcss ^8.4.6
    • postcss-scss ^4.0.3
    • stylelint-scss ^4.1.0
  • Following rule have been removed
    • function-calc-no-invalid
  • Following rule have been enabled:
    • custom-property-no-missing-var-function
  • Add stylelint-scss plugin and following rules have been enabled:
    • scss/at-else-if-parentheses-space-before
    • scss/at-use-no-unnamespaced
    • scss/at-function-parentheses-space-before
    • scss/at-import-no-partial-leading-underscore
    • scss/at-import-partial-extension
    • scss/at-mixin-parentheses-space-before
    • scss/declaration-nested-properties
    • scss/declaration-nested-properties-no-divided-groups
    • scss/dimension-no-non-numeric-values
    • scss/dollar-variable-colon-newline-after
    • scss/dollar-variable-colon-space-after
    • scss/dollar-variable-colon-space-before
    • scss/dollar-variable-no-missing-interpolation
    • scss/dollar-variable-no-namespaced-assignment
    • scss/double-slash-comment-whitespace-inside
    • scss/function-quote-no-quoted-strings-inside
    • scss/function-unquote-no-unquoted-strings-inside
    • scss/media-feature-value-dollar-variable
    • scss/no-duplicate-dollar-variables
    • scss/no-global-function-names
    • scss/operator-no-unspaced
    • scss/selector-no-redundant-nesting-selector
  • Add stylelint-scss plugin and following rules have been added, but turned off:
    • scss/at-else-closing-brace-newline-after
    • scss/at-else-empty-line-before
    • scss/at-extend-no-missing-placeholder
    • scss/at-function-named-arguments
    • scss/at-function-pattern
    • scss/at-if-closing-brace-space-after
    • scss/at-if-no-null
    • scss/at-import-partial-extension-blacklist
    • scss/at-import-partial-extension-whitelist
    • scss/at-mixin-argumentless-call-parentheses
    • scss/at-mixin-named-arguments
    • scss/at-mixin-pattern
    • scss/at-rule-conditional-no-parentheses
    • scss/at-rule-no-unknown
    • scss/at-each-key-value-single-line
    • scss/at-else-closing-brace-space-after
    • scss/dollar-variable-default
    • scss/dollar-variable-empty-line-after
    • scss/dollar-variable-empty-line-before
    • scss/dollar-variable-first-in-block
    • scss/dollar-variable-pattern
    • scss/double-slash-comment-empty-line-before
    • scss/double-slash-comment-inline
    • scss/function-color-relative
    • scss/map-keys-quotes
    • scss/no-dollar-variables
    • scss/operator-no-newline-before
    • scss/partial-no-import
    • scss/percent-placeholder-pattern
    • scss/selector-nest-combinators
    • scss/selector-no-union-class-name

v1.2.2 (2021-10-07):

  • Set custom-property-empty-line-before rule to null

v1.2.1 (2021-06-30):

  • Add use to at-rule-no-unknown

v1.2.0 (2021-05-17):

  • Bump Stylelint version to v13.13.1
  • Following rules have been enabled:
    • alpha-value-notation
    • color-function-notation
    • comment-word-disallowed-list
    • max-nesting-depth
    • named-grid-areas-no-invalid
    • no-duplicate-at-import-rules
    • no-invalid-position-at-import-rule
    • no-irregular-whitespace
    • unicode-bom
    • unit-disallowed-list
  • Following rules have been deprecated:
    • at-rule-property-requirelist
    • comment-word-blacklist
    • media-feature-name-value-whitelist
    • selector-combinator-blacklist
    • selector-combinator-whitelist
    • selector-pseudo-element-blacklist
    • selector-pseudo-element-whitelist
    • unit-blacklist

v1.1.0 (2019-04-30):

  • Bump Stylelint version to v10.0.1
  • Following rules have been enabled:
    • function-calc-no-invalid
    • no-empty-first-line
  • Following rules have been added, but turned off:
    • at-rule-property-requirelist
    • keyframes-name-pattern
    • linebreaks
    • media-feature-name-value-whitelist
    • selector-combinator-blacklist
    • selector-combinator-whitelist
    • selector-max-pseudo-class
    • selector-pseudo-element-blacklist
    • selector-pseudo-element-whitelist
  • Fix "at-rule-no-unknown" throw an error on SCSS directives

v1.0.2 (2018-01-29):

  • Bump Stylint version to v8.4.0

v1.0.1 (2017-08-22):

  • Fix "at-rule-empty-line-before" so we can group @import together.
  • Add Changelog.