File tree Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,10 @@ decreasing precedence:
107
107
to be desired in sample code as with the code file convention.
108
108
* ` no-console ` - This rule is unlikely to have inadvertent temporary debugging
109
109
within examples.
110
+ * ` no-multiple-empty-lines ` - This rule may be problematic for projects which
111
+ use an initial newline just to start an example. Also, projects may wish to
112
+ use extra lines within examples just for easier illustration
113
+ purposes.
110
114
* ` no-undef ` - Many variables in examples will be ` undefined ` .
111
115
* ` no-unused-vars ` - It is common to define variables for clarity without always
112
116
using them within examples.
Original file line number Diff line number Diff line change @@ -751,6 +751,10 @@ decreasing precedence:
751
751
to be desired in sample code as with the code file convention.
752
752
* ` no-console ` - This rule is unlikely to have inadvertent temporary debugging
753
753
within examples.
754
+ * ` no-multiple-empty-lines ` - This rule may be problematic for projects which
755
+ use an initial newline just to start an example. Also, projects may wish to
756
+ use extra lines within examples just for easier illustration
757
+ purposes.
754
758
* ` no-undef ` - Many variables in examples will be ` undefined ` .
755
759
* ` no-unused-vars ` - It is common to define variables for clarity without always
756
760
using them within examples.
@@ -922,7 +926,7 @@ function quux2 () {
922
926
function quux2 () {
923
927
924
928
}
925
- // Message: @example error (no-multiple-empty-lines ): Too many blank lines at the beginning of file. Max of 0 allowed .
929
+ // Message: @example warning (id-length ): Identifier name 'i' is too short (< 2) .
926
930
927
931
/**
928
932
* @example const i = 5 ;
Original file line number Diff line number Diff line change @@ -69,6 +69,10 @@ export default iterateJsdoc(({
69
69
// Unlikely to have inadvertent debugging within examples
70
70
'no-console' : 0 ,
71
71
72
+ // Often wish to start `@example` code after newline; also may use
73
+ // empty lines for spacing
74
+ 'no-multiple-empty-lines' : 0 ,
75
+
72
76
// Many variables in examples will be `undefined`
73
77
'no-undef' : 0 ,
74
78
Original file line number Diff line number Diff line change @@ -376,10 +376,6 @@ export default {
376
376
}
377
377
` ,
378
378
errors : [
379
- {
380
- line : 3 ,
381
- message : '@example error (no-multiple-empty-lines): Too many blank lines at the beginning of file. Max of 0 allowed.' ,
382
- } ,
383
379
{
384
380
line : 4 ,
385
381
message : '@example warning (id-length): Identifier name \'i\' is too short (< 2).' ,
You can’t perform that action at this time.
0 commit comments