Skip to content

Commit 10242bd

Browse files
authored
Merge pull request #1142 from nextcloud-libraries/dependabot/npm_and_yarn/eslint-plugin-jsdoc-55.0.0
chore(deps): Bump eslint-plugin-jsdoc from 54.1.1 to 55.2.0
2 parents c4d7c0a + a72ab7f commit 10242bd

File tree

3 files changed

+58
-41
lines changed

3 files changed

+58
-41
lines changed

lib/configs/documentation.ts

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
55
import type { Linter } from 'eslint'
6+
import type { Settings } from 'eslint-plugin-jsdoc/iterateJsdoc.js'
67
import type { ConfigOptions } from '../types.d.ts'
78

8-
import jsdocPlugin from 'eslint-plugin-jsdoc'
9+
import { jsdoc } from 'eslint-plugin-jsdoc'
910
import {
1011
GLOB_FILES_JAVASCRIPT,
1112
GLOB_FILES_TESTING,
@@ -27,6 +28,13 @@ const JS_FUNCTION_CONTEXTS = [
2728
'MethodDefinition:not(:has(TSTypeAnnotation))',
2829
]
2930

31+
const SHARED_JSDOC_SETTINGS: Partial<Settings> = {
32+
// We use the alias for legacy reasons to prevent unnecessary noise
33+
tagNamePreference: {
34+
returns: 'return',
35+
},
36+
}
37+
3038
/**
3139
* Config factory for code documentation related rules (JSDoc)
3240
*
@@ -35,32 +43,27 @@ const JS_FUNCTION_CONTEXTS = [
3543
export function documentation(options: ConfigOptions): Linter.Config[] {
3644
return [
3745
{
38-
files: [
39-
...GLOB_FILES_JAVASCRIPT,
40-
...GLOB_FILES_TYPESCRIPT,
41-
...GLOB_FILES_VUE,
42-
],
43-
plugins: {
44-
jsdoc: jsdocPlugin,
45-
},
46-
},
47-
48-
{
49-
...jsdocPlugin.configs['flat/recommended-typescript-flavor'],
46+
...jsdoc({
47+
config: 'flat/recommended-typescript-flavor',
48+
settings: {
49+
...SHARED_JSDOC_SETTINGS,
50+
mode: 'permissive',
51+
},
52+
}),
53+
name: 'nextcloud/documentation/javascript',
5054
files: [
5155
...GLOB_FILES_JAVASCRIPT,
5256
...(options.vueIsTypescript ? [] : GLOB_FILES_VUE),
5357
],
54-
settings: {
55-
jsdoc: {
56-
mode: 'permissive',
57-
},
58-
},
5958
ignores: GLOB_FILES_TESTING,
6059
},
6160

6261
{
63-
...jsdocPlugin.configs['flat/recommended-typescript'],
62+
...jsdoc({
63+
config: 'flat/recommended-typescript',
64+
settings: SHARED_JSDOC_SETTINGS,
65+
}),
66+
name: 'nextcloud/documentation/typescript',
6467
files: [
6568
...GLOB_FILES_TYPESCRIPT,
6669
...(options.vueIsTypescript ? GLOB_FILES_VUE : []),
@@ -89,14 +92,6 @@ export function documentation(options: ConfigOptions): Linter.Config[] {
8992
{ startLines: 1 },
9093
],
9194
},
92-
settings: {
93-
jsdoc: {
94-
// We use the alias for legacy reasons to prevent unnecessary noise
95-
tagNamePreference: {
96-
returns: 'return',
97-
},
98-
},
99-
},
10095
},
10196

10297
{

package-lock.json

Lines changed: 35 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@stylistic/eslint-plugin": "^5.3.1",
4848
"eslint-config-flat-gitignore": "^2.1.0",
4949
"eslint-plugin-antfu": "^3.1.1",
50-
"eslint-plugin-jsdoc": "^54.1.1",
50+
"eslint-plugin-jsdoc": "^55.2.0",
5151
"eslint-plugin-perfectionist": "^4.15.0",
5252
"eslint-plugin-vue": "^10.4.0",
5353
"fast-xml-parser": "^5.2.5",

0 commit comments

Comments
 (0)