
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
stylelint-stylistic
Advanced tools
As I have very few free time to take care of this plugin, I have decided to share support of it with firefoxic. As such, the new package will continue support for stylelint 16 and future update. Please note this current package will still be usable with stylelint 15 but will no longer receive fixes.
Plugin for endangered stylelint stylistic rules.
As of its version 15, the popular stylelint package will slowly deprecate and remove 76 stylistic rules.
The proposed solution was to move to other specialized formatting packages like prettier, but it proved to be a tedious task on large projects. Not all of them are able to shift easily and fix the potential conflicts between different linters / formatters (especially on hybrid linting environments such as CSS-in-JS).
As these endangered rules were working quite well, and alongside the stylelint recommendation, I have decided to move them to this package in order to maintain them. Only a soft migration will be need to keep them in your projects.
You will need stylelint 15.0.0 or higher as a peer dependency.
Install the package :
npm install stylelint-stylistic --save-dev
or
yarn add stylelint-stylistic --dev
Append the plugin to your stylelint configuration plugins :
{
"plugins": [
"stylelint-stylistic"
]
}
Or alternatively, if you wish to use the plugin default config, you can directly extend it :
{
"extends": [
"stylelint-stylistic/config"
]
}
All rules were moved, according to stylelint plugin convention, to the stylistic scope. If you already have some of them in your configuration, juste changed any rule to stylistic/rule.
| Rule | Auto-fixable | Category |
|---|---|---|
stylistic/color-hex-caseSpecify lowercase or uppercase for hex colors. | yes | Color |
stylistic/function-comma-newline-afterRequire a newline or disallow whitespace after the commas of functions. | yes | Function |
stylistic/function-comma-newline-beforeRequire a newline or disallow whitespace before the commas of functions. | yes | Function |
stylistic/function-comma-space-afterRequire a single space or disallow whitespace after the commas of functions. | yes | Function |
stylistic/function-comma-space-beforeRequire a single space or disallow whitespace before the commas of functions. | yes | Function |
stylistic/function-max-empty-linesLimit the number of adjacent empty lines within functions. | yes | Function |
stylistic/function-parentheses-newline-insideRequire a newline or disallow whitespace on the inside of the parentheses of functions. | yes | Function |
stylistic/function-parentheses-space-insideRequire a single space or disallow whitespace on the inside of the parentheses of functions. | yes | Function |
stylistic/function-whitespace-afterRequire or disallow whitespace after functions. | yes | Function |
stylistic/number-leading-zeroRequire or disallow a leading zero for fractional numbers less than 1. | yes | Number |
stylistic/number-no-trailing-zerosDisallow trailing zeros in numbers. | yes | Number |
stylistic/string-quotesSpecify single or double quotes around strings. | yes | String |
stylistic/unit-caseSpecify lowercase or uppercase for units. | yes | Unit |
stylistic/value-list-comma-newline-afterRequire a newline or disallow whitespace after the commas of value lists. | yes | Value list |
stylistic/value-list-comma-newline-beforeRequire a newline or disallow whitespace before the commas of value lists. | no | Value list |
stylistic/value-list-comma-space-afterRequire a single space or disallow whitespace after the commas of value lists. | yes | Value list |
stylistic/value-list-comma-space-beforeRequire a single space or disallow whitespace before the commas of value lists. | yes | Value list |
stylistic/value-list-max-empty-linesLimit the number of adjacent empty lines within value lists. | yes | Value list |
stylistic/property-caseSpecify lowercase or uppercase for properties. | yes | Property |
stylistic/declaration-bang-space-afterRequire a single space or disallow whitespace after the bang of declarations. | yes | Declaration |
stylistic/declaration-bang-space-beforeRequire a single space or disallow whitespace before the bang of declarations. | yes | Declaration |
stylistic/declaration-colon-newline-afterRequire a newline or disallow whitespace after the colon of declarations. | yes | Declaration |
stylistic/declaration-colon-space-afterRequire a single space or disallow whitespace after the colon of declarations. | yes | Declaration |
stylistic/declaration-colon-space-beforeRequire a single space or disallow whitespace before the colon of declarations. | yes | Declaration |
stylistic/declaration-block-semicolon-newline-afterRequire a newline or disallow whitespace after the semicolons of declaration blocks. | yes | Declaration block |
stylistic/declaration-block-semicolon-newline-beforeRequire a newline or disallow whitespace before the semicolons of declaration blocks. | no | Declaration block |
stylistic/declaration-block-semicolon-space-afterRequire a single space or disallow whitespace after the semicolons of declaration blocks. | yes | Declaration block |
stylistic/declaration-block-semicolon-space-beforeRequire a single space or disallow whitespace before the semicolons of declaration blocks. | yes | Declaration block |
stylistic/declaration-block-trailing-semicolonRequire or disallow a trailing semicolon within declaration blocks. | yes | Declaration block |
stylistic/block-closing-brace-empty-line-beforeRequire or disallow an empty line before the closing brace of blocks. | yes | Block |
stylistic/block-closing-brace-newline-afterRequire a newline or disallow whitespace after the closing brace of blocks. | yes | Block |
stylistic/block-closing-brace-newline-beforeRequire a newline or disallow whitespace before the closing brace of blocks. | yes | Block |
stylistic/block-closing-brace-space-afterRequire a single space or disallow whitespace after the closing brace of blocks. | no | Block |
stylistic/block-closing-brace-space-beforeRequire a single space or disallow whitespace before the closing brace of blocks. | yes | Block |
stylistic/block-opening-brace-newline-afterRequire a newline after the opening brace of blocks. | yes | Block |
stylistic/block-opening-brace-newline-beforeRequire a newline or disallow whitespace before the opening brace of blocks. | yes | Block |
stylistic/block-opening-brace-space-afterRequire a single space or disallow whitespace after the opening brace of blocks. | yes | Block |
stylistic/block-opening-brace-space-beforeRequire a single space or disallow whitespace before the opening brace of blocks. | yes | Block |
stylistic/selector-attribute-brackets-space-insideRequire a single space or disallow whitespace on the inside of the brackets within attribute selectors. | yes | Selector |
stylistic/selector-attribute-operator-space-afterRequire a single space or disallow whitespace after operators within attribute selectors. | yes | Selector |
stylistic/selector-attribute-operator-space-beforeRequire a single space or disallow whitespace before operators within attribute selectors. | yes | Selector |
stylistic/selector-combinator-space-afterRequire a single space or disallow whitespace after the combinators of selectors. | yes | Selector |
stylistic/selector-combinator-space-beforeRequire a single space or disallow whitespace before the combinators of selectors. | yes | Selector |
stylistic/selector-descendant-combinator-no-non-spaceDisallow non-space characters for descendant combinators of selectors. | yes | Selector |
stylistic/selector-max-empty-linesLimit the number of adjacent empty lines within selectors. | yes | Selector |
stylistic/selector-pseudo-class-caseSpecify lowercase or uppercase for pseudo-class selectors. | yes | Selector |
stylistic/selector-pseudo-class-parentheses-space-insideRequire a single space or disallow whitespace on the inside of the parentheses within pseudo-class selectors. | yes | Selector |
stylistic/selector-pseudo-element-caseSpecify lowercase or uppercase for pseudo-element selectors. | yes | Selector |
stylistic/selector-list-comma-newline-afterRequire a newline or disallow whitespace after the commas of selector lists. | yes | Selector list |
stylistic/selector-list-comma-newline-beforeRequire a newline or disallow whitespace before the commas of selector lists. | yes | Selector list |
stylistic/selector-list-comma-space-afterRequire a single space or disallow whitespace after the commas of selector lists. | yes | Selector list |
stylistic/selector-list-comma-space-beforeRequire a single space or disallow whitespace before the commas of selector lists. | yes | Selector list |
stylistic/media-feature-colon-space-afterRequire a single space or disallow whitespace after the colon in media features. | yes | Media feature |
stylistic/media-feature-colon-space-beforeRequire a single space or disallow whitespace before the colon in media features. | yes | Media feature |
stylistic/media-feature-name-caseSpecify lowercase or uppercase for media feature names. | yes | Media feature |
stylistic/media-feature-parentheses-space-insideRequire a single space or disallow whitespace on the inside of the parentheses within media features. | yes | Media feature |
stylistic/media-feature-range-operator-space-afterRequire a single space or disallow whitespace after the range operator in media features. | yes | Media feature |
stylistic/media-feature-range-operator-space-beforeRequire a single space or disallow whitespace before the range operator in media features. | yes | Media feature |
stylistic/media-query-list-comma-newline-afterRequire a newline or disallow whitespace after the commas of media query lists. | yes | Media query list |
stylistic/media-query-list-comma-newline-beforeRequire a newline or disallow whitespace before the commas of media query lists. | no | Media query list |
stylistic/media-query-list-comma-space-afterRequire a single space or disallow whitespace after the commas of media query lists. | yes | Media query list |
stylistic/media-query-list-comma-space-beforeRequire a single space or disallow whitespace before the commas of media query lists. | yes | Media query list |
stylistic/at-rule-name-caseSpecify lowercase or uppercase for at-rules names. | yes | At-rule |
stylistic/at-rule-name-newline-afterRequire a newline after at-rule names. | no | At-rule |
stylistic/at-rule-name-space-afterRequire a single space after at-rule names. | yes | At-rule |
stylistic/at-rule-semicolon-newline-afterRequire a newline after the semicolon of at-rules. | yes | At-rule |
stylistic/at-rule-semicolon-space-beforeRequire a single space or disallow whitespace before the semicolons of at-rules. | no | At-rule |
stylistic/indentationSpecify indentation. | yes | General / Sheet |
stylistic/linebreaksSpecify unix or windows linebreaks. | yes | General / Sheet |
stylistic/max-empty-linesLimit the number of adjacent empty lines. | yes | General / Sheet |
stylistic/max-line-lengthLimit the length of a line. | no | General / Sheet |
stylistic/no-empty-first-lineDisallow empty first lines. | yes | General / Sheet |
stylistic/no-eol-whitespaceDisallow end-of-line whitespace. | yes | General / Sheet |
stylistic/no-extra-semicolonsDisallow extra semicolons. | yes | General / Sheet |
stylistic/no-missing-end-of-source-newlineDisallow missing end-of-source newlines. | yes | General / Sheet |
stylistic/unicode-bomRequire or disallow Unicode BOM. | no | General / Sheet |
All contributions are welcome, I will read all pull requests. For now, my focus will be to move all the rules to TS modules, and try to improve them.
The project uses yarn as a package manager. Once installed, clone the repository, and install the dependencies :
yarn reinstall
You will then be able to compile the library :
yarn build
Some examples are available in the examples folder as a playground zone.
FAQs
Plugin for endangered stylelint stylistic rules
The npm package stylelint-stylistic receives a total of 7,650 weekly downloads. As such, stylelint-stylistic popularity was classified as popular.
We found that stylelint-stylistic demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.