-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add json schema validation to aglintrc.json file for autocompletion #211
base: master
Are you sure you want to change the base?
Conversation
@@ -2,6 +2,8 @@ | |||
.DS_Store | |||
.eslintcache | |||
.vscode | |||
.idea |
There was a problem hiding this comment.
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
@@ -68,6 +68,7 @@ | |||
"@types/text-table": "^0.2.2", | |||
"@typescript-eslint/eslint-plugin": "^5.60.1", | |||
"@typescript-eslint/parser": "^5.60.1", | |||
"ajv": "^8.16.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dev dependency for tests
@@ -84,15 +86,30 @@ describe('Linter config', () => { | |||
}); | |||
}); | |||
|
|||
test('check custom Superstruct validation', () => { | |||
const assertSuperStruct = (value: unknown) => { |
There was a problem hiding this comment.
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
Closes #210
After this is approved, the next step would be to add it to schema store in this file.