Skip to content

Commit 3889927

Browse files
committed
docs: generate docs
1 parent e03be63 commit 3889927

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

.README/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ This table maps the rules between `eslint-plugin-jsdoc` and `jscs-jsdoc`.
1616
| --- | --- |
1717
| [`check-examples`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-examples) | N/A |
1818
| [`check-param-names`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-param-names) | [`checkParamNames`](https://github.com/jscs-dev/jscs-jsdoc#checkparamnames) |
19+
| [`check-syntax`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-syntax) | N/A |
1920
| [`check-tag-names`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-tag-names) | N/A ~ [`checkAnnotations`](https://github.com/jscs-dev/jscs-jsdoc#checkannotations) |
2021
| [`check-types`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-types) | [`checkTypes`](https://github.com/jscs-dev/jscs-jsdoc#checktypes) |
2122
| [`newline-after-description`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-newline-after-description) | [`requireNewlineAfterDescription`](https://github.com/jscs-dev/jscs-jsdoc#requirenewlineafterdescription) and [`disallowNewlineAfterDescription`](https://github.com/jscs-dev/jscs-jsdoc#disallownewlineafterdescription) |
@@ -73,6 +74,7 @@ Finally, enable all of the rules that you would like to use.
7374
"rules": {
7475
"jsdoc/check-examples": 1,
7576
"jsdoc/check-param-names": 1,
77+
"jsdoc/check-syntax": 1,
7678
"jsdoc/check-tag-names": 1,
7779
"jsdoc/check-types": 1,
7880
"jsdoc/newline-after-description": 1,
@@ -247,6 +249,7 @@ Finally, the following rule pertains to inline disable directives:
247249

248250
{"gitdown": "include", "file": "./rules/check-examples.md"}
249251
{"gitdown": "include", "file": "./rules/check-param-names.md"}
252+
{"gitdown": "include", "file": "./rules/check-syntax.md"}
250253
{"gitdown": "include", "file": "./rules/check-tag-names.md"}
251254
{"gitdown": "include", "file": "./rules/check-types.md"}
252255
{"gitdown": "include", "file": "./rules/newline-after-description.md"}

.README/rules/check-syntax.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
### `check-syntax`
2+
3+
Reports against Google Closure Compiler syntax.
4+
5+
|||
6+
|---|---|
7+
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|
8+
|Tags|N/A|
9+
10+
<!-- assertions checkSyntax -->

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ JSDoc linting rules for ESLint.
1919
* [Rules](#eslint-plugin-jsdoc-rules)
2020
* [`check-examples`](#eslint-plugin-jsdoc-rules-check-examples)
2121
* [`check-param-names`](#eslint-plugin-jsdoc-rules-check-param-names)
22+
* [`check-syntax`](#eslint-plugin-jsdoc-rules-check-syntax)
2223
* [`check-tag-names`](#eslint-plugin-jsdoc-rules-check-tag-names)
2324
* [`check-types`](#eslint-plugin-jsdoc-rules-check-types)
2425
* [`newline-after-description`](#eslint-plugin-jsdoc-rules-newline-after-description)
@@ -47,6 +48,7 @@ This table maps the rules between `eslint-plugin-jsdoc` and `jscs-jsdoc`.
4748
| --- | --- |
4849
| [`check-examples`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-examples) | N/A |
4950
| [`check-param-names`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-param-names) | [`checkParamNames`](https://github.com/jscs-dev/jscs-jsdoc#checkparamnames) |
51+
| [`check-syntax`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-syntax) | N/A |
5052
| [`check-tag-names`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-tag-names) | N/A ~ [`checkAnnotations`](https://github.com/jscs-dev/jscs-jsdoc#checkannotations) |
5153
| [`check-types`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-types) | [`checkTypes`](https://github.com/jscs-dev/jscs-jsdoc#checktypes) |
5254
| [`newline-after-description`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-newline-after-description) | [`requireNewlineAfterDescription`](https://github.com/jscs-dev/jscs-jsdoc#requirenewlineafterdescription) and [`disallowNewlineAfterDescription`](https://github.com/jscs-dev/jscs-jsdoc#disallownewlineafterdescription) |
@@ -106,6 +108,7 @@ Finally, enable all of the rules that you would like to use.
106108
"rules": {
107109
"jsdoc/check-examples": 1,
108110
"jsdoc/check-param-names": 1,
111+
"jsdoc/check-syntax": 1,
109112
"jsdoc/check-tag-names": 1,
110113
"jsdoc/check-types": 1,
111114
"jsdoc/newline-after-description": 1,
@@ -663,6 +666,40 @@ function quux ({
663666

664667
Likewise for the pattern `[a, b]` which is an [`ArrayPattern`](https://github.com/estree/estree/blob/master/es2015.md#arraypattern).
665668

669+
<a name="eslint-plugin-jsdoc-rules-check-syntax"></a>
670+
### <code>check-syntax</code>
671+
672+
Reports against Google Closure Compiler syntax.
673+
674+
|||
675+
|---|---|
676+
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|
677+
|Tags|N/A|
678+
679+
The following patterns are considered problems:
680+
681+
````js
682+
/**
683+
* @param {string=} foo
684+
*/
685+
function quux (foo) {
686+
687+
}
688+
// Message: Syntax should not be Google Closure Compiler style.
689+
````
690+
691+
The following patterns are not considered problems:
692+
693+
````js
694+
/**
695+
* @param {string} [foo]
696+
*/
697+
function quux (foo) {
698+
699+
}
700+
````
701+
702+
666703
<a name="eslint-plugin-jsdoc-rules-check-tag-names"></a>
667704
### <code>check-tag-names</code>
668705

0 commit comments

Comments
 (0)