Browse Source

Require jsdoc on functions and classes

Jeremy Tuloup 5 years ago
parent
commit
962bad93d5
2 changed files with 12 additions and 0 deletions
  1. 9 0
      .eslintrc.js
  2. 3 0
      tests/src/debugger.spec.ts

+ 9 - 0
.eslintrc.js

@@ -47,6 +47,15 @@ module.exports = {
     'jest/no-jest-import': 'off',
     'jest/no-export': 'warn',
     'jest/no-try-expect': 'warn',
+    'jsdoc/require-jsdoc': [
+      1,
+      {
+        require: {
+          FunctionExpression: true,
+          ClassDeclaration: true
+        }
+      }
+    ],
     'jsdoc/require-param-type': 'off',
     'jsdoc/require-property-type': 'off',
     'jsdoc/require-returns-type': 'off',

+ 3 - 0
tests/src/debugger.spec.ts

@@ -9,6 +9,9 @@ import { Debugger } from '../../lib/debugger';
 
 import { DebuggerService } from '../../lib/service';
 
+/**
+ * A test sidebar.
+ */
 class TestSidebar extends Debugger.Sidebar {}
 
 describe('Debugger', () => {