-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Bug: fix rule schemas #16879
Comments
Thanks for the issue! Per our semver policies, this is a breaking change so the fix will have to wait for the next major version. |
Also, schema for
|
TODO: also check changes from #13911 Edit: checked, nothing to add here. |
Also, schema for
|
In For example, |
Can you provide an example where the current schema doesn't work as expected for this rule? I think these two schemas are equivalent but the array shorthand cannot be used with references. https://eslint.org/docs/latest/extend/custom-rules#options-schemas
|
I updated the original post with a checklist. |
@mdjermanovic I tried both schemas and you're indeed right, the suggested schema does not work. I was actually focused on the |
in
Schema works like a charm even if it doesn't respect the mentioned type. But it should behave like a simple
I can't produce any error on this, I juste saw a particular schema type and reported it. If it is incorrect I'll delete the comment. |
The schema describes arrays and is technically correct for this rule: |
@mdjermanovic I will. I am on it. |
Environment
Node version: 18.8.0
npm version: 8.18.0
Local ESLint version: 8.26.0
Global ESLint version: 8.26.0
Operating System: macOS 10.15.7
What parser are you using?
Default (Espree)
What did you do?
Configuration
What did you expect to happen?
It should probably return a configuration error because
{ "minItems" : 2 }
shouldn't be allowed.What actually happened?
it doesn't take the option into account, the rule works like it should have been :
"array-element-newline": [ "error", "always" ]
without any configuration error reported.Participation
Additional comments
Checklist
[ ]deprecated rulearray-element-newline
the original post, see above[ ]deprecated rulenonblock-statement-body-position
Bug: fix rule schemas #16879 (comment)no-sequences
Bug: fix rule schemas #16879 (comment)no-constructor-return
Bug: fix rule schemas #16879 (comment) feat!: Set defaultschema: []
, drop support for function-style rules #17792The text was updated successfully, but these errors were encountered: