Skip to content

Commit f96a1af

Browse files
committed
chore: update devDep. and lint
1 parent da65fe9 commit f96a1af

9 files changed

+6
-41
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"cross-env": "^7.0.3",
5151
"decamelize": "^5.0.1",
5252
"eslint": "8.52.0",
53-
"eslint-config-canonical": "~42.1.0",
53+
"eslint-config-canonical": "~42.3.0",
5454
"espree": "^9.6.1",
5555
"gitdown": "^3.1.5",
5656
"glob": "^10.3.10",

pnpm-lock.yaml

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

src/exportParser.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ const getSymbol = function (node, globals, scope, opt) {
123123
/* eslint-enable complexity -- Temporary */
124124
const opts = opt || {};
125125
/* istanbul ignore next */
126-
// eslint-disable-next-line default-case
127126
switch (node.type) {
128127
case 'Identifier': {
129128
return getIdentifier(node, globals, scope, opts);
@@ -318,7 +317,6 @@ createSymbol = function (node, globals, value, scope, isGlobal) {
318317
}
319318

320319
let symbol;
321-
// eslint-disable-next-line default-case
322320
switch (node.type) {
323321
case 'FunctionDeclaration':
324322
/* istanbul ignore next */
@@ -411,7 +409,6 @@ createSymbol = function (node, globals, value, scope, isGlobal) {
411409
* @returns {void}
412410
*/
413411
const initVariables = function (node, globals, opts) {
414-
// eslint-disable-next-line default-case
415412
switch (node.type) {
416413
case 'Program': {
417414
for (const childNode of node.body) {

src/iterateJsdoc.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ import esquery from 'esquery';
122122
* [key: string]: string
123123
* }} [data]
124124
*/
125-
/* eslint-enable jsdoc/valid-types -- Old version */
126125

127126
/**
128127
* @callback GetRegexFromString
@@ -170,7 +169,6 @@ import esquery from 'esquery';
170169
* ) => import('comment-parser').Line[]} setter
171170
* @returns {void}
172171
*/
173-
/* eslint-enable jsdoc/no-undefined-types -- Bug */
174172

175173
/**
176174
* @callback SetDescriptionLines
@@ -185,7 +183,6 @@ import esquery from 'esquery';
185183
* @param {...Partial<import('comment-parser').Tokens>} tokens
186184
* @returns {void}
187185
*/
188-
/* eslint-enable jsdoc/no-undefined-types -- TS */
189186

190187
/**
191188
* @callback SetTag
@@ -195,7 +192,6 @@ import esquery from 'esquery';
195192
* @param {Partial<import('comment-parser').Tokens>} [tokens]
196193
* @returns {void}
197194
*/
198-
/* eslint-enable jsdoc/no-undefined-types -- TS */
199195

200196
/**
201197
* @callback RemoveTag
@@ -225,7 +221,6 @@ import esquery from 'esquery';
225221
* tokens?: Partial<import('comment-parser').Tokens> | undefined
226222
* ) => import('comment-parser').Tokens} SeedTokens
227223
*/
228-
/* eslint-enable jsdoc/no-undefined-types -- TS */
229224

230225
/**
231226
* Sets tokens to empty string.
@@ -240,7 +235,6 @@ import esquery from 'esquery';
240235
* @param {Partial<import('comment-parser').Tokens>} tokens
241236
* @returns {void}
242237
*/
243-
/* eslint-enable jsdoc/no-undefined-types -- TS */
244238

245239
/**
246240
* @callback AddLines
@@ -576,7 +570,6 @@ const {
576570
* }
577571
* }} StateObject
578572
*/
579-
/* eslint-enable jsdoc/valid-types -- Old version */
580573

581574
/**
582575
* The Node AST as supplied by the parser.
@@ -668,7 +661,6 @@ const getBasicUtils = (context, {
668661
* }} [data]
669662
* @returns {void}
670663
*/
671-
/* eslint-enable jsdoc/valid-types -- Old version of pratt */
672664

673665
/**
674666
* @param {Node|null} node
@@ -1807,7 +1799,6 @@ const getUtils = (
18071799
* contexts?: Context[]
18081800
* }} Settings
18091801
*/
1810-
/* eslint-enable jsdoc/valid-types -- Old version */
18111802

18121803
/**
18131804
* @param {import('eslint').Rule.RuleContext} context
@@ -1885,7 +1876,6 @@ const getSettings = (context) => {
18851876
const makeReport = (context, commentNode) => {
18861877
/** @type {Report} */
18871878
const report = (message, fix = null, jsdocLoc = null, data = undefined) => {
1888-
/* eslint-enable jsdoc/valid-types -- Old version */
18891879
let loc;
18901880

18911881
if (jsdocLoc) {
@@ -1985,8 +1975,6 @@ const makeReport = (context, commentNode) => {
19851975
* }
19861976
* ) => any } JsdocVisitor
19871977
*/
1988-
/* eslint-enable jsdoc/valid-types -- Old version */
1989-
/* eslint-enable jsdoc/no-undefined-types -- canonical still using an older version where not defined */
19901978

19911979
/**
19921980
* @param {{
@@ -2439,7 +2427,6 @@ export default function iterateJsdoc (iterator, ruleConfig) {
24392427
* @type {Context[]|undefined}
24402428
*/
24412429
let contexts;
2442-
/* eslint-enable jsdoc/valid-types -- Old version */
24432430
if (ruleConfig.contextDefaults || ruleConfig.contextSelected || ruleConfig.matchContext) {
24442431
contexts = ruleConfig.matchContext && context.options[0]?.match ?
24452432
context.options[0].match :
@@ -2486,7 +2473,6 @@ export default function iterateJsdoc (iterator, ruleConfig) {
24862473

24872474
/** @type {Partial<StateObject>} */
24882475
const state = {};
2489-
/* eslint-enable jsdoc/no-undefined-types -- TS */
24902476

24912477
/** @type {CheckJsdoc} */
24922478
const checkJsdoc = (info, handler, node) => {
@@ -2563,7 +2549,6 @@ export default function iterateJsdoc (iterator, ruleConfig) {
25632549
settings,
25642550
state: ste,
25652551
});
2566-
/* eslint-enable jsdoc/no-undefined-types -- Bug */
25672552
};
25682553
}
25692554

src/jsdocUtils.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ const getFunctionParameterNames = (
307307
}
308308

309309
if (param.type === 'Property') {
310-
// eslint-disable-next-line default-case
311310
switch (param.value.type) {
312311
case 'ArrayPattern': {
313312
return [
@@ -336,7 +335,6 @@ const getFunctionParameterNames = (
336335
}
337336

338337
case 'AssignmentPattern': {
339-
// eslint-disable-next-line default-case
340338
switch (param.value.left.type) {
341339
case 'Identifier':
342340
// Default parameter
@@ -1416,7 +1414,6 @@ const tagsWithNamesAndDescriptions = new Set([
14161414
* {message: string, replacement?: string}
14171415
* }} TagNamePreference
14181416
*/
1419-
/* eslint-enable jsdoc/valid-types -- Old version */
14201417

14211418
/**
14221419
* @param {import('eslint').Rule.RuleContext} context

src/rules/checkTypes.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ export default iterateJsdoc(({
113113
structuredTags,
114114
mode,
115115
} = settings;
116-
/* eslint-enable jsdoc/valid-types -- Old version */
117116

118117
const injectObjectPreferredTypes = !('Object' in preferredTypesOriginal ||
119118
'object' in preferredTypesOriginal ||

src/rules/requireHyphenBeforeParamDescription.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export default iterateJsdoc(({
1818
const tgs = /**
1919
* @type {null|"any"|{[key: string]: "always"|"never"}}
2020
*/ (tags);
21-
/* eslint-enable jsdoc/valid-types -- Old version */
2221

2322
/**
2423
* @param {import('@es-joy/jsdoccomment').JsdocTagWithInline} jsdocTag

src/rules/requireJsdoc.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ const getOption = (context, baseObject, option, key) => {
180180
return /** @type {{[key: string]: {default?: boolean|undefined}}} */ (
181181
baseObject.properties
182182
)[key].default;
183-
/* eslint-enable jsdoc/valid-types -- Old version */
184183
};
185184

186185
/**
@@ -202,7 +201,6 @@ const getOption = (context, baseObject, option, key) => {
202201
* }}
203202
*/
204203
const getOptions = (context, settings) => {
205-
/* eslint-enable jsdoc/valid-types -- Old version */
206204
const {
207205
publicOnly,
208206
contexts = settings.contexts || [],
@@ -227,7 +225,6 @@ const getOptions = (context, settings) => {
227225

228226
/** @type {{[key: string]: boolean|undefined}} */
229227
const properties = {};
230-
/* eslint-enable jsdoc/valid-types -- Old version */
231228
for (const prop of Object.keys(
232229
/** @type {import('json-schema').JSONSchema4Object} */ (
233230
/** @type {import('json-schema').JSONSchema4Object} */ (
@@ -260,7 +257,6 @@ const getOptions = (context, settings) => {
260257
require: ((baseObj) => {
261258
/** @type {{[key: string]: boolean|undefined}} */
262259
const properties = {};
263-
/* eslint-enable jsdoc/valid-types -- Old version */
264260
for (const prop of Object.keys(
265261
/** @type {import('json-schema').JSONSchema4Object} */ (
266262
/** @type {import('json-schema').JSONSchema4Object} */ (
@@ -318,7 +314,6 @@ export default {
318314
*/ (
319315
opts.publicOnly
320316
);
321-
/* eslint-enable jsdoc/valid-types -- Old version */
322317

323318
/**
324319
* @type {import('../iterateJsdoc.js').CheckJsdoc}
@@ -501,7 +496,6 @@ export default {
501496
report();
502497
}
503498
};
504-
/* eslint-enable complexity -- Temporary */
505499

506500
/**
507501
* @param {string} prop

src/rules/validTypes.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ export default iterateJsdoc(({
114114
let handled = false;
115115

116116
if (tagName) {
117-
// eslint-disable-next-line default-case
118117
switch (tagName) {
119118
case 'requires':
120119
case 'module': {

0 commit comments

Comments
 (0)