@@ -2,6 +2,7 @@ import eslintPluginJs from '@eslint/js'
22import eslintPluginStylistic from '@stylistic/eslint-plugin'
33import eslintPluginCypress from 'eslint-plugin-cypress'
44import eslintPluginImport from 'eslint-plugin-import'
5+ import eslintPluginJSDoc from 'eslint-plugin-jsdoc'
56import eslintPluginMocha from 'eslint-plugin-mocha'
67import eslintPluginN from 'eslint-plugin-n'
78import eslintPluginPromise from 'eslint-plugin-promise'
@@ -35,6 +36,7 @@ export default [
3536 {
3637 name : 'dd-trace/global-ignore' ,
3738 ignores : [
39+ '**/.bun' , // Ignore autogenerated bun files
3840 '**/coverage' , // Just coverage reports.
3941 '**/dist' , // Generated
4042 '**/docs' , // Any JS here is for presentation only.
@@ -55,7 +57,8 @@ export default [
5557 'packages/datadog-plugin-graphql/src/tools/transforms.js' // Inlined from apollo-graphql
5658 ]
5759 } ,
58- { name : '@eslint/js/recommended' , ...eslintPluginJs . configs . recommended } ,
60+ eslintPluginJs . configs . recommended ,
61+ eslintPluginJSDoc . configs [ 'flat/recommended' ] ,
5962 {
6063 // The following config and rules have been inlined from `eslint-config-standard` with the following modifications:
6164 // - Rules that were overridden elsewhere in this file have been removed.
@@ -85,6 +88,7 @@ export default [
8588 } ,
8689 plugins : {
8790 '@stylistic' : eslintPluginStylistic ,
91+ jsdoc : eslintPluginJSDoc ,
8892 import : eslintPluginImport ,
8993 n : eslintPluginN ,
9094 promise : eslintPluginPromise
@@ -215,6 +219,22 @@ export default [
215219 'import/no-duplicates' : 'error' ,
216220 'import/no-named-default' : 'error' ,
217221 'import/no-webpack-loader-syntax' : 'error' ,
222+ 'jsdoc/check-tag-names' : [ 'error' , { definedTags : [ 'datadog' ] } ] ,
223+ // TODO: Enable the rules that we want to use.
224+ 'jsdoc/check-types' : 'off' , // Should be activated, but it needs a couple of fixes.
225+ // no-defaults: This should be activated, since the defaults will not be picked up in a description.
226+ 'jsdoc/no-defaults' : 'off' ,
227+ 'jsdoc/no-undefined-types' : 'off' ,
228+ 'jsdoc/reject-any-type' : 'off' , // Should be activated, but it needs a couple of fixes.
229+ 'jsdoc/reject-function-type' : 'off' ,
230+ 'jsdoc/require-jsdoc' : 'off' ,
231+ 'jsdoc/require-param-description' : 'off' , // Having a description is not crucial for now.
232+ 'jsdoc/require-param' : 'off' ,
233+ 'jsdoc/require-property-description' : 'off' ,
234+ 'jsdoc/require-returns-description' : 'off' ,
235+ 'jsdoc/require-returns-type' : 'off' ,
236+ 'jsdoc/require-returns' : 'off' ,
237+ 'jsdoc/tag-lines' : 'off' , // Alignment is not important for us.
218238 'n/handle-callback-err' : [ 'error' , '^(err|error)$' ] ,
219239 'n/no-callback-literal' : 'error' ,
220240 'n/no-deprecated-api' : 'error' ,
0 commit comments