Skip to content

Commit 228c568

Browse files
authored
chore: update jsdoccomment, are-docs-informative, debug, espree, semver, devDeps (#1391)
Also: - chore: reapplies part of eslint-config-canonical
1 parent e26a11a commit 228c568

File tree

99 files changed

+6823
-6190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+6823
-6190
lines changed

.README/rules/check-line-alignment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Disables `wrapIndent`; existing wrap indentation is preserved without changes.
5858
|||
5959
|---|---|
6060
|Context|everywhere|
61-
|Options|string ("always", "never", "any") followed by object with `customSpacings`, `preserveMainDescriptionPostDelimiter`, `tags`, `wrapIndent`, `disableWrapIndent`|
61+
|Options|string ("always", "never", "any") followed by object with `customSpacings`, `disableWrapIndent`, `preserveMainDescriptionPostDelimiter`, `tags`, `wrapIndent`|
6262
|Tags|`param`, `property`, `returns` and others added by `tags`|
6363
|Aliases|`arg`, `argument`, `prop`, `return`|
6464
|Recommended|false|

.ncurc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ module.exports = {
88
// todo[engine:node@>=20]: Can reenable
99
'glob',
1010
// todo[engine:node@>=20]: Can reenable
11-
'rimraf'
11+
'rimraf',
1212
],
1313
};

docs/rules/check-line-alignment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Disables `wrapIndent`; existing wrap indentation is preserved without changes.
8686
|||
8787
|---|---|
8888
|Context|everywhere|
89-
|Options|string ("always", "never", "any") followed by object with `customSpacings`, `preserveMainDescriptionPostDelimiter`, `tags`, `wrapIndent`, `disableWrapIndent`|
89+
|Options|string ("always", "never", "any") followed by object with `customSpacings`, `disableWrapIndent`, `preserveMainDescriptionPostDelimiter`, `tags`, `wrapIndent`|
9090
|Tags|`param`, `property`, `returns` and others added by `tags`|
9191
|Aliases|`arg`, `argument`, `prop`, `return`|
9292
|Recommended|false|

docs/rules/convert-to-jsdoc-comments.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function quux () {}
118118

119119
// A single line comment
120120
function quux () {}
121-
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"lineOrBlockStyle":"line","enforceJsdocLineStyle":"single"}]
121+
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"enforceJsdocLineStyle":"single","lineOrBlockStyle":"line"}]
122122
// Message: Line comments should be JSDoc-style.
123123

124124
/* A single line comment */
@@ -128,7 +128,7 @@ function quux () {}
128128

129129
/* A single line comment */
130130
function quux () {}
131-
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"lineOrBlockStyle":"block","enforceJsdocLineStyle":"single"}]
131+
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"enforceJsdocLineStyle":"single","lineOrBlockStyle":"block"}]
132132
// Message: Block comments should be JSDoc-style.
133133

134134
// A single line comment
@@ -160,21 +160,21 @@ export class User {
160160
// Message: Block comments should be JSDoc-style.
161161

162162
/* A single line comment */ function quux () {}
163-
// Settings: {"jsdoc":{"minLines":0,"maxLines":0}}
163+
// Settings: {"jsdoc":{"maxLines":0,"minLines":0}}
164164
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"enforceJsdocLineStyle":"single"}]
165165
// Message: Block comments should be JSDoc-style.
166166

167167
var a = []; // Test comment
168-
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"contextsBeforeAndAfter":[],"contextsAfter":["VariableDeclarator"]}]
168+
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"contextsAfter":["VariableDeclarator"],"contextsBeforeAndAfter":[]}]
169169
// Message: Line comments should be JSDoc-style.
170170

171171
var a = []; // Test comment
172-
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"contextsBeforeAndAfter":[],"contextsAfter":[{"context":"VariableDeclarator","inlineCommentBlock":true}]}]
172+
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"contextsAfter":[{"context":"VariableDeclarator","inlineCommentBlock":true}],"contextsBeforeAndAfter":[]}]
173173
// Message: Line comments should be JSDoc-style.
174174

175175
var a = []; // Test comment
176-
// Settings: {"jsdoc":{"minLines":0,"maxLines":0}}
177-
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"contextsBeforeAndAfter":[],"contextsAfter":[{"context":"VariableDeclarator","inlineCommentBlock":true}]}]
176+
// Settings: {"jsdoc":{"maxLines":0,"minLines":0}}
177+
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"contextsAfter":[{"context":"VariableDeclarator","inlineCommentBlock":true}],"contextsBeforeAndAfter":[]}]
178178
// Message: Line comments should be JSDoc-style.
179179

