From 67e4c180bd34eab4056894cdebbafe30e72f2f15 Mon Sep 17 00:00:00 2001 From: fpetrakov Date: Thu, 18 Aug 2022 11:08:15 +0300 Subject: [PATCH] tests and docs fixes --- lib/rules/selector-max-universal/README.md | 20 ++++----------- .../selector-max-universal/__tests__/index.js | 25 ------------------- 2 files changed, 5 insertions(+), 40 deletions(-) diff --git a/lib/rules/selector-max-universal/README.md b/lib/rules/selector-max-universal/README.md index 19a7b352d7..5a387b7b44 100644 --- a/lib/rules/selector-max-universal/README.md +++ b/lib/rules/selector-max-universal/README.md @@ -79,29 +79,19 @@ The following patterns are _not_ considered problems: ### `ignoreAfterCombinators: ["array", "of", "combinators"]` -Ignore universal selector if it's preceded by specified after combinators. +Ignore universal selectors that come after one of the specified combinators. Given: ```json -[1, [">", "+"]] +[">", "+"] ``` -The following patterns are considered problems: - - -```css -*.foo * {} -``` - -The following patters are _not_ considered problems: +For example, with `2`. - -```css -*.foo + * {} -``` +The following pattern is _not_ considered a problem: ```css -*.foo > * {} +* * > * {} ``` diff --git a/lib/rules/selector-max-universal/__tests__/index.js b/lib/rules/selector-max-universal/__tests__/index.js index 99439e99f1..957f7ed463 100644 --- a/lib/rules/selector-max-universal/__tests__/index.js +++ b/lib/rules/selector-max-universal/__tests__/index.js @@ -269,31 +269,6 @@ testRule({ ], }); -testRule({ - ruleName, - config: [0, { ignoreAfterCombinators: ['+'] }], - - accept: [ - { - code: 'foo {}', - }, - { - code: 'foo + * {}', - }, - ], - - reject: [ - { - code: '* {}', - message: messages.expected('*', 0), - line: 1, - column: 1, - endLine: 1, - endColumn: 2, - }, - ], -}); - testRule({ ruleName, config: [1, { ignoreAfterCombinators: ['>'] }],