# Keep in mind that in regexp rules, dots may or may not be escaped.
# So if you want to exclude a rule like:
# `/example.(com|org)\/ads/`
# You should replace the dot `.` with `(\.|\\\.)`, resulting in:
# `\/example(\.|\\\.)\(com\|org\)\\\/ads\/`
# This regexp will match and block both:
# `/example.(com|org)\/ads/`
# `/example\.(com|org)\/ads/`
# See an example: https://regex101.com/r/L7CsOZ/1
#
# https://github.com/AdguardTeam/AGLint#configuration
root: true
extends:
  - aglint:recommended
syntax:
  - AdGuard
rules:
  no-excluded-rules:
    - error
    - regexp-patterns:
        # Do not forget to escape special regex characters
        #
        # https://github.com/AdguardTeam/AdguardFilters/issues/203905
        - \|\|roblox.com\^\$cookie=RBXEventTrackerV2
        # dropbox.com
        # Broken "Add account recovery" dialog when setting up 2FA
        # https://www.dropbox.com/account/security?enroll_mfa=1&mfa_checkpoint_token=
        - dropbox\.com##div\.dig-Banner\[role="alert"\]$
        - dropbox\.com##\.dig-Banner$
        # https://github.com/AdguardTeam/AdguardFilters/issues/202560
        - \|\|hotapi\*\.tiktokv\.\w{2,3}\^$
        # plvideo.ru - history will be broken
        - ^\|\|stat\.g2\.plvideo.ru\^
        # https://github.com/AdguardTeam/AdguardFilters/issues/157889#issuecomment-1660195416
        - ^\|\|amazon\.\*\$removeparam=psc$
        # https://github.com/AdguardTeam/AdguardFilters/issues/110571
        - ^\|\|amazon\.\*\$removeparam=ref$
        # https://github.com/AdguardTeam/AdguardFilters/issues/88627
        - ^\|\|amazon\.\*\$removeparam=ref_$
        - ^\|\|amazon\.\*\$removeparam=ie$
        # https://github.com/AdguardTeam/AdguardFilters/issues/89163
        - ^\|\|amazon\.\*\/message-us\$removeparam=origRef$
        # https://github.com/AdguardTeam/AdguardFilters/issues/148958
        # Breaks navigation and removes chosen seller id on the item's page
        - ^\|\|amazon\.\*\$removeparam=smid$
        # Broken redirect to Amazon from stores
        - ^\|\|amazon\.\*\$removeparam=ascsubtag$
        # https://github.com/AdguardTeam/AdguardFilters/issues/201809
        # May break sites
        - \|\|sdk-v2\.conscent\.in\^(\$third-party)?$
        # https://github.com/AdguardTeam/AdGuardSDNSFilter/issues/1846
        - \|\|c-api-bit.shopeemobile.com\^
        # https://github.com/AdguardTeam/AdguardFilters/issues/201028
        - \|\|tapi.pureapk.com\^
        # https://github.com/AdguardTeam/AdguardFilters/issues/200159#issuecomment-2710664591
        - \|\|market\.yandex\.[a-z]*\$removeparam=do-waremd5
        # https://github.com/easylist/easylist/issues/21268
        - \|\|applicationinsights\.io\^
        # https://github.com/AdguardTeam/AdguardFilters/issues/184034
        - \|\|events.data.microsoft.com\^
        # https://github.com/AdguardTeam/AdguardFilters/issues/127008
        - \|\|bilibili.com\^\$removeparam=from$
        # https://github.com/AdguardTeam/AdguardFilters/issues/198810
        # Don't add any too simple filter for this domain without $path
        - ^ameblo\.jp##div:has\(
        - ameblo\.jp##div(\[class.=.+\])?:empty
        # Causes problems on PlayStation consoles
        - \|\|telemetry\.api\.playstation\.com
        # https://github.com/AdguardTeam/AdguardFilters/issues/197916
        - \|\|mobile\.pipe\.aria\.microsoft.com
        # https://github.com/AdguardTeam/AdguardFilters/issues/146493
        - \|\|log\.suumo\.jp
        # Popular baits. Sync with EasyList
        - ^##\.ad-area$
        - ^##\.sidebar-ad$
        - ^##\.Ad-Container$
        # Cause many false positives
        - ^##\.cookie-modal$
        - ^###cookie-modal$
        # https://github.com/AdguardTeam/AdguardFilters/issues/165972#issuecomment-1815708057
        - ^ameblo\.jp##\.pickCreative_root$
        # https://github.com/AdguardTeam/AdguardFilters/issues/191068#issuecomment-2480464336
        - ^(\/sd)?_ads_updater-$
        - ^\|\|b\.karte\.io
        - ^\|\|static\.karte\.io
        # https://github.com/AdguardTeam/AdguardFilters/commit/a64fb16a9c0ba926f980ca5091ca6d39eeb6ef40
        - ^tuma(douga)?\.jp##\.index_banner_space$
        - static-assets\.bamgrid\.com\/analytics
        - staff-start\.com\/js\/track\/
        - minkou.jp\/js\/tracking\.js
        - amazon.com\/1\/batch\/1\/OP\/
        - amazon.com\/1\/batch\/1\/OE\/
        # https://github.com/AdguardTeam/AdguardFilters/pull/189856#issuecomment-2422639077
        - youtube\.com\^\$removeparam=si$
        # https://github.com/AdguardTeam/AdguardFilters/issues/195335
        - syndication\.twitter\.com\^
        # https://github.com/AdguardTeam/AdguardFilters/issues/197918
        - fiverr\.com\^\$removeparam=ref$
