-
Notifications
You must be signed in to change notification settings - Fork 7
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
refactor: json config structure #42
Conversation
package.json
Outdated
"@types/jest": "29.5.11", | ||
"@types/node": "20.10.7", | ||
"@typescript-eslint/parser": "6.2.0", | ||
"ajv": "8.12.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.
Should these 2 packages be in the dependencies
section?
src/types.ts
Outdated
notice: Type.Boolean(), | ||
return: Type.Boolean(), | ||
}), | ||
inheritdoc: Type.Optional(Type.Boolean()), |
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.
I believe the inheritdoc
option will either replace enforceInheritdoc
or be under functions
as it does not make sense to have inheritdoc enabled for external functions but not for public, or have it for functions but not for variables. It's ok as it is for now though, we will get to it when reading / using the config.
src/utils.ts
Outdated
root: detectedConfig.root ?? './', | ||
functions: detectedConfig.functions, | ||
enforceInheritdoc: detectedConfig.enforceInheritdoc ?? true, | ||
constructorNatspec: detectedConfig.constructorNatspec ?? false, |
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.
A TODO for one of the next PRs: deprecation logic will be defined here
src/types.ts
Outdated
notice: Type.Boolean(), | ||
return: Type.Boolean(), |
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.
notice
and return
should be true by default
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.
And add param
perhaps?
test/utils.test.ts
Outdated
}); | ||
}); | ||
|
||
it('Should revert with an invalid config', async () => { |
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.
Lowercase to match the rest of the tests 😬
it('Should revert with an invalid config', async () => { | |
it('should revert with an invalid config', async () => { |
package.json
Outdated
"@typescript-eslint/parser": "6.2.0", | ||
"eslint": "8.56.0", | ||
"eslint-plugin-jsdoc": "48.1.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.
Pls revert, these are useful packages
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.
how did this even happen lmao
🤖 Linear
Doesn't fully complete the linear task