Skip to content

Commit

Permalink
chore: update devDep. and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Nov 10, 2023
1 parent da65fe9 commit f96a1af
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 41 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"cross-env": "^7.0.3",
"decamelize": "^5.0.1",
"eslint": "8.52.0",
"eslint-config-canonical": "~42.1.0",
"eslint-config-canonical": "~42.3.0",
"espree": "^9.6.1",
"gitdown": "^3.1.5",
"glob": "^10.3.10",
Expand Down
15 changes: 5 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions src/exportParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ const getSymbol = function (node, globals, scope, opt) {
/* eslint-enable complexity -- Temporary */
const opts = opt || {};
/* istanbul ignore next */
// eslint-disable-next-line default-case
switch (node.type) {
case 'Identifier': {
return getIdentifier(node, globals, scope, opts);
Expand Down Expand Up @@ -318,7 +317,6 @@ createSymbol = function (node, globals, value, scope, isGlobal) {
}

let symbol;
// eslint-disable-next-line default-case
switch (node.type) {
case 'FunctionDeclaration':
/* istanbul ignore next */
Expand Down Expand Up @@ -411,7 +409,6 @@ createSymbol = function (node, globals, value, scope, isGlobal) {
* @returns {void}
*/
const initVariables = function (node, globals, opts) {
// eslint-disable-next-line default-case
switch (node.type) {
case 'Program': {
for (const childNode of node.body) {
Expand Down
15 changes: 0 additions & 15 deletions src/iterateJsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ import esquery from 'esquery';
* [key: string]: string
* }} [data]
*/
/* eslint-enable jsdoc/valid-types -- Old version */

/**
* @callback GetRegexFromString
Expand Down Expand Up @@ -170,7 +169,6 @@ import esquery from 'esquery';
* ) => import('comment-parser').Line[]} setter
* @returns {void}
*/
/* eslint-enable jsdoc/no-undefined-types -- Bug */

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

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

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

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

/**
* @callback AddLines
Expand Down Expand Up @@ -576,7 +570,6 @@ const {
* }
* }} StateObject
*/
/* eslint-enable jsdoc/valid-types -- Old version */

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

/**
* @param {Node|null} node
Expand Down Expand Up @@ -1807,7 +1799,6 @@ const getUtils = (
* contexts?: Context[]
* }} Settings
*/
/* eslint-enable jsdoc/valid-types -- Old version */

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

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

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

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

/** @type {CheckJsdoc} */
const checkJsdoc = (info, handler, node) => {
Expand Down Expand Up @@ -2563,7 +2549,6 @@ export default function iterateJsdoc (iterator, ruleConfig) {
settings,
state: ste,
});
/* eslint-enable jsdoc/no-undefined-types -- Bug */
};
}

Expand Down
3 changes: 0 additions & 3 deletions src/jsdocUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ const getFunctionParameterNames = (
}

if (param.type === 'Property') {
// eslint-disable-next-line default-case
switch (param.value.type) {
case 'ArrayPattern': {
return [
Expand Down Expand Up @@ -336,7 +335,6 @@ const getFunctionParameterNames = (
}

case 'AssignmentPattern': {
// eslint-disable-next-line default-case
switch (param.value.left.type) {
case 'Identifier':
// Default parameter
Expand Down Expand Up @@ -1416,7 +1414,6 @@ const tagsWithNamesAndDescriptions = new Set([
* {message: string, replacement?: string}
* }} TagNamePreference
*/
/* eslint-enable jsdoc/valid-types -- Old version */

/**
* @param {import('eslint').Rule.RuleContext} context
Expand Down
1 change: 0 additions & 1 deletion src/rules/checkTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ export default iterateJsdoc(({
structuredTags,
mode,
} = settings;
/* eslint-enable jsdoc/valid-types -- Old version */

const injectObjectPreferredTypes = !('Object' in preferredTypesOriginal ||
'object' in preferredTypesOriginal ||
Expand Down
1 change: 0 additions & 1 deletion src/rules/requireHyphenBeforeParamDescription.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default iterateJsdoc(({
const tgs = /**
* @type {null|"any"|{[key: string]: "always"|"never"}}
*/ (tags);
/* eslint-enable jsdoc/valid-types -- Old version */

/**
* @param {import('@es-joy/jsdoccomment').JsdocTagWithInline} jsdocTag
Expand Down
6 changes: 0 additions & 6 deletions src/rules/requireJsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ const getOption = (context, baseObject, option, key) => {
return /** @type {{[key: string]: {default?: boolean|undefined}}} */ (
baseObject.properties
)[key].default;
/* eslint-enable jsdoc/valid-types -- Old version */
};

/**
Expand All @@ -202,7 +201,6 @@ const getOption = (context, baseObject, option, key) => {
* }}
*/
const getOptions = (context, settings) => {
/* eslint-enable jsdoc/valid-types -- Old version */
const {
publicOnly,
contexts = settings.contexts || [],
Expand All @@ -227,7 +225,6 @@ const getOptions = (context, settings) => {

/** @type {{[key: string]: boolean|undefined}} */
const properties = {};
/* eslint-enable jsdoc/valid-types -- Old version */
for (const prop of Object.keys(
/** @type {import('json-schema').JSONSchema4Object} */ (
/** @type {import('json-schema').JSONSchema4Object} */ (
Expand Down Expand Up @@ -260,7 +257,6 @@ const getOptions = (context, settings) => {
require: ((baseObj) => {
/** @type {{[key: string]: boolean|undefined}} */
const properties = {};
/* eslint-enable jsdoc/valid-types -- Old version */
for (const prop of Object.keys(
/** @type {import('json-schema').JSONSchema4Object} */ (
/** @type {import('json-schema').JSONSchema4Object} */ (
Expand Down Expand Up @@ -318,7 +314,6 @@ export default {
*/ (
opts.publicOnly
);
/* eslint-enable jsdoc/valid-types -- Old version */

/**
* @type {import('../iterateJsdoc.js').CheckJsdoc}
Expand Down Expand Up @@ -501,7 +496,6 @@ export default {
report();
}
};
/* eslint-enable complexity -- Temporary */

/**
* @param {string} prop
Expand Down
1 change: 0 additions & 1 deletion src/rules/validTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export default iterateJsdoc(({
let handled = false;

if (tagName) {
// eslint-disable-next-line default-case
switch (tagName) {
case 'requires':
case 'module': {
Expand Down

0 comments on commit f96a1af

Please sign in to comment.