eslint-plugin-jsdoc 65.1.0 → 65.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rules.d.ts CHANGED
@@ -7,6 +7,10 @@ export interface Rules {
7
7
  | []
8
8
  | [
9
9
  {
10
+ /**
11
+ * Whether to ignore empty and whitespace-only lines (e.g., to allow a formatter to handle)
12
+ */
13
+ ignoreEmptyLines?: boolean;
10
14
  /**
11
15
  * Set to 0 if you wish to avoid the normal requirement for an inner indentation of
12
16
  * one space. Defaults to 1 (one space of normal inner indentation).
package/package.json CHANGED
@@ -163,5 +163,5 @@
163
163
  "test-cov": "TIMING=1 c8 --reporter text pnpm run test-no-cov",
164
164
  "test-index": "pnpm run test-no-cov test/rules/index.js"
165
165
  },
166
- "version": "65.1.0"
166
+ "version": "65.2.0"
167
167
  }
@@ -8,6 +8,7 @@ export default iterateJsdoc(({
8
8
  sourceCode,
9
9
  }) => {
10
10
  const {
11
+ ignoreEmptyLines = false,
11
12
  innerIndent = 1,
12
13
  } = context.options[0] || {};
13
14
 
@@ -15,6 +16,9 @@ export default iterateJsdoc(({
15
16
  const indentLevel = indent.length + innerIndent;
16
17
  const sourceLines = sourceCode.getText(jsdocNode).split('\n')
17
18
  .slice(1)
19
+ .filter((line) => {
20
+ return !ignoreEmptyLines || line.trim();
21
+ })
18
22
  .map((line, number) => {
19
23
  return {
20
24
  line: line.split('*')[0],
@@ -67,6 +71,10 @@ export default iterateJsdoc(({
67
71
  {
68
72
  additionalProperties: false,
69
73
  properties: {
74
+ ignoreEmptyLines: {
75
+ description: 'Whether to ignore empty and whitespace-only lines (e.g., to allow a formatter to handle)',
76
+ type: 'boolean',
77
+ },
70
78
  innerIndent: {
71
79
  default: 1,
72
80
  description: `Set to 0 if you wish to avoid the normal requirement for an inner indentation of
package/src/rules.d.ts CHANGED
@@ -7,6 +7,10 @@ export interface Rules {
7
7
  | []
8
8
  | [
9
9
  {
10
+ /**
11
+ * Whether to ignore empty and whitespace-only lines (e.g., to allow a formatter to handle)
12
+ */
13
+ ignoreEmptyLines?: boolean;
10
14
  /**
11
15
  * Set to 0 if you wish to avoid the normal requirement for an inner indentation of
12
16
  * one space. Defaults to 1 (one space of normal inner indentation).