Skip to content

Commit 8453451

Browse files
committed
update import
1 parent b5df3f2 commit 8453451

2 files changed

Lines changed: 41 additions & 43 deletions

File tree

src/rules/no-invalid-cosmetic-separator.ts

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,47 @@ import { type DeclarationPlain, type PseudoClassSelectorPlain } from '@adguard/e
1010
import { REMOVE_PROPERTY, REMOVE_VALUE } from '../common/constants';
1111
import { defineRule, LinterRuleType } from '../linter/rule';
1212

13-
import { SUPPORTED_EXT_CSS_PSEUDO_CLASSES } from './no-unsupported-css-pseudo-class';
13+
/**
14+
* Supported Extended CSS pseudo-classes.
15+
*
16+
* These pseudo-classes are not supported by browsers natively, so we need Extended CSS library to support them.
17+
*
18+
* Please keep this list sorted alphabetically.
19+
*/
20+
export const SUPPORTED_EXT_CSS_PSEUDO_CLASSES = new Set([
21+
/**
22+
* Pseudo-classes :is(), and :not() may use native implementation.
23+
*
24+
* @see {@link https://github.com/AdguardTeam/ExtendedCss#extended-css-is}
25+
* @see {@link https://github.com/AdguardTeam/ExtendedCss#extended-css-not}
26+
*/
27+
/**
28+
* :has() should also be conditionally considered as extended and should not be in this list,
29+
* for details check: https://github.com/AdguardTeam/ExtendedCss#extended-css-has,
30+
* but there is a bug with content blocker in safari:
31+
* for details check: https://bugs.webkit.org/show_bug.cgi?id=248868.
32+
*
33+
* TODO: remove 'has' later.
34+
*/
35+
'-abp-contains', // alias for 'contains'
36+
'-abp-has', // alias for 'has'
37+
'contains',
38+
'has', // some browsers support 'has' natively
39+
'has-text', // alias for 'contains'
40+
'if',
41+
'if-not',
42+
'matches-attr',
43+
'matches-css',
44+
'matches-css-after', // deprecated, replaced by 'matches-css'
45+
'matches-css-before', // deprecated, replaced by 'matches-css'
46+
'matches-property',
47+
'nth-ancestor',
48+
'remove',
49+
'upward',
50+
'xpath',
51+
'style',
52+
'matches-media',
53+
]);
1454

1555
export default defineRule({
1656
meta: {

src/rules/no-unsupported-css-pseudo-class.ts

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -10,48 +10,6 @@ import { getBuiltInRuleDocumentationUrl } from '../utils/repo-url';
1010
// TODO: Use compatibility tables once they support Extended CSS pseudo-classes.
1111
// https://github.com/AdguardTeam/tsurlfilter/issues/175
1212

13-
/**
14-
* Supported Extended CSS pseudo-classes.
15-
*
16-
* These pseudo-classes are not supported by browsers natively, so we need Extended CSS library to support them.
17-
*
18-
* Please keep this list sorted alphabetically.
19-
*/
20-
export const SUPPORTED_EXT_CSS_PSEUDO_CLASSES = new Set([
21-
/**
22-
* Pseudo-classes :is(), and :not() may use native implementation.
23-
*
24-
* @see {@link https://github.com/AdguardTeam/ExtendedCss#extended-css-is}
25-
* @see {@link https://github.com/AdguardTeam/ExtendedCss#extended-css-not}
26-
*/
27-
/**
28-
* :has() should also be conditionally considered as extended and should not be in this list,
29-
* for details check: https://github.com/AdguardTeam/ExtendedCss#extended-css-has,
30-
* but there is a bug with content blocker in safari:
31-
* for details check: https://bugs.webkit.org/show_bug.cgi?id=248868.
32-
*
33-
* TODO: remove 'has' later.
34-
*/
35-
'-abp-contains', // alias for 'contains'
36-
'-abp-has', // alias for 'has'
37-
'contains',
38-
'has', // some browsers support 'has' natively
39-
'has-text', // alias for 'contains'
40-
'if',
41-
'if-not',
42-
'matches-attr',
43-
'matches-css',
44-
'matches-css-after', // deprecated, replaced by 'matches-css'
45-
'matches-css-before', // deprecated, replaced by 'matches-css'
46-
'matches-property',
47-
'nth-ancestor',
48-
'remove',
49-
'upward',
50-
'xpath',
51-
'style',
52-
'matches-media',
53-
]);
54-
5513
/**
5614
* Supported Extended CSS pseudo-classes.
5715
*

0 commit comments

Comments
 (0)