Skip to content

Commit

Permalink
fix: move processor to own file; fixes #1277; fixes #1278
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Jul 29, 2024
1 parent 6248d59 commit 3ba475e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .README/processors.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The approach below works in ESLint 9. For ESLint 7, please see our [`check-examp
The approach requires that we first indicate the JavaScript files that will be checked for `@example` tags.

```js
import getJsdocProcessorPlugin from 'eslint-plugin-jsdoc/getJsdocProcessorPlugin.js';

export default [
{
files: ['**/*.js'],
Expand Down
2 changes: 2 additions & 0 deletions docs/processors.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ The approach below works in ESLint 9. For ESLint 7, please see our [`check-examp
The approach requires that we first indicate the JavaScript files that will be checked for `@example` tags.

```js
import getJsdocProcessorPlugin from 'eslint-plugin-jsdoc/getJsdocProcessorPlugin.js';

export default [
{
files: ['**/*.js'],
Expand Down
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,16 @@
"main": "./dist/index.cjs",
"types": "./dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"import": "./src/index.js",
"require": "./dist/index.cjs"
".": {
"types": "./dist/index.d.ts",
"import": "./src/index.js",
"require": "./dist/index.cjs"
},
"./getJsdocProcessorPlugin.js": {
"types": "./dist/getJsdocProcessorPlugin.d.ts",
"import": "./dist/getJsdocProcessorPlugin.cjs",
"require": "./src/getJsdocProcessorPlugin.js"
}
},
"name": "eslint-plugin-jsdoc",
"mocha": {
Expand Down
2 changes: 0 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,4 @@ index.configs['examples-and-default-expressions'] = /** @type {import('eslint').
})
]);

export { getJsdocProcessorPlugin };

export default index;

0 comments on commit 3ba475e

Please sign in to comment.