From b1a0145fab0d1ce2976055a3a38b2ce9c5a978b2 Mon Sep 17 00:00:00 2001 From: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com> Date: Wed, 22 Dec 2021 21:06:38 +0100 Subject: [PATCH] pre-commit: add eslint-plugin-jsdoc This allows us to enforce that the libraries we ship come with good JSDoc comments which should improve DX when mapping with capable code editors. --- .eslintrc.json | 3 ++- .pre-commit-config.yaml | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 9e7d744349b..1c77f95525b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": "eslint:recommended", + "extends": ["eslint:recommended", "plugin:jsdoc/recommended"], "parserOptions": { "ecmaVersion": 7, "sourceType": "script" @@ -7,6 +7,7 @@ "env": { "es6": true }, + "plugins": ["jsdoc"], "rules": { "array-bracket-spacing" : "warn", "block-spacing": "warn", diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b39a51629a..ec4aa310c30 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -70,6 +70,8 @@ repos: stages: - commit - manual + additional_dependencies: + - eslint-plugin-jsdoc@^v37.4.0 - repo: local hooks: - id: clang-format