Skip to content

Commit

Permalink
tests and docs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fpetrakov committed Aug 18, 2022
1 parent f752f30 commit 67e4c18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 40 deletions.
20 changes: 5 additions & 15 deletions lib/rules/selector-max-universal/README.md
Expand Up @@ -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:

<!-- prettier-ignore -->
```css
*.foo * {}
```

The following patters are _not_ considered problems:
For example, with `2`.

<!-- prettier-ignore -->
```css
*.foo + * {}
```
The following pattern is _not_ considered a problem:

<!-- prettier-ignore -->
```css
*.foo > * {}
* * > * {}
```
25 changes: 0 additions & 25 deletions lib/rules/selector-max-universal/__tests__/index.js
Expand Up @@ -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: ['>'] }],
Expand Down

0 comments on commit 67e4c18

Please sign in to comment.