Socket
Socket
Sign inDemoInstall

eslint-plugin-jsdoc

Package Overview
Dependencies
3
Maintainers
1
Versions
628
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.3 to 3.2.0

dist/rules/requireParamName.js

6

dist/index.js

@@ -35,2 +35,6 @@ 'use strict';

var _requireParamName = require('./rules/requireParamName');
var _requireParamName2 = _interopRequireDefault(_requireParamName);
var _requireParam = require('./rules/requireParam');

@@ -69,2 +73,3 @@

'require-param-description': _requireParamDescription2.default,
'require-param-name': _requireParamName2.default,
'require-param-type': _requireParamType2.default,

@@ -84,2 +89,3 @@ 'require-returns-description': _requireReturnsDescription2.default,

'require-param-description': 0,
'require-param-name': 0,
'require-param-type': 0,

@@ -86,0 +92,0 @@ 'require-returns-description': 0,

54

package.json

@@ -1,53 +0,1 @@

{
"author": {
"email": "gajus@gajus.com",
"name": "Gajus Kuizinas",
"url": "http://gajus.com"
},
"dependencies": {
"comment-parser": "^0.4.0",
"lodash": "^4.5.1"
},
"description": "JSDoc linting rules for ESLint.",
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-transform-flow-strip-types": "^6.18.0",
"babel-preset-env": "^1.2.2",
"babel-preset-es2015": "^6.24.1",
"babel-register": "^6.18.0",
"chai": "^3.5.0",
"eslint": "^3.10.2",
"eslint-config-canonical": "^5.5.0",
"gitdown": "^2.4.0",
"globby": "^4.0.0",
"mocha": "^2.5.3",
"semantic-release": "^6.3.6"
},
"engines": {
"node": ">=4"
},
"keywords": [
"eslint",
"plugin",
"jsdoc"
],
"license": "BSD-3-Clause",
"main": "./dist/index.js",
"name": "eslint-plugin-jsdoc",
"peerDependencies": {
"eslint": ">=0.8.0"
},
"repository": {
"type": "git",
"url": "https://github.com/gajus/eslint-plugin-jsdoc"
},
"scripts": {
"add-assertions": "babel-node --presets es2015 ./bin/readme-assertions",
"build": "NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps",
"generate-readme": "gitdown ./.README/README.md --output-file ./README.md && npm run add-assertions",
"lint": "eslint ./src ./test",
"test": "mocha --recursive --compilers js:babel-register"
},
"version": "3.1.3"
}
{"author":{"email":"gajus@gajus.com","name":"Gajus Kuizinas","url":"http://gajus.com"},"dependencies":{"comment-parser":"^0.4.2","lodash":"^4.17.4"},"description":"JSDoc linting rules for ESLint.","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-flow-strip-types":"^6.22.0","babel-preset-env":"^1.6.0","babel-preset-es2015":"^6.24.1","babel-register":"^6.26.0","chai":"^4.1.2","eslint":"^4.7.2","eslint-config-canonical":"^9.3.1","gitdown":"^2.5.1","globby":"^6.1.0","mocha":"^3.5.3","semantic-release":"^8.0.3"},"engines":{"node":">=4"},"keywords":["eslint","plugin","jsdoc"],"license":"BSD-3-Clause","main":"./dist/index.js","name":"eslint-plugin-jsdoc","peerDependencies":{"eslint":">=0.8.0"},"repository":{"type":"git","url":"https://github.com/gajus/eslint-plugin-jsdoc"},"scripts":{"add-assertions":"babel-node --presets es2015 ./bin/readme-assertions","build":"NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps","generate-readme":"gitdown ./.README/README.md --output-file ./README.md && npm run add-assertions","lint":"eslint ./src ./test","test":"mocha --recursive --compilers js:babel-register"},"version":"3.2.0"}

@@ -27,2 +27,3 @@ <a name="eslint-plugin-jsdoc"></a>

* [`require-param-description`](#eslint-plugin-jsdoc-rules-require-param-description)
* [`require-param-name`](#eslint-plugin-jsdoc-rules-require-param-name)
* [`require-param-type`](#eslint-plugin-jsdoc-rules-require-param-type)

@@ -49,2 +50,3 @@ * [`require-returns-description`](#eslint-plugin-jsdoc-rules-require-returns-description)

| [`require-param-description`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-description) | [`requireParamDescription`](https://github.com/jscs-dev/jscs-jsdoc#requireparamdescription) |
| [`require-param-name`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-name) | N/A |
| [`require-param-type`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-type) | [`requireParamTypes`](https://github.com/jscs-dev/jscs-jsdoc#requireparamtypes) |

@@ -102,2 +104,3 @@ | [`require-returns-description`](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-returns-description) | [`requireReturnDescription`](https://github.com/jscs-dev/jscs-jsdoc#requirereturndescription) |

"jsdoc/require-param-description": 1,
"jsdoc/require-param-name": 1,
"jsdoc/require-param-type": 1,

@@ -481,3 +484,3 @@ "jsdoc/require-returns-description": 1,

/**
/**
* @abstract

@@ -570,5 +573,5 @@ * @access

Why are `boolean`, `number` and `string` exempt from starting with a capital letter? Let's take `string` as an example. In Javascript, everything is an object. The string Object has prototypes for string functions such as `.toUpperCase()`.
Why are `boolean`, `number` and `string` exempt from starting with a capital letter? Let's take `string` as an example. In Javascript, everything is an object. The string Object has prototypes for string functions such as `.toUpperCase()`.
Fortunately we don't have to write `new String()` everywhere in our code. Javascript will automatically wrap string primitives into string Objects when we're applying a string function to a string primitive. This way the memory footprint is a tiny little bit smaller, and the [GC](https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)) has less work to do.
Fortunately we don't have to write `new String()` everywhere in our code. Javascript will automatically wrap string primitives into string Objects when we're applying a string function to a string primitive. This way the memory footprint is a tiny little bit smaller, and the [GC](https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)) has less work to do.

@@ -765,2 +768,10 @@ So in a sense, there two types of strings in Javascript; `{string}` literals, also called primitives and `{String}` Objects. We use the primitives because it's easier to write and uses less memory. `{String}` and `{string}` are technically both valid, but they are not the same.

/**
* тест.
*/
function quux () {
}
// Message: Description must start with an uppercase character.
/**
* Foo

@@ -838,2 +849,9 @@ */

/**
* Тест.
*/
function quux () {
}
/**
* Foo

@@ -1067,2 +1085,55 @@ * bar.

<a name="eslint-plugin-jsdoc-rules-require-param-name"></a>
### <code>require-param-name</code>
Requires that all function parameters have name.
> The `@param` tag requires you to specify the name of the parameter you are documenting. You can also include the parameter's type, enclosed in curly brackets, and a description of the parameter.
>
> [JSDoc](http://usejsdoc.org/tags-param.html#overview)
|||
|---|---|
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|
|Tags|`param`|
The following patterns are considered problems:
```js
/**
* @param
*/
function quux (foo) {
}
// Message: There must be an identifier after @param type.
/**
* @param {string}
*/
function quux (foo) {
}
// Message: There must be an identifier after @param tag.
```
The following patterns are not considered problems:
```js
/**
* @param foo
*/
function quux (foo) {
}
/**
* @param {string} foo
*/
function quux (foo) {
}
```
<a name="eslint-plugin-jsdoc-rules-require-param-type"></a>

@@ -1069,0 +1140,0 @@ ### <code>require-param-type</code>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc