SkillAgentSearch skills...

Stylelint Stylistic

Plugin for endangered stylelint stylistic rules.

Install / Use

npx skills add elirasza/stylelint-stylistic

Installs into whichever agent you are using.

About this skill

Quality Score

0/100

Supported Platforms

Universal

README

This package has been deprecated in favor of @stylistic/stylelint-plugin

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.

stylelint-stylistic

main branch quality workflow latest tag release workflow NPM

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.

1. Getting started

Requirements

You will need stylelint 15.0.0 or higher as a peer dependency.

Installation

Install the package :

npm install stylelint-stylistic --save-dev

or

yarn add stylelint-stylistic --dev

Usage

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"
  ]
}

2. Rules

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-case<br />Specify lowercase or uppercase for hex colors. | yes | Color | | stylistic/function-comma-newline-after<br />Require a newline or disallow whitespace after the commas of functions. | yes | Function | | stylistic/function-comma-newline-before<br />Require a newline or disallow whitespace before the commas of functions. | yes | Function | | stylistic/function-comma-space-after<br />Require a single space or disallow whitespace after the commas of functions. | yes | Function | | stylistic/function-comma-space-before<br />Require a single space or disallow whitespace before the commas of functions. | yes | Function | | stylistic/function-max-empty-lines<br />Limit the number of adjacent empty lines within functions. | yes | Function | | stylistic/function-parentheses-newline-inside<br />Require a newline or disallow whitespace on the inside of the parentheses of functions. | yes | Function | | stylistic/function-parentheses-space-inside<br />Require a single space or disallow whitespace on the inside of the parentheses of functions. | yes | Function | | stylistic/function-whitespace-after<br />Require or disallow whitespace after functions. | yes | Function | | stylistic/number-leading-zero<br />Require or disallow a leading zero for fractional numbers less than 1. | yes | Number | | stylistic/number-no-trailing-zeros<br />Disallow trailing zeros in numbers. | yes | Number | | stylistic/string-quotes<br />Specify single or double quotes around strings. | yes | String | | stylistic/unit-case<br />Specify lowercase or uppercase for units. | yes | Unit | | stylistic/value-list-comma-newline-after<br />Require a newline or disallow whitespace after the commas of value lists. | yes | Value list | | stylistic/value-list-comma-newline-before<br />Require a newline or disallow whitespace before the commas of value lists. | no | Value list | | stylistic/value-list-comma-space-after<br />Require a single space or disallow whitespace after the commas of value lists. | yes | Value list | | stylistic/value-list-comma-space-before<br />Require a single space or disallow whitespace before the commas of value lists. | yes | Value list | | stylistic/value-list-max-empty-lines<br />Limit the number of adjacent empty lines within value lists. | yes | Value list | | stylistic/property-case<br />Specify lowercase or uppercase for properties. | yes | Property | | stylistic/declaration-bang-space-after<br />Require a single space or disallow whitespace after the bang of declarations. | yes | Declaration | | stylistic/declaration-bang-space-before<br />Require a single space or disallow whitespace before the bang of declarations. | yes | Declaration | | stylistic/declaration-colon-newline-after<br />Require a newline or disallow whitespace after the colon of declarations. | yes | Declaration | | stylistic/declaration-colon-space-after<br />Require a single space or disallow whitespace after the colon of declarations. | yes | Declaration | | stylistic/declaration-colon-space-before<br />Require a single space or disallow whitespace before the colon of declarations. | yes | Declaration | | stylistic/declaration-block-semicolon-newline-after<br />Require a newline or disallow whitespace after the semicolons of declaration blocks. | yes | Declaration block | | [stylistic/declaration-block-semicolon-newline-before](./lib/rules/declarati

Related Skills

View on GitHub
GitHub Stars63
CategoryDevelopment
Updated1y ago
Forks3

Languages

JavaScript

Security Score

65/100

Audited on Dec 19, 2024

No findings