@@ -13,7 +13,7 @@ export default index;
1313/* eslint-disable jsdoc/valid-types -- Bug */
1414/**
1515 * @type {((
16- * cfg?: {
16+ * cfg?: import('eslint').Linter.Config & {
1717 * mergeSettings?: boolean,
1818 * config?: `flat/${import('./index-cjs.js').ConfigGroups}${import('./index-cjs.js').ConfigVariants}${import('./index-cjs.js').ErrorLevelVariants}`,
1919 * settings?: Partial<import('./iterateJsdoc.js').Settings>,
@@ -29,19 +29,62 @@ export const jsdoc = function (cfg) {
2929 jsdoc : index ,
3030 } ,
3131 } ;
32- if (
33- cfg ?. config
34- ) {
35- // @ts -expect-error Security check
36- if ( cfg . config === '__proto__' ) {
37- throw new TypeError ( 'Disallowed config value' ) ;
32+
33+ if ( cfg ) {
34+ if ( cfg . config ) {
35+ // @ts -expect-error Security check
36+ if ( cfg . config === '__proto__' ) {
37+ throw new TypeError ( 'Disallowed config value' ) ;
38+ }
39+
40+ outputConfig = index . configs [ cfg . config ] ;
3841 }
3942
40- outputConfig = index . configs [ cfg . config ] ;
41- }
43+ if ( cfg . rules ) {
44+ outputConfig . rules = {
45+ ...outputConfig . rules ,
46+ ...cfg . rules ,
47+ } ;
48+ }
49+
50+ if ( cfg . plugins ) {
51+ outputConfig . plugins = {
52+ ...outputConfig . plugins ,
53+ ...cfg . plugins ,
54+ } ;
55+ }
56+
57+ if ( cfg . name ) {
58+ outputConfig . name = cfg . name ;
59+ }
60+
61+ if ( cfg . basePath ) {
62+ outputConfig . basePath = cfg . basePath ;
63+ }
64+
65+ if ( cfg . files ) {
66+ outputConfig . files = cfg . files ;
67+ }
68+
69+ if ( cfg . ignores ) {
70+ outputConfig . ignores = cfg . ignores ;
71+ }
4272
43- if ( cfg ?. rules ) {
44- outputConfig . rules = cfg . rules ;
73+ if ( cfg . language ) {
74+ outputConfig . language = cfg . language ;
75+ }
76+
77+ if ( cfg . languageOptions ) {
78+ outputConfig . languageOptions = cfg . languageOptions ;
79+ }
80+
81+ if ( cfg . linterOptions ) {
82+ outputConfig . linterOptions = cfg . linterOptions ;
83+ }
84+
85+ if ( cfg . processor ) {
86+ outputConfig . processor = cfg . processor ;
87+ }
4588 }
4689
4790 outputConfig . settings = {
@@ -78,3 +121,7 @@ export const jsdoc = function (cfg) {
78121
79122 return outputConfig ;
80123} ;
124+
125+ export {
126+ getJsdocProcessorPlugin ,
127+ } from './getJsdocProcessorPlugin.js' ;
0 commit comments