Socket
Socket
Sign inDemoInstall

eslint-plugin-jsdoc

Package Overview
Dependencies
Maintainers
1
Versions
655
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-jsdoc - npm Package Compare versions

Comparing version 44.2.7 to 45.0.0

20

dist/index.js

@@ -200,2 +200,3 @@ "use strict";

'jsdoc/no-types': warnOrError,
'jsdoc/no-undefined-types': 'off',
'jsdoc/require-param-type': 'off',

@@ -209,2 +210,19 @@ 'jsdoc/require-property-type': 'off',

/**
* @param {"warn"|"error"} warnOrError
* @returns {import('eslint').ESLint.ConfigData}
*/
const createRecommendedTypeScriptFlavorRuleset = warnOrError => {
const ruleset = createRecommendedRuleset(warnOrError);
return {
...ruleset,
rules: {
...ruleset.rules,
/* eslint-disable indent -- Extra indent to avoid use by auto-rule-editing */
'jsdoc/no-undefined-types': 'off'
/* eslint-enable indent */
}
};
};
/* istanbul ignore if -- TS */

@@ -218,2 +236,4 @@ if (!index.configs) {

index.configs['recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error');
index.configs['recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn');
index.configs['recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error');
var _default = index;

@@ -220,0 +240,0 @@ exports.default = _default;

2

package.json

@@ -135,3 +135,3 @@ {

},
"version": "44.2.7"
"version": "45.0.0"
}

@@ -134,24 +134,30 @@ <a name="user-content-eslint-plugin-jsdoc"></a>

If you plan to use TypeScript syntax (and not just "typescript"
`mode` to indicate the JSDoc flavor is TypeScript), you can configure
the following:
`mode` to indicate the JSDoc flavor is TypeScript), you can use:
```javascript
```json
{
"rules": {
"jsdoc/no-types": 1,
"jsdoc/require-param-type": 0,
"jsdoc/require-property-type": 0,
"jsdoc/require-returns-type": 0,
}
"extends": ["plugin:jsdoc/recommended-typescript"]
}
```
...or just use:
...or to report with failing errors instead of mere warnings:
```json
{
"extends": ["plugin:jsdoc/recommended-typescript"]
"extends": ["plugin:jsdoc/recommended-typescript-error"]
}
```
If you are not using TypeScript syntax (your source files are still `.js` files)
but you are using the TypeScript flavor within JSDoc (i.e., the default
"typescript" `mode` in `eslint-plugin-jsdoc`) and you are perhaps using
`allowJs` and `checkJs` options of TypeScript's `tsconfig.json`), you may
use:
```json
{
"extends": ["plugin:jsdoc/recommended-typescript-flavor"]
}
```
...or to report with failing errors instead of mere warnings:

@@ -161,3 +167,3 @@

{
"extends": ["plugin:jsdoc/recommended-typescript-error"]
"extends": ["plugin:jsdoc/recommended-typescript-flavor-error"]
}

@@ -164,0 +170,0 @@ ```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc