Skip to content

Commit

Permalink
refactor: simplify new-parens rule schema (#17060)
Browse files Browse the repository at this point in the history
  • Loading branch information
mho22 committed Apr 5, 2023
1 parent a3aa6f5 commit cf682d2
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions lib/rules/new-parens.js
Expand Up @@ -31,20 +31,11 @@ module.exports = {
},

fixable: "code",
schema: {
anyOf: [
{
type: "array",
items: [
{
enum: ["always", "never"]
}
],
minItems: 0,
maxItems: 1
}
]
},
schema: [
{
enum: ["always", "never"]
}
],
messages: {
missing: "Missing '()' invoking a constructor.",
unnecessary: "Unnecessary '()' invoking a constructor with no arguments."
Expand Down

0 comments on commit cf682d2

Please sign in to comment.