diff options
author | Rich Trott <rtrott@gmail.com> | 2021-11-30 03:41:31 +0300 |
---|---|---|
committer | Danielle Adams <adamzdanielle@gmail.com> | 2022-02-01 07:00:58 +0300 |
commit | af9b05fc119827f118f28c8f07bb8fd263170aff (patch) | |
tree | 0bfa8c70e0e075270ebcbc17f299afa50b638453 /.eslintrc.js | |
parent | 45e7affa9c4afdf1b841a39643301f7207d95a0f (diff) |
tools: install and enable JSDoc linting in ESLint
PR-URL: https://github.com/nodejs/node/pull/41027
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to '.eslintrc.js')
-rw-r--r-- | .eslintrc.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/.eslintrc.js b/.eslintrc.js index 3e1513b2b1f..66a3148e758 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -15,6 +15,7 @@ NodePlugin.RULES_DIR = path.resolve(__dirname, 'tools', 'eslint-rules'); const ModuleFindPath = Module._findPath; const hacks = [ 'eslint-plugin-node-core', + 'eslint-plugin-jsdoc', 'eslint-plugin-markdown', '@babel/eslint-parser', '@babel/plugin-syntax-import-assertions', @@ -34,7 +35,7 @@ Module._findPath = (request, paths, isMain) => { module.exports = { root: true, - plugins: ['markdown', 'node-core'], + plugins: ['jsdoc', 'markdown', 'node-core'], parser: '@babel/eslint-parser', parserOptions: { babelOptions: { @@ -336,6 +337,9 @@ module.exports = { 'use-isnan': 'error', 'valid-typeof': ['error', { requireStringLiterals: true }], + // JSDoc rules + 'jsdoc/check-types': 'error', + // Custom rules from eslint-plugin-node-core 'node-core/no-unescaped-regexp-dot': 'error', 'node-core/no-duplicate-requires': 'error', |