Closed MrHen closed 5 years ago
max-asserts
: Cannot use a default as per #214 (comment).
I opened an issue to eslint
reporting this. It's working as designed for now. Either we complain to ajv
to add this behavior or we "convert from the numeric option to an object which would then pick up the default" as you said.
Alternatively, set the default in schema but also use the fallback in create.
👍 With a TODO comment about removing the fallback in the next major version.
@sindresorhus I think I got it right this time? Although now I'm thinking I should just file an Issue for it and include a link in the TODO comment. 😛
Although now I'm thinking I should just file an Issue for it and include a link in the TODO comment.
👍
@MrHen Can you submit the PR URL here: https://issuehunt.io/r/avajs/eslint-plugin-ava/issues/214 ?
@sindresorhus Done. Sorry, I keep forgetting it isn't automatic.
Fixes #214.
Honestly, I'm not sure this issue makes a lot of sense. There were only three rules I saw that had options at all:
assertion-arguments
: Default isundefined
. I added it explicitly but it seems kind of redundant.max-asserts
: Cannot use a default as per https://github.com/avajs/eslint-plugin-ava/issues/214#issuecomment-478915717. I'm not a big fan of non-object options anyway. I recommend converting from the numeric option to an object which would then pick up the default. This would be a breaking change, though. Alternatively, set the default inschema
but also use the fallback increate
.test-title-format
: Default is alsoundefined
.Am I missing something about this request? There was no
Object.assign
usage to replace.