@@ -101,7 +101,7 @@ For defaults, a couple rules are enabled which are usually useful:
101
101
102
102
``` js
103
103
import {getJsdocProcessorPlugin } from ' eslint-plugin-jsdoc' ;
104
- import {
104
+ import ts, {
105
105
parser as typescriptEslintParser ,
106
106
} from ' typescript-eslint' ;
107
107
@@ -133,8 +133,10 @@ export default [
133
133
},
134
134
processor: ' examples/examples'
135
135
},
136
+ // Apply your TypeScript config
137
+ ... ts .configs .recommended ,
136
138
{
137
- // Target the blocks within TypeScript
139
+ // Target the @example blocks within TypeScript
138
140
files: [
139
141
// `**/*.ts` could also work if you want to share this config
140
142
// with other non-@example TypeScript
@@ -148,8 +150,13 @@ export default [
148
150
rules: {
149
151
// Add the rules you want to apply to @example here
150
152
' no-extra-semi' : ' error' ,
153
+
151
154
// disable problematic rules here, e.g.,
152
155
// ...jsdoc.configs.examples[1].rules
156
+
157
+ // Due to https://github.com/gajus/eslint-plugin-jsdoc/issues/1377 ,
158
+ // `typescript-eslint` type-checked rules must currently be disbaled
159
+ ... ts .configs .disableTypeChecked .rules
153
160
}
154
161
}
155
162
];
0 commit comments