AdguardTeam / AdguardTeam/AGLint

Add new rule for detecting legacy HTML filtering rule syntax

Offen
#238 1 Kommentar 0 Reaktionen 1 zugewiesene Person Zugewiesen an @maximtop Auf GitHub ansehen
Priority: P4 T: Linter rule
Vorherrschende Sprache
TypeScript
Sterne
70
Forks
4
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Deprecate old HTML filtering syntax, and suggest the modern approach. For example

- `tag-content` should be replaced by `contains`:
```adblock
example.com$$script[tag-content="foo"]
```
↓↓↓ should be fixed as ↓↓↓
```adblock
example.com$$script:contains(foo)
```
- `wildcard` should be replaced by `contains`, and glob pattern should be replaced by regular expression:
```adblock
example.com$$script[wildcard="*banner*text*"]
```
↓↓↓ should be fixed as ↓↓↓
```adblock
example.com$$script:contains(/banner.*text/)
```

Suggested rule name: `no-legacy-html-filtering-syntax`

https://github.com/AdguardTeam/AGLint/issues/13#issuecomment-1913122971

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.