Skip to content

Commit b44d0ad

Browse files
committed
fix: update dependencies
1 parent 14d7832 commit b44d0ad

13 files changed

+59
-37
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@
2626
"@babel/preset-env": "^7.15.8",
2727
"@babel/register": "^7.15.3",
2828
"@hkdobrev/run-if-changed": "^0.3.1",
29-
"@typescript-eslint/parser": "^5.1.0",
29+
"@typescript-eslint/parser": "^5.2.0",
3030
"babel-plugin-add-module-exports": "^1.0.4",
3131
"babel-plugin-istanbul": "^6.1.1",
3232
"chai": "^4.3.4",
3333
"cross-env": "^7.0.3",
3434
"eslint": "^8.1.0",
35-
"eslint-config-canonical": "^30.1.0",
35+
"eslint-config-canonical": "^32.1.0",
3636
"gitdown": "^3.1.4",
3737
"glob": "^7.2.0",
3838
"husky": "^7.0.4",
39-
"lint-staged": "^11.2.3",
39+
"lint-staged": "^11.2.4",
4040
"mocha": "^9.1.3",
4141
"nyc": "^15.1.0",
4242
"open-editor": "^3.0.0",

src/iterateJsdoc.js

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ const getUtils = (
637637
};
638638

639639
const getSettings = (context) => {
640-
/* eslint-disable sort-keys-fix/sort-keys-fix */
640+
/* eslint-disable canonical/sort-keys */
641641
const settings = {
642642
// All rules
643643
ignorePrivate: Boolean(context.settings.jsdoc?.ignorePrivate),
@@ -665,7 +665,7 @@ const getSettings = (context) => {
665665
mode: context.settings.jsdoc?.mode ??
666666
(context.parserPath.includes('@typescript-eslint') ? 'typescript' : 'jsdoc'),
667667
};
668-
/* eslint-enable sort-keys-fix/sort-keys-fix */
668+
/* eslint-enable canonical/sort-keys */
669669

670670
jsdocUtils.setTagStructure(settings.mode);
671671
try {
@@ -831,7 +831,7 @@ const iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveContexts) => {
831831

832832
const utils = getBasicUtils(context, settings);
833833
jsdocNodes.forEach((jsdocNode) => {
834-
if (!(/^\/\*\*\s/).test(sourceCode.getText(jsdocNode))) {
834+
if (!(/^\/\*\*\s/u).test(sourceCode.getText(jsdocNode))) {
835835
return;
836836
}
837837

@@ -850,10 +850,18 @@ const iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveContexts) => {
850850
lastIndex: idx,
851851
selector: node?.type,
852852
},
853-
indent, jsdoc,
854-
ruleConfig, context, lines, jsdocNode, node,
855-
settings, sourceCode, iterator,
856-
state, true,
853+
indent,
854+
jsdoc,
855+
ruleConfig,
856+
context,
857+
lines,
858+
jsdocNode,
859+
node,
860+
settings,
861+
sourceCode,
862+
iterator,
863+
state,
864+
true,
857865
);
858866
});
859867

@@ -880,10 +888,18 @@ const iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveContexts) => {
880888
lastIndex,
881889
selector: node?.type,
882890
},
883-
indent, jsdoc,
884-
ruleConfig, context, lines, jsdocNode, node,
885-
settings, sourceCode, iterator,
886-
state, true,
891+
indent,
892+
jsdoc,
893+
ruleConfig,
894+
context,
895+
lines,
896+
jsdocNode,
897+
node,
898+
settings,
899+
sourceCode,
900+
iterator,
901+
state,
902+
true,
887903
);
888904
});
889905
if (lastCall && ruleConfig.exit) {
@@ -1085,9 +1101,7 @@ export default function iterateJsdoc (iterator, ruleConfig) {
10851101
}
10861102

10871103
iterate(
1088-
info, indent, jsdoc,
1089-
ruleConfig, context, lines, jsdocNode, node,
1090-
settings, sourceCode, iterator, state,
1104+
info, indent, jsdoc, ruleConfig, context, lines, jsdocNode, node, settings, sourceCode, iterator, state,
10911105
);
10921106
};
10931107

src/jsdocUtils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ const getJsdocTagsDeep = (jsdoc : Object, targetTagName : string) : Array<Object
250250
return ret;
251251
};
252252

253+
// eslint-disable-next-line @babel/new-cap
253254
const modeWarnSettings = WarnSettings();
254255

