AdguardTeam / AGLint

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

.aglintrc.json file json schema for autocompletion #210

Open royhadad opened 2 months ago

royhadad commented 2 months ago

I tried to configure the .aglintrc.json file, and noticed there is no json schema for it (which adds autocomplete in common editors like VSCode/InteliJ.

We can see an example from the Datree project (which I used to be a maintainer of): https://github.com/datreeio/datree/blob/0c3b63e6ce9688cdb5ad3bf06768875664cf15be/pkg/validatePoliciesYaml/policiesSchema.json

the schema can be pushed into schema store for auto completion.

I just wanna validate 2 things before I code it and open a PR:

  1. Would we be happy to add something like that to the project?
  2. Anything I should be aware of? I noticed we have some code specifying the aglintrc file here
scripthunter7 commented 2 months ago

Hi @royhadad,

I think this is a good idea, thanks if you do it :) The structure of the config file is documented in the following link:

https://github.com/AdguardTeam/AGLint?tab=readme-ov-file#configuration-file-structure

scripthunter7 commented 2 months ago

I think JSON schemas also can be added to our extension: https://github.com/AdguardTeam/VscodeAdblockSyntax/issues/136