180180
// Test comment
@@ -230,11 +230,11 @@ function quux () {}
230230

231231
/* A single line comment */
232232
function quux () {}
233-
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"lineOrBlockStyle":"line","enforceJsdocLineStyle":"single"}]
233+
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"enforceJsdocLineStyle":"single","lineOrBlockStyle":"line"}]
234234

235235
// A single line comment
236236
function quux () {}
237-
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"lineOrBlockStyle":"block","enforceJsdocLineStyle":"single"}]
237+
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"enforceJsdocLineStyle":"single","lineOrBlockStyle":"block"}]
238238

239239
// @ts-expect-error
240240
function quux () {}
@@ -245,6 +245,6 @@ function quux () {}
245245

246246
// Test comment
247247
var a = [];
248-
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"contextsBeforeAndAfter":[],"contextsAfter":["VariableDeclarator"]}]
248+
// "jsdoc/convert-to-jsdoc-comments": ["error"|"warn", {"contextsAfter":["VariableDeclarator"],"contextsBeforeAndAfter":[]}]
249249
````
250250

docs/rules/informative-docs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ let emoji;
278278
*/
279279
export function packageNameFromPath(path) {
280280
const base = basename(path);
281-
return /^vd+(.d+)?$/.exec(base) || /^tsd.d/.exec(base) ? basename(dirname(path)) : base;
281+
return /^v\d+(\.\d+)?$/.exec(base) || /^ts\d\.\d/.exec(base) ? basename(dirname(path)) : base;
282282
}
283283
// Message: This description only repeats the name it describes.
284284