255256
const getTagNamesForMode = (mode, context) => {

src/rules/checkExamples.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export default iterateJsdoc(({
254254
if (!filename) {
255255
const jsFileName = context.getFilename();
256256
if (typeof jsFileName === 'string' && jsFileName.includes('.')) {
257-
defaultFileName = jsFileName.replace(/\..*?$/, `.${ext}`);
257+
defaultFileName = jsFileName.replace(/\..*?$/u, `.${ext}`);
258258
} else {
259259
defaultFileName = `dummy.${ext}`;
260260
}

src/rules/checkIndentation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default iterateJsdoc(({
2727
excludeTags = ['example'],
2828
} = options;
2929

30-
const reg = new RegExp(/^(?:\/?\**|[ \t]*)\*[ \t]{2}/gmu);
30+
const reg = /^(?:\/?\**|[ \t]*)\*[ \t]{2}/gmu;
3131
const textWithoutCodeBlocks = maskCodeBlocks(sourceCode.getText(jsdocNode));
3232
const text = excludeTags.length ? maskExcludedContent(textWithoutCodeBlocks, excludeTags) : textWithoutCodeBlocks;
3333

src/rules/checkParamNames.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,17 +256,18 @@ export default iterateJsdoc(({
256256
disableExtraPropertyReporting,
257257
enableFixer,
258258
functionParameterNames,
259-
jsdoc, jsdocNode, utils, report,
259+
jsdoc,
260+
jsdocNode,
261+
utils,
262+
report,
260263
);
261264

262265
if (isError || !checkDestructured) {
263266
return;
264267
}
265268

266269
validateParameterNamesDeep(
267-
targetTagName, allowExtraTrailingParamDocs,
268-
jsdocParameterNamesDeep,
269-
jsdoc, report,
270+
targetTagName, allowExtraTrailingParamDocs, jsdocParameterNamesDeep, jsdoc, report,
270271
);
271272
}, {
272273
meta: {

src/rules/checkPropertyNames.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,17 @@ export default iterateJsdoc(({
8686
const isError = validatePropertyNames(
8787
targetTagName,
8888
enableFixer,
89-
jsdoc, jsdocNode, utils,
89+
jsdoc,
90+
jsdocNode,
91+
utils,
9092
);
9193

9294
if (isError) {
9395
return;
9496
}
9597

9698
validatePropertyNamesDeep(
97-
targetTagName, jsdocPropertyNamesDeep,
98-
jsdoc, report,
99+
targetTagName, jsdocPropertyNamesDeep, jsdoc, report,
99100
);
100101
}, {
101102
iterateAllJsdocs: true,

src/rules/matchDescription.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default iterateJsdoc(({
6464
if (jsdoc.description) {
6565
const {description} = utils.getDescription();
6666
validateDescription(
67-
description.replace(/\s+$/, ''),
67+
description.replace(/\s+$/u, ''),
6868
);
6969
}
7070

src/rules/multilineBlocks.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ export default iterateJsdoc(({
3737

3838
utils.reportJSDoc(
3939
'Single line blocks are not permitted by your configuration.',
40-
null, fixer, true,
40+
null,
41+
fixer,
42+
true,
4143
);
4244

4345
return;
@@ -56,7 +58,8 @@ export default iterateJsdoc(({
5658
};
5759
utils.reportJSDoc(
5860
'Should have no text on the "0th" line (after the `/**`).',
59-
null, fixer,
61+
null,
62+
fixer,
6063
);
6164

6265
return;
@@ -93,7 +96,8 @@ export default iterateJsdoc(({
9396
};
9497
utils.reportJSDoc(
9598
'Should have no text on the final line (before the `*/`).',
96-
null, fixer,
99+
null,
100+
fixer,
97101
);
98102
}
99103
};
@@ -198,7 +202,8 @@ export default iterateJsdoc(({
198202
utils.reportJSDoc(
199203
'Multiline jsdoc blocks are prohibited by ' +
200204
'your configuration.',
201-
null, fixer,
205+
null,
206+
fixer,
202207
);
203208

204209
return;

src/rules/newlineAfterDescription.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default iterateJsdoc(({
2323
}
2424

2525
const {description, lastDescriptionLine} = utils.getDescription();
26-
const descriptionEndsWithANewline = (/\n\r?$/).test(description);
26+
const descriptionEndsWithANewline = (/\n\r?$/u).test(description);
2727

2828
if (always) {
2929
if (!descriptionEndsWithANewline) {

0 commit comments

Comments
 (0)