Skip to content

Commit c72f8b0

Browse files
committed
chore: update eslint
1 parent 9b2d540 commit c72f8b0

File tree

9 files changed

+237
-228
lines changed

9 files changed

+237
-228
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@hkdobrev/run-if-changed": "^0.6.3",
3636
"@rollup/plugin-node-resolve": "^16.0.3",
3737
"@semantic-release/commit-analyzer": "^13.0.1",
38-
"@semantic-release/github": "^12.0.0",
38+
"@semantic-release/github": "^12.0.1",
3939
"@semantic-release/npm": "^13.1.1",
4040
"@types/chai": "^5.2.3",
4141
"@types/debug": "^4.1.12",
@@ -55,7 +55,7 @@
5555
"camelcase": "^8.0.0",
5656
"chai": "^6.2.0",
5757
"decamelize": "^6.0.1",
58-
"eslint": "9.38.0",
58+
"eslint": "9.39.0",
5959
"eslint-config-canonical": "^45.0.1",
6060
"gitdown": "^4.1.1",
6161
"glob": "^11.0.3",

pnpm-lock.yaml

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

src/exportParser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,7 @@ const ignorableNestedTypes = new Set([
716716
* @returns {import('eslint').Rule.Node|false}
717717
*/
718718
const getExportAncestor = function (nde) {
719+
/** @type {import('eslint').Rule.Node|null} */
719720
let node = nde;
720721
let idx = 0;
721722
const ignorableIfDeep = ignorableNestedTypes.has(nde?.type);

src/iterateJsdoc.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ const getBasicUtils = (context, {
687687
/**
688688
* @callback Report
689689
* @param {string} message
690-
* @param {import('eslint').Rule.ReportFixer|null} [fix]
690+
* @param {import('@eslint/core').RuleFixer|null} [fix]
691691
* @param {null|
692692
* {line?: Integer, column?: Integer}|
693693
* import('comment-parser').Spec & {line?: Integer}
@@ -2120,9 +2120,7 @@ const getIndentAndJSDoc = function (lines, jsdocNode) {
21202120

21212121
/**
21222122
*
2123-
* @typedef {{node: Node & {
2124-
* range: [number, number]
2125-
* }, state: StateObject}} NonCommentArgs
2123+
* @typedef {{node: Node, state: StateObject}} NonCommentArgs
21262124
*/
21272125

21282126
/**
@@ -2312,9 +2310,7 @@ const iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveCommentContext
23122310

23132311
return {
23142312
/**
2315-
* @param {import('eslint').Rule.Node & {
2316-
* range: [Integer, Integer];
2317-
* }} node
2313+
* @param {import('eslint').Rule.Node} node
23182314
* @returns {void}
23192315
*/
23202316
'*:not(Program)' (node) {

src/jsdocUtils.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,7 @@ const hasNonFunctionYield = (node, checkYieldReturnValue) => {
14061406
if (
14071407
/** @type {import('eslint').Rule.Node} */ (
14081408
node
1409-
).parent.type === 'VariableDeclarator'
1409+
).parent?.type === 'VariableDeclarator'
14101410
) {
14111411
return true;
14121412
}
@@ -1812,11 +1812,17 @@ const exemptSpeciaMethods = (jsdoc, node, context, schema) => {
18121812
])) ||
18131813
isGetter(node) && (
18141814
!checkGetters ||
1815-
checkGetters === 'no-setter' && hasAccessorPair(/** @type {import('./iterateJsdoc.js').Node} */ (node).parent)
1815+
checkGetters === 'no-setter' && hasAccessorPair(
1816+
/** @type {import('./iterateJsdoc.js').Node} */
1817+
(/** @type {import('./iterateJsdoc.js').Node} */ (node).parent),
1818+
)
18161819
) ||
18171820
isSetter(node) && (
18181821
!checkSetters ||
1819-
checkSetters === 'no-getter' && hasAccessorPair(/** @type {import('./iterateJsdoc.js').Node} */ (node).parent)
1822+
checkSetters === 'no-getter' && hasAccessorPair(
1823+
/** @type {import('./iterateJsdoc.js').Node} */
1824+
(/** @type {import('./iterateJsdoc.js').Node} */ (node).parent),
1825+
)
18201826
);
18211827
};
18221828

src/rules/convertToJsdocComments.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ export default {
111111

112112
const decorator = getDecorator(
113113
/** @type {import('eslint').Rule.Node} */
114+
// @ts-expect-error Bug?
114115
(baseNode),
115116
);
116117
if (decorator) {

src/rules/requireFileOverview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ will be checked, but you must use \`file\` on the configuration object).`,
207207
state,
208208
}) {
209209
if (!state.hasNonComment) {
210-
state.hasNonComment = node.range[0];
210+
state.hasNonComment = /** @type {[number, number]} */ (node.range)?.[0];
211211
}
212212
},
213213
});

src/rules/requireJsdoc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,7 @@ export default {
670670

671671
const decorator = getDecorator(
672672
/** @type {import('eslint').Rule.Node} */
673+
// @ts-expect-error Bug?
673674
(baseNode),
674675
);
675676
if (decorator) {

src/rules/requireParam.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default iterateJsdoc(({
7474
return;
7575
}
7676

77-
if (node && node.parent.type === 'VariableDeclarator' &&
77+
if (node && node.parent?.type === 'VariableDeclarator' &&
7878
'typeAnnotation' in node.parent.id && node.parent.id.typeAnnotation) {
7979
return;
8080
}

0 commit comments

Comments
 (0)