@@ -287,7 +287,7 @@ export function packageNameFromPath(path) {
287287
*/
288288
export default function packageNameFromPath(path) {
289289
const base = basename(path);
290-
return /^vd+(.d+)?$/.exec(base) || /^tsd.d/.exec(base) ? basename(dirname(path)) : base;
290+
return /^v\d+(\.\d+)?$/.exec(base) || /^ts\d\.\d/.exec(base) ? basename(dirname(path)) : base;
291291
}
292292
// Message: This description only repeats the name it describes.
293293
````

docs/rules/require-jsdoc.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,15 +1018,15 @@ export type LoginOptions = CmdOptions<{
10181018
username?: string;
10191019
password?: string;
10201020
}>;
1021-
// "jsdoc/require-jsdoc": ["error"|"warn", {"publicOnly":{"ancestorsOnly":true},"contexts":["TSTypeAliasDeclaration","TSInterfaceDeclaration","TSMethodSignature","TSPropertySignature"]}]
1021+
// "jsdoc/require-jsdoc": ["error"|"warn", {"contexts":["TSTypeAliasDeclaration","TSInterfaceDeclaration","TSMethodSignature","TSPropertySignature"],"publicOnly":{"ancestorsOnly":true}}]
10221022
// Message: Missing JSDoc comment.
10231023

10241024
type Props = {
10251025
variant: string
10261026
}
10271027

10281028
export type { Props as ComponentProps };
1029-
// "jsdoc/require-jsdoc": ["error"|"warn", {"publicOnly":{"esm":true},"require":{"FunctionDeclaration":true,"FunctionExpression":true,"ArrowFunctionExpression":true,"ClassDeclaration":true,"ClassExpression":true,"MethodDefinition":true},"contexts":["VariableDeclaration","TSTypeAliasDeclaration","TSPropertySignature","TSInterfaceDeclaration","TSMethodSignature","TSEnumDeclaration"],"enableFixer":true}]
1029+
// "jsdoc/require-jsdoc": ["error"|"warn", {"contexts":["VariableDeclaration","TSTypeAliasDeclaration","TSPropertySignature","TSInterfaceDeclaration","TSMethodSignature","TSEnumDeclaration"],"enableFixer":true,"publicOnly":{"esm":true},"require":{"ArrowFunctionExpression":true,"ClassDeclaration":true,"ClassExpression":true,"FunctionDeclaration":true,"FunctionExpression":true,"MethodDefinition":true}}]
10301030
// Message: Missing JSDoc comment.
10311031
````
10321032

@@ -1901,7 +1901,7 @@ export class MyClass {
19011901

19021902
#myPrivateProp = 5;
19031903
}
1904-
// "jsdoc/require-jsdoc": ["error"|"warn", {"publicOnly":true,"contexts":["PropertyDefinition"],"require":{"MethodDefinition":true}}]
1904+
// "jsdoc/require-jsdoc": ["error"|"warn", {"contexts":["PropertyDefinition"],"publicOnly":true,"require":{"MethodDefinition":true}}]
19051905

19061906
class Abc {
19071907
static {

eslint.config.js

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,86 @@
1-
import globals from 'globals';
21
import jsdoc from './src/index.js';
3-
// import canonical from 'eslint-config-canonical';
4-
// import canonicalJsdoc from 'eslint-config-canonical/jsdoc.js';
2+
import {
3+
recommended as canonical,
4+
} from 'eslint-config-canonical/canonical';
5+
import {
6+
recommended as canonicalJsdoc,
7+
} from 'eslint-config-canonical/jsdoc';
8+
import globals from 'globals';
59

610
const common = {
711
linterOptions: {
8-
reportUnusedDisableDirectives: 'off'
9-
},
10-
plugins: {
11-
jsdoc
12+
reportUnusedDisableDirectives: 'off',
1213
},
1314
};
1415

1516
export default [
16-
// canonical,
17-
// canonicalJsdoc,
17+
...canonical,
18+
...canonicalJsdoc,
1819
...jsdoc.configs['examples-and-default-expressions'],
1920
{
2021
// Must be by itself
21-
ignores: ['dist/**', '.ignore/**/*.js'],
22+
ignores: [
23+
'dist/**', '.ignore/**', '**/*.d.ts',
24+
],
2225
},
2326
{
2427
...common,
2528
languageOptions: {
2629
ecmaVersion: 'latest',
30+
globals: globals.node,
2731
sourceType: 'module',
28-
globals: globals.node
29-
},
30-
settings: {
31-
jsdoc: {
32-
mode: 'typescript'
33-
}
3432
},
3533
rules: {
36-
'array-element-newline': 0,
34+
'@stylistic/array-element-newline': 0,
35+
'@stylistic/no-extra-parens': 0,
3736
'filenames/match-regex': 0,
3837
'import/extensions': 0,
3938
'import/no-useless-path-segments': 0,
39+
'linebreak-style': 0,
40+
'no-inline-comments': 0,
4041
'prefer-named-capture-group': 0,
42+
'unicorn/import-index': 0,
4143
'unicorn/no-array-reduce': 0,
4244
'unicorn/no-unsafe-regex': 0,
4345
'unicorn/prefer-array-some': 0,
4446
'unicorn/prevent-abbreviations': 0,
45-
'unicorn/import-index': 0,
46-
'linebreak-style': 0,
47-
'no-inline-comments': 0,
48-
'no-extra-parens': 0
49-
}
47+
},
5048
},
5149
{
5250
...common,
53-
files: ['.ncurc.cjs'],
51+
files: [
52+
'.ncurc.cjs',
53+
],
5454
languageOptions: {
5555
parserOptions: {
5656
ecmaFeatures: {
57-
impliedStrict: false
57+
impliedStrict: false,
5858
},
5959
},
60-
sourceType: 'script'
60+
sourceType: 'script',
6161
},
6262
rules: {
63+
'canonical/filename-match-regex': 0,
6364
'import/no-commonjs': 0,
6465
strict: [
6566
'error',
66-
'global'
67-
]
68-
}
67+
'global',
68+
],
69+
},
6970
},
7071
{
7172
...common,
72-
files: ['test/**/*.js'],
73+
files: [
74+
'test/**/*.js',
75+
],
7376
languageOptions: {
7477
ecmaVersion: 'latest',
75-
sourceType: 'module'
78+
globals: globals.mocha,
79+
sourceType: 'module',
7680
},
7781
rules: {
7882
'no-restricted-syntax': 0,
79-
'unicorn/prevent-abbreviations': 0
80-
}
83+
'unicorn/prevent-abbreviations': 0,
84+
},
8185
},
8286
];

