diff --git a/.circleci/config.yml b/.circleci/config.yml index e2f87a0..e18847d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: - codacy: codacy/base@12.1.3 + codacy: codacy/base@12.2.0 codacy_plugins_test: codacy/plugins-test@2.0.11 workflows: @@ -11,8 +11,8 @@ workflows: write_sbt_version: true - codacy/sbt: name: publish_docker_local - openjdk_version: "11" - install_sbt_version: "1.10.0" + openjdk_version: "17" + install_sbt_version: "1.10.1" cmd: | sbt "scalafmtCheckAll; scalafmtSbtCheck; diff --git a/.gitignore b/.gitignore index 8d0c405..c192128 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,7 @@ project/metals.sbt node_modules/ .stylelint-version .vscode/ + + +#Ignore vscode AI rules +.github/copilot-instructions.md diff --git a/Dockerfile b/Dockerfile index 0590e4a..82d1c94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:lts-alpine3.20 +FROM node:lts-alpine3.22 WORKDIR /workdir diff --git a/build.sbt b/build.sbt index 6f527a4..b533cf1 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ ThisBuild / scalaVersion := "2.13.13" ThisBuild / libraryDependencies ++= Seq( - "com.codacy" %% "codacy-engine-scala-seed" % "6.1.3", + "com.codacy" %% "codacy-engine-scala-seed" % "6.1.5", "com.github.pathikrit" %% "better-files" % "3.9.2") name := "codacy-stylelint" diff --git a/docs/description/alpha-value-notation.md b/docs/description/alpha-value-notation.md index 23a7150..397837d 100644 --- a/docs/description/alpha-value-notation.md +++ b/docs/description/alpha-value-notation.md @@ -9,18 +9,20 @@ Specify percentage or number notation for alpha-values. * This notation */ ``` -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"number"|"percentage"` - ### `"number"` Alpha-values _must always_ use the number notation. +```json +{ + "alpha-value-notation": "number" +} +``` + The following patterns are considered problems: @@ -49,6 +51,12 @@ a { color: rgb(0 0 0 / 0.5) } Alpha-values _must always_ use percentage notation. +```json +{ + "alpha-value-notation": "percentage" +} +``` + The following patterns are considered problems: @@ -75,16 +83,20 @@ a { color: rgb(0 0 0 / 50%) } ## Optional secondary options -### `exceptProperties: ["/regex/", /regex/, "string"]` +### `exceptProperties` -Reverse the primary option for matching properties. +```json +{ "exceptProperties": ["array", "of", "properties", "/regex/"] } +``` -For example with `"percentage"`. +Reverse the primary option for matching properties. Given: ```json -["opacity"] +{ + "alpha-value-notation": ["percentage", { "exceptProperties": ["opacity"] }] +} ``` The following patterns are considered problems: diff --git a/docs/description/annotation-no-unknown.md b/docs/description/annotation-no-unknown.md index e7b9954..e94d183 100644 --- a/docs/description/annotation-no-unknown.md +++ b/docs/description/annotation-no-unknown.md @@ -11,12 +11,16 @@ a { color: green !imprtant; } This rule considers annotations defined in the CSS Specifications, up to and including Editor's Drafts, to be known. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "annotation-no-unknown": true +} +``` + The following pattern is considered a problem: @@ -37,12 +41,21 @@ a { ## Optional secondary options -### `ignoreAnnotations: ["/regex/", /regex/, "string"]` +### `ignoreAnnotations` + +```json +{ "ignoreAnnotations": ["array", "of", "annotations", "/regex/"] } +``` Given: ```json -["/^--foo-/", "--bar"] +{ + "annotation-no-unknown": [ + true, + { "ignoreAnnotations": ["/^--foo-/", "--bar"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/at-rule-allowed-list.md b/docs/description/at-rule-allowed-list.md index 57610f1..83619bf 100644 --- a/docs/description/at-rule-allowed-list.md +++ b/docs/description/at-rule-allowed-list.md @@ -11,16 +11,20 @@ Specify a list of allowed at-rules. This rule ignores the `@charset` rule. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string`: `["array", "of", "unprefixed", "at-rules"]|"at-rule"` +### `Array` + +```json +["array", "of", "unprefixed", "at-rules"] +``` Given: ```json -["extend", "keyframes"] +{ + "at-rule-allowed-list": ["extend", "keyframes"] +} ``` The following patterns are considered problems: diff --git a/docs/description/at-rule-descriptor-no-unknown.md b/docs/description/at-rule-descriptor-no-unknown.md index dfe060f..4d2ae3c 100644 --- a/docs/description/at-rule-descriptor-no-unknown.md +++ b/docs/description/at-rule-descriptor-no-unknown.md @@ -17,11 +17,9 @@ You can filter the [CSSTree Syntax Reference](https://csstree.github.io/docs/syn This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as SCSS or Less. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +This rule checks descriptors within at-rules. To check properties, you can use the [`property-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/property-no-unknown/README.md) rule. -This rule checks descriptors within at-rules. To check properties, you can use the [`property-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/property-no-unknown/README.md) rule. - -For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#languageoptions) section. +For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/configure.md#languageoptions) section. Prior art: @@ -31,6 +29,12 @@ Prior art: ### `true` +```json +{ + "at-rule-descriptor-no-unknown": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/at-rule-descriptor-value-no-unknown.md b/docs/description/at-rule-descriptor-value-no-unknown.md index 5015c63..efe3d78 100644 --- a/docs/description/at-rule-descriptor-value-no-unknown.md +++ b/docs/description/at-rule-descriptor-value-no-unknown.md @@ -17,21 +17,19 @@ You can filter the [CSSTree Syntax Reference](https://csstree.github.io/docs/syn This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as SCSS or Less. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - -This rule checks descriptor values within at-rules. You can use [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/declaration-property-value-no-unknown/README.md) to disallow unknown values for properties within declarations, and [`at-rule-descriptor-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/at-rule-descriptor-no-unknown/README.md) to disallow unknown descriptors for at-rules. +This rule checks descriptor values within at-rules. You can use [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/declaration-property-value-no-unknown/README.md) to disallow unknown values for properties within declarations, and [`at-rule-descriptor-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/at-rule-descriptor-no-unknown/README.md) to disallow unknown descriptors for at-rules. This rule overlaps with: -- [`color-no-invalid-hex`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/color-no-invalid-hex/README.md) -- [`function-linear-gradient-no-nonstandard-direction`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/function-linear-gradient-no-nonstandard-direction/README.md) -- [`function-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/function-no-unknown/README.md) -- [`string-no-newline`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/string-no-newline/README.md) -- [`unit-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/unit-no-unknown/README.md) +- [`color-no-invalid-hex`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/color-no-invalid-hex/README.md) +- [`function-linear-gradient-no-nonstandard-direction`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/function-linear-gradient-no-nonstandard-direction/README.md) +- [`function-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/function-no-unknown/README.md) +- [`string-no-newline`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/string-no-newline/README.md) +- [`unit-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/unit-no-unknown/README.md) You can either turn off the rules or configure them to ignore the overlaps. -For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#languageoptions) section. +For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/configure.md#languageoptions) section. Prior art: @@ -41,6 +39,12 @@ Prior art: ### `true` +```json +{ + "at-rule-descriptor-value-no-unknown": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/at-rule-disallowed-list.md b/docs/description/at-rule-disallowed-list.md index b50677f..c3df9d0 100644 --- a/docs/description/at-rule-disallowed-list.md +++ b/docs/description/at-rule-disallowed-list.md @@ -11,16 +11,20 @@ Specify a list of disallowed at-rules. This rule ignores the `@charset` rule. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string`: `["array", "of", "unprefixed", "at-rules"]|"at-rule"` +### `Array` + +```json +["array", "of", "unprefixed", "at-rules"] +``` Given: ```json -["extend", "keyframes"] +{ + "at-rule-disallowed-list": ["extend", "keyframes"] +} ``` The following patterns are considered problems: diff --git a/docs/description/at-rule-empty-line-before.md b/docs/description/at-rule-empty-line-before.md index 89e3512..87d4da7 100644 --- a/docs/description/at-rule-empty-line-before.md +++ b/docs/description/at-rule-empty-line-before.md @@ -17,16 +17,20 @@ This rule ignores: - the `@charset` rule - `@import` in Less -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"always"|"never"` - ### `"always"` There _must always_ be an empty line before at-rules. +```json +{ + "at-rule-empty-line-before": "always" +} +``` + The following patterns are considered problems: @@ -53,6 +57,12 @@ a {} There _must never_ be an empty line before at-rules. +```json +{ + "at-rule-empty-line-before": "never" +} +``` + The following patterns are considered problems: @@ -77,7 +87,11 @@ a {} ## Optional secondary options -### `except: ["after-same-name", "inside-block", "blockless-after-same-name-blockless", "blockless-after-blockless", "first-nested"]` +### `except` + +```json +{ "except": ["array", "of", "options"] } +``` #### `"after-same-name"` @@ -85,7 +99,13 @@ Reverse the primary option for at-rules that follow another at-rule with the sam This means that you can group your at-rules by name. -For example, with `"always"`: +Given: + +```json +{ + "at-rule-empty-line-before": ["always", { "except": ["after-same-name"] }] +} +``` The following patterns are _not_ considered problems: @@ -114,7 +134,13 @@ a { Reverse the primary option for at-rules that are inside a block. -For example, with `"always"`: +Given: + +```json +{ + "at-rule-empty-line-before": ["always", { "except": ["inside-block"] }] +} +``` The following patterns are considered problems: @@ -156,7 +182,16 @@ This means that you can group your blockless at-rules by name. Shared-line comments do not affect this option. -For example, with `"always"`: +Given: + +```json +{ + "at-rule-empty-line-before": [ + "always", + { "except": ["blockless-after-same-name-blockless"] } + ] +} +``` The following patterns are _not_ considered problems: @@ -194,7 +229,16 @@ Reverse the primary option for blockless at-rules that follow another blockless Shared-line comments do not affect this option. -For example, with `"always"`: +Given: + +```json +{ + "at-rule-empty-line-before": [ + "always", + { "except": ["blockless-after-blockless"] } + ] +} +``` The following patterns are considered problems: @@ -229,7 +273,13 @@ The following patterns are _not_ considered problems: Reverse the primary option for at-rules that are nested and the first child of their parent node. -For example, with `"always"`: +Given: + +```json +{ + "at-rule-empty-line-before": ["always", { "except": ["first-nested"] }] +} +``` The following patterns are considered problems: @@ -263,7 +313,11 @@ b { } ``` -### `ignore: ["after-comment", "first-nested", "inside-block", "blockless-after-same-name-blockless", "blockless-after-blockless"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` #### `"after-comment"` @@ -271,6 +325,14 @@ Ignore at-rules that follow a comment. Shared-line comments do not trigger this option. +Given: + +```json +{ + "at-rule-empty-line-before": ["always", { "ignore": ["after-comment"] }] +} +``` + The following patterns are _not_ considered problems: @@ -297,7 +359,13 @@ The following patterns are _not_ considered problems: Ignore at-rules that are nested and the first child of their parent node. -For example, with `"always"`: +Given: + +```json +{ + "at-rule-empty-line-before": ["always", { "ignore": ["first-nested"] }] +} +``` The following patterns are _not_ considered problems: @@ -314,7 +382,13 @@ The following patterns are _not_ considered problems: Ignore at-rules that are inside a block. -For example, with `"always"`: +Given: + +```json +{ + "at-rule-empty-line-before": ["always", { "ignore": ["inside-block"] }] +} +``` The following patterns are _not_ considered problems: @@ -349,7 +423,16 @@ Ignore blockless at-rules that follow another blockless at-rule with the same na This means that you can group your blockless at-rules by name. -For example, with `"always"`: +Given: + +```json +{ + "at-rule-empty-line-before": [ + "always", + { "ignore": ["blockless-after-same-name-blockless"] } + ] +} +``` The following patterns are _not_ considered problems: @@ -378,7 +461,16 @@ a { Ignore blockless at-rules that follow another blockless at-rule. -For example, with `"always"`: +Given: + +```json +{ + "at-rule-empty-line-before": [ + "always", + { "ignore": ["blockless-after-blockless"] } + ] +} +``` The following patterns are _not_ considered problems: @@ -399,16 +491,23 @@ The following patterns are _not_ considered problems: @media print {} ``` -### `ignoreAtRules: ["/regex/", /regex/, "string"]` +### `ignoreAtRules` -Ignore specified at-rules. +```json +{ "ignoreAtRules": ["array", "of", "at-rules", "/regex/"] } +``` -For example, with `"always"`. +Ignore specified at-rules. Given: ```json -["namespace", "/^my-/"] +{ + "at-rule-empty-line-before": [ + "always", + { "ignoreAtRules": ["namespace", "/^my-/"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/at-rule-no-deprecated.md b/docs/description/at-rule-no-deprecated.md index 8f9753c..2862596 100644 --- a/docs/description/at-rule-no-deprecated.md +++ b/docs/description/at-rule-no-deprecated.md @@ -17,9 +17,7 @@ This rule flags at-rules that were removed or deprecated after being in the CSS - polyfilled with some adoption before any browser actually shipped - had an MDN page at one point in time -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) accept arguments. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule. Prior art: @@ -30,6 +28,12 @@ Prior art: ### `true` +```json +{ + "at-rule-no-deprecated": true +} +``` + The following patterns are considered problems: @@ -56,12 +60,18 @@ a { @layer {} } ## Optional secondary options -### `ignoreAtRules: ["/regex/", /regex/, "string"]` +### `ignoreAtRules` + +```json +{ "ignoreAtRules": ["array", "of", "at-rules", "/regex/"] } +``` Given: ```json -["/^view/", "apply"] +{ + "at-rule-no-deprecated": [true, { "ignoreAtRules": ["/^view/", "apply"] }] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/at-rule-no-unknown.md b/docs/description/at-rule-no-unknown.md index 5bb45f5..efa400d 100644 --- a/docs/description/at-rule-no-unknown.md +++ b/docs/description/at-rule-no-unknown.md @@ -11,14 +11,18 @@ Disallow unknown at-rules. This rule considers at-rules defined in the CSS Specifications, up to and including Editor's Drafts, to be known. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - -For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#languageoptions) section. +For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/configure.md#languageoptions) section. ## Options ### `true` +```json +{ + "at-rule-no-unknown": true +} +``` + The following patterns are considered problems: @@ -42,12 +46,18 @@ The following patterns are _not_ considered problems: ## Optional secondary options -### `ignoreAtRules: ["/regex/", /regex/, "string"]` +### `ignoreAtRules` + +```json +{ "ignoreAtRules": ["array", "of", "at-rules", "/regex/"] } +``` Given: ```json -["/^--my-/", "--custom"] +{ + "at-rule-no-unknown": [true, { "ignoreAtRules": ["/^--my-/", "--custom"] }] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/at-rule-no-vendor-prefix.md b/docs/description/at-rule-no-vendor-prefix.md index 28d42c7..69c0432 100644 --- a/docs/description/at-rule-no-vendor-prefix.md +++ b/docs/description/at-rule-no-vendor-prefix.md @@ -11,14 +11,18 @@ Disallow vendor prefixes for at-rules. This rule ignores non-standard vendor-prefixed at-rules that aren't handled by [Autoprefixer](https://github.com/postcss/autoprefixer). -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. However, it will not remove duplicate at-rules produced when the prefixes are removed. You can use [Autoprefixer](https://github.com/postcss/autoprefixer) itself, with the [`add` option off and the `remove` option on](https://github.com/postcss/autoprefixer#options), in these situations. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. However, it will not remove duplicate at-rules produced when the prefixes are removed. You can use [Autoprefixer](https://github.com/postcss/autoprefixer) itself, with the [`add` option off and the `remove` option on](https://github.com/postcss/autoprefixer#options), in these situations. ## Options ### `true` +```json +{ + "at-rule-no-vendor-prefix": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/at-rule-prelude-no-invalid.md b/docs/description/at-rule-prelude-no-invalid.md index 4d6d70d..3456db7 100644 --- a/docs/description/at-rule-prelude-no-invalid.md +++ b/docs/description/at-rule-prelude-no-invalid.md @@ -15,17 +15,15 @@ You can filter the [CSSTree Syntax Reference](https://csstree.github.io/docs/syn This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as SCSS or Less. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - This rule overlaps with: -- [`media-query-no-invalid`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/media-query-no-invalid/README.md) -- [`string-no-newline`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/string-no-newline/README.md) -- [`unit-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/unit-no-unknown/README.md) +- [`media-query-no-invalid`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/media-query-no-invalid/README.md) +- [`string-no-newline`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/string-no-newline/README.md) +- [`unit-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/unit-no-unknown/README.md) You can either turn off the rules or configure them to ignore the overlaps. -For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#languageoptions) section. +For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/configure.md#languageoptions) section. Prior art: @@ -35,6 +33,12 @@ Prior art: ### `true` +```json +{ + "at-rule-prelude-no-invalid": true +} +``` + The following patterns are considered problems: @@ -59,14 +63,23 @@ The following patterns are _not_ considered problems: @font-palette-values --foo {} ``` -## Secondary Options +## Optional secondary options -### `ignoreAtRules: ["/regex/", /regex/, "string"]` +### `ignoreAtRules` + +```json +{ "ignoreAtRules": ["array", "of", "at-rules", "/regex/"] } +``` Given: ```json -["property", "/^font-/"] +{ + "at-rule-prelude-no-invalid": [ + true, + { "ignoreAtRules": ["property", "/^font-/"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/at-rule-property-required-list.md b/docs/description/at-rule-property-required-list.md index 6bd1752..70f4df7 100644 --- a/docs/description/at-rule-property-required-list.md +++ b/docs/description/at-rule-property-required-list.md @@ -9,17 +9,21 @@ Specify a list of required properties (or descriptors) for an at-rule. * At-rule and required descriptor names */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`object`: `{ "at-rule-name": ["array", "of", "properties or descriptors"]|"property or descriptor" }` +### `Array` + +```json +{ "at-rule-name": ["array", "of", "properties", "or", "descriptors"] } +``` Given: ```json { - "font-face": ["font-display", "font-family", "font-style"] + "at-rule-property-required-list": { + "font-face": ["font-display", "font-family", "font-style"] + } } ``` diff --git a/docs/description/block-no-empty.md b/docs/description/block-no-empty.md index 5a257d1..4facac9 100644 --- a/docs/description/block-no-empty.md +++ b/docs/description/block-no-empty.md @@ -13,6 +13,12 @@ Disallow empty blocks. ### `true` +```json +{ + "block-no-empty": true +} +``` + The following patterns are considered problems: @@ -52,10 +58,22 @@ a { ## Optional secondary options -### `ignore: ["comments"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` + +#### `"comments"` Exclude comments from being treated as content inside of a block. +```json +{ + "block-no-empty": [true, { "ignore": ["comments"] }] +} +``` + The following patterns are considered problems: diff --git a/docs/description/block-no-redundant-nested-style-rules.md b/docs/description/block-no-redundant-nested-style-rules.md new file mode 100644 index 0000000..4771cf5 --- /dev/null +++ b/docs/description/block-no-redundant-nested-style-rules.md @@ -0,0 +1,49 @@ +# block-no-redundant-nested-style-rules + +Disallow redundant nested style rules within blocks. + + +```css +a { & { color: red; } } +/** ↑ + * This nested style rule */ +``` + +## Options + +### `true` + +```json +{ + "block-no-redundant-nested-style-rules": true +} +``` + +The following patterns are considered problems: + + +```css +a { & { color: red; } } +``` + + +```css +a { @media all { & { color: red; } } } +``` + +The following patterns are _not_ considered problems: + + +```css +a { color: red; } +``` + + +```css +a { @media all { color: red; } } +``` + + +```css +a { &.foo { color: red; } } +``` diff --git a/docs/description/color-function-alias-notation.md b/docs/description/color-function-alias-notation.md new file mode 100644 index 0000000..4133f19 --- /dev/null +++ b/docs/description/color-function-alias-notation.md @@ -0,0 +1,84 @@ +# color-function-alias-notation + +Specify alias notation for color-functions. + + +```css + a { color: rgb(0 0 0 / 0.2) } +/** ↑ + * This notation */ +``` + +Color functions `rgb()` and `hsl()` have aliases `rgba()` and `hsla()`. Those are exactly equivalent, and [it's preferable](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb) to use the first variant without `a`. + +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. + +## Options + +### `"without-alpha"` + +Applicable color-functions _must always_ use the without alpha notation. + +```json +{ + "color-function-alias-notation": "without-alpha" +} +``` + +The following patterns are considered problems: + + +```css +a { color: rgba(0 0 0) } +``` + + +```css +a { color: hsla(270 60% 50% / 15%) } +``` + +The following patterns are _not_ considered problems: + + +```css +a { color: rgb(0 0 0) } +``` + + +```css +a { color: hsl(270 60% 50% / 15%) } +``` + +### `"with-alpha"` + +Applicable color-functions _must always_ use with alpha notation. + +```json +{ + "color-function-alias-notation": "with-alpha" +} +``` + +The following patterns are considered problems: + + +```css +a { color: rgb(0 0 0) } +``` + + +```css +a { color: hsl(270 60% 50% / 15%) } +``` + +The following patterns are _not_ considered problems: + + +```css +a { color: rgba(0 0 0) } +``` + + +```css +a { color: hsla(270 60% 50% / 15%) } +``` diff --git a/docs/description/color-function-notation.md b/docs/description/color-function-notation.md index fc6639a..6f6ca7d 100644 --- a/docs/description/color-function-notation.md +++ b/docs/description/color-function-notation.md @@ -13,18 +13,20 @@ Modern color-functions use a comma-free syntax because functions in CSS are used For legacy reasons, `rgb()` and `hsl()` also supports an alternate syntax that separates all of its arguments with commas. Also for legacy reasons, the `rgba()` and `hsla()` functions exist using the same comma-based syntax. -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule when the primary option is `"modern"`. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule when the primary option is `"modern"`. ## Options -`string`: `"modern"|"legacy"` - ### `"modern"` Applicable color-functions _must always_ use modern notation. +```json +{ + "color-function-notation": "modern" +} +``` + The following patterns are considered problems: @@ -73,6 +75,12 @@ a { color: hsl(.75turn 60% 70%) } Applicable color-functions _must always_ use the legacy notation. +```json +{ + "color-function-notation": "legacy" +} +``` + The following patterns are considered problems: @@ -119,14 +127,22 @@ a { color: hsl(.75turn, 60%, 70%) } ## Optional secondary options -### `ignore: ["with-var-inside"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` + +#### `"with-var-inside"` Ignore color functions containing variables. Given: ```json -["modern", { "ignore": ["with-var-inside"] }] +{ + "color-function-notation": ["modern", { "ignore": ["with-var-inside"] }] +} ``` The following patterns are _not_ considered problems: @@ -140,7 +156,9 @@ a { Given: ```json -["legacy", { "ignore": ["with-var-inside"] }] +{ + "color-function-notation": ["legacy", { "ignore": ["with-var-inside"] }] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/color-hex-alpha.md b/docs/description/color-hex-alpha.md index 99ef206..4884a32 100644 --- a/docs/description/color-hex-alpha.md +++ b/docs/description/color-hex-alpha.md @@ -9,14 +9,16 @@ a { color: #fffa } * This alpha channel */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`string`: `"always"|"never"` - ### `"always"` +```json +{ + "color-hex-alpha": "always" +} +``` + The following patterns are considered problems: @@ -43,6 +45,12 @@ a { color: #ffffffaa; } ### `"never"` +```json +{ + "color-hex-alpha": "never" +} +``` + The following patterns are considered problems: diff --git a/docs/description/color-hex-length.md b/docs/description/color-hex-length.md index d506583..6d3f804 100644 --- a/docs/description/color-hex-length.md +++ b/docs/description/color-hex-length.md @@ -9,16 +9,18 @@ a { color: #fff } * This hex color */ ``` -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"short"|"long"` - ### `"short"` +```json +{ + "color-hex-length": "short" +} +``` + The following patterns are considered problems: @@ -50,6 +52,12 @@ a { color: #a4a4a4; } ### `"long"` +```json +{ + "color-hex-length": "long" +} +``` + The following patterns are considered problems: diff --git a/docs/description/color-named.md b/docs/description/color-named.md index 79049ee..55b45f1 100644 --- a/docs/description/color-named.md +++ b/docs/description/color-named.md @@ -13,12 +13,16 @@ This rule ignores `$sass` and `@less` variable syntaxes. ## Options -`string`: `"always-where-possible"|"never"` - ### `"always-where-possible"` Colors _must always_, where possible, be named. +```json +{ + "color-named": "always-where-possible" +} +``` + This will complain if a hex (3, 4, 6 and 8 digit), `rgb()`, `rgba()`, `hsl()`, `hsla()`, `hwb()` or `gray()` color can be represented as a named color. The following patterns are considered problems: @@ -89,6 +93,12 @@ a { color: rgb(0, 0, 0, 0.5); } Colors _must never_ be named. +```json +{ + "color-named": "never" +} +``` + The following patterns are considered problems: @@ -120,11 +130,23 @@ a { color: var(--white); } ## Optional secondary options -### `ignore: ["inside-function"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` + +#### `"inside-function"` Ignore colors that are inside a function. -For example, with `"never"`. +Given: + +```json +{ + "color-named": ["never", { "ignore": ["inside-function"] }] +} +``` The following patterns are _not_ considered problems: @@ -142,14 +164,18 @@ a { } ``` -### `ignoreProperties: ["/regex/", /regex/, "string"]` +### `ignoreProperties` -For example with `"never"`. +```json +{ "ignoreProperties": ["array", "of", "properties", "/regex/"] } +``` Given: ```json -["/^my-/", "composes"] +{ + "color-named": ["never", { "ignoreProperties": ["/^my-/", "composes"] }] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/color-no-hex.md b/docs/description/color-no-hex.md index 4e050aa..24612aa 100644 --- a/docs/description/color-no-hex.md +++ b/docs/description/color-no-hex.md @@ -9,12 +9,16 @@ a { color: #333 } * This hex color */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "color-no-hex": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/color-no-invalid-hex.md b/docs/description/color-no-invalid-hex.md index 52fc529..ea85910 100644 --- a/docs/description/color-no-invalid-hex.md +++ b/docs/description/color-no-invalid-hex.md @@ -11,12 +11,10 @@ a { color: #y3 } Longhand hex colors can be either 6 or 8 (with alpha channel) hexadecimal characters. And their shorthand variants are 3 and 4 characters respectively. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - This rule overlaps with: -- [`at-rule-descriptor-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/at-rule-descriptor-value-no-unknown/README.md) -- [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/declaration-property-value-no-unknown/README.md) +- [`at-rule-descriptor-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/at-rule-descriptor-value-no-unknown/README.md) +- [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/declaration-property-value-no-unknown/README.md) We recommend using these rules for CSS and this rule for CSS-like languages, such as SCSS and Less. @@ -24,6 +22,12 @@ We recommend using these rules for CSS and this rule for CSS-like languages, suc ### `true` +```json +{ + "color-no-invalid-hex": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/comment-empty-line-before.md b/docs/description/comment-empty-line-before.md index 6be930a..dfee8ec 100644 --- a/docs/description/comment-empty-line-before.md +++ b/docs/description/comment-empty-line-before.md @@ -18,16 +18,20 @@ This rule ignores: - single-line comments with `//` (when you're using a custom syntax that supports them) - comments within selector and value lists -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"always"|"never"` - ### `"always"` There _must always_ be an empty line before comments. +```json +{ + "comment-empty-line-before": "always" +} +``` + The following patterns are considered problems: @@ -54,6 +58,12 @@ a {} /* comment */ There _must never_ be an empty line before comments. +```json +{ + "comment-empty-line-before": "never" +} +``` + The following patterns are considered problems: @@ -78,11 +88,23 @@ a {} /* comment */ ## Optional secondary options -### `except: ["first-nested"]` +### `except` + +```json +{ "except": ["array", "of", "options"] } +``` + +#### `"first-nested"` Reverse the primary option for comments that are nested and the first child of their parent node. -For example, with `"always"`: +Given: + +```json +{ + "comment-empty-line-before": ["always", { "except": ["first-nested"] }] +} +``` The following patterns are considered problems: @@ -105,13 +127,23 @@ a { } ``` -### `ignore: ["after-comment", "stylelint-commands"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` #### `"after-comment"` Ignore comments that follow another comment. -For example, with `"always"`: +Given: + +```json +{ + "comment-empty-line-before": ["always", { "ignore": ["after-comment"] }] +} +``` The following patterns are _not_ considered problems: @@ -142,7 +174,13 @@ a { Ignore configuration comments, e.g. `/* stylelint-disable color-no-hex */`. -For example, with `"always"`: +Given: + +```json +{ + "comment-empty-line-before": ["always", { "ignore": ["stylelint-commands"] }] +} +``` The following patterns are considered problems: @@ -166,14 +204,23 @@ a { } ``` -### `ignoreComments: ["/regex/", /regex/, "string"]` +### `ignoreComments` + +```json +{ "ignoreComments": ["array", "of", "comments", "/regex/"] } +``` Ignore comments matching the given regular expressions or strings. -For example, with `"always"` and given: +Given: ```json -["/^ignore/", "string-ignore"] +{ + "comment-empty-line-before": [ + "always", + { "ignoreComments": ["/^ignore/", "string-ignore"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/comment-no-empty.md b/docs/description/comment-no-empty.md index edea0a8..544f48f 100644 --- a/docs/description/comment-no-empty.md +++ b/docs/description/comment-no-empty.md @@ -18,6 +18,12 @@ This rule ignores SCSS-like comments. ### `true` +```json +{ + "comment-no-empty": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/comment-pattern.md b/docs/description/comment-pattern.md index 55965ed..d767d26 100644 --- a/docs/description/comment-pattern.md +++ b/docs/description/comment-pattern.md @@ -9,18 +9,18 @@ Specify a pattern for comments. * The pattern of this */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`regex|string` +### `string` -A string will be translated into a RegExp like so `new RegExp(yourString)` — so be sure to escape properly. +Specify a regex string not surrounded with `"/"`. -Given the string: +Given: ```json -"foo .+" +{ + "comment-pattern": "foo .+" +} ``` The following patterns are considered problems: diff --git a/docs/description/comment-whitespace-inside.md b/docs/description/comment-whitespace-inside.md index 421c7d9..b031a54 100644 --- a/docs/description/comment-whitespace-inside.md +++ b/docs/description/comment-whitespace-inside.md @@ -14,16 +14,20 @@ Any number of asterisks are allowed at the beginning or end of the comment. So ` > [!WARNING] > Comments within _selector and value lists_ are currently ignored. -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"always"|"never"` - ### `"always"` There _must always_ be whitespace inside the markers. +```json +{ + "comment-whitespace-inside": "always" +} +``` + The following patterns are considered problems: @@ -70,6 +74,12 @@ The following patterns are _not_ considered problems: There _must never_ be whitespace on the inside the markers. +```json +{ + "comment-whitespace-inside": "never" +} +``` + The following patterns are considered problems: diff --git a/docs/description/comment-word-disallowed-list.md b/docs/description/comment-word-disallowed-list.md index 7a519bf..96ffebf 100644 --- a/docs/description/comment-word-disallowed-list.md +++ b/docs/description/comment-word-disallowed-list.md @@ -12,18 +12,20 @@ Specify a list of disallowed words within comments. > [!WARNING] > Comments within _selector and value lists_ are currently ignored. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string|regexp`: `["array", "of", "words", /or/, "/regex/"]|"word"|"/regex/"|/regex/` +### `Array` -If a string is surrounded with `"/"` (e.g. `"/^TODO:/"`), it is interpreted as a regular expression. +```json +["array", "of", "words", "/regex/"] +``` Given: ```json -["/^TODO:/", "badword"] +{ + "comment-word-disallowed-list": ["/^TODO:/", "badword"] +} ``` The following patterns are considered problems: diff --git a/docs/description/container-name-pattern.md b/docs/description/container-name-pattern.md new file mode 100644 index 0000000..0796bbd --- /dev/null +++ b/docs/description/container-name-pattern.md @@ -0,0 +1,58 @@ +# container-name-pattern + +Specify a pattern for container names. + + +```css +@container foo (width > 400px) {} +/** ↑ + * The pattern of this */ +``` + +## Options + +### `string` + +Specify a regex string not surrounded with `"/"`. + +Given: + +```json +{ + "container-name-pattern": "foo-.+" +} +``` + +The following patterns are considered problems: + + +```css +@container foo {} +``` + + +```css +a { container-name: bar; } +``` + + +```css +a { container: baz / inline-size; } +``` + +The following patterns are _not_ considered problems: + + +```css +@container foo-bar {} +``` + + +```css +a { container-name: foo-bar; } +``` + + +```css +a { container: foo-baz / inline-size; } +``` diff --git a/docs/description/custom-media-pattern.md b/docs/description/custom-media-pattern.md index ba47903..273a39e 100644 --- a/docs/description/custom-media-pattern.md +++ b/docs/description/custom-media-pattern.md @@ -9,18 +9,18 @@ Specify a pattern for custom media query names. * The pattern of this */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`regex|string` +### `string` -A string will be translated into a RegExp like so `new RegExp(yourString)` — so be sure to escape properly. +Specify a regex string not surrounded with `"/"`. -Given the string: +Given: ```json -"foo-.+" +{ + "custom-media-pattern": "foo-.+" +} ``` The following patterns are considered problems: diff --git a/docs/description/custom-property-empty-line-before.md b/docs/description/custom-property-empty-line-before.md index 3c47c9a..594b73e 100644 --- a/docs/description/custom-property-empty-line-before.md +++ b/docs/description/custom-property-empty-line-before.md @@ -13,14 +13,18 @@ a { * This line */ ``` -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"always"|"never"` - ### `"always"` +```json +{ + "custom-property-empty-line-before": "always" +} +``` + The following patterns are considered problems: @@ -47,6 +51,12 @@ a { ### `"never"` +```json +{ + "custom-property-empty-line-before": "never" +} +``` + The following patterns are considered problems: @@ -90,7 +100,11 @@ a { ## Optional secondary options -### `except: ["after-comment", "after-custom-property", "first-nested"]` +### `except` + +```json +{ "except": ["array", "of", "options"] } +``` #### `"after-comment"` @@ -98,7 +112,16 @@ Reverse the primary option for custom properties that follow a comment. Shared-line comments do not trigger this option. -For example, with `"always"`: +Given: + +```json +{ + "custom-property-empty-line-before": [ + "always", + { "except": ["after-comment"] } + ] +} +``` The following patterns are considered problems: @@ -150,7 +173,16 @@ Reverse the primary option for custom properties that follow another custom prop Shared-line comments do not affect this option. -For example, with `"always"`: +Given: + +```json +{ + "custom-property-empty-line-before": [ + "always", + { "except": ["after-custom-property"] } + ] +} +``` The following patterns are considered problems: @@ -198,7 +230,16 @@ a { Reverse the primary option for custom properties that are nested and the first child of their parent node. -For example, with `"always"`: +Given: + +```json +{ + "custom-property-empty-line-before": [ + "always", + { "except": ["first-nested"] } + ] +} +``` The following patterns are considered problems: @@ -223,13 +264,26 @@ a { } ``` -### `ignore: ["after-comment", "first-nested", "inside-single-line-block"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` #### `"after-comment"` Ignore custom properties that follow a comment. -For example, with `"always"`: +Given: + +```json +{ + "custom-property-empty-line-before": [ + "always", + { "ignore": ["after-comment"] } + ] +} +``` The following patterns are _not_ considered problems: @@ -241,11 +295,46 @@ a { } ``` +#### `"after-custom-property"` + +Ignore custom properties that follow another custom property. + +Given: + +```json +{ + "custom-property-empty-line-before": [ + "always", + { "ignore": ["after-custom-property"] } + ] +} +``` + +The following patterns are _not_ considered problems: + + +```css +a { + + --foo: pink; + --bar: red; +} +``` + #### `"first-nested"` Ignore custom properties that are nested and the first child of their parent node. -For example, with `"always"`: +Given: + +```json +{ + "custom-property-empty-line-before": [ + "always", + { "ignore": ["first-nested"] } + ] +} +``` The following patterns are _not_ considered problems: @@ -262,7 +351,16 @@ a { Ignore custom properties that are inside single-line blocks. -For example, with `"always"`: +Given: + +```json +{ + "custom-property-empty-line-before": [ + "always", + { "ignore": ["inside-single-line-block"] } + ] +} +``` The following patterns are _not_ considered problems: diff --git a/docs/description/custom-property-no-missing-var-function.md b/docs/description/custom-property-no-missing-var-function.md index 549fe95..9132ee7 100644 --- a/docs/description/custom-property-no-missing-var-function.md +++ b/docs/description/custom-property-no-missing-var-function.md @@ -15,12 +15,16 @@ This rule has the following limitations: - It only reports custom properties that are defined within the same source. - It does not check properties that can contain author-defined identifiers, e.g. `transition-property`. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "custom-property-no-missing-var-function": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/custom-property-pattern.md b/docs/description/custom-property-pattern.md index 6dea7bc..b198db2 100644 --- a/docs/description/custom-property-pattern.md +++ b/docs/description/custom-property-pattern.md @@ -9,18 +9,18 @@ a { --foo-: 1px; } * The pattern of this */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`regex|string` +### `string` -A string will be translated into a RegExp like so `new RegExp(yourString)` — so be sure to escape properly. +Specify a regex string not surrounded with `"/"`. -Given the string: +Given: ```json -"foo-.+" +{ + "custom-property-pattern": "foo-.+" +} ``` The following patterns are considered problems: diff --git a/docs/description/declaration-block-no-duplicate-custom-properties.md b/docs/description/declaration-block-no-duplicate-custom-properties.md index 5e3e7cc..646a599 100644 --- a/docs/description/declaration-block-no-duplicate-custom-properties.md +++ b/docs/description/declaration-block-no-duplicate-custom-properties.md @@ -11,12 +11,16 @@ a { --custom-property: pink; --custom-property: orange; } This rule is case-sensitive. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "declaration-block-no-duplicate-custom-properties": true +} +``` + The following patterns are considered problems: @@ -43,14 +47,23 @@ a { --custom-property: pink; --cUstOm-prOpErtY: orange; } ## Optional secondary options -### `ignoreProperties: ["/regex/", /regex/, "non-regex"]` +### `ignoreProperties` + +```json +{ "ignoreProperties": ["array", "of", "properties", "/regex/"] } +``` Ignore duplicates of specific properties. Given: ```json -["--custom-property", "/ignored/"] +{ + "declaration-block-no-duplicate-custom-properties": [ + true, + { "ignoreProperties": ["--custom-property", "/ignored/"] } + ] +} ``` The following patterns are considered problems: diff --git a/docs/description/declaration-block-no-duplicate-properties.md b/docs/description/declaration-block-no-duplicate-properties.md index 2902828..4e001e6 100644 --- a/docs/description/declaration-block-no-duplicate-properties.md +++ b/docs/description/declaration-block-no-duplicate-properties.md @@ -11,14 +11,18 @@ a { color: pink; color: orange; } This rule ignores variables (`$sass`, `@less`, `--custom-property`). -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options ### `true` +```json +{ + "declaration-block-no-duplicate-properties": true +} +``` + The following patterns are considered problems: @@ -45,10 +49,25 @@ a { color: pink; background: orange; } ## Optional secondary options -### `ignore: ["consecutive-duplicates"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` + +#### `"consecutive-duplicates"` Ignore consecutive duplicated properties. +```json +{ + "declaration-block-no-duplicate-properties": [ + true, + { "ignore": ["consecutive-duplicates"] } + ] +} +``` + They can prove to be useful fallbacks for older browsers. The following patterns are considered problems: @@ -73,10 +92,19 @@ p { } ``` -### `ignore: ["consecutive-duplicates-with-different-values"]` +#### `"consecutive-duplicates-with-different-values"` Ignore consecutive duplicated properties with different values. +```json +{ + "declaration-block-no-duplicate-properties": [ + true, + { "ignore": ["consecutive-duplicates-with-different-values"] } + ] +} +``` + Including duplicate properties (fallbacks) is useful to deal with older browsers support for CSS properties. E.g. using `px` units when `rem` isn't available. The following patterns are considered problems: @@ -112,10 +140,19 @@ p { } ``` -### `ignore: ["consecutive-duplicates-with-different-syntaxes"]` +#### `"consecutive-duplicates-with-different-syntaxes"` Ignore consecutive duplicated properties with different value syntaxes (type and unit of value). +```json +{ + "declaration-block-no-duplicate-properties": [ + true, + { "ignore": ["consecutive-duplicates-with-different-syntaxes"] } + ] +} +``` + The following patterns are considered problems: @@ -139,10 +176,19 @@ p { } ``` -### `ignore: ["consecutive-duplicates-with-same-prefixless-values"]` +#### `"consecutive-duplicates-with-same-prefixless-values"` Ignore consecutive duplicated properties with identical values, when ignoring their prefix. +```json +{ + "declaration-block-no-duplicate-properties": [ + true, + { "ignore": ["consecutive-duplicates-with-same-prefixless-values"] } + ] +} +``` + This option is useful to deal with draft CSS values while still being future proof. E.g. using `fit-content` and `-moz-fit-content`. The following patterns are considered problems: @@ -176,14 +222,23 @@ p { } ``` -### `ignoreProperties: ["/regex/", /regex/, "non-regex"]` +### `ignoreProperties` + +```json +{ "ignoreProperties": ["array", "of", "properties", "/regex/"] } +``` Ignore duplicates of specific properties. Given: ```json -["color", "/background-/"] +{ + "declaration-block-no-duplicate-properties": [ + true, + { "ignoreProperties": ["color", "/background-/"] } + ] +} ``` The following patterns are considered problems: diff --git a/docs/description/declaration-block-no-redundant-longhand-properties.md b/docs/description/declaration-block-no-redundant-longhand-properties.md index 5765312..b669a8a 100644 --- a/docs/description/declaration-block-no-redundant-longhand-properties.md +++ b/docs/description/declaration-block-no-redundant-longhand-properties.md @@ -90,14 +90,18 @@ This rule complains when the following shorthand properties can be used: Flexbox-related properties can be ignored using `ignoreShorthands: ["/flex/"]` (see below). -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix most of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix most of the problems reported by this rule. ## Options ### `true` +```json +{ + "declaration-block-no-redundant-longhand-properties": true +} +``` + The following patterns are considered problems: @@ -175,13 +179,30 @@ a { ## Optional secondary options -### `ignoreLonghands: ["array", "of", "properties"]` +### `ignoreLonghands` + +```json +{ "ignoreLonghands": ["array", "of", "properties"] } +``` + +Ignore the specified longhand properties. Given: - ```json -["text-decoration-thickness", "background-size", "background-origin", "background-clip"] +{ + "declaration-block-no-redundant-longhand-properties": [ + true, + { + "ignoreLonghands": [ + "text-decoration-thickness", + "background-size", + "background-origin", + "background-clip" + ] + } + ] +} ``` The following patterns are considered problems: @@ -229,12 +250,23 @@ a { } ``` -### `ignoreShorthands: ["/regex/", /regex/, "string"]` +### `ignoreShorthands` + +```json +{ "ignoreShorthands": ["array", "of", "shorthands", "/regex/"] } +``` + +Ignore the specified shorthand properties. Given: ```json -["padding", "/border/"] +{ + "declaration-block-no-redundant-longhand-properties": [ + true, + { "ignoreShorthands": ["padding", "/border/"] } + ] +} ``` The following patterns are _not_ considered problems: @@ -259,16 +291,6 @@ a { } ``` - -```css -a { - border-top-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-right-width: 1px; -} -``` - ```css a { diff --git a/docs/description/declaration-block-no-shorthand-property-overrides.md b/docs/description/declaration-block-no-shorthand-property-overrides.md index 1891185..9061ee0 100644 --- a/docs/description/declaration-block-no-shorthand-property-overrides.md +++ b/docs/description/declaration-block-no-shorthand-property-overrides.md @@ -11,12 +11,16 @@ a { background-repeat: repeat; background: green; } In almost every case, this is just an authorial oversight. For more about this behavior, see [MDN's documentation of shorthand properties](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties). -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "declaration-block-no-shorthand-property-overrides": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/declaration-block-single-line-max-declarations.md b/docs/description/declaration-block-single-line-max-declarations.md index 22ee83e..57a37f4 100644 --- a/docs/description/declaration-block-single-line-max-declarations.md +++ b/docs/description/declaration-block-single-line-max-declarations.md @@ -9,13 +9,19 @@ a { color: pink; top: 0; } * The number of these declarations */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`int`: Maximum number of declarations allowed. +### `number` + +Specify a maximum number of declarations allowed. + +Given: -For example, with `1`: +```json +{ + "declaration-block-single-line-max-declarations": 1 +} +``` The following patterns are considered problems: diff --git a/docs/description/declaration-empty-line-before.md b/docs/description/declaration-empty-line-before.md index 6a54f5f..7f90370 100644 --- a/docs/description/declaration-empty-line-before.md +++ b/docs/description/declaration-empty-line-before.md @@ -13,16 +13,20 @@ a { * This line */ ``` -This rule only applies to standard property declarations. Use the [`custom-property-empty-line-before`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/custom-property-empty-line-before/README.md) rule for custom property declarations. +This rule only applies to standard property declarations. Use the [`custom-property-empty-line-before`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/custom-property-empty-line-before/README.md) rule for custom property declarations. -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"always"|"never"` - ### `"always"` +```json +{ + "declaration-empty-line-before": "always" +} +``` + The following patterns are considered problems: @@ -64,6 +68,12 @@ a { ### `"never"` +```json +{ + "declaration-empty-line-before": "never" +} +``` + The following patterns are considered problems: @@ -105,7 +115,11 @@ a { ## Optional secondary options -### `except: ["after-comment", "after-declaration", "first-nested"]` +### `except` + +```json +{ "except": ["array", "of", "options"] } +``` #### `"after-comment"` @@ -113,7 +127,13 @@ Reverse the primary option for declarations that follow a comment. Shared-line comments do not trigger this option. -For example, with `"always"`: +Given: + +```json +{ + "declaration-empty-line-before": ["always", { "except": ["after-comment"] }] +} +``` The following patterns are considered problems: @@ -161,7 +181,16 @@ Reverse the primary option for declarations that follow another declaration. Shared-line comments do not affect this option. -For example, with `"always"`: +Given: + +```json +{ + "declaration-empty-line-before": [ + "always", + { "except": ["after-declaration"] } + ] +} +``` The following patterns are considered problems: @@ -209,7 +238,13 @@ a { Reverse the primary option for declarations that are nested and the first child of their parent node. -For example, with `"always"`: +Given: + +```json +{ + "declaration-empty-line-before": ["always", { "except": ["first-nested"] }] +} +``` The following patterns are considered problems: @@ -234,13 +269,23 @@ a { } ``` -### `ignore: ["after-comment", "after-declaration", "first-nested", "inside-single-line-block"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` #### `"after-comment"` Ignore declarations that follow a comment. -For example, with `"always"`: +Given: + +```json +{ + "declaration-empty-line-before": ["always", { "ignore": ["after-comment"] }] +} +``` The following patterns are _not_ considered problems: @@ -256,7 +301,16 @@ a { Ignore declarations that follow another declaration. -For example, with `"always"`: +Given: + +```json +{ + "declaration-empty-line-before": [ + "always", + { "ignore": ["after-declaration"] } + ] +} +``` The following patterns are _not_ considered problems: @@ -295,7 +349,13 @@ a { Ignore declarations that are nested and the first child of their parent node. -For example, with `"always"`: +Given: + +```json +{ + "declaration-empty-line-before": ["always", { "ignore": ["first-nested"] }] +} +``` The following patterns are _not_ considered problems: @@ -312,7 +372,16 @@ a { Ignore declarations that are inside single-line blocks. -For example, with `"always"`: +Given: + +```json +{ + "declaration-empty-line-before": [ + "always", + { "ignore": ["inside-single-line-block"] } + ] +} +``` The following patterns are _not_ considered problems: diff --git a/docs/description/declaration-no-important.md b/docs/description/declaration-no-important.md index cdbc7e6..873b501 100644 --- a/docs/description/declaration-no-important.md +++ b/docs/description/declaration-no-important.md @@ -15,6 +15,12 @@ If you always want `!important` in your declarations, e.g. if you're writing [us ### `true` +```json +{ + "declaration-no-important": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/declaration-property-max-values.md b/docs/description/declaration-property-max-values.md index ab6e371..b2cc666 100644 --- a/docs/description/declaration-property-max-values.md +++ b/docs/description/declaration-property-max-values.md @@ -2,20 +2,26 @@ Limit the number of values for a list of properties within declarations. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`object`: `{ "unprefixed-property-name": int }` +### `Object` + +```json +{ "unprefixed-property-name": 0 } +``` + +Specify pairs of a property and a max value. In practice, you should specify any positive integers as max values. -If a property name is surrounded with `"/"` (e.g. `"/^margin/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/^margin/` will match `margin`, `margin-top`, `margin-inline`, etc. +You can specify a regex for a property name, such as `{ "/^margin/": 0 }`. Given: ```json { - "border": 2, - "/^margin/": 1 + "declaration-property-max-values": { + "border": 2, + "/^margin/": 1 + } } ``` diff --git a/docs/description/declaration-property-unit-allowed-list.md b/docs/description/declaration-property-unit-allowed-list.md index 3d442fa..1037c88 100644 --- a/docs/description/declaration-property-unit-allowed-list.md +++ b/docs/description/declaration-property-unit-allowed-list.md @@ -9,21 +9,25 @@ a { width: 100px; } * These properties and these units */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`object`: `{ "unprefixed-property-name": ["array", "of", "units"]|"unit" }` +### `Object>` + +```json +{ "unprefixed-property-name": ["array", "of", "units"] } +``` -If a property name is surrounded with `"/"` (e.g. `"/^animation/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/^animation/` will match `animation`, `animation-duration`, `animation-timing-function`, etc. +You can specify a regex for a property name, such as `{ "/^animation/": [] }`. Given: ```json { - "font-size": ["em", "px"], - "/^animation/": "s", - "line-height": [] + "declaration-property-unit-allowed-list": { + "font-size": ["em", "px"], + "/^animation/": ["s"], + "line-height": [] + } } ``` @@ -88,22 +92,30 @@ a { line-height: 1; } ## Optional secondary options -### `ignore: ["inside-function"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` + +#### `"inside-function"` Ignore units that are inside a function. -For example, given: +Given: ```json -[ - { - "/^border/": ["px"], - "/^background/": ["%"] - }, - { - "ignore": ["inside-function"] - } -] +{ + "declaration-property-unit-allowed-list": [ + { + "/^border/": ["px"], + "/^background/": ["%"] + }, + { + "ignore": ["inside-function"] + } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/declaration-property-unit-disallowed-list.md b/docs/description/declaration-property-unit-disallowed-list.md index 435fdbc..32b3ce0 100644 --- a/docs/description/declaration-property-unit-disallowed-list.md +++ b/docs/description/declaration-property-unit-disallowed-list.md @@ -9,20 +9,24 @@ a { width: 100px; } * These properties and these units */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`object`: `{ "unprefixed-property-name": ["array", "of", "units"]|"unit" }` +### `Object>` + +```json +{ "unprefixed-property-name": ["array", "of", "units"] } +``` -If a property name is surrounded with `"/"` (e.g. `"/^animation/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/^animation/` will match `animation`, `animation-duration`, `animation-timing-function`, etc. +You can specify a regex for a property name, such as `{ "/^animation/": [] }`. Given: ```json { - "font-size": ["em", "px"], - "/^animation/": "s" + "declaration-property-unit-disallowed-list": { + "font-size": ["em", "px"], + "/^animation/": ["s"] + } } ``` diff --git a/docs/description/declaration-property-value-allowed-list.md b/docs/description/declaration-property-value-allowed-list.md index 5affe1e..a0207dd 100644 --- a/docs/description/declaration-property-value-allowed-list.md +++ b/docs/description/declaration-property-value-allowed-list.md @@ -9,15 +9,17 @@ a { text-transform: uppercase; } * These properties and these values */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`object`: `{ "unprefixed-property-name": ["array", "of", "values", "/regex/", /regex/]|"value"|"/regex/"|/regex/ }` +### `Object>` -If a property name is found in the object, only the listed property values are allowed. This rule complains about all non-matching values. (If the property name is not included in the object, anything goes.) +```json +{ "unprefixed-property-name": ["array", "of", "values", "/regex/"] } +``` + +You can specify a regex for a property name, such as `{ "/^animation/": [] }`. -If a property name is surrounded with `"/"` (e.g. `"/^animation/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/^animation/` will match `animation`, `animation-duration`, `animation-timing-function`, etc. +If a property name is found in the object, only the listed property values are allowed. This rule complains about all non-matching values. (If the property name is not included in the object, anything goes.) The same goes for values. Keep in mind that a regular expression value is matched against the entire value of the declaration, not specific parts of it. For example, a value like `"10px solid rgba( 255 , 0 , 0 , 0.5 )"` will _not_ match `"/^solid/"` (notice beginning of the line boundary) but _will_ match `"/\\s+solid\\s+/"` or `"/\\bsolid\\b/"`. @@ -27,9 +29,11 @@ Given: ```json { - "transform": ["/scale/"], - "whitespace": "nowrap", - "/color/": ["/^green/"] + "declaration-property-value-allowed-list": { + "transform": ["/scale/"], + "whitespace": ["nowrap"], + "/color/": ["/^green/"] + } } ``` diff --git a/docs/description/declaration-property-value-disallowed-list.md b/docs/description/declaration-property-value-disallowed-list.md index 9ce3b9f..8525408 100644 --- a/docs/description/declaration-property-value-disallowed-list.md +++ b/docs/description/declaration-property-value-disallowed-list.md @@ -9,13 +9,15 @@ a { text-transform: uppercase; } * These properties and these values */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`object`: `{ "unprefixed-property-name": ["array", "of", "values", "/regex/", /regex/]|"value"|"/regex/"|/regex/ }` +### `Object>` + +```json +{ "unprefixed-property-name": ["array", "of", "values", "/regex/"] } +``` -If a property name is surrounded with `"/"` (e.g. `"/^animation/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/^animation/` will match `animation`, `animation-duration`, `animation-timing-function`, etc. +You can specify a regex for a property name, such as `{ "/^animation/": [] }`. The same goes for values. Keep in mind that a regular expression value is matched against the entire value of the declaration, not specific parts of it. For example, a value like `"10px solid rgba( 255 , 0 , 0 , 0.5 )"` will _not_ match `"/^solid/"` (notice beginning of the line boundary) but _will_ match `"/\\s+solid\\s+/"` or `"/\\bsolid\\b/"`. @@ -25,10 +27,12 @@ Given: ```json { - "transform": ["/scale3d/", "/rotate3d/", "/translate3d/"], - "position": "fixed", - "color": ["/^green/"], - "/^animation/": ["/ease/"] + "declaration-property-value-disallowed-list": { + "transform": ["/scale3d/", "/rotate3d/", "/translate3d/"], + "position": ["fixed"], + "color": ["/^green/"], + "/^animation/": ["/ease/"] + } } ``` diff --git a/docs/description/declaration-property-value-keyword-no-deprecated.md b/docs/description/declaration-property-value-keyword-no-deprecated.md index 795b71e..ab3d75c 100644 --- a/docs/description/declaration-property-value-keyword-no-deprecated.md +++ b/docs/description/declaration-property-value-keyword-no-deprecated.md @@ -17,7 +17,7 @@ This rule flags keywords that were removed or deprecated after being in the CSS - polyfilled with some adoption before any browser actually shipped - had an MDN page at one point in time -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule. Prior art: @@ -27,6 +27,12 @@ Prior art: ### `true` +```json +{ + "declaration-property-value-keyword-no-deprecated": true +} +``` + The following patterns are considered problems: @@ -53,12 +59,21 @@ a { text-justify: inter-character; } ## Optional secondary options -### `ignoreKeywords: ["/regex/", /regex/, "string"]` +### `ignoreKeywords` + +```json +{ "ignoreKeywords": ["array", "of", "keywords", "/regex/"] } +``` Given: ```json -["ActiveBorder", "/caption/i"] +{ + "declaration-property-value-keyword-no-deprecated": [ + true, + { "ignoreKeywords": ["ActiveBorder", "/caption/i"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/declaration-property-value-no-unknown.md b/docs/description/declaration-property-value-no-unknown.md index 597091b..1044140 100644 --- a/docs/description/declaration-property-value-no-unknown.md +++ b/docs/description/declaration-property-value-no-unknown.md @@ -15,20 +15,18 @@ You can filter the [CSSTree Syntax Reference](https://csstree.github.io/docs/syn This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as SCSS or Less. -This rule checks property values. You can use [`at-rule-descriptor-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/at-rule-descriptor-value-no-unknown/README.md) to disallow unknown values for descriptors within at-rules. +This rule checks property values. You can use [`at-rule-descriptor-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/at-rule-descriptor-value-no-unknown/README.md) to disallow unknown values for descriptors within at-rules. This rule overlaps with: -- [`color-no-invalid-hex`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/color-no-invalid-hex/README.md) -- [`function-linear-gradient-no-nonstandard-direction`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/function-linear-gradient-no-nonstandard-direction/README.md) -- [`function-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/function-no-unknown/README.md) -- [`string-no-newline`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/string-no-newline/README.md) -- [`unit-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/unit-no-unknown/README.md) +- [`color-no-invalid-hex`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/color-no-invalid-hex/README.md) +- [`function-linear-gradient-no-nonstandard-direction`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/function-linear-gradient-no-nonstandard-direction/README.md) +- [`function-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/function-no-unknown/README.md) +- [`string-no-newline`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/string-no-newline/README.md) +- [`unit-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/unit-no-unknown/README.md) You can either turn off the rules or configure them to ignore the overlaps. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept arguments. - Prior art: - [stylelint-csstree-validator](https://www.npmjs.com/package/stylelint-csstree-validator) @@ -37,6 +35,12 @@ Prior art: ### `true` +```json +{ + "declaration-property-value-no-unknown": true +} +``` + The following patterns are considered problems: @@ -63,18 +67,33 @@ a { top: var(--foo); } ## Optional secondary options -### `ignoreProperties: { "property": ["/regex/", /regex/, "non-regex"]|"/regex/"|/regex/|"non-regex" }` +### `ignoreProperties` + +```json +{ + "ignoreProperties": { "property-name": ["array", "of", "values", "/regex/"] } +} +``` + +Ignore the specified property and value pairs. Keys in the object indicate property names. -Ignore the specified property and value pairs. Keys in the object indicate property names. If a string in the object is surrounded with `"/"`, it's interpreted as a regular expression. For example, `"/.+/"` matches any strings. +You can specify a regex for a property name, such as `{ "/^margin/": [] }`. Given: ```json { - "top": ["unknown"], - "/^margin-/": "/^--foo/", - "padding": "/.+/", - "/.+/": "--unknown-value" + "declaration-property-value-no-unknown": [ + true, + { + "ignoreProperties": { + "top": ["unknown"], + "/^margin-/": ["/^--foo/"], + "padding": ["/.+/"], + "/.+/": ["--unknown-value"] + } + } + ] } ``` @@ -100,14 +119,23 @@ a { padding: invalid; } a { width: --unknown-value; } ``` -### `propertiesSyntax: { property: syntax }` +### `propertiesSyntax` + +```json +{ "propertiesSyntax": { "property": "syntax" } } +``` Extend or alter the properties syntax dictionary. [CSS Value Definition Syntax](https://github.com/csstree/csstree/blob/master/docs/definition-syntax.md) is used to define a value's syntax. If a definition starts with `|` it is added to the [existing definition value](https://csstree.github.io/docs/syntax/) if any. Given: ```json -{ "size": "" } +{ + "declaration-property-value-no-unknown": [ + true, + { "propertiesSyntax": { "size": "" } } + ] +} ``` The following patterns are _not_ considered problems: @@ -122,7 +150,11 @@ a { size: 0; } a { size: 10px } ``` -### `typesSyntax: { type: syntax }` +### `typesSyntax` + +```json +{ "typesSyntax": { "type": "syntax" } } +``` Extend or alter the types syntax dictionary. [CSS Value Definition Syntax](https://github.com/csstree/csstree/blob/master/docs/definition-syntax.md) is used to define a value's syntax. If a definition starts with `|` it is added to the [existing definition value](https://csstree.github.io/docs/syntax/) if any. @@ -132,8 +164,13 @@ Given: ```json { - "propertiesSyntax": { "top": "| <--foo()>" }, - "typesSyntax": { "--foo()": "--foo( )" } + "declaration-property-value-no-unknown": [ + true, + { + "propertiesSyntax": { "top": "| <--foo()>" }, + "typesSyntax": { "--foo()": "--foo( )" } + } + ] } ``` diff --git a/docs/description/description.json b/docs/description/description.json index da1b230..ffd7c51 100644 --- a/docs/description/description.json +++ b/docs/description/description.json @@ -5,6 +5,13 @@ "name" : "property-no-unknown", "description" : "property-no-unknown" } ] +}, { + "patternId" : "no-invalid-position-declaration", + "title" : "Disallow invalid position declarations.", + "parameters" : [ { + "name" : "no-invalid-position-declaration", + "description" : "no-invalid-position-declaration" + } ] }, { "patternId" : "at-rule-disallowed-list", "title" : "Specify a list of disallowed at-rules.", @@ -243,6 +250,13 @@ "name" : "property-disallowed-list", "description" : "property-disallowed-list" } ] +}, { + "patternId" : "media-type-no-deprecated", + "title" : "Disallow deprecated media types.", + "parameters" : [ { + "name" : "media-type-no-deprecated", + "description" : "media-type-no-deprecated" + } ] }, { "patternId" : "no-invalid-position-at-import-rule", "title" : "Disallow invalid position `@import` rules.", @@ -432,6 +446,13 @@ "name" : "selector-pseudo-element-colon-notation", "description" : "selector-pseudo-element-colon-notation" } ] +}, { + "patternId" : "nesting-selector-no-missing-scoping-root", + "title" : "Disallow missing scoping root for nesting selectors.", + "parameters" : [ { + "name" : "nesting-selector-no-missing-scoping-root", + "description" : "nesting-selector-no-missing-scoping-root" + } ] }, { "patternId" : "scss_at-use-no-unnamespaced", "title" : "Disallow usage of `@use` without a namespace.", @@ -579,6 +600,13 @@ "name" : "selector-nested-pattern", "description" : "selector-nested-pattern" } ] +}, { + "patternId" : "block-no-redundant-nested-style-rules", + "title" : "Disallow redundant nested style rules within blocks.", + "parameters" : [ { + "name" : "block-no-redundant-nested-style-rules", + "description" : "block-no-redundant-nested-style-rules" + } ] }, { "patternId" : "scss_at-import-partial-extension", "title" : "Require or disallow extension in `@import` commands.", @@ -726,6 +754,13 @@ "name" : "operator-no-newline-after", "description" : "operator-no-newline-after" } ] +}, { + "patternId" : "container-name-pattern", + "title" : "Specify a pattern for container names.", + "parameters" : [ { + "name" : "container-name-pattern", + "description" : "container-name-pattern" + } ] }, { "patternId" : "selector-type-case", "title" : "Specify lowercase or uppercase for type selectors.", @@ -950,6 +985,13 @@ "name" : "length-zero-no-unit", "description" : "length-zero-no-unit" } ] +}, { + "patternId" : "property-no-deprecated", + "title" : "Disallow deprecated properties.", + "parameters" : [ { + "name" : "property-no-deprecated", + "description" : "property-no-deprecated" + } ] }, { "patternId" : "media-query-no-invalid", "title" : "Disallow invalid media queries.", @@ -1405,6 +1447,13 @@ "name" : "declaration-property-unit-allowed-list", "description" : "declaration-property-unit-allowed-list" } ] +}, { + "patternId" : "color-function-alias-notation", + "title" : "Specify alias notation for color-functions.", + "parameters" : [ { + "name" : "color-function-alias-notation", + "description" : "color-function-alias-notation" + } ] }, { "patternId" : "unit-no-unknown", "title" : "Disallow unknown units.", diff --git a/docs/description/font-family-name-quotes.md b/docs/description/font-family-name-quotes.md index 3df9c70..ddf0e11 100644 --- a/docs/description/font-family-name-quotes.md +++ b/docs/description/font-family-name-quotes.md @@ -13,14 +13,10 @@ This rule checks the `font` and `font-family` properties. This rule ignores `$sass`, `@less`, and `var(--custom-property)` variable syntaxes. -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix most of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept arguments. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix most of the problems reported by this rule. ## Options -`string`: `"always-where-required"|"always-where-recommended"|"always-unless-keyword"` - _Please read the following to understand these options_: - The `font` and `font-family` properties accept a short list of special **keywords**: `inherit`, `serif`, `sans-serif`, `cursive`, `fantasy`, `system-ui`, `monospace`, `ui-serif`, `ui-sans-serif`, `ui-monospace`, `ui-rounded`, `emoji`, `math` and `fangsong`. If you wrap these words in quotes, the browser will not interpret them as keywords, but will instead look for a font by that name (e.g. will look for a `"sans-serif"` font) -- which is almost _never_ what you want. Instead, you use these keywords to point to the built-in, generic fallbacks (right?). Therefore, _all of the options below enforce no quotes around these keywords_. (If you actually want to use a font named `"sans-serif"`, turn this rule off.) @@ -37,6 +33,12 @@ For more on these subtleties, read ["Unquoted font family names in CSS"](https:/ Expect quotes around every font family name that is not a keyword. +```json +{ + "font-family-name-quotes": "always-unless-keyword" +} +``` + The following patterns are considered problems: @@ -75,6 +77,12 @@ a { font: 1em 'Arial', sans-serif; } Expect quotes only when quotes are _required_ according to the criteria above, and disallow quotes in all other cases. +```json +{ + "font-family-name-quotes": "always-where-required" +} +``` + The following patterns are considered problems: @@ -118,6 +126,12 @@ a { font: 1em Arial, sans-serif; } Expect quotes only when quotes are _recommended_ according to the criteria above, and disallow quotes in all other cases. (This includes all cases where quotes are _required_, as well.) +```json +{ + "font-family-name-quotes": "always-where-recommended" +} +``` + The following patterns are considered problems: diff --git a/docs/description/font-family-no-duplicate-names.md b/docs/description/font-family-no-duplicate-names.md index 6c5b154..ba2f31c 100644 --- a/docs/description/font-family-no-duplicate-names.md +++ b/docs/description/font-family-no-duplicate-names.md @@ -16,12 +16,16 @@ This rule ignores `$sass`, `@less`, and `var(--custom-property)` variable syntax > [!WARNING] > This rule will stumble on _unquoted_ multi-word font names and _unquoted_ font names containing escape sequences. Wrap these font names in quotation marks, and everything should be fine. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept arguments. - ## Options ### `true` +```json +{ + "font-family-no-duplicate-names": true +} +``` + The following patterns are considered problems: @@ -58,12 +62,21 @@ a { font: normal 14px/32px -apple-system, BlinkMacSystemFont, sans-serif; } ## Optional secondary options -### `ignoreFontFamilyNames: ["/regex/", /regex/, "string"]` +### `ignoreFontFamilyNames` + +```json +{ "ignoreFontFamilyNames": ["array", "of", "font-family-names", "/regex/"] } +``` Given: ```json -["/^My Font /", "monospace"] +{ + "font-family-no-duplicate-names": [ + true, + { "ignoreFontFamilyNames": ["/^My Font /", "monospace"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/font-family-no-missing-generic-family-keyword.md b/docs/description/font-family-no-missing-generic-family-keyword.md index 3b72759..3984ba1 100644 --- a/docs/description/font-family-no-missing-generic-family-keyword.md +++ b/docs/description/font-family-no-missing-generic-family-keyword.md @@ -20,6 +20,12 @@ This rule checks the `font` and `font-family` properties. ### `true` +```json +{ + "font-family-no-missing-generic-family-keyword": true +} +``` + The following patterns are considered problems: @@ -66,12 +72,23 @@ a { font-family: Helvetica, var(--font-family-common); } ## Optional secondary options -### `ignoreFontFamilies: ["/regex/", /regex/, "string"]` +### `ignoreFontFamilies` + +```json +{ "ignoreFontFamilies": ["array", "of", "font-families", "/regex/"] } +``` Given: ```json -["custom-font"] +{ + "font-family-no-missing-generic-family-keyword": [ + true, + { + "ignoreFontFamilies": ["custom-font"] + } + ] +} ``` The following pattern is _not_ considered a problem: diff --git a/docs/description/font-weight-notation.md b/docs/description/font-weight-notation.md index af49468..185e0e1 100644 --- a/docs/description/font-weight-notation.md +++ b/docs/description/font-weight-notation.md @@ -19,16 +19,20 @@ a { font: italic small-caps 600 16px/3 cursive; } This rule ignores `$sass`, `@less`, and `var(--custom-property)` variable syntaxes. -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"numeric"|"named-where-possible"` - ### `"numeric"` `font-weight` values _must always_ be numbers. +```json +{ + "font-weight-notation": "numeric" +} +``` + The following patterns are considered problems: @@ -67,6 +71,12 @@ a { font: italic 400 20px; } `font-weight` values _must always_ be keywords when an appropriate keyword is available. +```json +{ + "font-weight-notation": "named-where-possible" +} +``` + This means that only `400` and `700` will be rejected, because those are the only numbers with keyword equivalents (`normal` and `bold`). The following patterns are considered problems: @@ -95,10 +105,24 @@ a { font: italic normal 20px sans-serif; } ## Optional secondary options -### `ignore: ["relative"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` + +#### `"relative"` Ignore the [_relative_](https://drafts.csswg.org/css-fonts/#font-weight-prop) keyword names of `bolder` and `lighter`. +Given: + +```json +{ + "font-weight-notation": ["numeric", { "ignore": ["relative"] }] +} +``` + The following patterns are _not_ considered problems: diff --git a/docs/description/function-allowed-list.md b/docs/description/function-allowed-list.md index 9ed0a77..5e4979b 100644 --- a/docs/description/function-allowed-list.md +++ b/docs/description/function-allowed-list.md @@ -9,18 +9,20 @@ a { transform: scale(1); } * This function */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string|regex`: `["array", "of", "unprefixed", /functions/, "/regex/"]|"function"|"/regex/"|/regex/` +### `Array` -If a string is surrounded with `"/"` (e.g. `"/^rgb/"`), it is interpreted as a regular expression. +```json +["array", "of", "unprefixed", "functions", "/regex/"] +``` Given: ```json -["scale", "rgba", "/linear-gradient/"] +{ + "function-allowed-list": ["scale", "rgba", "/linear-gradient/"] +} ``` The following patterns are considered problems: @@ -73,3 +75,67 @@ a { -moz-linear-gradient(45deg, blue, red); } ``` + +## Optional secondary options + +### `exceptWithoutPropertyFallback` + +```json +{ + "exceptWithoutPropertyFallback": [ + "array", + "of", + "unprefixed", + "functions", + "/regex/" + ] +} +``` + +Disallow the matching functions when they are without a property fallback in the same declaration block. + +Given: + +```json +{ + "function-allowed-list": [ + ["scale", "min", "/max/"], + { "exceptWithoutPropertyFallback": ["min", "/max/"] } + ] +} +``` + +The following patterns are considered problems: + + +```css +a { width: min(50%, 100px); } +``` + + +```css +a { height: max(50%, 100px); } +``` + + +```css +a { + width: max(50%, 100px); + width: 100px; +} +``` + +The following patterns are _not_ considered problems: + + +```css +a { transform: scale(1); } +``` + + +```css +a { + width: 100px; + width: min(50%, 100px); +} +``` diff --git a/docs/description/function-calc-no-unspaced-operator.md b/docs/description/function-calc-no-unspaced-operator.md index acc7b87..526eb1b 100644 --- a/docs/description/function-calc-no-unspaced-operator.md +++ b/docs/description/function-calc-no-unspaced-operator.md @@ -11,14 +11,18 @@ a { top: calc(1px + 2px); } This rule checks that there is a single whitespace or a newline plus indentation before the `+` or `-` operator, and a single whitespace or a newline after that operator. -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept arguments. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options ### `true` +```json +{ + "function-calc-no-unspaced-operator": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/function-disallowed-list.md b/docs/description/function-disallowed-list.md index 57b6c44..b9863b8 100644 --- a/docs/description/function-disallowed-list.md +++ b/docs/description/function-disallowed-list.md @@ -9,18 +9,20 @@ a { transform: scale(1); } * This function */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string|regex`: `["array", "of", "unprefixed", /functions/, "regex"]|"function"|"/regex/"|/regex/` +### `Array` -If a string is surrounded with `"/"` (e.g. `"/^rgb/"`), it is interpreted as a regular expression. +```json +["array", "of", "unprefixed", "functions", "/regex/"] +``` Given: ```json -["scale", "rgba", "linear-gradient"] +{ + "function-disallowed-list": ["scale", "rgba", "/linear-gradient/"] +} ``` The following patterns are considered problems: diff --git a/docs/description/function-linear-gradient-no-nonstandard-direction.md b/docs/description/function-linear-gradient-no-nonstandard-direction.md index a9b9d02..8cd65b1 100644 --- a/docs/description/function-linear-gradient-no-nonstandard-direction.md +++ b/docs/description/function-linear-gradient-no-nonstandard-direction.md @@ -18,8 +18,8 @@ A common mistake (matching outdated non-standard syntax) is to use just a side-o This rule overlaps with: -- [`at-rule-descriptor-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/at-rule-descriptor-value-no-unknown/README.md) -- [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/declaration-property-value-no-unknown/README.md) +- [`at-rule-descriptor-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/at-rule-descriptor-value-no-unknown/README.md) +- [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/declaration-property-value-no-unknown/README.md) We recommend using these rules for CSS and this rule for CSS-like languages, such as SCSS and Less. @@ -27,6 +27,12 @@ We recommend using these rules for CSS and this rule for CSS-like languages, suc ### `true` +```json +{ + "function-linear-gradient-no-nonstandard-direction": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/function-name-case.md b/docs/description/function-name-case.md index 43da863..eb64bec 100644 --- a/docs/description/function-name-case.md +++ b/docs/description/function-name-case.md @@ -11,16 +11,18 @@ a { width: calc(5% - 10em); } Camel case function names, e.g. `translateX`, are accounted for when the `lower` option is used. -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"lower"|"upper"` - ### `"lower"` +```json +{ + "function-name-case": "lower" +} +``` + The following patterns are considered problems: @@ -69,6 +71,12 @@ a { ### `"upper"` +```json +{ + "function-name-case": "upper" +} +``` + The following patterns are considered problems: @@ -117,16 +125,23 @@ a { ## Optional secondary options -### `ignoreFunctions: ["/regex/", /regex/, "non-regex"]` +### `ignoreFunctions` -Ignore case of function names. +```json +{ "ignoreFunctions": ["array", "of", "functions", "/regex/"] } +``` -For example, with `"lower"`. +Ignore case of function names. Given: ```json -["--some-function", "/^--get.*$/"] +{ + "function-name-case": [ + "lower", + { "ignoreFunctions": ["--some-function", "/^--get.*$/"] } + ] +} ``` The following patterns are considered problems: diff --git a/docs/description/function-no-unknown.md b/docs/description/function-no-unknown.md index b88b068..48b144e 100644 --- a/docs/description/function-no-unknown.md +++ b/docs/description/function-no-unknown.md @@ -13,12 +13,10 @@ This rule considers functions defined in the CSS Specifications to be known. This rule ignores double-dashed custom functions, e.g. `--custom-function()`. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - This rule overlaps with: -- [`at-rule-descriptor-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/at-rule-descriptor-value-no-unknown/README.md) -- [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/declaration-property-value-no-unknown/README.md) +- [`at-rule-descriptor-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/at-rule-descriptor-value-no-unknown/README.md) +- [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/declaration-property-value-no-unknown/README.md) We recommend using these rules for CSS and this rule for CSS-like languages, such as SCSS and Less. @@ -26,6 +24,12 @@ We recommend using these rules for CSS and this rule for CSS-like languages, suc ### `true` +```json +{ + "function-no-unknown": true +} +``` + The following patterns are considered problems: @@ -47,16 +51,20 @@ a { transform: --custom-function(1); } ## Optional secondary options -### `ignoreFunctions: ["/regex/", /regex/, "non-regex"]` +### `ignoreFunctions` -Ignore the specified functions. +```json +{ "ignoreFunctions": ["array", "of", "functions", "/regex/"] } +``` -For example, with `true`. +Ignore the specified functions. Given: ```json -["theme", "/^foo-/"] +{ + "function-no-unknown": [true, { "ignoreFunctions": ["theme", "/^foo-/"] }] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/function-url-no-scheme-relative.md b/docs/description/function-url-no-scheme-relative.md index dd289ec..4306be2 100644 --- a/docs/description/function-url-no-scheme-relative.md +++ b/docs/description/function-url-no-scheme-relative.md @@ -4,7 +4,7 @@ Disallow scheme-relative urls. ```css -a { background-image: url('//www.google.com/file.jpg'); } +a { background-image: url('//www.example.org/file.jpg'); } /** ↑ * This scheme-relative url */ ``` @@ -17,15 +17,26 @@ This rule ignores url arguments that are variables (`$sass`, `@less`, `--custom- ### `true` +```json +{ + "function-url-no-scheme-relative": true +} +``` + The following patterns are considered problems: ```css a { - background: url("//www.google.com/file.jpg"); + background: url("//www.example.org/file.jpg"); } ``` + +```css +@import url("//www.example.org/foo.css"); +``` + The following patterns are _not_ considered problems: @@ -38,7 +49,7 @@ a { ```css a { - background: url("http://www.google.com/file.jpg"); + background: url("http://www.example.org/file.jpg"); } ``` @@ -48,3 +59,13 @@ a { background: url("/path/to/file.jpg"); } ``` + + +```css +@import url("http://www.example.org/foo.css"); +``` + + +```css +@import url("/path/to/foo.css"); +``` diff --git a/docs/description/function-url-quotes.md b/docs/description/function-url-quotes.md index c1cdb0d..c9ae48f 100644 --- a/docs/description/function-url-quotes.md +++ b/docs/description/function-url-quotes.md @@ -9,16 +9,20 @@ a { background: url("x.jpg") } * These quotes */ ``` -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix most of the problems reported by this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix most of the problems reported by this rule. ## Options -`string`: `"always"|"never"` - ### `"always"` Urls _must always_ be quoted. +```json +{ + "function-url-quotes": "always" +} +``` + The following patterns are considered problems: @@ -52,6 +56,12 @@ a { background: url('x.jpg'); } Urls _must never_ be quoted. +```json +{ + "function-url-quotes": "never" +} +``` + The following patterns are considered problems: @@ -88,11 +98,23 @@ a { background: url(x.jpg); } ## Optional secondary options -### `except: ["empty"]` +### `except` + +```json +{ "except": ["array", "of", "options"] } +``` + +#### `"empty"` Reverse the primary option for functions that have no arguments. -For example, with `"always"`. +Given: + +```json +{ + "function-url-quotes": ["always", { "except": ["empty"] }] +} +``` The following patterns are _not_ considered problems: diff --git a/docs/description/function-url-scheme-allowed-list.md b/docs/description/function-url-scheme-allowed-list.md index e34b2e7..5ed3887 100644 --- a/docs/description/function-url-scheme-allowed-list.md +++ b/docs/description/function-url-scheme-allowed-list.md @@ -16,16 +16,20 @@ This rule ignores: - URL arguments without an existing URL scheme - URL arguments with variables or variable interpolation (`$sass`, `@less`, `--custom-property`, `#{$var}`, `@{var}`, `$(var)`) -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string|regex`: `["array", "of", /schemes/, "/regex/"]|"scheme"|"/regex/"|/regex/` +### `Array` + +```json +["array", "of", "schemes", "/regex/"] +``` Given: ```json -["data", "/^http/"] +{ + "function-url-scheme-allowed-list": ["data", "/^http/"] +} ``` The following patterns are considered problems: diff --git a/docs/description/function-url-scheme-disallowed-list.md b/docs/description/function-url-scheme-disallowed-list.md index 75ed109..4eb4917 100644 --- a/docs/description/function-url-scheme-disallowed-list.md +++ b/docs/description/function-url-scheme-disallowed-list.md @@ -16,16 +16,20 @@ This rule ignores: - URL arguments without an existing URL scheme - URL arguments with variables or variable interpolation (`$sass`, `@less`, `--custom-property`, `#{$var}`, `@{var}`, `$(var)`) -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string|regex`: `["array", "of", /schemes/, "/regex/"]|"scheme"|"/regex/"|/regex/` +### `Array` + +```json +["array", "of", "schemes", "/regex/"] +``` Given: ```json -["ftp", "/^http/"] +{ + "function-url-scheme-disallowed-list": ["ftp", "/^http/"] +} ``` The following patterns are considered problems: diff --git a/docs/description/hue-degree-notation.md b/docs/description/hue-degree-notation.md index 65f02b7..d21a07c 100644 --- a/docs/description/hue-degree-notation.md +++ b/docs/description/hue-degree-notation.md @@ -11,18 +11,20 @@ Specify number or angle notation for degree hues. Because hues are so often given in degrees, a hue can also be given as a number, which is interpreted as a number of degrees. -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"angle"|"number"` - ### `"angle"` Degree hues _must always_ use angle notation. +```json +{ + "hue-degree-notation": "angle" +} +``` + The following patterns are considered problems: @@ -51,6 +53,12 @@ a { color: lch(56.29% 19.86 10deg / 15%) } Degree hues _must always_ use the number notation. +```json +{ + "hue-degree-notation": "number" +} +``` + The following patterns are considered problems: diff --git a/docs/description/import-notation.md b/docs/description/import-notation.md index 56d96fb..ad9acdd 100644 --- a/docs/description/import-notation.md +++ b/docs/description/import-notation.md @@ -9,18 +9,20 @@ Specify string or URL notation for `@import` rules. * This notation */ ``` -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept arguments. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"string"|"url"` - ### `"string"` `@import` rules _must always_ use string notation. +```json +{ + "import-notation": "string" +} +``` + The following patterns are considered problems: @@ -54,6 +56,12 @@ The following patterns are _not_ considered problems: `@import` rules _must always_ use URL notation. +```json +{ + "import-notation": "url" +} +``` + The following patterns are considered problems: diff --git a/docs/description/keyframe-block-no-duplicate-selectors.md b/docs/description/keyframe-block-no-duplicate-selectors.md index d1f957b..a1c3ad1 100644 --- a/docs/description/keyframe-block-no-duplicate-selectors.md +++ b/docs/description/keyframe-block-no-duplicate-selectors.md @@ -11,12 +11,16 @@ Disallow duplicate selectors within keyframe blocks. This rule is case-insensitive. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "keyframe-block-no-duplicate-selectors": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/keyframe-declaration-no-important.md b/docs/description/keyframe-declaration-no-important.md index f3b353d..1eee032 100644 --- a/docs/description/keyframe-declaration-no-important.md +++ b/docs/description/keyframe-declaration-no-important.md @@ -18,6 +18,12 @@ Using `!important` within keyframes declarations is [completely ignored in some ### `true` +```json +{ + "keyframe-declaration-no-important": true +} +``` + The following pattern is considered a problem: diff --git a/docs/description/keyframe-selector-notation.md b/docs/description/keyframe-selector-notation.md index bea4866..c03e49f 100644 --- a/docs/description/keyframe-selector-notation.md +++ b/docs/description/keyframe-selector-notation.md @@ -11,18 +11,20 @@ Specify keyword or percentage notation for keyframe selectors. The keyword `from` is equivalent to the value `0%`. The keyword `to` is equivalent to the value `100%`. -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"keyword"|"percentage"|"percentage-unless-within-keyword-only-block"` - ### `"keyword"` Keyframe selectors _must always_ use the keyword notation. +```json +{ + "keyframe-selector-notation": "keyword" +} +``` + The following pattern is considered a problem: @@ -41,6 +43,12 @@ The following pattern is _not_ considered a problem: Keyframe selectors _must always_ use the percentage notation. +```json +{ + "keyframe-selector-notation": "percentage" +} +``` + The following pattern is considered a problem: @@ -59,6 +67,12 @@ The following pattern is _not_ considered a problem: Keyframe selectors _must_ use the percentage notation unless within a keyword-only block. +```json +{ + "keyframe-selector-notation": "percentage-unless-within-keyword-only-block" +} +``` + The following pattern is considered a problem: diff --git a/docs/description/keyframes-name-pattern.md b/docs/description/keyframes-name-pattern.md index 5be87fa..5c7ff6d 100644 --- a/docs/description/keyframes-name-pattern.md +++ b/docs/description/keyframes-name-pattern.md @@ -9,18 +9,18 @@ Specify a pattern for keyframe names. * The pattern of this */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`regex|string` +### `string` -A string will be translated into a RegExp like so `new RegExp(yourString)` — so be sure to escape properly. +Specify a regex string not surrounded with `"/"`. -Given the string: +Given: ```json -"foo-.+" +{ + "keyframes-name-pattern": "foo-.+" +} ``` The following patterns are considered problems: diff --git a/docs/description/layer-name-pattern.md b/docs/description/layer-name-pattern.md index 8db431d..b698c5a 100644 --- a/docs/description/layer-name-pattern.md +++ b/docs/description/layer-name-pattern.md @@ -9,18 +9,18 @@ Specify a pattern for layer names. * This layer name */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`regex|string` +### `string` -A string will be translated into a RegExp like so `new RegExp(yourString)` — so be sure to escape properly. +Specify a regex string not surrounded with `"/"`. -Given the string: +Given: ```json -"^[a-z][a-z0-9.-]*$" +{ + "layer-name-pattern": "^[a-z][a-z0-9.-]*$" +} ``` The following patterns are considered problems: diff --git a/docs/description/length-zero-no-unit.md b/docs/description/length-zero-no-unit.md index 15258fb..d747f7b 100644 --- a/docs/description/length-zero-no-unit.md +++ b/docs/description/length-zero-no-unit.md @@ -13,12 +13,18 @@ _Lengths_ refer to distance measurements. A length is a _dimension_, which is a This rule ignores lengths within math functions (e.g. `calc`). -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options ### `true` +```json +{ + "length-zero-no-unit": true +} +``` + The following patterns are considered problems: @@ -55,11 +61,21 @@ a { top: 1.001vh } ## Optional secondary options -### `ignore: ["custom-properties"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` #### `"custom-properties"` -Ignore units for zero length in custom properties. +Ignore units for zero lengths in custom properties. + +```json +{ + "length-zero-no-unit": [true, { "ignore": ["custom-properties"] }] +} +``` The following pattern is _not_ considered a problem: @@ -68,12 +84,20 @@ The following pattern is _not_ considered a problem: a { --x: 0px; } ``` -### `ignoreFunctions: ["/regex/", /regex/, "string"]` +### `ignoreFunctions` + +```json +{ "ignoreFunctions": ["array", "of", "functions", "/regex/"] } +``` + +Ignore units for zero lengths within the specified functions. Given: ```json -["var", "/^--/"] +{ + "length-zero-no-unit": [true, { "ignoreFunctions": ["var", "/^--/"] }] +} ``` The following patterns are _not_ considered problems: @@ -88,14 +112,25 @@ a { top: var(--foo, 0px); } a { top: --bar(0px); } ``` -### `ignorePreludeOfAtRules: ["/regex/", /regex/, "string"]` +### `ignorePreludeOfAtRules` + +```json +{ + "ignorePreludeOfAtRules": ["array", "of", "at-rules", "/regex/"] +} +``` Ignore units for zero lengths within the preludes of the specified at-rules. Given: ```json -["media", "/^--bar/"] +{ + "length-zero-no-unit": [ + true, + { "ignorePreludeOfAtRules": ["media", "/^--bar/"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/lightness-notation.md b/docs/description/lightness-notation.md index 4605dc7..0abe4fa 100644 --- a/docs/description/lightness-notation.md +++ b/docs/description/lightness-notation.md @@ -11,18 +11,20 @@ Specify number or percentage notation for lightness. This rule supports `oklch`, `oklab`, `lch` and `lab` functions. -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"percentage"|"number"` - ### `"percentage"` Lightness _must always_ use the percentage notation. +```json +{ + "lightness-notation": "percentage" +} +``` + The following patterns are considered problems: @@ -71,6 +73,12 @@ a { color: lab(86% 0.2 154) } Lightness _must always_ use the number notation. +```json +{ + "lightness-notation": "number" +} +``` + The following patterns are considered problems: diff --git a/docs/description/max-nesting-depth.md b/docs/description/max-nesting-depth.md index 64cd3f8..425d51c 100644 --- a/docs/description/max-nesting-depth.md +++ b/docs/description/max-nesting-depth.md @@ -48,13 +48,19 @@ a { This rule integrates into Stylelint's core the functionality of the (now deprecated) plugin [`stylelint-statement-max-nesting-depth`](https://github.com/davidtheclark/stylelint-statement-max-nesting-depth). -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`int`: Maximum nesting depth allowed. +### `number` + +Specify a maximum nesting depth allowed. -For example, with `2`: +Given: + +```json +{ + "max-nesting-depth": 2 +} +``` The following patterns are considered problems: @@ -106,11 +112,23 @@ a .foo__foo .bar .baz {} ## Optional secondary options -### `ignore: ["blockless-at-rules"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` + +#### `"blockless-at-rules"` Ignore at-rules that only wrap other rules, and do not themselves have declaration blocks. -For example, with `1`: +Given: + +```json +{ + "max-nesting-depth": [1, { "ignore": ["blockless-at-rules"] }] +} +``` The following patterns are considered problems: @@ -163,11 +181,17 @@ a { } ``` -### `ignore: ["pseudo-classes"]` +#### `"pseudo-classes"` Ignore rules where the first selector in each selector list item is a pseudo-class -For example, with `1`: +Given: + +```json +{ + "max-nesting-depth": [1, { "ignore": ["pseudo-classes"] }] +} +``` The following patterns are considered problems: @@ -281,14 +305,20 @@ a { } ``` -### `ignoreAtRules: ["/regex/", /regex/, "string"]` +### `ignoreAtRules` + +```json +{ "ignoreAtRules": ["array", "of", "at-rules", "/regex/"] } +``` Ignore the specified at-rules. -For example, with `1` and given: +Given: ```json -["/^--my-/", "media"] +{ + "max-nesting-depth": [1, { "ignoreAtRules": ["/^--my-/", "media"] }] +} ``` The following patterns are _not_ considered problems: @@ -357,14 +387,20 @@ a { } ``` -### `ignorePseudoClasses: ["/regex/", /regex/, "string"]` +### `ignorePseudoClasses` + +```json +{ "ignorePseudoClasses": ["array", "of", "pseudo-classes", "/regex/"] } +``` Ignore the specified pseudo-classes. -For example, with `1` and given: +Given: ```json -["hover", "^focus-"] +{ + "max-nesting-depth": [1, { "ignorePseudoClasses": ["hover", "^focus-"] }] +} ``` The following patterns are _not_ considered problems: @@ -415,14 +451,23 @@ a { } ``` -### `ignoreRules: ["/regex/", /regex/, "string"]` +### `ignoreRules` + +```json +{ "ignoreRules": ["array", "of", "selectors", "/regex/"] } +``` Ignore rules matching with the specified selectors. -For example, with `1` and given: +Given: ```json -[".my-selector", "/^.ignored-sel/"] +{ + "max-nesting-depth": [ + 1, + { "ignoreRules": [".my-selector", "/^.ignored-sel/"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/media-feature-name-allowed-list.md b/docs/description/media-feature-name-allowed-list.md index 32390e1..793ed24 100644 --- a/docs/description/media-feature-name-allowed-list.md +++ b/docs/description/media-feature-name-allowed-list.md @@ -9,16 +9,20 @@ Specify a list of allowed media feature names. * This media feature name */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string|regex`: `["array", "of", "unprefixed", /media-features/, "regex"]|"media-feature"|"/regex/"|/regex/` +### `Array` + +```json +["array", "of", "unprefixed", "media-features", "/regex/"] +``` Given: ```json -["max-width", "/^my-/"] +{ + "media-feature-name-allowed-list": ["max-width", "/^my-/"] +} ``` The following patterns are considered problems: diff --git a/docs/description/media-feature-name-disallowed-list.md b/docs/description/media-feature-name-disallowed-list.md index c96d1ad..a91dbf5 100644 --- a/docs/description/media-feature-name-disallowed-list.md +++ b/docs/description/media-feature-name-disallowed-list.md @@ -9,16 +9,20 @@ Specify a list of disallowed media feature names. * This media feature name */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string|regex`: `["array", "of", "unprefixed", /media-features/, "regex"]|"media-feature"|"/regex/"|/regex/` +### `Array` + +```json +["array", "of", "unprefixed", "media-features", "/regex/"] +``` Given: ```json -["max-width", "/^my-/"] +{ + "media-feature-name-disallowed-list": ["max-width", "/^my-/"] +} ``` The following patterns are considered problems: diff --git a/docs/description/media-feature-name-no-unknown.md b/docs/description/media-feature-name-no-unknown.md index 27e0ad7..d0325be 100644 --- a/docs/description/media-feature-name-no-unknown.md +++ b/docs/description/media-feature-name-no-unknown.md @@ -13,12 +13,16 @@ This rule considers media feature names defined in the CSS Specifications, up to This rule ignores vendor-prefixed media feature names. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "media-feature-name-no-unknown": true +} +``` + The following patterns are considered problems: @@ -65,12 +69,21 @@ The following patterns are _not_ considered problems: ## Optional secondary options -### `ignoreMediaFeatureNames: ["/regex/", /regex/, "string"]` +### `ignoreMediaFeatureNames` + +```json +{ "ignoreMediaFeatureNames": ["array", "of", "media-features", "/regex/"] } +``` Given: ```json -["/^my-/", "custom"] +{ + "media-feature-name-no-unknown": [ + true, + { "ignoreMediaFeatureNames": ["/^my-/", "custom"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/media-feature-name-no-vendor-prefix.md b/docs/description/media-feature-name-no-vendor-prefix.md index 6c556f8..46569f5 100644 --- a/docs/description/media-feature-name-no-vendor-prefix.md +++ b/docs/description/media-feature-name-no-vendor-prefix.md @@ -11,12 +11,18 @@ Disallow vendor prefixes for media feature names. This rule ignores non-standard vendor-prefixed media feature names that aren't handled by [Autoprefixer](https://github.com/postcss/autoprefixer). -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. However, it will not remove duplicate media feature names produced when the prefixes are removed. You can use [Autoprefixer](https://github.com/postcss/autoprefixer) itself, with the [`add` option off and the `remove` option on](https://github.com/postcss/autoprefixer#options), in these situations. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. However, it will not remove duplicate media feature names produced when the prefixes are removed. You can use [Autoprefixer](https://github.com/postcss/autoprefixer) itself, with the [`add` option off and the `remove` option on](https://github.com/postcss/autoprefixer#options), in these situations. ## Options ### `true` +```json +{ + "media-feature-name-no-vendor-prefix": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/media-feature-name-unit-allowed-list.md b/docs/description/media-feature-name-unit-allowed-list.md index 9730def..f1bef64 100644 --- a/docs/description/media-feature-name-unit-allowed-list.md +++ b/docs/description/media-feature-name-unit-allowed-list.md @@ -9,20 +9,24 @@ Specify a list of allowed name and unit pairs within media features. * This media feature name and these units */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`object`: `{ "name": ["array", "of", "units"]|"unit" }` +### `Array` + +```json +{ "media-feature-name": ["array", "of", "units"] } +``` -If a feature name is surrounded with `"/"` (e.g. `"/height/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/height/` will match `height`, `min-height`, `max-height`, etc. +You can specify a regex for a media feature name, such as `{ "/height$/": [] }`. Given: ```json { - "width": "em", - "/height/": ["em", "rem"] + "media-feature-name-unit-allowed-list": { + "width": "em", + "/height/": ["em", "rem"] + } } ``` diff --git a/docs/description/media-feature-name-value-allowed-list.md b/docs/description/media-feature-name-value-allowed-list.md index 4dd680f..a493c82 100644 --- a/docs/description/media-feature-name-value-allowed-list.md +++ b/docs/description/media-feature-name-value-allowed-list.md @@ -9,24 +9,27 @@ Specify a list of allowed media feature name and value pairs. * These features and values */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`object`: `{ "unprefixed-media-feature-name": ["array", "of", "values", "/regex/", /regex/]|"value"|"/regex/"|/regex/ }` +### `Object>` + +```json +{ "unprefixed-media-feature-name": ["array", "of", "values", "/regex/"] } +``` + +You can specify a regex for a media feature name, such as `{ "/width$/": [] }`. If a media feature name is found in the object, only its allowed-listed values are allowed. If the media feature name is not included in the object, anything goes. -If a name or value is surrounded with `/` (e.g. `"/width$/"`), it is interpreted -as a regular expression. For example, `/width$/` will match `max-width` and `min-width`. - Given: ```json { - "min-width": ["768px", "1024px"], - "/resolution/": "/dpcm$/" + "media-feature-name-value-allowed-list": { + "min-width": ["768px", "1024px"], + "/resolution/": ["/dpcm$/"] + } } ``` diff --git a/docs/description/media-feature-name-value-no-unknown.md b/docs/description/media-feature-name-value-no-unknown.md index 3517e0c..477d9d0 100644 --- a/docs/description/media-feature-name-value-no-unknown.md +++ b/docs/description/media-feature-name-value-no-unknown.md @@ -15,16 +15,20 @@ This rule is only appropriate for CSS. You should not turn it on for CSS-like la It sometimes overlaps with: -- [`unit-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/unit-no-unknown/README.md) +- [`unit-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/unit-no-unknown/README.md) If duplicate problems are flagged, you can turn off the corresponding rule. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "media-feature-name-value-no-unknown": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/media-feature-range-notation.md b/docs/description/media-feature-range-notation.md index b49f16a..24530be 100644 --- a/docs/description/media-feature-range-notation.md +++ b/docs/description/media-feature-range-notation.md @@ -13,18 +13,20 @@ Media features of the range type can be written using prefixes or the more moder Because `min-` and `max-` both equate to range comparisons that include the value, they may be [limiting in certain situations](https://drafts.csswg.org/mediaqueries/#mq-min-max). -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule. ## Options -`string`: `"context"|"prefix"` - ### `"context"` Media feature ranges _must always_ use context notation. +```json +{ + "media-feature-range-notation": "context" +} +``` + The following patterns are considered problems: @@ -53,6 +55,12 @@ The following patterns are _not_ considered problems: Media feature ranges _must always_ use prefix notation. +```json +{ + "media-feature-range-notation": "prefix" +} +``` + The following patterns are considered problems: @@ -76,3 +84,37 @@ The following patterns are _not_ considered problems: ```css @media (min-width: 1px) and (max-width: 2px) {} ``` + +## Optional secondary options + +### `except` + +```json +{ "except": ["array", "of", "options"] } +``` + +#### `"exact-value"` + +Reverse the primary option for media features with exact values. + +Given: + +```json +{ + "media-feature-range-notation": ["context", { "except": ["exact-value"] }] +} +``` + +The following pattern is considered a problem: + + +```css +@media (min-width: 1px) {} +``` + +The following pattern is _not_ considered a problem: + + +```css +@media (width: 1px) {} +``` diff --git a/docs/description/media-query-no-invalid.md b/docs/description/media-query-no-invalid.md index 84ed2a2..058424b 100644 --- a/docs/description/media-query-no-invalid.md +++ b/docs/description/media-query-no-invalid.md @@ -15,15 +15,19 @@ This rule is only appropriate for CSS. You should not turn it on for CSS-like la It works well with other rules that validate feature names and values: -- [`media-feature-name-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/media-feature-name-no-unknown/README.md) -- [`media-feature-name-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/media-feature-name-value-no-unknown/README.md) - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +- [`media-feature-name-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/media-feature-name-no-unknown/README.md) +- [`media-feature-name-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/media-feature-name-value-no-unknown/README.md) ## Options ### `true` +```json +{ + "media-query-no-invalid": true +} +``` + The following patterns are considered problems: @@ -65,14 +69,23 @@ The following patterns are _not_ considered problems: ## Optional secondary options -### `ignoreFunctions: ["/regex/", /regex/, "string"]` +### `ignoreFunctions` + +```json +{ "ignoreFunctions": ["array", "of", "functions", "/regex/"] } +``` Ignore the specified functions. Given: ```json -["theme", "/^get.*$/"] +{ + "media-query-no-invalid": [ + true, + { "ignoreFunctions": ["theme", "/^get.*$/"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/media-type-no-deprecated.md b/docs/description/media-type-no-deprecated.md new file mode 100644 index 0000000..b516d48 --- /dev/null +++ b/docs/description/media-type-no-deprecated.md @@ -0,0 +1,88 @@ +# media-type-no-deprecated + +Disallow deprecated media types. + + +```css + @media tv {} +/** ↑ + * Deprecated media type */ +``` + +Several CSS media types defined in earlier specifications have been deprecated and should no longer be used. According to the CSS [media queries specification](https://drafts.csswg.org/mediaqueries-5/#media-types), the following media types are recognized as valid but match nothing: + +- `aural` +- `braille` +- `embossed` +- `handheld` +- `projection` +- `speech` +- `tty` +- `tv` + +Currently, the recommended media types are: + +- `all` +- `screen` +- `print` + +The deprecated media types were removed because they were either never widely implemented or their use cases are now better handled by media features rather than broad device categories. + +## Options + +### `true` + +```json +{ + "media-type-no-deprecated": true +} +``` + +The following pattern is considered a problem: + + +```css +@media tty {} +``` + +The following pattern is _not_ considered a problem: + + +```css +@media screen {} +``` + +## Optional secondary options + +### `ignoreMediaTypes` + +```json +{ "ignoreMediaTypes": ["array", "of", "types", "/regex/"] } +``` + +Ignore the specified media types. + +Given: + +```json +{ + "media-type-no-deprecated": [true, { "ignoreMediaTypes": ["/^t/", "speech"] }] +} +``` + +The following patterns are _not_ considered problems: + + +```css +@media tv {} +``` + + +```css +@media tty {} +``` + + +```css +@media speech {} +``` diff --git a/docs/description/named-grid-areas-no-invalid.md b/docs/description/named-grid-areas-no-invalid.md index f2705e5..b735e66 100644 --- a/docs/description/named-grid-areas-no-invalid.md +++ b/docs/description/named-grid-areas-no-invalid.md @@ -22,6 +22,12 @@ And all named grid areas that spans multiple grid cells must form a single fille ### `true` +```json +{ + "named-grid-areas-no-invalid": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/nesting-selector-no-missing-scoping-root.md b/docs/description/nesting-selector-no-missing-scoping-root.md new file mode 100644 index 0000000..7ab6251 --- /dev/null +++ b/docs/description/nesting-selector-no-missing-scoping-root.md @@ -0,0 +1,66 @@ +# nesting-selector-no-missing-scoping-root + +Disallow missing scoping root for nesting selectors. + + +```css + & {} +/** ↑ + * This nesting selector */ +``` + +CSS nesting selectors (`&`) represent the parent selector in nested CSS. When used at the top level or within certain at-rules without a scoping root, they can cause unexpected behavior or indicate a mistake in the CSS structure. + +## Options + +### `true` + +```json +{ + "nesting-selector-no-missing-scoping-root": true +} +``` + +The following patterns are considered problems: + + +```css +& {} +``` + + +```css +@media all { + & {} +} +``` + + +```css +@scope (&) {} +``` + +The following patterns are _not_ considered problems: + + +```css +a { + & {} +} +``` + + +```css +a { + @media all { + & {} + } +} +``` + + +```css +a { + @scope (&) {} +} +``` diff --git a/docs/description/no-descending-specificity.md b/docs/description/no-descending-specificity.md index 8bb74f6..cb9e52a 100644 --- a/docs/description/no-descending-specificity.md +++ b/docs/description/no-descending-specificity.md @@ -15,8 +15,6 @@ The clashes of these two mechanisms for prioritization, source order and specifi This rule enforces that practice _as best it can_, reporting fewer errors than it should. It cannot catch every _actual_ overriding selector, but it can catch certain common mistakes. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## How it works **This rule looks at the last _compound selector_ in every full selector, and then compares it with other selectors in the stylesheet that end in the same way.** @@ -96,6 +94,12 @@ This may lead to confusion because both rules contain different declarations and ### `true` +```json +{ + "no-descending-specificity": true +} +``` + The following patterns are considered problems: @@ -186,10 +190,22 @@ a { top: 10px; } ## Optional secondary options -### `ignore: ["selectors-within-list"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` + +#### `"selectors-within-list"` Ignores selectors within list of selectors. +```json +{ + "no-descending-specificity": [true, { "ignore": ["selectors-within-list"] }] +} +``` + The following patterns are considered problems: diff --git a/docs/description/no-duplicate-at-import-rules.md b/docs/description/no-duplicate-at-import-rules.md index f67cf06..2d7f55e 100644 --- a/docs/description/no-duplicate-at-import-rules.md +++ b/docs/description/no-duplicate-at-import-rules.md @@ -10,12 +10,16 @@ Disallow duplicate `@import` rules. * These are duplicates */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "no-duplicate-at-import-rules": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/no-duplicate-selectors.md b/docs/description/no-duplicate-selectors.md index 1c488a2..4cd6635 100644 --- a/docs/description/no-duplicate-selectors.md +++ b/docs/description/no-duplicate-selectors.md @@ -22,12 +22,16 @@ The same selector _is_ allowed to repeat in the following circumstances: This rule resolves nested selectors. So `a b {} a { & b {} }` counts as a problem, because the resolved selectors end up with a duplicate. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "no-duplicate-selectors": true +} +``` + The following patterns are considered problems: @@ -117,11 +121,17 @@ a { ## Optional secondary options -### `disallowInList: true | false` (default: `false`) +### `disallowInList` -This option will also disallow duplicate selectors within selector lists. +This option will also disallow duplicate selectors within selector lists. Defaults to `false`. -For example, with `true`. +Given: + +```json +{ + "no-duplicate-selectors": [true, { "disallowInList": true }] +} +``` The following patterns are considered problems: diff --git a/docs/description/no-empty-source.md b/docs/description/no-empty-source.md index df9e2b7..f2ec0b4 100644 --- a/docs/description/no-empty-source.md +++ b/docs/description/no-empty-source.md @@ -13,6 +13,12 @@ A source containing only whitespace, e.g., spaces, tabs, or newlines, is conside ### `true` +```json +{ + "no-empty-source": true +} +``` + The following patterns are _not_ considered problems: diff --git a/docs/description/no-invalid-double-slash-comments.md b/docs/description/no-invalid-double-slash-comments.md index 18da75d..9dd9313 100644 --- a/docs/description/no-invalid-double-slash-comments.md +++ b/docs/description/no-invalid-double-slash-comments.md @@ -19,6 +19,12 @@ If you are using a preprocessor that allows `//` single-line comments (e.g. Sass ### `true` +```json +{ + "no-invalid-double-slash-comments": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/no-invalid-position-at-import-rule.md b/docs/description/no-invalid-position-at-import-rule.md index dca7e40..f6e1648 100644 --- a/docs/description/no-invalid-position-at-import-rule.md +++ b/docs/description/no-invalid-position-at-import-rule.md @@ -16,6 +16,12 @@ Any `@import` rules must precede all other valid at-rules and style rules in a s ### `true` +```json +{ + "no-invalid-position-at-import-rule": true +} +``` + The following patterns are considered problems: @@ -58,12 +64,21 @@ a {} ## Optional secondary options -### `ignoreAtRules: ["/regex/", /regex/, "string"]` +### `ignoreAtRules` + +```json +{ "ignoreAtRules": ["array", "of", "at-rules", "/regex/"] } +``` Given: ```json -["/^--my-/", "--custom"] +{ + "no-invalid-position-at-import-rule": [ + true, + { "ignoreAtRules": ["/^--my-/", "--custom"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/no-invalid-position-declaration.md b/docs/description/no-invalid-position-declaration.md new file mode 100644 index 0000000..21f6d49 --- /dev/null +++ b/docs/description/no-invalid-position-declaration.md @@ -0,0 +1,62 @@ +# no-invalid-position-declaration + +Disallow invalid position declarations. + + +```css +color: red; +/** ↑ + * This declaration */ +``` + +Declarations can only be positioned within the ``, `` and `` productions. + +## Options + +### `true` + +```json +{ + "no-invalid-position-declaration": true +} +``` + +The following patterns are considered problems: + + +```css +color: red; +``` + + +```css +--foo: red; +``` + + +```css +@media all { + color: red; +} +``` + +The following patterns are _not_ considered problems: + + +```css +a { color: red; } +``` + + +```css +a { --foo: red; } +``` + + +```css +@media all { + a { + color: red; + } +} +``` diff --git a/docs/description/no-irregular-whitespace.md b/docs/description/no-irregular-whitespace.md index 155fb64..79656a5 100644 --- a/docs/description/no-irregular-whitespace.md +++ b/docs/description/no-irregular-whitespace.md @@ -13,6 +13,12 @@ Disallow irregular whitespaces. ### `true` +```json +{ + "no-irregular-whitespace": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/no-unknown-animations.md b/docs/description/no-unknown-animations.md index fc629c8..82df2d8 100644 --- a/docs/description/no-unknown-animations.md +++ b/docs/description/no-unknown-animations.md @@ -15,12 +15,16 @@ a { animation: fancy-slide 2s linear; } This rule considers the identifiers of `@keyframes` rules defined within the same source to be known. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "no-unknown-animations": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/no-unknown-custom-media.md b/docs/description/no-unknown-custom-media.md index c9583cf..d406af0 100644 --- a/docs/description/no-unknown-custom-media.md +++ b/docs/description/no-unknown-custom-media.md @@ -15,12 +15,16 @@ Disallow unknown custom media queries. This rule considers custom media queries defined **within the same source** to be known. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "no-unknown-custom-media": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/no-unknown-custom-properties.md b/docs/description/no-unknown-custom-properties.md index 571d1ab..d5eb318 100644 --- a/docs/description/no-unknown-custom-properties.md +++ b/docs/description/no-unknown-custom-properties.md @@ -15,12 +15,16 @@ a { color: var(--foo, var(--bar)); } This rule considers custom properties defined within the same source to be known. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "no-unknown-custom-properties": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/number-max-precision.md b/docs/description/number-max-precision.md index 965f34c..fb889e6 100644 --- a/docs/description/number-max-precision.md +++ b/docs/description/number-max-precision.md @@ -9,13 +9,19 @@ a { top: 3.245634px; } * This decimal place */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`int`: Maximum number of decimal places allowed. +### `number` + +Specify a maximum number of decimal places allowed. + +Given: -For example, with `2`: +```json +{ + "number-max-precision": 2 +} +``` The following patterns are considered problems: @@ -48,16 +54,20 @@ a { top: 3.24px; } ## Optional secondary options -### `ignoreProperties: ["/regex/", /regex/, "string"]` +### `ignoreProperties` -Ignore the precision of numbers for the specified properties. +```json +{ "ignoreProperties": ["array", "of", "properties", "/regex/"] } +``` -For example, with `0`. +Ignore the precision of numbers for the specified properties. Given: ```json -["transition"] +{ + "number-max-precision": [0, { "ignoreProperties": ["transition"] }] +} ``` The following patterns are considered problems: @@ -74,16 +84,20 @@ The following patterns are _not_ considered problems: a { transition: all 4.5s ease; } ``` -### `ignoreUnits: ["/regex/", /regex/, "string"]` +### `ignoreUnits` -Ignore the precision of numbers for values with the specified units. +```json +{ "ignoreUnits": ["array", "of", "units", "/regex/"] } +``` -For example, with `2`. +Ignore the precision of numbers for values with the specified units. Given: ```json -["/^my-/", "%"] +{ + "number-max-precision": [2, { "ignoreUnits": ["/^my-/", "%"] }] +} ``` The following patterns are considered problems: @@ -134,16 +148,25 @@ a { } ``` -### `insideFunctions: {"/regex/": int, /regex/: int, "string": int}` +### `insideFunctions` -The `insideFunctions` option can change a primary option value for specified functions. +```json +{ "insideFunctions": { "function-name": 0 } } +``` -For example, with `2`. +You can specify a regex for a function name, such as `{ "/^(oklch|oklab)$/": 0 }`. + +The `insideFunctions` option can change a primary option value for specified functions. Given: ```json -{ "/^(oklch|oklab|lch|lab)$/": 4 } +{ + "number-max-precision": [ + 2, + { "insideFunctions": { "/^(oklch|oklab|lch|lab)$/": 4 } } + ] +} ``` The following patterns are considered problems: diff --git a/docs/description/property-allowed-list.md b/docs/description/property-allowed-list.md index cfff094..d5a310a 100644 --- a/docs/description/property-allowed-list.md +++ b/docs/description/property-allowed-list.md @@ -11,18 +11,20 @@ a { color: red; } This rule ignores preprocessor variables (e.g. `$sass`, `@less`). -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string|regex`: `["array", "of", /properties/, "regex"]|"property"|"/regex/"|/regex/` +### `Array` -If a string is surrounded with `"/"` (e.g. `"/^background/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/^background/` will match `background`, `background-size`, `background-color`, etc. +```json +["array", "of", "properties", "/regex/"] +``` Given: ```json -["display", "animation", "/^background/", "--foo"] +{ + "property-allowed-list": ["display", "animation", "/^background/", "--foo"] +} ``` The following patterns are considered problems: diff --git a/docs/description/property-disallowed-list.md b/docs/description/property-disallowed-list.md index 2bbf58e..10797ad 100644 --- a/docs/description/property-disallowed-list.md +++ b/docs/description/property-disallowed-list.md @@ -11,18 +11,25 @@ a { text-rendering: optimizeLegibility; } This rule ignores preprocessor variables (e.g. `$sass`, `@less`). -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string|regex`: `["array", "of", /properties/, "regex"]|"property"|"/regex/"|/regex/` +### `Array` -If a string is surrounded with `"/"` (e.g. `"/^background/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/^background/` will match `background`, `background-size`, `background-color`, etc. +```json +["array", "of", "properties", "/regex/"] +``` Given: ```json -["text-rendering", "animation", "/^background/", "--foo"] +{ + "property-disallowed-list": [ + "text-rendering", + "animation", + "/^background/", + "--foo" + ] +} ``` The following patterns are considered problems: diff --git a/docs/description/property-no-deprecated.md b/docs/description/property-no-deprecated.md new file mode 100644 index 0000000..e162f0f --- /dev/null +++ b/docs/description/property-no-deprecated.md @@ -0,0 +1,86 @@ +# property-no-deprecated + +Disallow deprecated properties. + + +```css + a { word-wrap: break-word; } +/** ↑ + * Deprecated property */ +``` + +This rule flags properties that were removed or deprecated after being in the CSS specifications, including editor drafts, and were either: + +- shipped in a stable version of a browser +- shipped by a developer channel/edition browser +- shipped but behind experimental flags +- polyfilled with some adoption before any browser actually shipped +- had an MDN page at one point in time + +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule. + +Prior art: + +- [@isnotdefined/no-obsolete](https://www.npmjs.com/package/@isnotdefined/stylelint-plugin) + +## Options + +### `true` + +```json +{ + "property-no-deprecated": true +} +``` + +The following patterns are considered problems: + + +```css +a { clip: rect(0, 0, 0, 0); } +``` + + +```css +a { word-wrap: break-word; } +``` + +The following patterns are _not_ considered problems: + + +```css +a { clip-path: rect(0, 0, 0, 0); } +``` + + +```css +a { overflow-wrap: break-word; } +``` + +## Optional secondary options + +### `ignoreProperties` + +```json +{ "ignoreProperties": ["array", "of", "properties", "/regex/"] } +``` + +Given: + +```json +{ + "property-no-deprecated": [true, { "ignoreProperties": ["clip", "/^grid-/"] }] +} +``` + +The following patterns are _not_ considered problems: + + +```css +a { clip: rect(0, 0, 0, 0); } +``` + + +```css +a { grid-row-gap: 4px; } +``` diff --git a/docs/description/property-no-unknown.md b/docs/description/property-no-unknown.md index dcb2032..f9707c5 100644 --- a/docs/description/property-no-unknown.md +++ b/docs/description/property-no-unknown.md @@ -18,14 +18,18 @@ This rule ignores: Use option `checkPrefixed` described below to turn on checking of vendor-prefixed properties. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - -For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#languageoptions) section. +For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/configure.md#languageoptions) section. ## Options ### `true` +```json +{ + "property-no-unknown": true +} +``` + The following patterns are considered problems: @@ -81,12 +85,18 @@ a { ## Optional secondary options -### `ignoreProperties: ["/regex/", /regex/, "string"]` +### `ignoreProperties` + +```json +{ "ignoreProperties": ["array", "of", "properties", "/regex/"] } +``` Given: ```json -["/^my-/", "custom"] +{ + "property-no-unknown": [true, { "ignoreProperties": ["/^my-/", "custom"] }] +} ``` The following patterns are _not_ considered problems: @@ -112,14 +122,20 @@ a { } ``` -### `ignoreSelectors: ["/regex/", /regex/, "string"]` +### `ignoreSelectors` + +```json +{ "ignoreSelectors": ["array", "of", "selectors", "/regex/"] } +``` Skips checking properties of the given selectors against this rule. Given: ```json -[":root"] +{ + "property-no-unknown": [true, { "ignoreSelectors": [":root"] }] +} ``` The following patterns are _not_ considered problems: @@ -131,14 +147,20 @@ The following patterns are _not_ considered problems: } ``` -### `ignoreAtRules: ["/regex/", /regex/, "string"]` +### `ignoreAtRules` + +```json +{ "ignoreAtRules": ["array", "of", "at-rules", "/regex/"] } +``` Ignores properties nested within specified at-rules. Given: ```json -["supports"] +{ + "property-no-unknown": [true, { "ignoreAtRules": ["supports"] }] +} ``` The following patterns are _not_ considered problems: @@ -152,11 +174,17 @@ The following patterns are _not_ considered problems: } ``` -### `checkPrefixed: true | false` (default: `false`) +### `checkPrefixed` -If `true`, this rule will check vendor-prefixed properties. +If `true`, this rule will check vendor-prefixed properties. Defaults to `false`. -For example with `true`: +Given: + +```json +{ + "property-no-unknown": [true, { "checkPrefixed": true }] +} +``` The following patterns are _not_ considered problems: diff --git a/docs/description/property-no-vendor-prefix.md b/docs/description/property-no-vendor-prefix.md index 7fbd830..ab9accc 100644 --- a/docs/description/property-no-vendor-prefix.md +++ b/docs/description/property-no-vendor-prefix.md @@ -11,14 +11,18 @@ a { -webkit-transform: scale(1); } This rule ignores non-standard vendor-prefixed properties that aren't handled by [Autoprefixer](https://github.com/postcss/autoprefixer). -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. However, it will not remove duplicate properties produced when the prefixes are removed. You can use [Autoprefixer](https://github.com/postcss/autoprefixer) itself, with the [`add` option off and the `remove` option on](https://github.com/postcss/autoprefixer#options), in these situations. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. However, it will not remove duplicate properties produced when the prefixes are removed. You can use [Autoprefixer](https://github.com/postcss/autoprefixer) itself, with the [`add` option off and the `remove` option on](https://github.com/postcss/autoprefixer#options), in these situations. ## Options ### `true` +```json +{ + "property-no-vendor-prefix": true +} +``` + The following patterns are considered problems: @@ -50,12 +54,21 @@ a { -webkit-touch-callout: none; } ## Optional secondary options -### `ignoreProperties: ["/regex/", /regex/, "string"]` +### `ignoreProperties` + +```json +{ "ignoreProperties": ["array", "of", "properties", "/regex/"] } +``` Given: ```json -["transform", "columns"] +{ + "property-no-vendor-prefix": [ + true, + { "ignoreProperties": ["transform", "columns"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/rule-empty-line-before.md b/docs/description/rule-empty-line-before.md index d0b2006..90a2ed0 100644 --- a/docs/description/rule-empty-line-before.md +++ b/docs/description/rule-empty-line-before.md @@ -13,16 +13,20 @@ b {} /* ↑ */ This rule ignores rules that are the very first node in a source. -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"always"|"never"|"always-multi-line"|"never-multi-line"` - ### `"always"` There _must always_ be an empty line before rules. +```json +{ + "rule-empty-line-before": "always" +} +``` + The following patterns are considered problems: @@ -49,6 +53,12 @@ b {} There _must never_ be an empty line before rules. +```json +{ + "rule-empty-line-before": "never" +} +``` + The following patterns are considered problems: @@ -75,6 +85,12 @@ b {} There _must always_ be an empty line before multi-line rules. +```json +{ + "rule-empty-line-before": "always-multi-line" +} +``` + The following patterns are considered problems: @@ -104,6 +120,12 @@ b { There _must never_ be an empty line before multi-line rules. +```json +{ + "rule-empty-line-before": "never-multi-line" +} +``` + The following patterns are considered problems: @@ -131,13 +153,23 @@ b { ## Optional secondary options -### `except: ["after-rule", "after-single-line-comment", "inside-block-and-after-rule", "inside-block", "first-nested"]` +### `except` + +```json +{ "except": ["array", "of", "options"] } +``` #### `"after-rule"` Reverse the primary option for rules that follow another rule. -For example, with `"always"`: +Given: + +```json +{ + "rule-empty-line-before": ["always", { "except": ["after-rule"] }] +} +``` The following patterns are considered problems: @@ -160,7 +192,16 @@ b {} Reverse the primary option for rules that follow a single-line comment. -For example, with `"always"`: +Given: + +```json +{ + "rule-empty-line-before": [ + "always", + { "except": ["after-single-line-comment"] } + ] +} +``` The following patterns are considered problems: @@ -183,7 +224,16 @@ a {} Reverse the primary option for rules that are inside a block and follow another rule. -For example, with `"always"`: +Given: + +```json +{ + "rule-empty-line-before": [ + "always", + { "except": ["inside-block-and-after-rule"] } + ] +} +``` The following patterns are considered problems: @@ -212,7 +262,13 @@ The following patterns are _not_ considered problems: Reverse the primary option for rules that are inside a block. -For example, with `"always"`: +Given: + +```json +{ + "rule-empty-line-before": ["always", { "except": ["inside-block"] }] +} +``` The following patterns are considered problems: @@ -244,7 +300,13 @@ a { Reverse the primary option for rules that are nested and the first child of their parent node. -For example, with `"always"`: +Given: + +```json +{ + "rule-empty-line-before": ["always", { "except": ["first-nested"] }] +} +``` The following patterns are considered problems: @@ -269,13 +331,23 @@ The following patterns are _not_ considered problems: } ``` -### `ignore: ["after-comment", "first-nested", "inside-block"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` #### `"after-comment"` Ignore rules that follow a comment. -For example, with `"always"`: +Given: + +```json +{ + "rule-empty-line-before": ["always", { "ignore": ["after-comment"] }] +} +``` The following patterns are _not_ considered problems: @@ -289,7 +361,13 @@ a {} Ignore rules that are nested and the first child of their parent node. -For example, with `"always"`: +Given: + +```json +{ + "rule-empty-line-before": ["always", { "ignore": ["first-nested"] }] +} +``` The following patterns are _not_ considered problems: @@ -306,7 +384,13 @@ The following patterns are _not_ considered problems: Ignore rules that are inside a block. -For example, with `"always"`: +Given: + +```json +{ + "rule-empty-line-before": ["always", { "ignore": ["inside-block"] }] +} +``` The following patterns are _not_ considered problems: diff --git a/docs/description/rule-selector-property-disallowed-list.md b/docs/description/rule-selector-property-disallowed-list.md index 1a5f8a5..bdd07a3 100644 --- a/docs/description/rule-selector-property-disallowed-list.md +++ b/docs/description/rule-selector-property-disallowed-list.md @@ -9,22 +9,24 @@ Specify a list of disallowed properties for selectors within rules. * Selector and property name */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`object`: `{ "selector": ["array", "of", "properties", "/regex/", /regex/]|"property"|"/regex/"|/regex/` +### `Object>` -If a selector name is surrounded with `"/"` (e.g. `"/anchor/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of all the potential anchors: `/anchor/` will match `.anchor`, `[data-anchor]`, etc. +```json +{ "selector": ["array", "of", "properties", "/regex/"] } +``` -The same goes for properties. Keep in mind that a regular expression value is matched against the entire property name, not specific parts of it. For example, a value like `"animation-duration"` will _not_ match `"/^duration/"` (notice beginning of the line boundary) but _will_ match `"/duration/"`. +You can specify a regex for a selector, such as `{ "/foo-/": [] }`. Given: ```json { - "a": ["color", "/margin/"], - "/foo/": "/size/" + "rule-selector-property-disallowed-list": { + "a": ["color", "/margin/"], + "/foo/": ["/size/"] + } } ``` @@ -64,14 +66,25 @@ html[data-foo] { color: red; } ## Optional secondary options -### `ignore: ["keyframe-selectors"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` + +#### `"keyframe-selectors"` Ignore keyframe selectors. Given: ```json -[{ "/^[a-z]+$/": ["opacity"] }, { "ignore": ["keyframe-selectors"] }] +{ + "rule-selector-property-disallowed-list": [ + { "/^[a-z]+$/": ["opacity"] }, + { "ignore": ["keyframe-selectors"] } + ] +} ``` The following pattern is _not_ considered a problem: diff --git a/docs/description/scss_at-else-empty-line-before.md b/docs/description/scss_at-else-empty-line-before.md index 1e20616..9a3cda0 100644 --- a/docs/description/scss_at-else-empty-line-before.md +++ b/docs/description/scss_at-else-empty-line-before.md @@ -66,4 +66,4 @@ a { ## Caveats -If you use autofix, this rule could clash with [`at-mixin-parentheses-space-before`](https://github.com/stylelint-scss/stylelint-scss/6.11.1/src/rules/at-mixin-parentheses-space-before/README.md) rule. +If you use autofix, this rule could clash with [`at-mixin-parentheses-space-before`](https://github.com/stylelint-scss/stylelint-scss/6.12.1/src/rules/at-mixin-parentheses-space-before/README.md) rule. diff --git a/docs/description/scss_declaration-property-value-no-unknown.md b/docs/description/scss_declaration-property-value-no-unknown.md index 534cacd..63d46a1 100644 --- a/docs/description/scss_declaration-property-value-no-unknown.md +++ b/docs/description/scss_declaration-property-value-no-unknown.md @@ -17,10 +17,10 @@ This rule is experimental with some false negatives that we'll patch in minor re It sometimes overlaps with: -- [`color-no-invalid-hex`](https://github.com/stylelint-scss/stylelint-scss/6.11.1/src/rules/color-no-invalid-hex/README.md) -- [`function-no-unknown`](https://github.com/stylelint-scss/stylelint-scss/6.11.1/src/rules/function-no-unknown/README.md) -- [`string-no-newline`](https://github.com/stylelint-scss/stylelint-scss/6.11.1/src/rules/string-no-newline/README.md) -- [`unit-no-unknown`](https://github.com/stylelint-scss/stylelint-scss/6.11.1/src/rules/unit-no-unknown/README.md) +- [`color-no-invalid-hex`](https://github.com/stylelint-scss/stylelint-scss/6.12.1/src/rules/color-no-invalid-hex/README.md) +- [`function-no-unknown`](https://github.com/stylelint-scss/stylelint-scss/6.12.1/src/rules/function-no-unknown/README.md) +- [`string-no-newline`](https://github.com/stylelint-scss/stylelint-scss/6.12.1/src/rules/string-no-newline/README.md) +- [`unit-no-unknown`](https://github.com/stylelint-scss/stylelint-scss/6.12.1/src/rules/unit-no-unknown/README.md) If duplicate problems are flagged, you can turn off the corresponding rule. diff --git a/docs/description/scss_double-slash-comment-whitespace-inside.md b/docs/description/scss_double-slash-comment-whitespace-inside.md index aa99fd7..5e3c1a0 100644 --- a/docs/description/scss_double-slash-comment-whitespace-inside.md +++ b/docs/description/scss_double-slash-comment-whitespace-inside.md @@ -9,6 +9,8 @@ a { * Such whitespace */ ``` +The [`fix` option](https://stylelint.io/user-guide/usage/options#fix) can automatically fix all of the problems reported by this rule. + This rule only works with SCSS-like [single-line comments](https://sass-lang.com/documentation/syntax/comments) and ignores CSS comments (`/* */`). Any number of slashes are allowed at the beginning of the comment. So `/// comment` is treated the same way as `// comment`. @@ -21,7 +23,7 @@ Note that a newline is not possible as a whitespace in terms of this rule as `// ### `"always"` -There *must always* be whitespace after the `//` inside `//`-comments. +There _must always_ be whitespace after the `//` inside `//`-comments. The following patterns are considered warnings: @@ -29,7 +31,7 @@ The following patterns are considered warnings: //comment ``` -The following patterns are *not* considered warnings: +The following patterns are _not_ considered warnings: ```scss // comment @@ -41,7 +43,7 @@ The following patterns are *not* considered warnings: ### `"never"` -There *must never* be whitespace after the `//` inside `//`-comments. +There _must never_ be whitespace after the `//` inside `//`-comments. The following patterns are considered warnings: @@ -49,7 +51,7 @@ The following patterns are considered warnings: // comment ``` -The following patterns are *not* considered warnings: +The following patterns are _not_ considered warnings: ```scss //comment diff --git a/docs/description/scss_property-no-unknown.md b/docs/description/scss_property-no-unknown.md index f9e458f..9a02a7c 100644 --- a/docs/description/scss_property-no-unknown.md +++ b/docs/description/scss_property-no-unknown.md @@ -18,7 +18,7 @@ This rule ignores: Use option `checkPrefixed` described below to turn on checking of vendor-prefixed properties. -The [`message` secondary option](https://github.com/stylelint-scss/stylelint-scss/6.11.1/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`message` secondary option](https://github.com/stylelint-scss/stylelint-scss/6.12.1/docs/user-guide/configure.md#message) can accept the arguments of this rule. ## Options diff --git a/docs/description/selector-anb-no-unmatchable.md b/docs/description/selector-anb-no-unmatchable.md index 2ca97ef..88ea286 100644 --- a/docs/description/selector-anb-no-unmatchable.md +++ b/docs/description/selector-anb-no-unmatchable.md @@ -11,12 +11,16 @@ a:nth-child(0n+0) {} [An+B selectors](https://www.w3.org/TR/css-syntax-3/#anb-microsyntax) are one-indexed. Selectors that always evaluate to `0` will not match any elements. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "selector-anb-no-unmatchable": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/selector-attribute-name-disallowed-list.md b/docs/description/selector-attribute-name-disallowed-list.md index a23fa90..d340920 100644 --- a/docs/description/selector-attribute-name-disallowed-list.md +++ b/docs/description/selector-attribute-name-disallowed-list.md @@ -9,16 +9,20 @@ Specify a list of disallowed attribute names. * This name */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string|regex`: `["array", "of", /names/, "regex"]|"name"|"/regex/"|/regex/` +### `Array` + +```json +["array", "of", "attribute-names", "/regex/"] +``` Given: ```json -["class", "id", "/^data-/"] +{ + "selector-attribute-name-disallowed-list": ["class", "id", "/^data-/"] +} ``` The following patterns are considered problems: diff --git a/docs/description/selector-attribute-operator-allowed-list.md b/docs/description/selector-attribute-operator-allowed-list.md index 19a7c4b..811a1cc 100644 --- a/docs/description/selector-attribute-operator-allowed-list.md +++ b/docs/description/selector-attribute-operator-allowed-list.md @@ -9,16 +9,20 @@ Specify a list of allowed attribute operators. * This operator */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string`: `["array", "of", "operators"]|"operator"` +### `Array` + +```json +["array", "of", "attribute-operators"] +``` Given: ```json -["=", "|="] +{ + "selector-attribute-operator-allowed-list": ["=", "|="] +} ``` The following patterns are considered problems: diff --git a/docs/description/selector-attribute-operator-disallowed-list.md b/docs/description/selector-attribute-operator-disallowed-list.md index 8125f06..00cc3be 100644 --- a/docs/description/selector-attribute-operator-disallowed-list.md +++ b/docs/description/selector-attribute-operator-disallowed-list.md @@ -9,16 +9,20 @@ Specify a list of disallowed attribute operators. * This operator */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string`: `["array", "of", "operators"]|"operator"` +### `Array` + +```json +["array", "of", "attribute-operators"] +``` Given: ```json -["*="] +{ + "selector-attribute-operator-disallowed-list": ["*="] +} ``` The following patterns are considered problems: diff --git a/docs/description/selector-attribute-quotes.md b/docs/description/selector-attribute-quotes.md index 2331912..1144416 100644 --- a/docs/description/selector-attribute-quotes.md +++ b/docs/description/selector-attribute-quotes.md @@ -9,18 +9,20 @@ Require or disallow quotes for attribute values. * These quotes */ ``` -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix most of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept arguments. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix most of the problems reported by this rule. ## Options -`string`: `"always"|"never"` - ### `"always"` Attribute values _must always_ be quoted. +```json +{ + "selector-attribute-quotes": "always" +} +``` + The following patterns are considered problems: @@ -64,6 +66,12 @@ The following patterns are _not_ considered problems: Attribute values _must never_ be quoted. +```json +{ + "selector-attribute-quotes": "never" +} +``` + The following patterns are considered problems: diff --git a/docs/description/selector-class-pattern.md b/docs/description/selector-class-pattern.md index 0347fb1..ad564ef 100644 --- a/docs/description/selector-class-pattern.md +++ b/docs/description/selector-class-pattern.md @@ -13,20 +13,20 @@ This rule ignores non-outputting Less mixin definitions and called Less mixins. Escaped selectors (e.g. `.u-size-11\/12\@sm`) are parsed as escaped twice (e.g. `.u-size-11\\/12\\@sm`). Your RegExp should account for that. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`regex|string` +### `string` -A string will be translated into a RegExp like so `new RegExp(yourString)` — so be sure to escape properly. +Specify a regex string not surrounded with `"/"`. The selector value _after `.`_ will be checked. No need to include `.` in your pattern. -Given the string: +Given: ```json -"foo-[a-z]+" +{ + "selector-class-pattern": "foo-[a-z]+" +} ``` The following patterns are considered problems: @@ -70,16 +70,16 @@ div > #zing + .foo-bar {} ## Optional secondary options -### `resolveNestedSelectors: true | false` (default: `false`) +### `resolveNestedSelectors` -This option will resolve nested selectors with `&` interpolation. - -For example, with `true`. +This option will resolve nested selectors with `&` interpolation. Defaults to `false`. Given the string: ```json -"^[A-Z]+$" +{ + "selector-class-pattern": ["^[A-Z]+$", { "resolveNestedSelectors": true }] +} ``` The following patterns are considered problems: diff --git a/docs/description/selector-combinator-allowed-list.md b/docs/description/selector-combinator-allowed-list.md index 465dd8f..dee46f0 100644 --- a/docs/description/selector-combinator-allowed-list.md +++ b/docs/description/selector-combinator-allowed-list.md @@ -13,16 +13,20 @@ This rule normalizes the whitespace descendant combinator to be a single space. This rule ignores [reference combinators](https://www.w3.org/TR/selectors4/#idref-combinators) e.g. `/for/`. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string`: `["array", "of", "combinators"]|"combinator"` +### `Array` + +```json +["array", "of", "combinators"] +``` Given: ```json -[">", " "] +{ + "selector-combinator-allowed-list": [">", " "] +} ``` The following patterns are considered problems: diff --git a/docs/description/selector-combinator-disallowed-list.md b/docs/description/selector-combinator-disallowed-list.md index a8aa207..e3c5795 100644 --- a/docs/description/selector-combinator-disallowed-list.md +++ b/docs/description/selector-combinator-disallowed-list.md @@ -13,16 +13,20 @@ This rule normalizes the whitespace descendant combinator to be a single space. This rule ignores [reference combinators](https://www.w3.org/TR/selectors4/#idref-combinators) e.g. `/for/`. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string`: `["array", "of", "combinators"]|"combinator"` +### `Array` + +```json +["array", "of", "combinators"] +``` Given: ```json -[">", " "] +{ + "selector-combinator-disallowed-list": [">", " "] +} ``` The following patterns are considered problems: diff --git a/docs/description/selector-disallowed-list.md b/docs/description/selector-disallowed-list.md index e9cb4d3..ad18625 100644 --- a/docs/description/selector-disallowed-list.md +++ b/docs/description/selector-disallowed-list.md @@ -9,18 +9,20 @@ Specify a list of disallowed selectors. * This is selector */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string|regexp`: `["array", "of", "selectors", /or/, "/regex/"]|"selector"|"/regex/"|/regex/` +### `Array` -If a string is surrounded with `"/"` (e.g. `"/\.foo/"`), it is interpreted as a regular expression. +```json +["array", "of", "selectors", "/regex/"] +``` Given: ```json -["a > .foo", "/\\[data-.+]/"] +{ + "selector-disallowed-list": ["a > .foo", "/\\[data-.+]/"] +} ``` The following patterns are considered problems: @@ -71,16 +73,16 @@ a[href] {} ## Optional secondary options -### `splitList: true | false` (default: `false`) - -Split selector lists into individual selectors. +### `splitList` -For example, with `true`. +Split selector lists into individual selectors. Defaults to `false`. Given: ```json -[".foo", { "splitList": true }] +{ + "selector-disallowed-list": [".foo", { "splitList": true }] +} ``` The following pattern is considered a problem: @@ -97,14 +99,22 @@ The following pattern is _not_ considered a problem: .bar .foo {} ``` -### `ignore: ["inside-block"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` + +#### `"inside-block"` Ignore selectors that are inside a block. Given: ```json -[".foo", { "ignore": ["inside-block"] }] +{ + "selector-disallowed-list": [".foo", { "ignore": ["inside-block"] }] +} ``` The following pattern is _not_ considered a problem: @@ -116,14 +126,16 @@ The following pattern is _not_ considered a problem: } ``` -### `ignore: ["keyframe-selectors"]` +#### `"keyframe-selectors"` Ignore keyframe selectors. Given: ```json -["/from/", { "ignore": ["keyframe-selectors"] }] +{ + "selector-disallowed-list": ["/from/", { "ignore": ["keyframe-selectors"] }] +} ``` The following pattern is _not_ considered a problem: diff --git a/docs/description/selector-id-pattern.md b/docs/description/selector-id-pattern.md index 2bb7f18..fc6fb22 100644 --- a/docs/description/selector-id-pattern.md +++ b/docs/description/selector-id-pattern.md @@ -9,20 +9,20 @@ Specify a pattern for ID selectors. * These ID selectors */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`regex|string` +### `string` -A string will be translated into a RegExp like so `new RegExp(yourString)` — so be sure to escape properly. +Specify a regex string not surrounded with `"/"`. The selector value _after `#`_ will be checked. No need to include `#` in your pattern. -Given the string: +Given: ```json -"foo-[a-z]+" +{ + "selector-id-pattern": "foo-[a-z]+" +} ``` The following patterns are considered problems: diff --git a/docs/description/selector-max-attribute.md b/docs/description/selector-max-attribute.md index 61b4c00..f39a1d8 100644 --- a/docs/description/selector-max-attribute.md +++ b/docs/description/selector-max-attribute.md @@ -13,13 +13,19 @@ This rule resolves nested selectors before counting the number of attribute sele The `:not()` pseudo-class is also evaluated separately. The rule processes the argument as if it were an independent selector, and the result does not count toward the total for the entire selector. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`int`: Maximum attribute selectors allowed. +### `number` + +Specify a maximum attribute selectors allowed. + +Given: -For example, with `2`: +```json +{ + "selector-max-attribute": 2 +} +``` The following patterns are considered problems: @@ -92,16 +98,20 @@ The following patterns are _not_ considered problems: ## Optional secondary options -### `ignoreAttributes: ["/regex/", /regex/, "non-regex"]` +### `ignoreAttributes` + +```json +{ "ignoreAttributes": ["array", "of", "attributes", "/regex/"] } +``` Given: ```json -["/^data-my-/", "dir"] +{ + "selector-max-attribute": [0, { "ignoreAttributes": ["/^data-my-/", "dir"] }] +} ``` -For example, with `0`. - The following patterns are _not_ considered problems: diff --git a/docs/description/selector-max-class.md b/docs/description/selector-max-class.md index 9b5fb96..1dbb36a 100644 --- a/docs/description/selector-max-class.md +++ b/docs/description/selector-max-class.md @@ -14,13 +14,19 @@ This rule resolves nested selectors before counting the number of classes in a s The `:not()` pseudo-class is also evaluated separately. The rule processes the argument as if it were an independent selector, and the result does not count toward the total for the entire selector. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`int`: Maximum classes allowed. +### `number` + +Specify a maximum classes allowed. + +Given: -For example, with `2`: +```json +{ + "selector-max-class": 2 +} +``` The following patterns are considered problems: diff --git a/docs/description/selector-max-combinators.md b/docs/description/selector-max-combinators.md index daededc..f878370 100644 --- a/docs/description/selector-max-combinators.md +++ b/docs/description/selector-max-combinators.md @@ -11,13 +11,19 @@ Limit the number of combinators in a selector. This rule resolves nested selectors before counting the number of combinators selectors. Each selector in a [selector list](https://www.w3.org/TR/selectors4/#selector-list) is evaluated separately. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`int`: Maximum combinators selectors allowed. +### `number` + +Specify a maximum combinators selectors allowed. + +Given: -For example, with `2`: +```json +{ + "selector-max-combinators": 2 +} +``` The following patterns are considered problems: diff --git a/docs/description/selector-max-compound-selectors.md b/docs/description/selector-max-compound-selectors.md index 5e992e3..4a0665d 100644 --- a/docs/description/selector-max-compound-selectors.md +++ b/docs/description/selector-max-compound-selectors.md @@ -17,20 +17,26 @@ This rule resolves nested selectors before counting the depth of a selector. Eac > [!WARNING] > The `:not()` pseudo-class is considered one compound selector irrespective to the complexity of the selector inside it. The rule _does_ process that inner selector, but does so separately, independent of the main selector. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`int`: Maximum compound selectors allowed. +### `number` + +Specify a maximum compound selectors allowed. + +Given: -For example, with `3`: +```json +{ + "selector-max-compound-selectors": 3 +} +``` The following patterns are considered problems: ```css .foo .bar .baz .lorem {} -``` +```` ```css @@ -63,16 +69,23 @@ div {} ## Optional secondary options -### `ignoreSelectors: ["/regex/", /regex/, "non-regex"]` +### `ignoreSelectors` -Ignore some compound selectors. This may be useful for deep selectors like Vue's `::v-deep` or Angular's `::ng-deep` that behave more like combinators than compound selectors. +```json +{ "ignoreSelectors": ["array", "of", "selectors", "/regex/"] } +``` -For example, with `2`. +Ignore some compound selectors. This may be useful for deep selectors like Vue's `::v-deep` or Angular's `::ng-deep` that behave more like combinators than compound selectors. Given: ```json -["::v-deep", "/ignored/", ":not"] +{ + "selector-max-compound-selectors": [ + 2, + { "ignoreSelectors": ["::v-deep", "/ignored/", ":not"] } + ] +} ``` The following patterns are considered problems: diff --git a/docs/description/selector-max-id.md b/docs/description/selector-max-id.md index e8588a1..b5c48cf 100644 --- a/docs/description/selector-max-id.md +++ b/docs/description/selector-max-id.md @@ -13,13 +13,19 @@ This rule resolves nested selectors before counting the number of ID selectors. The `:not()` pseudo-class is also evaluated separately. The rule processes the argument as if it were an independent selector, and the result does not count toward the total for the entire selector. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`int`: Maximum universal selectors allowed. +### `number` + +Specify a maximum universal selectors allowed. -For example, with `2`: +Given: + +```json +{ + "selector-max-id": 2 +} +``` The following patterns are considered problems: @@ -79,7 +85,18 @@ The following patterns are _not_ considered problems: ## Optional secondary options -### `checkContextFunctionalPseudoClasses: ["/regex/", /regex/, "non-regex"]` +### `checkContextFunctionalPseudoClasses` + +```json +{ + "checkContextFunctionalPseudoClasses": [ + "array", + "of", + "pseudo-classes", + "/regex/" + ] +} +``` Check selectors inside of the specified custom [functional pseudo-classes](https://drafts.csswg.org/selectors-4/#pseudo-classes) that provide [evaluation contexts](https://drafts.csswg.org/selectors-4/#specificity-rules). @@ -88,7 +105,9 @@ This option has a higher precedence than `ignoreContextFunctionalPseudoClasses`. Given: ```json -[":--foo"] +{ + "selector-max-id": [2, { "checkContextFunctionalPseudoClasses": [":--foo"] }] +} ``` The following pattern is considered a problem: @@ -105,14 +124,30 @@ The following pattern is _not_ considered a problem: :--foo() {} ``` -### `ignoreContextFunctionalPseudoClasses: ["/regex/", /regex/, "non-regex"]` +### `ignoreContextFunctionalPseudoClasses` + +```json +{ + "ignoreContextFunctionalPseudoClasses": [ + "array", + "of", + "pseudo-classes", + "/regex/" + ] +} +``` Ignore selectors inside of the specified [functional pseudo-classes](https://drafts.csswg.org/selectors-4/#pseudo-classes) that provide [evaluation contexts](https://drafts.csswg.org/selectors-4/#specificity-rules). Given: ```json -[":not", "/^:(h|H)as$/"] +{ + "selector-max-id": [ + 0, + { "ignoreContextFunctionalPseudoClasses": [":not", "/^:(h|H)as$/"] } + ] +} ``` The following patterns are considered problems: diff --git a/docs/description/selector-max-pseudo-class.md b/docs/description/selector-max-pseudo-class.md index 3fe399c..61ceab5 100644 --- a/docs/description/selector-max-pseudo-class.md +++ b/docs/description/selector-max-pseudo-class.md @@ -14,13 +14,19 @@ This rule resolves nested selectors before counting the number of pseudo-classes The content of the `:not()` pseudo-class is also evaluated separately. The rule processes the argument as if it were an independent selector, and the result does not count toward the total for the entire selector. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`int`: Maximum pseudo-classes allowed. +### `number` + +Specify a maximum pseudo-classes allowed. -For example, with `1`: +Given: + +```json +{ + "selector-max-pseudo-class": 1 +} +``` The following patterns are considered problems: diff --git a/docs/description/selector-max-specificity.md b/docs/description/selector-max-specificity.md index cb833c7..940d56e 100644 --- a/docs/description/selector-max-specificity.md +++ b/docs/description/selector-max-specificity.md @@ -15,15 +15,21 @@ This rule ignores selectors with variable interpolation (`#{$var}`, `@{var}`, `$ This rule resolves nested selectors before counting the specificity of a selector. Each selector in a [selector list](https://www.w3.org/TR/selectors4/#selector-list) is evaluated separately. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`string`: Maximum specificity allowed. +### `string` + +Specify a maximum specificity allowed. + +The format is `"id,class,type"`, as laid out in the [W3C selector spec](https://drafts.csswg.org/selectors/#specificity-rules). -Format is `"id,class,type"`, as laid out in the [W3C selector spec](https://drafts.csswg.org/selectors/#specificity-rules). +Given: -For example, with `"0,2,0"`: +```json +{ + "selector-max-specificity": "0,2,0" +} +``` The following patterns are considered problems: @@ -92,17 +98,23 @@ div {} ## Optional secondary options -### `ignoreSelectors: ["/regex/", /regex/, "non-regex"]` +### `ignoreSelectors` + +```json +{ "ignoreSelectors": ["array", "of", "selectors", "/regex/"] } +``` Given: ```json -[ - "0,2,0", - { - "ignoreSelectors": [":host", ":host-context", "/^my-/"] - } -] +{ + "selector-max-specificity": [ + "0,2,0", + { + "ignoreSelectors": [":host", ":host-context", "/^my-/"] + } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/selector-max-type.md b/docs/description/selector-max-type.md index 406a63f..ecb32e1 100644 --- a/docs/description/selector-max-type.md +++ b/docs/description/selector-max-type.md @@ -13,13 +13,19 @@ This rule resolves nested selectors before counting the number of type selectors The `:not()` pseudo-class is also evaluated separately. The rule processes the argument as if it were an independent selector, and the result does not count toward the total for the entire selector. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`int`: Maximum type selectors allowed. +### `number` + +Specify a maximum type selectors allowed. -For example, with `2`: +Given: + +```json +{ + "selector-max-type": 2 +} +``` The following patterns are considered problems: @@ -79,13 +85,23 @@ div a .foo:not(span) {} ## Optional secondary options -### `ignore: ["child", "compounded", "custom-elements", "descendant", "next-sibling"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` #### `"child"` Discount child type selectors. -For example, with `2`: +Given: + +```json +{ + "selector-max-type": [2, { "ignore": ["child"] }] +} +``` The following patterns are _not_ considered problems: @@ -103,7 +119,13 @@ div span > a {} Discount compounded type selectors -- i.e. type selectors chained with other selectors. -For example, with `2`: +Given: + +```json +{ + "selector-max-type": [2, { "ignore": ["compounded"] }] +} +``` The following patterns are _not_ considered problems: @@ -121,7 +143,13 @@ div span a#bar {} Discount custom elements. -For example, with `2`: +Given: + +```json +{ + "selector-max-type": [2, { "ignore": ["custom-elements"] }] +} +``` The following pattern is _not_ considered a problem: @@ -134,7 +162,13 @@ div a foo-bar {} Discount descendant type selectors. -For example, with `2`: +Given: + +```json +{ + "selector-max-type": [2, { "ignore": ["descendant"] }] +} +``` The following patterns are _not_ considered problems: @@ -152,7 +186,13 @@ The following patterns are _not_ considered problems: Discount next-sibling type selectors. -For example, with `2`: +Given: + +```json +{ + "selector-max-type": [2, { "ignore": ["next-sibling"] }] +} +``` The following patterns are _not_ considered problems: @@ -166,16 +206,20 @@ div a + span {} #bar + div + span + a + span {} ``` -### `ignoreTypes: ["/regex/", /regex/, "non-regex"]` +### `ignoreTypes` + +```json +{ "ignoreTypes": ["array", "of", "types", "/regex/"] } +``` Given: ```json -["/^my-/", "custom"] +{ + "selector-max-type": [2, { "ignoreTypes": ["/^my-/", "custom"] }] +} ``` -For example, with `2`. - The following patterns are _not_ considered problems: diff --git a/docs/description/selector-max-universal.md b/docs/description/selector-max-universal.md index 9d745b0..1824f41 100644 --- a/docs/description/selector-max-universal.md +++ b/docs/description/selector-max-universal.md @@ -13,13 +13,19 @@ This rule resolves nested selectors before counting the number of universal sele The logical combinations pseudo-class (e.g. `:not`, `:has`) is also evaluated separately. The rule processes the argument as if it were an independent selector, and the result does not count toward the total for the entire selector. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`int`: Maximum universal selectors allowed. +### `number` + +Specify a maximum universal selectors allowed. + +Given: -For example, with `2`: +```json +{ + "selector-max-universal": 2 +} +``` The following patterns are considered problems: @@ -79,18 +85,22 @@ The following patterns are _not_ considered problems: ## Optional secondary options -### `ignoreAfterCombinators: ["array", "of", "combinators"]` +### `ignoreAfterCombinators` + +```json +{ "ignoreAfterCombinators": ["array", "of", "combinators"] } +``` Ignore universal selectors that come after one of the specified combinators. Given: ```json -[">", "+"] +{ + "selector-max-universal": [2, { "ignoreAfterCombinators": [">", "+"] }] +} ``` -For example, with `2`. - The following pattern is _not_ considered a problem: diff --git a/docs/description/selector-nested-pattern.md b/docs/description/selector-nested-pattern.md index 9016dc5..3996612 100644 --- a/docs/description/selector-nested-pattern.md +++ b/docs/description/selector-nested-pattern.md @@ -13,20 +13,20 @@ Specify a pattern for the selectors of rules nested within rules. Non-standard selectors (e.g. selectors with Sass or Less interpolation) and selectors of rules nested within at-rules are ignored. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`regex|string` +### `string` -A string will be translated into a RegExp like so `new RegExp(yourString)` — so be sure to escape properly. +Specify a regex string not surrounded with `"/"`. The selector value will be checked in its entirety. If you'd like to allow for combinators and commas, you must incorporate them into your pattern. -Given the string: +Given: ```json -"^&:(?:hover|focus)$" +{ + "selector-nested-pattern": "^&:(?:hover|focus)$" +} ``` The following patterns are considered problems: @@ -79,16 +79,16 @@ a { ## Optional secondary options -### `splitList: true | false` (default: `false`) +### `splitList` -Split selector lists into individual selectors. +Split selector lists into individual selectors. Defaults to `false`. -For example, with `true`. - -Given the string: +Given: ```json -"^&:(?:hover|focus)$" +{ + "selector-nested-pattern": ["^&:(?:hover|focus)$", { "splitList": true }] +} ``` The following patterns are considered problems: diff --git a/docs/description/selector-no-qualifying-type.md b/docs/description/selector-no-qualifying-type.md index 95368c5..497db37 100644 --- a/docs/description/selector-no-qualifying-type.md +++ b/docs/description/selector-no-qualifying-type.md @@ -11,12 +11,16 @@ Disallow qualifying a selector by type. A type selector is "qualifying" when it is compounded with (chained to) another selector (e.g. `a.foo`, `a#foo`). This rule does not regulate type selectors that are combined with other selectors via a combinator (e.g. `a > .foo`, `a #foo`). -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "selector-no-qualifying-type": true +} +``` + The following patterns are considered problems: @@ -65,12 +69,22 @@ input { ## Optional secondary options -### `ignore: ["attribute", "class", "id"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` #### `"attribute"` Allow attribute selectors qualified by type. +```json +{ + "selector-no-qualifying-type": [true, { "ignore": ["attribute"] }] +} +``` + The following patterns are _not_ considered problems: @@ -84,6 +98,12 @@ input[type='button'] { Allow class selectors qualified by type. +```json +{ + "selector-no-qualifying-type": [true, { "ignore": ["class"] }] +} +``` + The following patterns are _not_ considered problems: @@ -97,6 +117,12 @@ a.foo { Allow ID selectors qualified by type. +```json +{ + "selector-no-qualifying-type": [true, { "ignore": ["id"] }] +} +``` + The following patterns are _not_ considered problems: diff --git a/docs/description/selector-no-vendor-prefix.md b/docs/description/selector-no-vendor-prefix.md index 7da4162..155c8b0 100644 --- a/docs/description/selector-no-vendor-prefix.md +++ b/docs/description/selector-no-vendor-prefix.md @@ -11,14 +11,18 @@ input::-moz-placeholder {} This rule ignores non-standard vendor-prefixed selectors that aren't handled by [Autoprefixer](https://github.com/postcss/autoprefixer). -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. However, it will not remove duplicate selectors produced when the prefixes are removed. You can use [Autoprefixer](https://github.com/postcss/autoprefixer) itself, with the [`add` option off and the `remove` option on](https://github.com/postcss/autoprefixer#options), in these situations. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. However, it will not remove duplicate selectors produced when the prefixes are removed. You can use [Autoprefixer](https://github.com/postcss/autoprefixer) itself, with the [`add` option off and the `remove` option on](https://github.com/postcss/autoprefixer#options), in these situations. ## Options ### `true` +```json +{ + "selector-no-vendor-prefix": true +} +``` + The following patterns are considered problems: @@ -45,14 +49,23 @@ input::placeholder {} ## Optional secondary options -### `ignoreSelectors: ["/regex/", /regex/, "non-regex"]` +### `ignoreSelectors` + +```json +{ "ignoreSelectors": ["array", "of", "selectors", "/regex/"] } +``` Ignore vendor prefixes for selectors. Given: ```json -["::-webkit-input-placeholder", "/-moz-.*/"] +{ + "selector-no-vendor-prefix": [ + true, + { "ignoreSelectors": ["::-webkit-input-placeholder", "/-moz-.*/"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/selector-not-notation.md b/docs/description/selector-not-notation.md index f65f68d..a775d21 100644 --- a/docs/description/selector-not-notation.md +++ b/docs/description/selector-not-notation.md @@ -16,16 +16,30 @@ Use: - `"complex"` to author modern Selectors Level 4 CSS - `"simple"` for backwards compatibility with older browsers -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) option can automatically fix most of the problems reported by this rule. +> [!NOTE] +> The notations can have different specificities. For example: -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. + +```css +/* this complex notation has a specificity of 0,1,1 */ +a:not(.foo, .bar) {} -## Options +/* this simple notation has a specificity of 0,2,1 */ +a:not(.foo):not(.bar) {} +``` + +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) option can automatically fix most of the problems reported by this rule. -`string`: `"simple"|"complex"` +## Options ### `"simple"` +```json +{ + "selector-not-notation": "simple" +} +``` + The following patterns are considered problems: @@ -52,6 +66,12 @@ The following patterns are _not_ considered problems: ### `"complex"` +```json +{ + "selector-not-notation": "complex" +} +``` + The following pattern is considered a problem: diff --git a/docs/description/selector-pseudo-class-allowed-list.md b/docs/description/selector-pseudo-class-allowed-list.md index 58e809e..68bdfeb 100644 --- a/docs/description/selector-pseudo-class-allowed-list.md +++ b/docs/description/selector-pseudo-class-allowed-list.md @@ -11,18 +11,20 @@ Specify a list of allowed pseudo-class selectors. This rule ignores selectors that use variable interpolation e.g. `:#{$variable} {}`. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string|regex`: `["array", "of", "unprefixed", /pseudo-classes/, "/regex/"]|"pseudo-class"|"/regex/"|/regex/` +### `Array` -If a string is surrounded with `"/"` (e.g. `"/^nth-/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/^nth-/` will match `nth-child`, `nth-last-child`, `nth-of-type`, etc. +```json +["array", "of", "unprefixed", "pseudo-classes", "/regex/"] +``` Given: ```json -["hover", "/^nth-/"] +{ + "selector-pseudo-class-allowed-list": ["hover", "/^nth-/"] +} ``` The following patterns are considered problems: diff --git a/docs/description/selector-pseudo-class-disallowed-list.md b/docs/description/selector-pseudo-class-disallowed-list.md index e02be83..87ccd6f 100644 --- a/docs/description/selector-pseudo-class-disallowed-list.md +++ b/docs/description/selector-pseudo-class-disallowed-list.md @@ -11,18 +11,20 @@ Specify a list of disallowed pseudo-class selectors. This rule ignores selectors that use variable interpolation e.g. `:#{$variable} {}`. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string|regex`: `["array", "of", "unprefixed", /pseudo-classes/, "/regex/"]|"pseudo-class"|"/regex/"|/regex/` +### `Array` -If a string is surrounded with `"/"` (e.g. `"/^nth-/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/^nth-/` will match `nth-child`, `nth-last-child`, `nth-of-type`, etc. +```json +["array", "of", "unprefixed", "pseudo-classes", "/regex/"] +``` Given: ```json -["hover", "/^nth-/"] +{ + "selector-pseudo-class-disallowed-list": ["hover", "/^nth-/"] +} ``` The following patterns are considered problems: diff --git a/docs/description/selector-pseudo-class-no-unknown.md b/docs/description/selector-pseudo-class-no-unknown.md index 134da5d..c00da5b 100644 --- a/docs/description/selector-pseudo-class-no-unknown.md +++ b/docs/description/selector-pseudo-class-no-unknown.md @@ -13,12 +13,16 @@ This rule considers pseudo-class selectors defined in the CSS Specifications, up This rule ignores vendor-prefixed pseudo-class selectors. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "selector-pseudo-class-no-unknown": true +} +``` + The following patterns are considered problems: @@ -60,12 +64,21 @@ input:-moz-placeholder {} ## Optional secondary options -### `ignorePseudoClasses: ["/regex/", /regex/, "non-regex"]` +### `ignorePseudoClasses` + +```json +{ "ignorePseudoClasses": ["array", "of", "pseudo-classes", "/regex/"] } +``` Given: ```json -["/^--my-/", "--pseudo-class"] +{ + "selector-pseudo-class-no-unknown": [ + true, + { "ignorePseudoClasses": ["/^--my-/", "--pseudo-class"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/selector-pseudo-element-allowed-list.md b/docs/description/selector-pseudo-element-allowed-list.md index 9e4f453..648e0e0 100644 --- a/docs/description/selector-pseudo-element-allowed-list.md +++ b/docs/description/selector-pseudo-element-allowed-list.md @@ -14,16 +14,20 @@ This rule ignores: - CSS2 pseudo-elements i.e. those prefixed with a single colon - selectors that use variable interpolation e.g. `::#{$variable} {}` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string|regex`: `["array", "of", "unprefixed", /pseudo-elements/, "/regex/"]|"pseudo-element"|"/regex/"|/regex/` +### `Array` + +```json +["array", "of", "unprefixed", "pseudo-elements", "/regex/"] +``` Given: ```json -["before", "/^--my-/i"] +{ + "selector-pseudo-element-allowed-list": ["before", "/^--my-/i"] +} ``` The following patterns are considered problems: diff --git a/docs/description/selector-pseudo-element-colon-notation.md b/docs/description/selector-pseudo-element-colon-notation.md index aeb7e6d..3f922ad 100644 --- a/docs/description/selector-pseudo-element-colon-notation.md +++ b/docs/description/selector-pseudo-element-colon-notation.md @@ -13,18 +13,20 @@ The `::` notation was chosen for _pseudo-elements_ to establish a discrimination However, for compatibility with existing style sheets, user agents also accept the previous one-colon notation for _pseudo-elements_ introduced in CSS levels 1 and 2 (namely, `:first-line`, `:first-letter`, `:before` and `:after`). -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"single"|"double"` - ### `"single"` Applicable pseudo-elements _must always_ use the single colon notation. +```json +{ + "selector-pseudo-element-colon-notation": "single" +} +``` + The following patterns are considered problems: @@ -83,6 +85,12 @@ li::marker { font-variant-numeric: tabular-nums; } Applicable pseudo-elements _must always_ use the double colon notation. +```json +{ + "selector-pseudo-element-colon-notation": "double" +} +``` + The following patterns are considered problems: diff --git a/docs/description/selector-pseudo-element-disallowed-list.md b/docs/description/selector-pseudo-element-disallowed-list.md index 0a3a19a..34a19ec 100644 --- a/docs/description/selector-pseudo-element-disallowed-list.md +++ b/docs/description/selector-pseudo-element-disallowed-list.md @@ -14,16 +14,20 @@ This rule ignores: - CSS2 pseudo-elements i.e. those prefixed with a single colon - selectors that use variable interpolation e.g. `::#{$variable} {}` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string|regex`: `["array", "of", "unprefixed", /pseudo-elements/, "/regex/"]|"pseudo-element"|"/regex/"|/regex/` +### `Array` + +```json +["array", "of", "unprefixed", "pseudo-elements", "/regex/"] +``` Given: ```json -["before", "/^--my-/i"] +{ + "selector-pseudo-element-disallowed-list": ["before", "/^--my-/i"] +} ``` The following patterns are considered problems: diff --git a/docs/description/selector-pseudo-element-no-unknown.md b/docs/description/selector-pseudo-element-no-unknown.md index ddde98f..002dbb5 100644 --- a/docs/description/selector-pseudo-element-no-unknown.md +++ b/docs/description/selector-pseudo-element-no-unknown.md @@ -13,12 +13,16 @@ This rule considers pseudo-element selectors defined in the CSS Specifications, This rule ignores vendor-prefixed pseudo-element selectors. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "selector-pseudo-element-no-unknown": true +} +``` + The following patterns are considered problems: @@ -60,12 +64,21 @@ input::-moz-placeholder {} ## Optional secondary options -### `ignorePseudoElements: ["/regex/", /regex/, "non-regex"]` +### `ignorePseudoElements` + +```json +{ "ignorePseudoElements": ["array", "of", "pseudo-elements", "/regex/"] } +``` Given: ```json -["/^--my-/", "--pseudo-element"] +{ + "selector-pseudo-element-no-unknown": [ + true, + { "ignorePseudoElements": ["/^--my-/", "--pseudo-element"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/selector-type-case.md b/docs/description/selector-type-case.md index 028c666..f6689e6 100644 --- a/docs/description/selector-type-case.md +++ b/docs/description/selector-type-case.md @@ -9,16 +9,18 @@ Specify lowercase or uppercase for type selectors. * This is type selector */ ``` -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"lower"|"upper"` - ### `"lower"` +```json +{ + "selector-type-case": "lower" +} +``` + The following patterns are considered problems: @@ -45,6 +47,12 @@ li {} ### `"upper"` +```json +{ + "selector-type-case": "upper" +} +``` + The following patterns are considered problems: @@ -71,12 +79,21 @@ LI {} ## Optional secondary options -### `ignoreTypes: ["/regex/", /regex/, "non-regex"]` +### `ignoreTypes` + +```json +{ "ignoreTypes": ["array", "of", "types", "/regex/"] } +``` Given: ```json -["$childClass", "/(p|P)arent.*/"] +{ + "selector-type-case": [ + "lower", + { "ignoreTypes": ["$childClass", "/(p|P)arent.*/"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/selector-type-no-unknown.md b/docs/description/selector-type-no-unknown.md index fb15567..12b3f6a 100644 --- a/docs/description/selector-type-no-unknown.md +++ b/docs/description/selector-type-no-unknown.md @@ -11,12 +11,16 @@ Disallow unknown type selectors. This rule considers tags defined in the HTML, SVG, and MathML specifications to be known. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "selector-type-no-unknown": true +} +``` + The following patterns are considered problems: @@ -48,12 +52,22 @@ li > a {} ## Optional secondary options -### `ignore: ["custom-elements", "default-namespace"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` #### `"custom-elements"` Allow custom elements. +```json +{ + "selector-type-no-unknown": [true, { "ignore": ["custom-elements"] }] +} +``` + The following patterns are considered problems: @@ -77,6 +91,12 @@ x-foo {} Allow unknown type selectors if they belong to the default namespace. +```json +{ + "selector-type-no-unknown": [true, { "ignore": ["default-namespace"] }] +} +``` + The following patterns are considered problems: @@ -91,12 +111,21 @@ The following patterns are _not_ considered problems: unknown {} ``` -### `ignoreNamespaces: ["/regex/", /regex/, "string"]` +### `ignoreNamespaces` + +```json +{ "ignoreNamespaces": ["array", "of", "namespaces", "/regex/"] } +``` Given: ```json -["/^my-/", "custom-namespace"] +{ + "selector-type-no-unknown": [ + true, + { "ignoreNamespaces": ["/^my-/", "custom-namespace"] } + ] +} ``` The following patterns are _not_ considered problems: @@ -116,12 +145,21 @@ my-namespace|unknown {} my-other-namespace|unknown {} ``` -### `ignoreTypes: ["/regex/", /regex/, "string"]` +### `ignoreTypes` + +```json +{ "ignoreTypes": ["array", "of", "types", "/regex/"] } +``` Given: ```json -["/^my-/", "custom-type"] +{ + "selector-type-no-unknown": [ + true, + { "ignoreTypes": ["/^my-/", "custom-type"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/shorthand-property-no-redundant-values.md b/docs/description/shorthand-property-no-redundant-values.md index c68d571..5d207d3 100644 --- a/docs/description/shorthand-property-no-redundant-values.md +++ b/docs/description/shorthand-property-no-redundant-values.md @@ -28,14 +28,18 @@ This rule checks the following shorthand properties: - `scroll-padding`, `scroll-padding-block`, `scroll-padding-inline` - `inset`, `inset-block`, `inset-inline` -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options ### `true` +```json +{ + "shorthand-property-no-redundant-values": true +} +``` + The following patterns are considered problems: @@ -84,3 +88,27 @@ a { padding: 1px 1em 1pt 1pc; } ```css a { border-radius: 10px / 5px; } ``` + +## Optional secondary options + +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` + +#### `"four-into-three-edge-values"` + +Ignore four-value shorthand declarations that could be shortened to three values when applied to edges. + +The following patterns are _not_ considered problems: + + +```css +a { margin: 1px 2px 3px 2px; } +``` + + +```css +a { inset: auto 0 0 0; } +``` diff --git a/docs/description/string-no-newline.md b/docs/description/string-no-newline.md index 9d14011..fc90d2c 100644 --- a/docs/description/string-no-newline.md +++ b/docs/description/string-no-newline.md @@ -15,10 +15,10 @@ a { This rule overlaps with: -- [`at-rule-descriptor-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/at-rule-descriptor-value-no-unknown/README.md) -- [`at-rule-prelude-no-invalid`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/at-rule-prelude-no-invalid/README.md) -- [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/declaration-property-value-no-unknown/README.md) -- [`media-query-no-invalid`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/media-query-no-invalid/README.md) +- [`at-rule-descriptor-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/at-rule-descriptor-value-no-unknown/README.md) +- [`at-rule-prelude-no-invalid`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/at-rule-prelude-no-invalid/README.md) +- [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/declaration-property-value-no-unknown/README.md) +- [`media-query-no-invalid`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/media-query-no-invalid/README.md) We recommend configuring this rule so that it doesn't overlap. @@ -26,6 +26,12 @@ We recommend configuring this rule so that it doesn't overlap. ### `true` +```json +{ + "string-no-newline": true +} +``` + The following patterns are considered problems: @@ -82,12 +88,22 @@ a { ## Optional secondary options -### `ignore: ["at-rule-preludes", "declaration-values"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` #### `"at-rule-preludes"` Ignore strings in at-rule preludes. +```json +{ + "string-no-newline": [true, { "ignore": ["at-rule-preludes"] }] +} +``` + The following patterns are _not_ considered problems: diff --git a/docs/description/syntax-string-no-invalid.md b/docs/description/syntax-string-no-invalid.md index 2084964..45f3eed 100644 --- a/docs/description/syntax-string-no-invalid.md +++ b/docs/description/syntax-string-no-invalid.md @@ -15,12 +15,16 @@ Syntax strings are used for the `syntax` descriptor value of the `@property` at- You can check [§5.1 “Supported Names” of the CSS Properties & Values API](https://drafts.css-houdini.org/css-properties-values-api/#supported-names) for a list of valid syntax component names. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options ### `true` +```json +{ + "syntax-string-no-invalid": true +} +``` + The following patterns are considered problems: diff --git a/docs/description/time-min-milliseconds.md b/docs/description/time-min-milliseconds.md index 7f56692..15e3be9 100644 --- a/docs/description/time-min-milliseconds.md +++ b/docs/description/time-min-milliseconds.md @@ -11,13 +11,19 @@ a { animation: slip-n-slide 150ms linear; } This rule checks positive numbers in `transition-duration`, `transition-delay`, `animation-duration`, `animation-delay`, and those times as they manifest in the `transition` and `animation` shorthands. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`int`: Minimum number of milliseconds for time values. +### `number` + +Specify a minimum number of milliseconds for time values. -For example, with `100`: +Given: + +```json +{ + "time-min-milliseconds": 100 +} +``` The following patterns are considered problems: @@ -65,11 +71,23 @@ a { animation-delay: 1s; } ## Optional secondary options -### `ignore: ["delay"]` +### `ignore` + +```json +{ "ignore": ["array", "of", "options"] } +``` + +#### `"delay"` Ignore time values for an animation or transition delay. -For example, with a minimum of `200` milliseconds. +Given: + +```json +{ + "time-min-milliseconds": [200, { "ignore": ["delay"] }] +} +``` The following pattern is _not_ considered a problem: diff --git a/docs/description/unit-allowed-list.md b/docs/description/unit-allowed-list.md index 36f6d15..580f155 100644 --- a/docs/description/unit-allowed-list.md +++ b/docs/description/unit-allowed-list.md @@ -9,16 +9,20 @@ a { width: 100px; } * These units */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string`: `["array", "of", "units"]|"unit"` +### `Array` + +```json +["array", "of", "units"] +``` Given: ```json -["px", "em", "deg"] +{ + "unit-allowed-list": ["px", "em", "deg"] +} ``` The following patterns are considered problems: @@ -67,18 +71,27 @@ a { transform: rotate(30deg); } ## Optional secondary options -### `ignoreProperties: { "unit": ["property", "/regex/", /regex/]|"property"|"/regex/"|/regex/ }` +### `ignoreProperties` -Ignore units in the values of declarations with the specified properties. +```json +{ "ignoreProperties": { "unit": ["array", "of", "properties", "/regex/"] } } +``` -For example, with `["px", "em"]`. +Ignore units in the values of declarations with the specified properties. Given: ```json { - "rem": ["line-height", "/^border/"], - "%": ["width"] + "unit-allowed-list": [ + ["px", "em"], + { + "ignoreProperties": { + "rem": ["line-height", "/^border/"], + "%": ["width"] + } + } + ] } ``` @@ -116,16 +129,20 @@ a { -moz-border-radius-topright: 20rem; } a { height: 100%; } ``` -### `ignoreFunctions: ["function", "/regex/", /regex/]|"function"|"/regex/"|/regex/` +### `ignoreFunctions` -Ignore units that are inside of the specified functions. +```json +{ "ignoreFunctions": ["array", "of", "functions", "/regex/"] } +``` -For example, with `["px", "em"]`. +Ignore units that are inside of the specified functions. Given: ```json -["/^hsl/", "calc"] +{ + "unit-allowed-list": [["px", "em"], { "ignoreFunctions": ["/^hsl/", "calc"] }] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/unit-disallowed-list.md b/docs/description/unit-disallowed-list.md index d8579d8..0ff0972 100644 --- a/docs/description/unit-disallowed-list.md +++ b/docs/description/unit-disallowed-list.md @@ -9,16 +9,20 @@ a { width: 100px; } * These units */ ``` -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - ## Options -`array|string`: `["array", "of", "units"]|"unit"` +### `Array` + +```json +["array", "of", "units"] +``` Given: ```json -["px", "em", "deg"] +{ + "unit-disallowed-list": ["px", "em", "deg"] +} ``` The following patterns are considered problems: @@ -62,18 +66,27 @@ a { animation: animation-name 5s ease; } ## Optional secondary options -### `ignoreProperties: { "unit": ["property", "/regex/", /regex/]|"property"|"/regex/"|/regex/ }` +### `ignoreProperties` -Ignore units in the values of declarations with the specified properties. +```json +{ "ignoreProperties": { "unit": ["array", "of", "properties", "/regex/"] } } +``` -For example, with `["px", "vmin"]`. +Ignore units in the values of declarations with the specified properties. Given: ```json { - "px": ["font-size", "/^border/"], - "vmin": "width" + "unit-disallowed-list": [ + ["px", "vmin"], + { + "ignoreProperties": { + "px": ["font-size", "/^border/"], + "vmin": "width" + } + } + ] } ``` @@ -111,18 +124,31 @@ a { -moz-border-radius-topright: 40px; } a { height: 100vmin; } ``` -### `ignoreMediaFeatureNames: { "unit": ["property", "/regex/", /regex/]|"property"|"/regex/"|/regex/ }` +### `ignoreMediaFeatureNames` -Ignore units for specific feature names. +```json +{ + "ignoreMediaFeatureNames": { + "unit": ["array", "of", "feature-names", "/regex/"] + } +} +``` -For example, with `["px", "dpi"]`. +Ignore units for specific feature names. Given: ```json { - "px": ["min-width", "/height$/"], - "dpi": "resolution" + "unit-disallowed-list": [ + ["px", "dpi"], + { + "ignoreMediaFeatureNames": { + "px": ["min-width", "/height$/"], + "dpi": "resolution" + } + } + ] } ``` @@ -160,16 +186,23 @@ The following patterns are considered problems: @media print and (max-resolution: 100dpi) {} ``` -### `ignoreFunctions: ["function", "/regex/", /regex/]|"function"|"/regex/"|/regex/` +### `ignoreFunctions` -Ignore units that are inside of the specified functions. +```json +{ "ignoreFunctions": { "unit": ["array", "of", "functions", "/regex/"] } } +``` -For example, with `["px"]`. +Ignore units that are inside of the specified functions. Given: ```json -["calc", "/^translate/"] +{ + "unit-disallowed-list": [ + ["px"], + { "ignoreFunctions": ["calc", "/^translate/"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/unit-no-unknown.md b/docs/description/unit-no-unknown.md index 5697d0e..05dd63a 100644 --- a/docs/description/unit-no-unknown.md +++ b/docs/description/unit-no-unknown.md @@ -11,15 +11,13 @@ a { width: 100pixels; } This rule considers units defined in the CSS Specifications, up to and including Editor's Drafts, to be known. -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. - This rule overlaps with: -- [`at-rule-descriptor-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/at-rule-descriptor-value-no-unknown/README.md) -- [`at-rule-prelude-no-invalid`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/at-rule-prelude-no-invalid/README.md) -- [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/declaration-property-value-no-unknown/README.md) -- [`media-feature-name-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/media-feature-name-value-no-unknown/README.md) -- [`media-query-no-invalid`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/media-query-no-invalid/README.md) +- [`at-rule-descriptor-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/at-rule-descriptor-value-no-unknown/README.md) +- [`at-rule-prelude-no-invalid`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/at-rule-prelude-no-invalid/README.md) +- [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/declaration-property-value-no-unknown/README.md) +- [`media-feature-name-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/media-feature-name-value-no-unknown/README.md) +- [`media-query-no-invalid`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/media-query-no-invalid/README.md) We recommend using these rules for CSS and this rule for CSS-like languages, such as SCSS and Less. @@ -27,6 +25,12 @@ We recommend using these rules for CSS and this rule for CSS-like languages, suc ### `true` +```json +{ + "unit-no-unknown": true +} +``` + The following patterns are considered problems: @@ -75,12 +79,18 @@ a { ## Optional secondary options -### `ignoreUnits: ["/regex/", /regex/, "string"]` +### `ignoreUnits` + +```json +{ "ignoreUnits": ["array", "of", "units", "/regex/"] } +``` Given: ```json -["/^--foo-/", "--bar"] +{ + "unit-no-unknown": [true, { "ignoreUnits": ["/^--foo-/", "--bar"] }] +} ``` The following patterns are _not_ considered problems: @@ -99,12 +109,21 @@ a { } ``` -### `ignoreFunctions: ["/regex/", /regex/, "string"]` +### `ignoreFunctions` + +```json +{ "ignoreFunctions": ["array", "of", "functions", "/regex/"] } +``` Given: ```json -["foo", "/^my-/", "/^YOUR-/i"] +{ + "unit-no-unknown": [ + true, + { "ignoreFunctions": ["foo", "/^my-/", "/^YOUR-/i"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/description/value-keyword-case.md b/docs/description/value-keyword-case.md index 47b30f5..d0c2a7a 100644 --- a/docs/description/value-keyword-case.md +++ b/docs/description/value-keyword-case.md @@ -11,16 +11,18 @@ Specify lowercase or uppercase for keywords values. This rule ignores [``](https://developer.mozilla.org/en/docs/Web/CSS/custom-ident) of known properties. Keyword values which are paired with non-properties (e.g. `$vars` and custom properties), and do not conform to the primary option, can be ignored using the `ignoreKeywords: []` secondary option. -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. ## Options -`string`: `"lower"|"upper"` - ### `"lower"` +```json +{ + "value-keyword-case": "lower" +} +``` + The following patterns are considered problems: @@ -69,6 +71,12 @@ a { ### `"upper"` +```json +{ + "value-keyword-case": "upper" +} +``` + The following patterns are considered problems: @@ -117,16 +125,23 @@ a { ## Optional secondary options -### `ignoreKeywords: ["/regex/", /regex/, "non-regex"]` +### `ignoreKeywords` -Ignore case of keywords values. +```json +{ "ignoreKeywords": ["array", "of", "keywords", "/regex/"] } +``` -For example, with `"lower"`. +Ignore case of keywords values. Given: ```json -["Block", "/^(f|F)lex$/"] +{ + "value-keyword-case": [ + "lower", + { "ignoreKeywords": ["Block", "/^(f|F)lex$/"] } + ] +} ``` The following patterns are considered problems: @@ -189,14 +204,23 @@ a { } ``` -### `ignoreProperties: ["/regex/", /regex/, "non-regex"]` +### `ignoreProperties` + +```json +{ "ignoreProperties": ["array", "of", "properties", "/regex/"] } +``` Ignore case of the values of the listed properties. -For example, with `"lower"`. +Given: -```js -["/^(b|B)ackground$/", "display"]; +```json +{ + "value-keyword-case": [ + "lower", + { "ignoreProperties": ["/^(b|B)ackground$/", "display"] } + ] +} ``` The following patterns are considered problems: @@ -259,14 +283,20 @@ a { } ``` -### `ignoreFunctions: ["/regex/", /regex/, "non-regex"]` +### `ignoreFunctions` + +```json +{ "ignoreFunctions": ["array", "of", "functions", "/regex/"] } +``` Ignore case of the values inside the listed functions. -For example, with `"upper"`. +Given: -```js -["/^(f|F)oo$/", "t"]; +```json +{ + "value-keyword-case": ["upper", { "ignoreFunctions": ["/^(f|F)oo$/", "t"] }] +} ``` The following patterns are considered problems: @@ -321,11 +351,17 @@ a { } ``` -### `camelCaseSvgKeywords: true | false` (default: `false`) +### `camelCaseSvgKeywords` + +If `true`, this rule expects SVG keywords to be camel case when the primary option is `"lower"`. Defaults to `false`. -If `true`, this rule expects SVG keywords to be camel case when the primary option is `"lower"`. +Given: -For example with `true`: +```json +{ + "value-keyword-case": ["lower", { "camelCaseSvgKeywords": true }] +} +``` The following pattern is _not_ considered a problem: diff --git a/docs/description/value-no-vendor-prefix.md b/docs/description/value-no-vendor-prefix.md index 1e39686..8d7bf5d 100644 --- a/docs/description/value-no-vendor-prefix.md +++ b/docs/description/value-no-vendor-prefix.md @@ -11,14 +11,18 @@ a { display: -webkit-flex; } This rule does not fix vendor-prefixed values that weren't handled by [Autoprefixer](https://github.com/postcss/autoprefixer) version 10.2.5. Exceptions may be added on a case by case basis. -The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. However, it will not remove duplicate values produced when the prefixes are removed. You can use [Autoprefixer](https://github.com/postcss/autoprefixer) itself, with the [`add` option off and the `remove` option on](https://github.com/postcss/autoprefixer#options), in these situations. - -The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule. +The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. However, it will not remove duplicate values produced when the prefixes are removed. You can use [Autoprefixer](https://github.com/postcss/autoprefixer) itself, with the [`add` option off and the `remove` option on](https://github.com/postcss/autoprefixer#options), in these situations. ## Options ### `true` +```json +{ + "value-no-vendor-prefix": true +} +``` + The following patterns are considered problems: @@ -55,12 +59,21 @@ a { background: linear-gradient(bottom, #000, #fff); } ## Optional secondary options -### `ignoreValues: ["/regex/", /regex/, "string"]` +### `ignoreValues` + +```json +{ "ignoreValues": ["array", "of", "values", "/regex/"] } +``` Given: ```json -["grab", "max-content", "/^-moz-all$/"] +{ + "value-no-vendor-prefix": [ + true, + { "ignoreValues": ["grab", "max-content", "/^-moz-all$/"] } + ] +} ``` The following patterns are _not_ considered problems: diff --git a/docs/multiple-tests/with-config-file/results.xml b/docs/multiple-tests/with-config-file/results.xml index 7a2b48e..c86e424 100644 --- a/docs/multiple-tests/with-config-file/results.xml +++ b/docs/multiple-tests/with-config-file/results.xml @@ -8,6 +8,7 @@ + @@ -17,6 +18,7 @@ + @@ -26,5 +28,6 @@ + diff --git a/docs/patterns.json b/docs/patterns.json index 0847d94..efba24a 100644 --- a/docs/patterns.json +++ b/docs/patterns.json @@ -1,6 +1,6 @@ { "name" : "stylelint", - "version" : "16.17.0", + "version" : "16.23.0", "patterns" : [ { "patternId" : "alpha-value-notation", "level" : "Info", @@ -136,6 +136,26 @@ } ], "languages" : [ ], "enabled" : false + }, { + "patternId" : "block-no-redundant-nested-style-rules", + "level" : "Info", + "category" : "CodeStyle", + "parameters" : [ { + "name" : "block-no-redundant-nested-style-rules", + "default" : null + } ], + "languages" : [ ], + "enabled" : false + }, { + "patternId" : "color-function-alias-notation", + "level" : "Info", + "category" : "CodeStyle", + "parameters" : [ { + "name" : "color-function-alias-notation", + "default" : null + } ], + "languages" : [ ], + "enabled" : false }, { "patternId" : "color-function-notation", "level" : "Info", @@ -249,6 +269,16 @@ } ], "languages" : [ ], "enabled" : true + }, { + "patternId" : "container-name-pattern", + "level" : "Info", + "category" : "CodeStyle", + "parameters" : [ { + "name" : "container-name-pattern", + "default" : null + } ], + "languages" : [ ], + "enabled" : false }, { "patternId" : "content-property-no-static-value", "level" : "Info", @@ -825,6 +855,16 @@ } ], "languages" : [ ], "enabled" : false + }, { + "patternId" : "media-type-no-deprecated", + "level" : "Info", + "category" : "CodeStyle", + "parameters" : [ { + "name" : "media-type-no-deprecated", + "default" : null + } ], + "languages" : [ ], + "enabled" : false }, { "patternId" : "named-grid-areas-no-invalid", "level" : "Warning", @@ -835,6 +875,16 @@ } ], "languages" : [ ], "enabled" : false + }, { + "patternId" : "nesting-selector-no-missing-scoping-root", + "level" : "Info", + "category" : "CodeStyle", + "parameters" : [ { + "name" : "nesting-selector-no-missing-scoping-root", + "default" : null + } ], + "languages" : [ ], + "enabled" : false }, { "patternId" : "no-descending-specificity", "level" : "Warning", @@ -905,6 +955,16 @@ } ], "languages" : [ ], "enabled" : false + }, { + "patternId" : "no-invalid-position-declaration", + "level" : "Info", + "category" : "CodeStyle", + "parameters" : [ { + "name" : "no-invalid-position-declaration", + "default" : null + } ], + "languages" : [ ], + "enabled" : false }, { "patternId" : "no-irregular-whitespace", "level" : "Warning", @@ -1025,6 +1085,16 @@ } ], "languages" : [ ], "enabled" : true + }, { + "patternId" : "property-no-deprecated", + "level" : "Info", + "category" : "CodeStyle", + "parameters" : [ { + "name" : "property-no-deprecated", + "default" : null + } ], + "languages" : [ ], + "enabled" : false }, { "patternId" : "property-no-unknown", "level" : "Warning", diff --git a/package-lock.json b/package-lock.json index 2c30597..6ca7f24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,8 +5,8 @@ "packages": { "": { "dependencies": { - "@stylistic/stylelint-plugin": "^3.1.2", - "postcss": "^8.5.3", + "@stylistic/stylelint-plugin": "^4.0.0", + "postcss": "^8.5.6", "postcss-less": "^6.0.0", "postcss-safe-parser": "^7.0.1", "postcss-sass": "^0.5.0", @@ -14,20 +14,20 @@ "postcss-styled": "^0.34.0", "postcss-styled-syntax": "^0.7.1", "postcss-syntax": "^0.36.2", - "prettier": "^3.5.3", - "stylelint": "^16.17.0", + "prettier": "^3.6.2", + "stylelint": "^16.23.0", "stylelint-a11y": "^1.2.3", - "stylelint-config-css-modules": "^4.4.0", + "stylelint-config-css-modules": "^4.5.1", "stylelint-config-sass-guidelines": "^12.1.0", - "stylelint-config-standard": "^37.0.0", - "stylelint-config-standard-scss": "^14.0.0", + "stylelint-config-standard": "^39.0.0", + "stylelint-config-standard-scss": "^15.0.1", "stylelint-config-styled-components": "^0.1.1", "stylelint-config-tailwindcss": "^1.0.0", - "stylelint-config-twbs-bootstrap": "^16.0.0", + "stylelint-config-twbs-bootstrap": "^16.1.0", "stylelint-declaration-strict-value": "^1.10.11", "stylelint-no-px": "^2.1.0", "stylelint-prettier": "^5.0.3", - "stylelint-scss": "^6.11.1", + "stylelint-scss": "^6.12.1", "stylelint-selector-bem-pattern": "^4.0.1", "stylelint-suitcss": "^5.0.0" }, @@ -80,9 +80,9 @@ } }, "node_modules/@csstools/css-parser-algorithms": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.4.tgz", - "integrity": "sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.5.tgz", + "integrity": "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==", "funding": [ { "type": "github", @@ -98,13 +98,13 @@ "node": ">=18" }, "peerDependencies": { - "@csstools/css-tokenizer": "^3.0.3" + "@csstools/css-tokenizer": "^3.0.4" } }, "node_modules/@csstools/css-tokenizer": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.3.tgz", - "integrity": "sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.4.tgz", + "integrity": "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==", "funding": [ { "type": "github", @@ -121,9 +121,9 @@ } }, "node_modules/@csstools/media-query-list-parser": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.1.tgz", - "integrity": "sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-4.0.3.tgz", + "integrity": "sha512-HAYH7d3TLRHDOUQK4mZKf9k9Ph/m8Akstg66ywKR4SFAigjs3yBiUeZtFxywiTm5moZMAp/5W/ZuFnNXXYLuuQ==", "funding": [ { "type": "github", @@ -139,8 +139,8 @@ "node": ">=18" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^3.0.1", - "@csstools/css-tokenizer": "^3.0.1" + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" } }, "node_modules/@csstools/selector-specificity": { @@ -222,13 +222,10 @@ "peer": true }, "node_modules/@keyv/serialize": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.0.3.tgz", - "integrity": "sha512-qnEovoOp5Np2JDGonIDL6Ayihw0RhnRh6vxPuHo4RDn1UOzwEo4AeIfpL6UGIrsceWrCMiVPgwRjbHu4vYFc3g==", - "license": "MIT", - "dependencies": { - "buffer": "^6.0.3" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.1.0.tgz", + "integrity": "sha512-RlDgexML7Z63Q8BSaqhXdCYNBy/JQnqYIwxofUrNLGCblOMHp+xux2Q8nLMLlPpgHQPoU0Do8Z6btCpRBEqZ8g==", + "license": "MIT" }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", @@ -277,20 +274,43 @@ "stylelint": "^16.8.0" } }, - "node_modules/@stylistic/stylelint-plugin": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@stylistic/stylelint-plugin/-/stylelint-plugin-3.1.2.tgz", - "integrity": "sha512-tylFJGMQo62alGazK74MNxFjMagYOHmBZiePZFOJK2n13JZta0uVkB3Bh5qodUmOLtRH+uxH297EibK14UKm8g==", + "node_modules/@stylistic/stylelint-config/node_modules/@csstools/media-query-list-parser": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.1.tgz", + "integrity": "sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.1", + "@csstools/css-tokenizer": "^3.0.1" + } + }, + "node_modules/@stylistic/stylelint-config/node_modules/@stylistic/stylelint-plugin": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@stylistic/stylelint-plugin/-/stylelint-plugin-3.1.3.tgz", + "integrity": "sha512-85fsmzgsIVmyG3/GFrjuYj6Cz8rAM7IZiPiXCMiSMfoDOC1lOrzrXPDk24WqviAghnPqGpx8b0caK2PuewWGFg==", "license": "MIT", "dependencies": { "@csstools/css-parser-algorithms": "^3.0.1", "@csstools/css-tokenizer": "^3.0.1", "@csstools/media-query-list-parser": "^3.0.1", "is-plain-object": "^5.0.0", + "postcss": "^8.4.41", "postcss-selector-parser": "^6.1.2", "postcss-value-parser": "^4.2.0", - "style-search": "^0.1.0", - "stylelint": "^16.8.2" + "style-search": "^0.1.0" }, "engines": { "node": "^18.12 || >=20.9" @@ -299,6 +319,40 @@ "stylelint": "^16.8.0" } }, + "node_modules/@stylistic/stylelint-plugin": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@stylistic/stylelint-plugin/-/stylelint-plugin-4.0.0.tgz", + "integrity": "sha512-CFwt3K4Y/7bygNCLCQ8Sy4Hzgbhxq3BsNW0FIuYxl17HD3ywptm54ocyeiLVRrk5jtz1Zwks7Xr9eiZt8SWHAw==", + "license": "MIT", + "dependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/media-query-list-parser": "^4.0.3", + "postcss": "^8.5.6", + "postcss-selector-parser": "^7.1.0", + "postcss-value-parser": "^4.2.0", + "style-search": "^0.1.0" + }, + "engines": { + "node": "^18.12 || >=20.9" + }, + "peerDependencies": { + "stylelint": "^16.22.0" + } + }, + "node_modules/@stylistic/stylelint-plugin/node_modules/postcss-selector-parser": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", + "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@types/minimist": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", @@ -403,26 +457,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==" }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -457,38 +491,14 @@ "node": ">=8" } }, - "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, "node_modules/cacheable": { - "version": "1.8.9", - "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-1.8.9.tgz", - "integrity": "sha512-FicwAUyWnrtnd4QqYAoRlNs44/a1jTL7XDKqm5gJ90wz1DQPlC7U2Rd1Tydpv+E7WAr4sQHuw8Q8M3nZMAyecQ==", + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-1.10.3.tgz", + "integrity": "sha512-M6p10iJ/VT0wT7TLIGUnm958oVrU2cUK8pQAVU21Zu7h8rbk/PeRtRWrvHJBql97Bhzk3g1N6+2VKC+Rjxna9Q==", "license": "MIT", "dependencies": { - "hookified": "^1.7.1", - "keyv": "^5.3.1" + "hookified": "^1.10.0", + "keyv": "^5.4.0" } }, "node_modules/callsites": { @@ -650,9 +660,9 @@ } }, "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -981,9 +991,9 @@ } }, "node_modules/hookified": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.8.1.tgz", - "integrity": "sha512-GrO2l93P8xCWBSTBX9l2BxI78VU/MAAYag+pG8curS3aBGy0++ZlxrQ7PdUOUVMbn5BwkGb6+eRrnf43ipnFEA==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.11.0.tgz", + "integrity": "sha512-aDdIN3GyU5I6wextPplYdfmWCo+aLmjjVbntmX6HLD5RCi/xKsivYEBhnRD+d9224zFf008ZpLMPlWF0ZodYZw==", "license": "MIT" }, "node_modules/hosted-git-info": { @@ -1008,26 +1018,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, "node_modules/ignore": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", @@ -1211,12 +1201,12 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/keyv": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.3.2.tgz", - "integrity": "sha512-Lji2XRxqqa5Wg+CHLVfFKBImfJZ4pCSccu9eVWK6w4c2SDFLd8JAn1zqTuSFnsxb7ope6rMsnIHfp+eBbRBRZQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.4.0.tgz", + "integrity": "sha512-TMckyVjEoacG5IteUpUrOBsFORtheqziVyyY2dLUwg1jwTb8u48LX4TgmtogkNl9Y9unaEJ1luj10fGyjMGFOQ==", "license": "MIT", "dependencies": { - "@keyv/serialize": "^1.0.3" + "@keyv/serialize": "^1.1.0" } }, "node_modules/kind-of": { @@ -1228,9 +1218,9 @@ } }, "node_modules/known-css-properties": { - "version": "0.35.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.35.0.tgz", - "integrity": "sha512-a/RAk2BfKk+WFGhhOCAYqSiFLc34k8Mt/6NWRI4joER0EYUzXIcFivjjnoD3+XU1DggLn/tZc3DOAgke7l8a4A==", + "version": "0.37.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.37.0.tgz", + "integrity": "sha512-JCDrsP4Z1Sb9JwG0aJ8Eo2r7k4Ou5MwmThS/6lcIe1ICyb7UBJKGRIUUdqc2ASdE/42lgz6zFUnzAIhtXnBVrQ==", "license": "MIT" }, "node_modules/lilconfig": { @@ -1596,9 +1586,9 @@ } }, "node_modules/postcss": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", - "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", "funding": [ { "type": "opencollective", @@ -1615,7 +1605,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.8", + "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -1871,9 +1861,9 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/prettier": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", - "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" @@ -2222,9 +2212,9 @@ "integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=" }, "node_modules/stylelint": { - "version": "16.17.0", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.17.0.tgz", - "integrity": "sha512-I9OwVIWRMqVm2Br5iTbrfSqGRPWQUlvm6oXO1xZuYYu0Gpduy67N8wXOZv15p6E/JdlZiAtQaIoLKZEWk5hrjw==", + "version": "16.23.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.23.0.tgz", + "integrity": "sha512-69T5aS2LUY306ekt1Q1oaSPwz/jaG9HjyMix3UMrai1iEbuOafBe2Dh8xlyczrxFAy89qcKyZWWtc42XLx3Bbw==", "funding": [ { "type": "opencollective", @@ -2237,9 +2227,9 @@ ], "license": "MIT", "dependencies": { - "@csstools/css-parser-algorithms": "^3.0.4", - "@csstools/css-tokenizer": "^3.0.3", - "@csstools/media-query-list-parser": "^4.0.2", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/media-query-list-parser": "^4.0.3", "@csstools/selector-specificity": "^5.0.0", "@dual-bundle/import-meta-resolve": "^4.1.0", "balanced-match": "^2.0.0", @@ -2247,24 +2237,24 @@ "cosmiconfig": "^9.0.0", "css-functions-list": "^3.2.3", "css-tree": "^3.1.0", - "debug": "^4.3.7", + "debug": "^4.4.1", "fast-glob": "^3.3.3", "fastest-levenshtein": "^1.0.16", - "file-entry-cache": "^10.0.7", + "file-entry-cache": "^10.1.3", "global-modules": "^2.0.0", "globby": "^11.1.0", "globjoin": "^0.1.4", "html-tags": "^3.3.1", - "ignore": "^7.0.3", + "ignore": "^7.0.5", "imurmurhash": "^0.1.4", "is-plain-object": "^5.0.0", - "known-css-properties": "^0.35.0", + "known-css-properties": "^0.37.0", "mathml-tag-names": "^2.1.3", "meow": "^13.2.0", "micromatch": "^4.0.8", "normalize-path": "^3.0.0", "picocolors": "^1.1.1", - "postcss": "^8.5.3", + "postcss": "^8.5.6", "postcss-resolve-nested-selector": "^0.1.6", "postcss-safe-parser": "^7.0.1", "postcss-selector-parser": "^7.1.0", @@ -2296,11 +2286,12 @@ } }, "node_modules/stylelint-config-css-modules": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/stylelint-config-css-modules/-/stylelint-config-css-modules-4.4.0.tgz", - "integrity": "sha512-J93MtxPjRzs/TjwbJ5y9SQy4iIqULXwL1CF1yx2tQCJfS/VZUcDAmoGOwqlLbhHXSQtZO5XQiA75NVWUR3KDCQ==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/stylelint-config-css-modules/-/stylelint-config-css-modules-4.5.1.tgz", + "integrity": "sha512-xRMvAOVWa8h3Dw2NmanJHuPqMUInmMoBy14kkJDT2xs2xevxl7WnQOe/nDAMvgf9NkodzKrhKZ97E61yQOKkDA==", + "license": "Unlicense", "optionalDependencies": { - "stylelint-scss": "^6.0.0" + "stylelint-scss": "^6.12.1" }, "peerDependencies": { "stylelint": "^14.5.1 || ^15.0.0 || ^16.0.0" @@ -2319,9 +2310,9 @@ } }, "node_modules/stylelint-config-recommended": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-15.0.0.tgz", - "integrity": "sha512-9LejMFsat7L+NXttdHdTq94byn25TD+82bzGRiV1Pgasl99pWnwipXS5DguTpp3nP1XjvLXVnEJIuYBfsRjRkA==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-17.0.0.tgz", + "integrity": "sha512-WaMSdEiPfZTSFVoYmJbxorJfA610O0tlYuU2aEwY33UQhSPgFbClrVJYWvy3jGJx+XW37O+LyNLiZOEXhKhJmA==", "funding": [ { "type": "opencollective", @@ -2337,25 +2328,25 @@ "node": ">=18.12.0" }, "peerDependencies": { - "stylelint": "^16.13.0" + "stylelint": "^16.23.0" } }, "node_modules/stylelint-config-recommended-scss": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-14.1.0.tgz", - "integrity": "sha512-bhaMhh1u5dQqSsf6ri2GVWWQW5iUjBYgcHkh7SgDDn92ijoItC/cfO/W+fpXshgTQWhwFkP1rVcewcv4jaftRg==", + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-15.0.1.tgz", + "integrity": "sha512-V24bxkNkFGggqPVJlP9iXaBabwSGEG7QTz+PyxrRtjPkcF+/NsWtB3tKYvFYEmczRkWiIEfuFMhGpJFj9Fxe6Q==", "license": "MIT", "dependencies": { "postcss-scss": "^4.0.9", - "stylelint-config-recommended": "^14.0.1", - "stylelint-scss": "^6.4.0" + "stylelint-config-recommended": "^16.0.0", + "stylelint-scss": "^6.12.0" }, "engines": { - "node": ">=18.12.0" + "node": ">=20" }, "peerDependencies": { "postcss": "^8.3.3", - "stylelint": "^16.6.1" + "stylelint": "^16.16.0" }, "peerDependenciesMeta": { "postcss": { @@ -2364,9 +2355,9 @@ } }, "node_modules/stylelint-config-recommended-scss/node_modules/stylelint-config-recommended": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz", - "integrity": "sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-16.0.0.tgz", + "integrity": "sha512-4RSmPjQegF34wNcK1e1O3Uz91HN8P1aFdFzio90wNK9mjgAI19u5vsU868cVZboKzCaa5XbpvtTzAAGQAxpcXA==", "funding": [ { "type": "opencollective", @@ -2382,7 +2373,7 @@ "node": ">=18.12.0" }, "peerDependencies": { - "stylelint": "^16.1.0" + "stylelint": "^16.16.0" } }, "node_modules/stylelint-config-sass-guidelines": { @@ -2403,10 +2394,55 @@ "stylelint": "^16.1.0" } }, + "node_modules/stylelint-config-sass-guidelines/node_modules/@csstools/media-query-list-parser": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.1.tgz", + "integrity": "sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.1", + "@csstools/css-tokenizer": "^3.0.1" + } + }, + "node_modules/stylelint-config-sass-guidelines/node_modules/@stylistic/stylelint-plugin": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@stylistic/stylelint-plugin/-/stylelint-plugin-3.1.3.tgz", + "integrity": "sha512-85fsmzgsIVmyG3/GFrjuYj6Cz8rAM7IZiPiXCMiSMfoDOC1lOrzrXPDk24WqviAghnPqGpx8b0caK2PuewWGFg==", + "license": "MIT", + "dependencies": { + "@csstools/css-parser-algorithms": "^3.0.1", + "@csstools/css-tokenizer": "^3.0.1", + "@csstools/media-query-list-parser": "^3.0.1", + "is-plain-object": "^5.0.0", + "postcss": "^8.4.41", + "postcss-selector-parser": "^6.1.2", + "postcss-value-parser": "^4.2.0", + "style-search": "^0.1.0" + }, + "engines": { + "node": "^18.12 || >=20.9" + }, + "peerDependencies": { + "stylelint": "^16.8.0" + } + }, "node_modules/stylelint-config-standard": { - "version": "37.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-37.0.0.tgz", - "integrity": "sha512-+6eBlbSTrOn/il2RlV0zYGQwRTkr+WtzuVSs1reaWGObxnxLpbcspCUYajVQHonVfxVw2U+h42azGhrBvcg8OA==", + "version": "39.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-39.0.0.tgz", + "integrity": "sha512-JabShWORb8Bmc1A47ZyJstran60P3yUdI1zWMpGYPeFiC6xzHXJMkpKAd8EjIhq3HPUplIWWMDJ/xu0AiPd+kA==", "funding": [ { "type": "opencollective", @@ -2419,30 +2455,30 @@ ], "license": "MIT", "dependencies": { - "stylelint-config-recommended": "^15.0.0" + "stylelint-config-recommended": "^17.0.0" }, "engines": { "node": ">=18.12.0" }, "peerDependencies": { - "stylelint": "^16.13.0" + "stylelint": "^16.23.0" } }, "node_modules/stylelint-config-standard-scss": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-14.0.0.tgz", - "integrity": "sha512-6Pa26D9mHyi4LauJ83ls3ELqCglU6VfCXchovbEqQUiEkezvKdv6VgsIoMy58i00c854wVmOw0k8W5FTpuaVqg==", + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-15.0.1.tgz", + "integrity": "sha512-8pmmfutrMlPHukLp+Th9asmk21tBXMVGxskZCzkRVWt1d8Z0SrXjUUQ3vn9KcBj1bJRd5msk6yfEFM0UYHBRdg==", "license": "MIT", "dependencies": { - "stylelint-config-recommended-scss": "^14.1.0", - "stylelint-config-standard": "^36.0.1" + "stylelint-config-recommended-scss": "^15.0.1", + "stylelint-config-standard": "^38.0.0" }, "engines": { - "node": ">=18.12.0" + "node": ">=20" }, "peerDependencies": { "postcss": "^8.3.3", - "stylelint": "^16.11.0" + "stylelint": "^16.18.0" }, "peerDependenciesMeta": { "postcss": { @@ -2451,9 +2487,9 @@ } }, "node_modules/stylelint-config-standard-scss/node_modules/stylelint-config-recommended": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz", - "integrity": "sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-16.0.0.tgz", + "integrity": "sha512-4RSmPjQegF34wNcK1e1O3Uz91HN8P1aFdFzio90wNK9mjgAI19u5vsU868cVZboKzCaa5XbpvtTzAAGQAxpcXA==", "funding": [ { "type": "opencollective", @@ -2469,13 +2505,13 @@ "node": ">=18.12.0" }, "peerDependencies": { - "stylelint": "^16.1.0" + "stylelint": "^16.16.0" } }, "node_modules/stylelint-config-standard-scss/node_modules/stylelint-config-standard": { - "version": "36.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-36.0.1.tgz", - "integrity": "sha512-8aX8mTzJ6cuO8mmD5yon61CWuIM4UD8Q5aBcWKGSf6kg+EC3uhB+iOywpTK4ca6ZL7B49en8yanOFtUW0qNzyw==", + "version": "38.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-38.0.0.tgz", + "integrity": "sha512-uj3JIX+dpFseqd/DJx8Gy3PcRAJhlEZ2IrlFOc4LUxBX/PNMEQ198x7LCOE2Q5oT9Vw8nyc4CIL78xSqPr6iag==", "funding": [ { "type": "opencollective", @@ -2488,13 +2524,13 @@ ], "license": "MIT", "dependencies": { - "stylelint-config-recommended": "^14.0.1" + "stylelint-config-recommended": "^16.0.0" }, "engines": { "node": ">=18.12.0" }, "peerDependencies": { - "stylelint": "^16.1.0" + "stylelint": "^16.18.0" } }, "node_modules/stylelint-config-styled-components": { @@ -2513,9 +2549,9 @@ } }, "node_modules/stylelint-config-twbs-bootstrap": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-twbs-bootstrap/-/stylelint-config-twbs-bootstrap-16.0.0.tgz", - "integrity": "sha512-MgFiCiqCZVUZ8Rt417lTPBnpgDgFsnZK1sy56UFL+niVLptO0kviKyzZB6b6yEU5bnlWRusau9/FgXiJOi2pJA==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/stylelint-config-twbs-bootstrap/-/stylelint-config-twbs-bootstrap-16.1.0.tgz", + "integrity": "sha512-jp+/lHxOo5r21g05+qC/nbFueb7OH5Pub5SdWeBj7T0HVGuHDjB4NoNlWklmz1GsqNhAtFms6ZCnJsAgc8XOmQ==", "funding": [ { "type": "github", @@ -2533,7 +2569,7 @@ "stylelint-config-recess-order": "^5.1.1", "stylelint-config-standard": "^36.0.1", "stylelint-config-standard-scss": "^14.0.0", - "stylelint-scss": "^6.11.1" + "stylelint-scss": "^6.12.1" }, "engines": { "node": ">=18.12.0" @@ -2542,6 +2578,51 @@ "stylelint": "^16.11.0" } }, + "node_modules/stylelint-config-twbs-bootstrap/node_modules/@csstools/media-query-list-parser": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.1.tgz", + "integrity": "sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.1", + "@csstools/css-tokenizer": "^3.0.1" + } + }, + "node_modules/stylelint-config-twbs-bootstrap/node_modules/@stylistic/stylelint-plugin": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@stylistic/stylelint-plugin/-/stylelint-plugin-3.1.3.tgz", + "integrity": "sha512-85fsmzgsIVmyG3/GFrjuYj6Cz8rAM7IZiPiXCMiSMfoDOC1lOrzrXPDk24WqviAghnPqGpx8b0caK2PuewWGFg==", + "license": "MIT", + "dependencies": { + "@csstools/css-parser-algorithms": "^3.0.1", + "@csstools/css-tokenizer": "^3.0.1", + "@csstools/media-query-list-parser": "^3.0.1", + "is-plain-object": "^5.0.0", + "postcss": "^8.4.41", + "postcss-selector-parser": "^6.1.2", + "postcss-value-parser": "^4.2.0", + "style-search": "^0.1.0" + }, + "engines": { + "node": "^18.12 || >=20.9" + }, + "peerDependencies": { + "stylelint": "^16.8.0" + } + }, "node_modules/stylelint-config-twbs-bootstrap/node_modules/stylelint-config-recommended": { "version": "14.0.1", "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz", @@ -2564,6 +2645,29 @@ "stylelint": "^16.1.0" } }, + "node_modules/stylelint-config-twbs-bootstrap/node_modules/stylelint-config-recommended-scss": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-14.1.0.tgz", + "integrity": "sha512-bhaMhh1u5dQqSsf6ri2GVWWQW5iUjBYgcHkh7SgDDn92ijoItC/cfO/W+fpXshgTQWhwFkP1rVcewcv4jaftRg==", + "license": "MIT", + "dependencies": { + "postcss-scss": "^4.0.9", + "stylelint-config-recommended": "^14.0.1", + "stylelint-scss": "^6.4.0" + }, + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "postcss": "^8.3.3", + "stylelint": "^16.6.1" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + } + } + }, "node_modules/stylelint-config-twbs-bootstrap/node_modules/stylelint-config-standard": { "version": "36.0.1", "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-36.0.1.tgz", @@ -2589,6 +2693,28 @@ "stylelint": "^16.1.0" } }, + "node_modules/stylelint-config-twbs-bootstrap/node_modules/stylelint-config-standard-scss": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-14.0.0.tgz", + "integrity": "sha512-6Pa26D9mHyi4LauJ83ls3ELqCglU6VfCXchovbEqQUiEkezvKdv6VgsIoMy58i00c854wVmOw0k8W5FTpuaVqg==", + "license": "MIT", + "dependencies": { + "stylelint-config-recommended-scss": "^14.1.0", + "stylelint-config-standard": "^36.0.1" + }, + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "postcss": "^8.3.3", + "stylelint": "^16.11.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + } + } + }, "node_modules/stylelint-declaration-strict-value": { "version": "1.10.11", "resolved": "https://registry.npmjs.org/stylelint-declaration-strict-value/-/stylelint-declaration-strict-value-1.10.11.tgz", @@ -2644,15 +2770,15 @@ } }, "node_modules/stylelint-scss": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-6.11.1.tgz", - "integrity": "sha512-e4rYo0UY+BIMtGeGanghrvHTjcryxgZbyFxUedp8dLFqC4P70aawNdYjRrQxbnKhu3BNr4+lt5e/53tcKXiwFA==", + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-6.12.1.tgz", + "integrity": "sha512-UJUfBFIvXfly8WKIgmqfmkGKPilKB4L5j38JfsDd+OCg2GBdU0vGUV08Uw82tsRZzd4TbsUURVVNGeOhJVF7pA==", "license": "MIT", "dependencies": { "css-tree": "^3.0.1", "is-plain-object": "^5.0.0", - "known-css-properties": "^0.35.0", - "mdn-data": "^2.15.0", + "known-css-properties": "^0.36.0", + "mdn-data": "^2.21.0", "postcss-media-query-parser": "^0.2.3", "postcss-resolve-nested-selector": "^0.1.6", "postcss-selector-parser": "^7.1.0", @@ -2665,10 +2791,16 @@ "stylelint": "^16.0.2" } }, + "node_modules/stylelint-scss/node_modules/known-css-properties": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.36.0.tgz", + "integrity": "sha512-A+9jP+IUmuQsNdsLdcg6Yt7voiMF/D4K83ew0OpJtpu+l34ef7LaohWV0Rc6KNvzw6ZDizkqfyB5JznZnzuKQA==", + "license": "MIT" + }, "node_modules/stylelint-scss/node_modules/mdn-data": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.18.0.tgz", - "integrity": "sha512-gtCy1yim/vpHF/tq3B4Z43x3zKWpYeb4IM3d/Mf4oMYcNuoXOYEaqtoFlLHw9zd7+WNN3jNh6/WXyUrD3OIiwQ==", + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.23.0.tgz", + "integrity": "sha512-786vq1+4079JSeu2XdcDjrhi/Ry7BWtjDl9WtGPWLiIHb2T66GvIVflZTBoSNZ5JqTtJGYEVMuFA/lbQlMOyDQ==", "license": "CC0-1.0" }, "node_modules/stylelint-scss/node_modules/postcss-selector-parser": { @@ -2832,29 +2964,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/stylelint/node_modules/@csstools/media-query-list-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-4.0.2.tgz", - "integrity": "sha512-EUos465uvVvMJehckATTlNqGj4UJWkTmdWuDMjqvSUkjGpmOyFZBVwb4knxCm/k2GMTXY+c/5RkdndzFYWeX5A==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT", - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@csstools/css-parser-algorithms": "^3.0.4", - "@csstools/css-tokenizer": "^3.0.3" - } - }, "node_modules/stylelint/node_modules/@csstools/selector-specificity": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", @@ -2903,29 +3012,29 @@ } }, "node_modules/stylelint/node_modules/file-entry-cache": { - "version": "10.0.7", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-10.0.7.tgz", - "integrity": "sha512-txsf5fu3anp2ff3+gOJJzRImtrtm/oa9tYLN0iTuINZ++EyVR/nRrg2fKYwvG/pXDofcrvvb0scEbX3NyW/COw==", + "version": "10.1.3", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-10.1.3.tgz", + "integrity": "sha512-D+w75Ub8T55yor7fPgN06rkCAUbAYw2vpxJmmjv/GDAcvCnv9g7IvHhIZoxzRZThrXPFI2maeY24pPbtyYU7Lg==", "license": "MIT", "dependencies": { - "flat-cache": "^6.1.7" + "flat-cache": "^6.1.12" } }, "node_modules/stylelint/node_modules/flat-cache": { - "version": "6.1.7", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.7.tgz", - "integrity": "sha512-qwZ4xf1v1m7Rc9XiORly31YaChvKt6oNVHuqqZcoED/7O+ToyNVGobKsIAopY9ODcWpEDKEBAbrSOCBHtNQvew==", + "version": "6.1.12", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.12.tgz", + "integrity": "sha512-U+HqqpZPPXP5d24bWuRzjGqVqUcw64k4nZAbruniDwdRg0H10tvN7H6ku1tjhA4rg5B9GS3siEvwO2qjJJ6f8Q==", "license": "MIT", "dependencies": { - "cacheable": "^1.8.9", + "cacheable": "^1.10.3", "flatted": "^3.3.3", - "hookified": "^1.7.1" + "hookified": "^1.10.0" } }, "node_modules/stylelint/node_modules/ignore": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.3.tgz", - "integrity": "sha512-bAH5jbK/F3T3Jls4I0SO1hmPR0dKU0a7+SY6n1yzRtG54FLO8d6w/nxLFX2Nb7dBu6cCWXPaAME6cYqFUMmuCA==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "license": "MIT", "engines": { "node": ">= 4" @@ -3313,20 +3422,20 @@ } }, "@csstools/css-parser-algorithms": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.4.tgz", - "integrity": "sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.5.tgz", + "integrity": "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==", "requires": {} }, "@csstools/css-tokenizer": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.3.tgz", - "integrity": "sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==" + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.4.tgz", + "integrity": "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==" }, "@csstools/media-query-list-parser": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.1.tgz", - "integrity": "sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-4.0.3.tgz", + "integrity": "sha512-HAYH7d3TLRHDOUQK4mZKf9k9Ph/m8Akstg66ywKR4SFAigjs3yBiUeZtFxywiTm5moZMAp/5W/ZuFnNXXYLuuQ==", "requires": {} }, "@csstools/selector-specificity": { @@ -3388,12 +3497,9 @@ } }, "@keyv/serialize": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.0.3.tgz", - "integrity": "sha512-qnEovoOp5Np2JDGonIDL6Ayihw0RhnRh6vxPuHo4RDn1UOzwEo4AeIfpL6UGIrsceWrCMiVPgwRjbHu4vYFc3g==", - "requires": { - "buffer": "^6.0.3" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.1.0.tgz", + "integrity": "sha512-RlDgexML7Z63Q8BSaqhXdCYNBy/JQnqYIwxofUrNLGCblOMHp+xux2Q8nLMLlPpgHQPoU0Do8Z6btCpRBEqZ8g==" }, "@nodelib/fs.scandir": { "version": "2.1.5", @@ -3424,21 +3530,54 @@ "integrity": "sha512-8J4YAxggy2Nzkb8KJIOLbtMXTPZ5gpKVmyhiiuKEUgCl9XFND5lM0e/ZZBMGEYZ68h5qcsS/jgg1wh235erRAw==", "requires": { "@stylistic/stylelint-plugin": "^3.0.0" + }, + "dependencies": { + "@csstools/media-query-list-parser": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.1.tgz", + "integrity": "sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==", + "requires": {} + }, + "@stylistic/stylelint-plugin": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@stylistic/stylelint-plugin/-/stylelint-plugin-3.1.3.tgz", + "integrity": "sha512-85fsmzgsIVmyG3/GFrjuYj6Cz8rAM7IZiPiXCMiSMfoDOC1lOrzrXPDk24WqviAghnPqGpx8b0caK2PuewWGFg==", + "requires": { + "@csstools/css-parser-algorithms": "^3.0.1", + "@csstools/css-tokenizer": "^3.0.1", + "@csstools/media-query-list-parser": "^3.0.1", + "is-plain-object": "^5.0.0", + "postcss": "^8.4.41", + "postcss-selector-parser": "^6.1.2", + "postcss-value-parser": "^4.2.0", + "style-search": "^0.1.0" + } + } } }, "@stylistic/stylelint-plugin": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@stylistic/stylelint-plugin/-/stylelint-plugin-3.1.2.tgz", - "integrity": "sha512-tylFJGMQo62alGazK74MNxFjMagYOHmBZiePZFOJK2n13JZta0uVkB3Bh5qodUmOLtRH+uxH297EibK14UKm8g==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@stylistic/stylelint-plugin/-/stylelint-plugin-4.0.0.tgz", + "integrity": "sha512-CFwt3K4Y/7bygNCLCQ8Sy4Hzgbhxq3BsNW0FIuYxl17HD3ywptm54ocyeiLVRrk5jtz1Zwks7Xr9eiZt8SWHAw==", "requires": { - "@csstools/css-parser-algorithms": "^3.0.1", - "@csstools/css-tokenizer": "^3.0.1", - "@csstools/media-query-list-parser": "^3.0.1", - "is-plain-object": "^5.0.0", - "postcss-selector-parser": "^6.1.2", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/media-query-list-parser": "^4.0.3", + "postcss": "^8.5.6", + "postcss-selector-parser": "^7.1.0", "postcss-value-parser": "^4.2.0", - "style-search": "^0.1.0", - "stylelint": "^16.8.2" + "style-search": "^0.1.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", + "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + } } }, "@types/minimist": { @@ -3527,11 +3666,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==" }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -3562,22 +3696,13 @@ "fill-range": "^7.1.1" } }, - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, "cacheable": { - "version": "1.8.9", - "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-1.8.9.tgz", - "integrity": "sha512-FicwAUyWnrtnd4QqYAoRlNs44/a1jTL7XDKqm5gJ90wz1DQPlC7U2Rd1Tydpv+E7WAr4sQHuw8Q8M3nZMAyecQ==", + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-1.10.3.tgz", + "integrity": "sha512-M6p10iJ/VT0wT7TLIGUnm958oVrU2cUK8pQAVU21Zu7h8rbk/PeRtRWrvHJBql97Bhzk3g1N6+2VKC+Rjxna9Q==", "requires": { - "hookified": "^1.7.1", - "keyv": "^5.3.1" + "hookified": "^1.10.0", + "keyv": "^5.4.0" } }, "callsites": { @@ -3693,9 +3818,9 @@ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==" }, "debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "requires": { "ms": "^2.1.3" } @@ -3939,9 +4064,9 @@ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" }, "hookified": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.8.1.tgz", - "integrity": "sha512-GrO2l93P8xCWBSTBX9l2BxI78VU/MAAYag+pG8curS3aBGy0++ZlxrQ7PdUOUVMbn5BwkGb6+eRrnf43ipnFEA==" + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.11.0.tgz", + "integrity": "sha512-aDdIN3GyU5I6wextPplYdfmWCo+aLmjjVbntmX6HLD5RCi/xKsivYEBhnRD+d9224zFf008ZpLMPlWF0ZodYZw==" }, "hosted-git-info": { "version": "4.0.2", @@ -3956,11 +4081,6 @@ "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==" }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, "ignore": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", @@ -4101,11 +4221,11 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "keyv": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.3.2.tgz", - "integrity": "sha512-Lji2XRxqqa5Wg+CHLVfFKBImfJZ4pCSccu9eVWK6w4c2SDFLd8JAn1zqTuSFnsxb7ope6rMsnIHfp+eBbRBRZQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.4.0.tgz", + "integrity": "sha512-TMckyVjEoacG5IteUpUrOBsFORtheqziVyyY2dLUwg1jwTb8u48LX4TgmtogkNl9Y9unaEJ1luj10fGyjMGFOQ==", "requires": { - "@keyv/serialize": "^1.0.3" + "@keyv/serialize": "^1.1.0" } }, "kind-of": { @@ -4114,9 +4234,9 @@ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" }, "known-css-properties": { - "version": "0.35.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.35.0.tgz", - "integrity": "sha512-a/RAk2BfKk+WFGhhOCAYqSiFLc34k8Mt/6NWRI4joER0EYUzXIcFivjjnoD3+XU1DggLn/tZc3DOAgke7l8a4A==" + "version": "0.37.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.37.0.tgz", + "integrity": "sha512-JCDrsP4Z1Sb9JwG0aJ8Eo2r7k4Ou5MwmThS/6lcIe1ICyb7UBJKGRIUUdqc2ASdE/42lgz6zFUnzAIhtXnBVrQ==" }, "lilconfig": { "version": "2.1.0", @@ -4383,11 +4503,11 @@ "peer": true }, "postcss": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", - "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", "requires": { - "nanoid": "^3.3.8", + "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } @@ -4526,9 +4646,9 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "prettier": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", - "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==" + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==" }, "prettier-linter-helpers": { "version": "1.0.0", @@ -4793,13 +4913,13 @@ "integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=" }, "stylelint": { - "version": "16.17.0", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.17.0.tgz", - "integrity": "sha512-I9OwVIWRMqVm2Br5iTbrfSqGRPWQUlvm6oXO1xZuYYu0Gpduy67N8wXOZv15p6E/JdlZiAtQaIoLKZEWk5hrjw==", + "version": "16.23.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.23.0.tgz", + "integrity": "sha512-69T5aS2LUY306ekt1Q1oaSPwz/jaG9HjyMix3UMrai1iEbuOafBe2Dh8xlyczrxFAy89qcKyZWWtc42XLx3Bbw==", "requires": { - "@csstools/css-parser-algorithms": "^3.0.4", - "@csstools/css-tokenizer": "^3.0.3", - "@csstools/media-query-list-parser": "^4.0.2", + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4", + "@csstools/media-query-list-parser": "^4.0.3", "@csstools/selector-specificity": "^5.0.0", "@dual-bundle/import-meta-resolve": "^4.1.0", "balanced-match": "^2.0.0", @@ -4807,24 +4927,24 @@ "cosmiconfig": "^9.0.0", "css-functions-list": "^3.2.3", "css-tree": "^3.1.0", - "debug": "^4.3.7", + "debug": "^4.4.1", "fast-glob": "^3.3.3", "fastest-levenshtein": "^1.0.16", - "file-entry-cache": "^10.0.7", + "file-entry-cache": "^10.1.3", "global-modules": "^2.0.0", "globby": "^11.1.0", "globjoin": "^0.1.4", "html-tags": "^3.3.1", - "ignore": "^7.0.3", + "ignore": "^7.0.5", "imurmurhash": "^0.1.4", "is-plain-object": "^5.0.0", - "known-css-properties": "^0.35.0", + "known-css-properties": "^0.37.0", "mathml-tag-names": "^2.1.3", "meow": "^13.2.0", "micromatch": "^4.0.8", "normalize-path": "^3.0.0", "picocolors": "^1.1.1", - "postcss": "^8.5.3", + "postcss": "^8.5.6", "postcss-resolve-nested-selector": "^0.1.6", "postcss-safe-parser": "^7.0.1", "postcss-selector-parser": "^7.1.0", @@ -4837,12 +4957,6 @@ "write-file-atomic": "^5.0.1" }, "dependencies": { - "@csstools/media-query-list-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-4.0.2.tgz", - "integrity": "sha512-EUos465uvVvMJehckATTlNqGj4UJWkTmdWuDMjqvSUkjGpmOyFZBVwb4knxCm/k2GMTXY+c/5RkdndzFYWeX5A==", - "requires": {} - }, "@csstools/selector-specificity": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz", @@ -4861,27 +4975,27 @@ } }, "file-entry-cache": { - "version": "10.0.7", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-10.0.7.tgz", - "integrity": "sha512-txsf5fu3anp2ff3+gOJJzRImtrtm/oa9tYLN0iTuINZ++EyVR/nRrg2fKYwvG/pXDofcrvvb0scEbX3NyW/COw==", + "version": "10.1.3", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-10.1.3.tgz", + "integrity": "sha512-D+w75Ub8T55yor7fPgN06rkCAUbAYw2vpxJmmjv/GDAcvCnv9g7IvHhIZoxzRZThrXPFI2maeY24pPbtyYU7Lg==", "requires": { - "flat-cache": "^6.1.7" + "flat-cache": "^6.1.12" } }, "flat-cache": { - "version": "6.1.7", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.7.tgz", - "integrity": "sha512-qwZ4xf1v1m7Rc9XiORly31YaChvKt6oNVHuqqZcoED/7O+ToyNVGobKsIAopY9ODcWpEDKEBAbrSOCBHtNQvew==", + "version": "6.1.12", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.12.tgz", + "integrity": "sha512-U+HqqpZPPXP5d24bWuRzjGqVqUcw64k4nZAbruniDwdRg0H10tvN7H6ku1tjhA4rg5B9GS3siEvwO2qjJJ6f8Q==", "requires": { - "cacheable": "^1.8.9", + "cacheable": "^1.10.3", "flatted": "^3.3.3", - "hookified": "^1.7.1" + "hookified": "^1.10.0" } }, "ignore": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.3.tgz", - "integrity": "sha512-bAH5jbK/F3T3Jls4I0SO1hmPR0dKU0a7+SY6n1yzRtG54FLO8d6w/nxLFX2Nb7dBu6cCWXPaAME6cYqFUMmuCA==" + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==" }, "meow": { "version": "13.2.0", @@ -4906,11 +5020,11 @@ "requires": {} }, "stylelint-config-css-modules": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/stylelint-config-css-modules/-/stylelint-config-css-modules-4.4.0.tgz", - "integrity": "sha512-J93MtxPjRzs/TjwbJ5y9SQy4iIqULXwL1CF1yx2tQCJfS/VZUcDAmoGOwqlLbhHXSQtZO5XQiA75NVWUR3KDCQ==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/stylelint-config-css-modules/-/stylelint-config-css-modules-4.5.1.tgz", + "integrity": "sha512-xRMvAOVWa8h3Dw2NmanJHuPqMUInmMoBy14kkJDT2xs2xevxl7WnQOe/nDAMvgf9NkodzKrhKZ97E61yQOKkDA==", "requires": { - "stylelint-scss": "^6.0.0" + "stylelint-scss": "^6.12.1" } }, "stylelint-config-recess-order": { @@ -4922,25 +5036,25 @@ } }, "stylelint-config-recommended": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-15.0.0.tgz", - "integrity": "sha512-9LejMFsat7L+NXttdHdTq94byn25TD+82bzGRiV1Pgasl99pWnwipXS5DguTpp3nP1XjvLXVnEJIuYBfsRjRkA==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-17.0.0.tgz", + "integrity": "sha512-WaMSdEiPfZTSFVoYmJbxorJfA610O0tlYuU2aEwY33UQhSPgFbClrVJYWvy3jGJx+XW37O+LyNLiZOEXhKhJmA==", "requires": {} }, "stylelint-config-recommended-scss": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-14.1.0.tgz", - "integrity": "sha512-bhaMhh1u5dQqSsf6ri2GVWWQW5iUjBYgcHkh7SgDDn92ijoItC/cfO/W+fpXshgTQWhwFkP1rVcewcv4jaftRg==", + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-15.0.1.tgz", + "integrity": "sha512-V24bxkNkFGggqPVJlP9iXaBabwSGEG7QTz+PyxrRtjPkcF+/NsWtB3tKYvFYEmczRkWiIEfuFMhGpJFj9Fxe6Q==", "requires": { "postcss-scss": "^4.0.9", - "stylelint-config-recommended": "^14.0.1", - "stylelint-scss": "^6.4.0" + "stylelint-config-recommended": "^16.0.0", + "stylelint-scss": "^6.12.0" }, "dependencies": { "stylelint-config-recommended": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz", - "integrity": "sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-16.0.0.tgz", + "integrity": "sha512-4RSmPjQegF34wNcK1e1O3Uz91HN8P1aFdFzio90wNK9mjgAI19u5vsU868cVZboKzCaa5XbpvtTzAAGQAxpcXA==", "requires": {} } } @@ -4953,37 +5067,60 @@ "@stylistic/stylelint-plugin": "^3.0.1", "postcss-scss": "^4.0.9", "stylelint-scss": "^6.2.1" + }, + "dependencies": { + "@csstools/media-query-list-parser": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.1.tgz", + "integrity": "sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==", + "requires": {} + }, + "@stylistic/stylelint-plugin": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@stylistic/stylelint-plugin/-/stylelint-plugin-3.1.3.tgz", + "integrity": "sha512-85fsmzgsIVmyG3/GFrjuYj6Cz8rAM7IZiPiXCMiSMfoDOC1lOrzrXPDk24WqviAghnPqGpx8b0caK2PuewWGFg==", + "requires": { + "@csstools/css-parser-algorithms": "^3.0.1", + "@csstools/css-tokenizer": "^3.0.1", + "@csstools/media-query-list-parser": "^3.0.1", + "is-plain-object": "^5.0.0", + "postcss": "^8.4.41", + "postcss-selector-parser": "^6.1.2", + "postcss-value-parser": "^4.2.0", + "style-search": "^0.1.0" + } + } } }, "stylelint-config-standard": { - "version": "37.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-37.0.0.tgz", - "integrity": "sha512-+6eBlbSTrOn/il2RlV0zYGQwRTkr+WtzuVSs1reaWGObxnxLpbcspCUYajVQHonVfxVw2U+h42azGhrBvcg8OA==", + "version": "39.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-39.0.0.tgz", + "integrity": "sha512-JabShWORb8Bmc1A47ZyJstran60P3yUdI1zWMpGYPeFiC6xzHXJMkpKAd8EjIhq3HPUplIWWMDJ/xu0AiPd+kA==", "requires": { - "stylelint-config-recommended": "^15.0.0" + "stylelint-config-recommended": "^17.0.0" } }, "stylelint-config-standard-scss": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-14.0.0.tgz", - "integrity": "sha512-6Pa26D9mHyi4LauJ83ls3ELqCglU6VfCXchovbEqQUiEkezvKdv6VgsIoMy58i00c854wVmOw0k8W5FTpuaVqg==", + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-15.0.1.tgz", + "integrity": "sha512-8pmmfutrMlPHukLp+Th9asmk21tBXMVGxskZCzkRVWt1d8Z0SrXjUUQ3vn9KcBj1bJRd5msk6yfEFM0UYHBRdg==", "requires": { - "stylelint-config-recommended-scss": "^14.1.0", - "stylelint-config-standard": "^36.0.1" + "stylelint-config-recommended-scss": "^15.0.1", + "stylelint-config-standard": "^38.0.0" }, "dependencies": { "stylelint-config-recommended": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz", - "integrity": "sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-16.0.0.tgz", + "integrity": "sha512-4RSmPjQegF34wNcK1e1O3Uz91HN8P1aFdFzio90wNK9mjgAI19u5vsU868cVZboKzCaa5XbpvtTzAAGQAxpcXA==", "requires": {} }, "stylelint-config-standard": { - "version": "36.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-36.0.1.tgz", - "integrity": "sha512-8aX8mTzJ6cuO8mmD5yon61CWuIM4UD8Q5aBcWKGSf6kg+EC3uhB+iOywpTK4ca6ZL7B49en8yanOFtUW0qNzyw==", + "version": "38.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-38.0.0.tgz", + "integrity": "sha512-uj3JIX+dpFseqd/DJx8Gy3PcRAJhlEZ2IrlFOc4LUxBX/PNMEQ198x7LCOE2Q5oT9Vw8nyc4CIL78xSqPr6iag==", "requires": { - "stylelint-config-recommended": "^14.0.1" + "stylelint-config-recommended": "^16.0.0" } } } @@ -5000,24 +5137,55 @@ "requires": {} }, "stylelint-config-twbs-bootstrap": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-twbs-bootstrap/-/stylelint-config-twbs-bootstrap-16.0.0.tgz", - "integrity": "sha512-MgFiCiqCZVUZ8Rt417lTPBnpgDgFsnZK1sy56UFL+niVLptO0kviKyzZB6b6yEU5bnlWRusau9/FgXiJOi2pJA==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/stylelint-config-twbs-bootstrap/-/stylelint-config-twbs-bootstrap-16.1.0.tgz", + "integrity": "sha512-jp+/lHxOo5r21g05+qC/nbFueb7OH5Pub5SdWeBj7T0HVGuHDjB4NoNlWklmz1GsqNhAtFms6ZCnJsAgc8XOmQ==", "requires": { "@stylistic/stylelint-config": "^2.0.0", "@stylistic/stylelint-plugin": "^3.1.2", "stylelint-config-recess-order": "^5.1.1", "stylelint-config-standard": "^36.0.1", "stylelint-config-standard-scss": "^14.0.0", - "stylelint-scss": "^6.11.1" + "stylelint-scss": "^6.12.1" }, "dependencies": { + "@csstools/media-query-list-parser": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-3.0.1.tgz", + "integrity": "sha512-HNo8gGD02kHmcbX6PvCoUuOQvn4szyB9ca63vZHKX5A81QytgDG4oxG4IaEfHTlEZSZ6MjPEMWIVU+zF2PZcgw==", + "requires": {} + }, + "@stylistic/stylelint-plugin": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@stylistic/stylelint-plugin/-/stylelint-plugin-3.1.3.tgz", + "integrity": "sha512-85fsmzgsIVmyG3/GFrjuYj6Cz8rAM7IZiPiXCMiSMfoDOC1lOrzrXPDk24WqviAghnPqGpx8b0caK2PuewWGFg==", + "requires": { + "@csstools/css-parser-algorithms": "^3.0.1", + "@csstools/css-tokenizer": "^3.0.1", + "@csstools/media-query-list-parser": "^3.0.1", + "is-plain-object": "^5.0.0", + "postcss": "^8.4.41", + "postcss-selector-parser": "^6.1.2", + "postcss-value-parser": "^4.2.0", + "style-search": "^0.1.0" + } + }, "stylelint-config-recommended": { "version": "14.0.1", "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz", "integrity": "sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==", "requires": {} }, + "stylelint-config-recommended-scss": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-14.1.0.tgz", + "integrity": "sha512-bhaMhh1u5dQqSsf6ri2GVWWQW5iUjBYgcHkh7SgDDn92ijoItC/cfO/W+fpXshgTQWhwFkP1rVcewcv4jaftRg==", + "requires": { + "postcss-scss": "^4.0.9", + "stylelint-config-recommended": "^14.0.1", + "stylelint-scss": "^6.4.0" + } + }, "stylelint-config-standard": { "version": "36.0.1", "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-36.0.1.tgz", @@ -5025,6 +5193,15 @@ "requires": { "stylelint-config-recommended": "^14.0.1" } + }, + "stylelint-config-standard-scss": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-14.0.0.tgz", + "integrity": "sha512-6Pa26D9mHyi4LauJ83ls3ELqCglU6VfCXchovbEqQUiEkezvKdv6VgsIoMy58i00c854wVmOw0k8W5FTpuaVqg==", + "requires": { + "stylelint-config-recommended-scss": "^14.1.0", + "stylelint-config-standard": "^36.0.1" + } } } }, @@ -5061,24 +5238,29 @@ } }, "stylelint-scss": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-6.11.1.tgz", - "integrity": "sha512-e4rYo0UY+BIMtGeGanghrvHTjcryxgZbyFxUedp8dLFqC4P70aawNdYjRrQxbnKhu3BNr4+lt5e/53tcKXiwFA==", + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-6.12.1.tgz", + "integrity": "sha512-UJUfBFIvXfly8WKIgmqfmkGKPilKB4L5j38JfsDd+OCg2GBdU0vGUV08Uw82tsRZzd4TbsUURVVNGeOhJVF7pA==", "requires": { "css-tree": "^3.0.1", "is-plain-object": "^5.0.0", - "known-css-properties": "^0.35.0", - "mdn-data": "^2.15.0", + "known-css-properties": "^0.36.0", + "mdn-data": "^2.21.0", "postcss-media-query-parser": "^0.2.3", "postcss-resolve-nested-selector": "^0.1.6", "postcss-selector-parser": "^7.1.0", "postcss-value-parser": "^4.2.0" }, "dependencies": { + "known-css-properties": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.36.0.tgz", + "integrity": "sha512-A+9jP+IUmuQsNdsLdcg6Yt7voiMF/D4K83ew0OpJtpu+l34ef7LaohWV0Rc6KNvzw6ZDizkqfyB5JznZnzuKQA==" + }, "mdn-data": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.18.0.tgz", - "integrity": "sha512-gtCy1yim/vpHF/tq3B4Z43x3zKWpYeb4IM3d/Mf4oMYcNuoXOYEaqtoFlLHw9zd7+WNN3jNh6/WXyUrD3OIiwQ==" + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.23.0.tgz", + "integrity": "sha512-786vq1+4079JSeu2XdcDjrhi/Ry7BWtjDl9WtGPWLiIHb2T66GvIVflZTBoSNZ5JqTtJGYEVMuFA/lbQlMOyDQ==" }, "postcss-selector-parser": { "version": "7.1.0", diff --git a/package.json b/package.json index 296d946..ea46c18 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "upgrade": "npm install" }, "dependencies": { - "@stylistic/stylelint-plugin": "^3.1.2", - "postcss": "^8.5.3", + "@stylistic/stylelint-plugin": "^4.0.0", + "postcss": "^8.5.6", "postcss-less": "^6.0.0", "postcss-safe-parser": "^7.0.1", "postcss-sass": "^0.5.0", @@ -19,20 +19,20 @@ "postcss-styled": "^0.34.0", "postcss-styled-syntax": "^0.7.1", "postcss-syntax": "^0.36.2", - "prettier": "^3.5.3", - "stylelint": "^16.17.0", + "prettier": "^3.6.2", + "stylelint": "^16.23.0", "stylelint-a11y": "^1.2.3", - "stylelint-config-css-modules": "^4.4.0", + "stylelint-config-css-modules": "^4.5.1", "stylelint-config-sass-guidelines": "^12.1.0", - "stylelint-config-standard": "^37.0.0", - "stylelint-config-standard-scss": "^14.0.0", + "stylelint-config-standard": "^39.0.0", + "stylelint-config-standard-scss": "^15.0.1", "stylelint-config-styled-components": "^0.1.1", "stylelint-config-tailwindcss": "^1.0.0", - "stylelint-config-twbs-bootstrap": "^16.0.0", + "stylelint-config-twbs-bootstrap": "^16.1.0", "stylelint-declaration-strict-value": "^1.10.11", "stylelint-no-px": "^2.1.0", "stylelint-prettier": "^5.0.3", - "stylelint-scss": "^6.11.1", + "stylelint-scss": "^6.12.1", "stylelint-selector-bem-pattern": "^4.0.1", "stylelint-suitcss": "^5.0.0" }