Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@babel/plugin-transform-flow-strip-types": "^7.27.1",
"@babel/preset-env": "^7.28.3",
"@es-joy/escodegen": "^3.5.1",
"@es-joy/jsdoc-eslint-parser": "^0.21.1",
"@es-joy/jsdoc-eslint-parser": "^0.22.0",
"@hkdobrev/run-if-changed": "^0.6.3",
"@semantic-release/commit-analyzer": "^13.0.1",
"@semantic-release/github": "^11.0.4",
Expand All @@ -42,16 +42,16 @@
"@types/node": "^24.3.0",
"@types/semver": "^7.7.0",
"@types/spdx-expression-parse": "^3.0.5",
"@typescript-eslint/types": "^8.39.1",
"@typescript-eslint/types": "^8.41.0",
"babel-plugin-add-module-exports": "^1.0.4",
"babel-plugin-istanbul": "^7.0.0",
"babel-plugin-transform-import-meta": "^2.3.3",
"c8": "^10.1.3",
"camelcase": "^8.0.0",
"chai": "^5.2.1",
"decamelize": "^6.0.0",
"eslint": "9.33.0",
"eslint-config-canonical": "~44.9.9",
"chai": "^6.0.1",
"decamelize": "^6.0.1",
"eslint": "9.34.0",
"eslint-config-canonical": "~45.0.0",
"gitdown": "^4.1.1",
"glob": "^11.0.3",
"globals": "^16.3.0",
Expand All @@ -66,7 +66,7 @@
"rimraf": "^6.0.1",
"semantic-release": "^24.2.7",
"typescript": "5.9.2",
"typescript-eslint": "^8.39.1"
"typescript-eslint": "^8.41.0"
},
"engines": {
"node": ">=20.11.0"
Expand Down
851 changes: 341 additions & 510 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/bin/generateDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const formatCodeSnippet = (setup, ruleName) => {
const getAssertions = async () => {
const assertionFiles = (await glob(path.resolve(dirname, '../../test/rules/assertions/*.js'))).filter((file) => {
return !file.includes('flatConfig');
}).reverse();
}).toReversed();

const assertionNames = assertionFiles.map((filePath) => {
return path.basename(filePath, '.js');
Expand Down
3 changes: 2 additions & 1 deletion src/iterateJsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@
seedTokens,
} = util;

// todo: Change these `any` types once importing types properly.

Check warning on line 546 in src/iterateJsdoc.js

View workflow job for this annotation

GitHub Actions / Lint

Unexpected 'todo' comment: 'todo: Change these `any` types once...'

/**
* Should use ESLint rule's typing.
Expand Down Expand Up @@ -1093,7 +1093,7 @@
src.number = firstNumber + /** @type {Integer} */ (lastIndex) + idx;
}

// Todo: Once rewiring of tags may be fixed in comment-parser to reflect

Check warning on line 1096 in src/iterateJsdoc.js

View workflow job for this annotation

GitHub Actions / Lint

Unexpected 'todo' comment: 'Todo: Once rewiring of tags may be fixed...'
// missing tags, this step should be added here (so that, e.g.,
// if accessing `jsdoc.tags`, such as to add a new tag, the
// correct information will be available)
Expand Down Expand Up @@ -1636,9 +1636,10 @@

/** @type {GetClassNode} */
utils.getClassNode = () => {
// eslint-disable-next-line canonical/no-use-extend-native -- Not extending
return [
...ancestors, node,
].reverse().find((parent) => {
].toReversed().find((parent) => {
return parent && [
'ClassDeclaration', 'ClassExpression',
].includes(parent.type);
Expand Down
2 changes: 1 addition & 1 deletion src/rules/noBlankBlocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default iterateJsdoc(({
line: lastDescriptionLine,
},
enableFixer ? () => {
jsdoc.source.splice(0, jsdoc.source.length);
jsdoc.source.splice(0);
} : null,
);
}, {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/requireDescriptionCompleteSentence.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export default iterateJsdoc(({
index,
length,
};
}).reverse();
}).toReversed();

for (const {
index,
Expand Down
2 changes: 1 addition & 1 deletion src/rules/tagLines.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default iterateJsdoc(({
},
] of tg.source.entries()) {
if (description) {
lines.splice(0, lines.length);
lines.splice(0);
tagSourceIdx = idx;
}

Expand Down
39 changes: 38 additions & 1 deletion test/getJsdocProcessPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ const check = ({
text,
}) => {
const plugin = getJsdocProcessorPlugin(options);
if (!plugin.processors || typeof plugin.processors.examples.preprocess !== 'function') {
throw new Error('No processors');
}

const results = plugin.processors.examples.preprocess(
text, filename,
);
Expand Down Expand Up @@ -168,6 +172,10 @@ describe('`getJsdocProcessorPlugin`', () => {
`;

const plugin = getJsdocProcessorPlugin(options);
if (!plugin.processors || typeof plugin.processors.examples.preprocess !== 'function') {
throw new Error('No processors');
}

const results = plugin.processors.examples.preprocess(
text, filename,
);
Expand All @@ -179,6 +187,10 @@ describe('`getJsdocProcessorPlugin`', () => {
},
]);

if (!plugin.processors || typeof plugin.processors.examples.postprocess !== 'function') {
throw new Error('No processors');
}

const postResults = plugin.processors.examples.postprocess(
[
[],
Expand Down Expand Up @@ -380,7 +392,6 @@ describe('`getJsdocProcessorPlugin`', () => {
`;
check({
filename,
// @ts-expect-error Ok?
options,
result: [
text,
Expand Down Expand Up @@ -651,6 +662,10 @@ describe('`getJsdocProcessorPlugin`', () => {
`;

const plugin = getJsdocProcessorPlugin(options);
if (!plugin.processors || typeof plugin.processors.examples.preprocess !== 'function') {
throw new Error('No processors');
}

const results = plugin.processors.examples.preprocess(
text, filename,
);
Expand All @@ -662,6 +677,10 @@ describe('`getJsdocProcessorPlugin`', () => {
},
]);

if (!plugin.processors || typeof plugin.processors.examples.postprocess !== 'function') {
throw new Error('No processors');
}

const postResults = plugin.processors.examples.postprocess(
[
[], [
Expand Down Expand Up @@ -700,6 +719,11 @@ describe('`getJsdocProcessorPlugin`', () => {
`;

const plugin = getJsdocProcessorPlugin(options);

if (!plugin.processors || typeof plugin.processors.examples.preprocess !== 'function') {
throw new Error('No processors');
}

const results = plugin.processors.examples.preprocess(
text, filename,
);
Expand All @@ -711,6 +735,10 @@ describe('`getJsdocProcessorPlugin`', () => {
},
]);

if (!plugin.processors || typeof plugin.processors.examples.postprocess !== 'function') {
throw new Error('No processors');
}

const postResults = plugin.processors.examples.postprocess(
[
[], [
Expand Down Expand Up @@ -750,6 +778,11 @@ describe('`getJsdocProcessorPlugin`', () => {
`;

const plugin = getJsdocProcessorPlugin(options);

if (!plugin.processors || typeof plugin.processors.examples.preprocess !== 'function') {
throw new Error('No processors');
}

const results = plugin.processors.examples.preprocess(
text, filename,
);
Expand All @@ -761,6 +794,10 @@ describe('`getJsdocProcessorPlugin`', () => {
},
]);

if (!plugin.processors || typeof plugin.processors.examples.postprocess !== 'function') {
throw new Error('No processors');
}

const postResults = plugin.processors.examples.postprocess(
[
[], [
Expand Down
Loading