Skip to content

feat: add json schema validation to aglintrc.json file for autocompletion#211

Open
royhadad wants to merge 2 commits into
AdguardTeam:masterfrom
royhadad:add_json_schema
Open

feat: add json schema validation to aglintrc.json file for autocompletion#211
royhadad wants to merge 2 commits into
AdguardTeam:masterfrom
royhadad:add_json_schema

Conversation

@royhadad

@royhadad royhadad commented Jul 1, 2024

Copy link
Copy Markdown

Closes #210

After this is approved, the next step would be to add it to schema store in this file.

Comment thread .gitignore
.DS_Store
.eslintcache
.vscode
.idea

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore InteliJ IDEA configuration files

Comment thread package.json
"@types/text-table": "^0.2.2",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"ajv": "^8.16.0",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dev dependency for tests

});

test('check custom Superstruct validation', () => {
const assertSuperStruct = (value: unknown) => {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

running the tests both on superstruct and the json schema, because they are duplicated.
In the future, we could migrate from Superstruct to Zod and automatically convert it to json schema using zod-to-json-schema, as @scripthunter7 suggested in AdguardTeam/VscodeAdblockSyntax#136

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.aglintrc.json file json schema for autocompletion

1 participant