Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-jsdoc

Package Overview
Dependencies
Maintainers
1
Versions
662
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 46.4.6 to 46.5.0

31

dist/index.js

@@ -63,3 +63,3 @@ "use strict";

* @type {import('eslint').ESLint.Plugin & {
* configs: Record<string, import('eslint').ESLint.ConfigData>
* configs: Record<string, import('eslint').ESLint.ConfigData|{}>
* }}

@@ -128,7 +128,10 @@ */

* @param {"warn"|"error"} warnOrError
* @returns {import('eslint').ESLint.ConfigData}
* @param {boolean} [flat]
* @returns {import('eslint').ESLint.ConfigData | {plugins: {}, rules: {}}}
*/
const createRecommendedRuleset = warnOrError => {
const createRecommendedRuleset = (warnOrError, flat) => {
return {
plugins: ['jsdoc'],
plugins: flat ? {
jsdoc: index
} : ['jsdoc'],
rules: {

@@ -194,6 +197,7 @@ 'jsdoc/check-access': warnOrError,

* @param {"warn"|"error"} warnOrError
* @returns {import('eslint').ESLint.ConfigData}
* @param {boolean} [flat]
* @returns {import('eslint').ESLint.ConfigData|{}}
*/
const createRecommendedTypeScriptRuleset = warnOrError => {
const ruleset = createRecommendedRuleset(warnOrError);
const createRecommendedTypeScriptRuleset = (warnOrError, flat) => {
const ruleset = createRecommendedRuleset(warnOrError, flat);
return {

@@ -219,6 +223,7 @@ ...ruleset,

* @param {"warn"|"error"} warnOrError
* @returns {import('eslint').ESLint.ConfigData}
* @param {boolean} [flat]
* @returns {import('eslint').ESLint.ConfigData|{}}
*/
const createRecommendedTypeScriptFlavorRuleset = warnOrError => {
const ruleset = createRecommendedRuleset(warnOrError);
const createRecommendedTypeScriptFlavorRuleset = (warnOrError, flat) => {
const ruleset = createRecommendedRuleset(warnOrError, flat);
return {

@@ -245,2 +250,8 @@ ...ruleset,

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

@@ -247,0 +258,0 @@ exports.default = _default;

@@ -20,9 +20,9 @@ {

"devDependencies": {
"@babel/cli": "^7.22.9",
"@babel/core": "^7.22.9",
"@babel/eslint-parser": "^7.22.9",
"@babel/node": "^7.22.6",
"@babel/cli": "^7.22.10",
"@babel/core": "^7.22.10",
"@babel/eslint-parser": "^7.22.10",
"@babel/node": "^7.22.10",
"@babel/plugin-syntax-class-properties": "^7.12.13",
"@babel/plugin-transform-flow-strip-types": "^7.22.5",
"@babel/preset-env": "^7.22.9",
"@babel/preset-env": "^7.22.10",
"@babel/register": "^7.22.5",

@@ -37,11 +37,12 @@ "@es-joy/escodegen": "^3.5.1",

"@types/debug": "^4.1.8",
"@types/eslint": "^8.44.1",
"@types/eslint": "^8.44.2",
"@types/esquery": "^1.5.0",
"@types/estree": "^1.0.1",
"@types/json-schema": "^7.0.12",
"@types/lodash.defaultsdeep": "^4.6.7",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.7",
"@types/node": "^20.5.0",
"@types/semver": "^7.5.0",
"@types/spdx-expression-parse": "^3.0.2",
"@typescript-eslint/parser": "^6.2.1",
"@typescript-eslint/parser": "^6.4.0",
"babel-plugin-add-module-exports": "^1.0.4",

@@ -53,3 +54,3 @@ "babel-plugin-istanbul": "^6.1.1",

"decamelize": "^5.0.1",
"eslint": "8.46.0",
"eslint": "8.47.0",
"eslint-config-canonical": "~41.1.7",

@@ -61,3 +62,4 @@ "espree": "^9.6.1",

"jsdoc-type-pratt-parser": "^4.0.0",
"lint-staged": "^13.2.3",
"json-schema": "^0.4.0",
"lint-staged": "^14.0.0",
"lodash.defaultsdeep": "^4.6.1",

@@ -130,3 +132,3 @@ "mocha": "^10.2.0",

"tsc-build": "tsc -p tsconfig-prod.json",
"build": "rimraf ./dist && cross-env NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps --ignore ./src/bin/*.js --no-copy-ignored && pnpm tsc-build || true",
"build": "rimraf ./dist && cross-env NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps --ignore ./src/bin/*.js --no-copy-ignored && pnpm tsc-build",
"check-docs": "babel-node ./src/bin/generateDocs.js --check",

@@ -146,3 +148,3 @@ "create-docs": "npm run create-options && babel-node ./src/bin/generateDocs.js",

},
"version": "46.4.6"
"version": "46.5.0"
}

@@ -15,2 +15,4 @@ <a name="user-content-eslint-plugin-jsdoc"></a>

* [Configuration](#user-content-eslint-plugin-jsdoc-configuration)
* [Flat config](#user-content-eslint-plugin-jsdoc-configuration-flat-config)
* [`eslintrc`](#user-content-eslint-plugin-jsdoc-configuration-eslintrc)
* [Options](#user-content-eslint-plugin-jsdoc-options)

@@ -44,2 +46,31 @@ * [Settings](#user-content-eslint-plugin-jsdoc-settings)

<a name="user-content-eslint-plugin-jsdoc-configuration-flat-config"></a>
<a name="eslint-plugin-jsdoc-configuration-flat-config"></a>
### Flat config
```js
import jsdoc from 'eslint-plugin-jsdoc';
const config = [
// configuration included in plugin
jsdoc.configs['flat/recommended'],
// other configuration objects...
{
files: ['**/*.js'],
plugins: {
jsdoc,
},
rules: {
'jsdoc/require-description': 'warn'
}
}
];
export default config;
```
<a name="user-content-eslint-plugin-jsdoc-configuration-eslintrc"></a>
<a name="eslint-plugin-jsdoc-configuration-eslintrc"></a>
### <code>eslintrc</code>
Add `plugins` section to [.eslintrc.*](https://eslint.org/docs/user-guide/configuring#configuration-file-formats)

@@ -46,0 +77,0 @@ and specify `eslint-plugin-jsdoc` as a plugin.

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