AdguardTeam / AGLint

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

Add configuration to `unknown-preprocessor-directives` and `unknown-hints-and-platforms` rules #201

Open scripthunter7 opened 9 months ago

scripthunter7 commented 9 months ago

Currently, supported directive names, hints and platforms are just burned into these rules.

It would be good to make them configurable, for example like this:

rules:
  unknown-hints-and-platforms: ["error", { "supportedPlatforms": ["windows", "mac", ... ], "supportedHints": ["PLATFORM", ...] }]
  unknown-preprocessor-directives: ["error", { "supportedDirectives": ["if", "endif", ... ] }]

Also, it would be good to put a "no-" prefix in front of their names