-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionbreakingThis change is backwards-incompatibleThis change is backwards-incompatiblebugESLint is working incorrectlyESLint is working incorrectlyrepro:yesIssues with a reproducible exampleIssues with a reproducible exampleruleRelates to ESLint's core rulesRelates to ESLint's core rules
Description
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
{
"root": true,
"env": {
"node": true,
"browser": true
},
"extends": [ "eslint:recommended" ],
"ignorePatterns": [ "**/node_modules/**/*" ],
"rules": {
"no-undef" : "off",
"no-unused-vars" : "off",
"array-element-newline": [ "error", "always", { "minItems": 2 } ]
}
}
var c = [1];
var d = [1, 2];
var e = [1, 2, 3
];
var f = [ 1, 2, 3 ];
var g = [
function foo() {
dosomething();
}, function bar() {
dosomething();
}
];
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
- I am willing to submit a pull request for this issue.
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 #17792
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionbreakingThis change is backwards-incompatibleThis change is backwards-incompatiblebugESLint is working incorrectlyESLint is working incorrectlyrepro:yesIssues with a reproducible exampleIssues with a reproducible exampleruleRelates to ESLint's core rulesRelates to ESLint's core rules