Skip to content

Commit 78ada08

Browse files
committed
chore: linting
1 parent 74ca17d commit 78ada08

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

eslint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ const common = {
1919
export default [
2020
...canonical,
2121
...canonicalJsdoc,
22+
// jsdoc({
23+
// config: 'flat/recommended',
24+
// }),
2225
...jsdoc({
2326
config: 'examples-and-default-expressions',
2427
}),

src/getJsdocProcessorPlugin.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ const getLinesCols = (text) => {
8383
/**
8484
* @typedef {number} Integer
8585
*/
86-
8786
/**
8887
* @typedef {object} JsdocProcessorOptions
8988
* @property {boolean} [captionRequired] Require captions for example tags
@@ -110,6 +109,13 @@ const getLinesCols = (text) => {
110109
* @returns {ESLint.Plugin}
111110
*/
112111
export const getJsdocProcessorPlugin = (options = {}) => {
112+
/**
113+
* @typedef {{
114+
* text: string,
115+
* filename: string|null|undefined
116+
* }} TextAndFileName
117+
*/
118+
113119
const {
114120
allowedLanguagesToProcess = [
115121
'js', 'ts', 'javascript', 'typescript',
@@ -169,10 +175,7 @@ export const getJsdocProcessorPlugin = (options = {}) => {
169175
*/
170176
const getTextsAndFileNames = (jsdoc, jsFileName, commentLineCols) => {
171177
/**
172-
* @type {{
173-
* text: string,
174-
* filename: string|null|undefined
175-
* }[]}
178+
* @type {TextAndFileName[]}
176179
*/
177180
const textsAndFileNames = [];
178181

@@ -666,6 +669,7 @@ export const getJsdocProcessorPlugin = (options = {}) => {
666669
);
667670
}).filter(
668671
/**
672+
* @param {TextAndFileName} file
669673
* @returns {file is Linter.ProcessorFile}
670674
*/
671675
(file) => {

0 commit comments

Comments
 (0)