Skip to content

Commit

Permalink
fix(examples processor): ensure config can be loaded with plugins
Browse files Browse the repository at this point in the history
Also:
- docs: fix processor docs
  • Loading branch information
brettz9 committed Jul 29, 2024
1 parent df43df9 commit 2fbd47c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .README/processors.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ Alternatively you can just use our built-in configs which do the above for you:
import jsdoc from 'eslint-plugin-jsdoc';

export default [
...index.configs.examples
...jsdoc.configs.examples

// Or for @default, @param and @property default expression processing
// ...index.configs['default-expressions']
// ...jsdoc.configs['default-expressions']

// Or for both, use:
// ...jsdoc.configs['examples-and-default-expressions'],
Expand Down
4 changes: 2 additions & 2 deletions docs/processors.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ Alternatively you can just use our built-in configs which do the above for you:
import jsdoc from 'eslint-plugin-jsdoc';

export default [
...index.configs.examples
...jsdoc.configs.examples

// Or for @default, @param and @property default expression processing
// ...index.configs['default-expressions']
// ...jsdoc.configs['default-expressions']

// Or for both, use:
// ...jsdoc.configs['examples-and-default-expressions'],
Expand Down
12 changes: 8 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,12 +371,16 @@ index.configs['examples-and-default-expressions'] = /** @type {import('eslint').
},
},
...index.configs.examples.map((config) => {
delete config.plugins;
return config;
return {
...config,
plugins: {}
};
}),
...index.configs['default-expressions'].map((config) => {
delete config.plugins;
return config;
return {
...config,
plugins: {}
};
})
]);

Expand Down

0 comments on commit 2fbd47c

Please sign in to comment.