package.json

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@
55
"url": "http://gajus.com"
66
},
77
"dependencies": {
8-
"@es-joy/jsdoccomment": "~0.50.1",
9-
"are-docs-informative": "^0.0.2",
8+
"@es-joy/jsdoccomment": "~0.50.2",
9+
"are-docs-informative": "^0.1.0",
1010
"comment-parser": "1.4.1",
11-
"debug": "^4.3.6",
11+
"debug": "^4.4.1",
1212
"escape-string-regexp": "^4.0.0",
13-
"espree": "^10.1.0",
13+
"espree": "^10.3.0",
1414
"esquery": "^1.6.0",
1515
"parse-imports-exports": "^0.2.4",
16-
"semver": "^7.6.3",
16+
"semver": "^7.7.2",
1717
"spdx-expression-parse": "^4.0.0"
1818
},
1919
"description": "JSDoc linting rules for ESLint.",
2020
"devDependencies": {
21-
"@babel/cli": "^7.24.8",
22-
"@babel/core": "^7.25.2",
23-
"@babel/eslint-parser": "^7.25.1",
24-
"@babel/node": "^7.25.0",
21+
"@babel/cli": "^7.27.2",
22+
"@babel/core": "^7.27.4",
23+
"@babel/eslint-parser": "^7.27.1",
24+
"@babel/node": "^7.27.1",
2525
"@babel/plugin-syntax-class-properties": "^7.12.13",
26-
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
27-
"@babel/preset-env": "^7.25.3",
26+
"@babel/plugin-transform-flow-strip-types": "^7.27.1",
27+
"@babel/preset-env": "^7.27.2",
2828
"@es-joy/escodegen": "^3.5.1",
2929
"@es-joy/jsdoc-eslint-parser": "^0.21.1",
30-
"@hkdobrev/run-if-changed": "^0.6.0",
31-
"@semantic-release/commit-analyzer": "^13.0.0",
32-
"@semantic-release/github": "^11.0.0",
30+
"@hkdobrev/run-if-changed": "^0.6.3",
31+
"@semantic-release/commit-analyzer": "^13.0.1",
32+
"@semantic-release/github": "^11.0.3",
3333
"@semantic-release/npm": "^12.0.1",
3434
"@types/chai": "^5.2.2",
3535
"@types/debug": "^4.1.12",
@@ -40,35 +40,35 @@
4040
"@types/json-schema": "^7.0.15",
4141
"@types/lodash.defaultsdeep": "^4.6.9",
4242
"@types/mocha": "^10.0.10",
43-
"@types/node": "^22.15.18",
43+
"@types/node": "^22.15.29",
4444
"@types/semver": "^7.7.0",
4545
"@types/spdx-expression-parse": "^3.0.5",
46-
"@typescript-eslint/types": "^8.32.1",
46+
"@typescript-eslint/types": "^8.33.0",
4747
"babel-plugin-add-module-exports": "^1.0.4",
4848
"babel-plugin-istanbul": "^7.0.0",
49-
"babel-plugin-transform-import-meta": "^2.2.1",
50-
"c8": "^10.1.2",
49+
"babel-plugin-transform-import-meta": "^2.3.2",
50+
"c8": "^10.1.3",
5151
"camelcase": "^8.0.0",
52-
"chai": "^5.1.1",
52+
"chai": "^5.2.0",
5353
"cross-env": "^7.0.3",
5454
"decamelize": "^6.0.0",
55-
"eslint": "9.9.0",
56-
"eslint-config-canonical": "~43.0.15",
55+
"eslint": "9.28.0",
56+
"eslint-config-canonical": "~44.9.5",
5757
"gitdown": "^4.1.1",
5858
"glob": "^10.4.2",
59-
"globals": "^15.9.0",
60-
"husky": "^9.1.4",
59+
"globals": "^16.2.0",
60+
"husky": "^9.1.7",
6161
"jsdoc-type-pratt-parser": "^4.1.0",
6262
"json-schema": "^0.4.0",
63-
"lint-staged": "^15.2.9",
63+
"lint-staged": "^16.1.0",
6464
"lodash.defaultsdeep": "^4.6.1",
65-
"mocha": "^10.7.3",
66-
"open-editor": "^5.0.0",
65+
"mocha": "^11.5.0",
66+
"open-editor": "^5.1.0",
6767
"replace": "^1.2.2",
6868
"rimraf": "^5.0.7",
69-
"semantic-release": "^24.1.1",
70-
"typescript": "5.8.x",
71-
"typescript-eslint": "^8.32.1"
69+
"semantic-release": "^24.2.5",
70+
"typescript": "5.8.3",
71+
"typescript-eslint": "^8.33.0"
7272
},
7373
"engines": {
7474
"node": ">=18"

0 commit comments

Comments
 (0)