Skip to content

Commit

Permalink
feat: Add support for allowJSDoc param for "multiline-comment-style"
Browse files Browse the repository at this point in the history
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
  • Loading branch information
laurent22 and mdjermanovic committed Mar 1, 2023
1 parent 8677d05 commit 06c80b2
Showing 1 changed file with 30 additions and 14 deletions.
44 changes: 30 additions & 14 deletions lib/rules/multiline-comment-style.js
Expand Up @@ -22,21 +22,37 @@ module.exports = {
},

fixable: "whitespace",
schema: [
{
enum: ["starred-block", "separate-lines", "bare-block"]
},
{
type: "object",
properties: {
allowJSDoc: {
type: "boolean",
default: true
}
schema: {
anyOf: [
{
type: "array",
items: [
{
enum: ["starred-block", "bare-block"]
}
],
additionalItems: false
},
additionalProperties: false
}
],
{
type: "array",
items: [
{
enum: ["separate-lines"]
},
{
type: "object",
properties: {
allowJSDoc: {
type: "boolean"
}
},
additionalProperties: false
}
],
additionalItems: false
}
]
},
messages: {
expectedBlock: "Expected a block comment instead of consecutive line comments.",
expectedBareBlock: "Expected a block comment without padding stars.",
Expand Down

0 comments on commit 06c80b2

Please sign in to comment.