AdguardTeam / AGLint

Universal adblock filter list linter
https://www.npmjs.com/package/@adguard/aglint
MIT License
49 stars 3 forks source link

Add a new rule to validate TLDs #203

Open scripthunter7 opened 7 months ago

scripthunter7 commented 7 months ago

We already have a basic domain validator in AGTree. This is used to validate the domain list of the cosmetic rule or the value of the $domain modifier.

I recommend improving this utility by checking TLDs (if the TLD is not a wildcard, like example.*)

References:

Alex-302 commented 7 months ago

Maybe related to this issue - file extensions, used on the sites (to not consider as TLD) https://github.com/AdguardTeam/HostlistCompiler/issues/44

scripthunter7 commented 7 months ago

@Alex-302 Yes, that issue can be solved with the list of known TLDs