diff options
author | Rich Trott <rtrott@gmail.com> | 2021-11-30 03:41:31 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2021-12-02 07:00:17 +0300 |
commit | e601c0d678f815e00c385c5b5b3b9efd6bcaaf91 (patch) | |
tree | 65a37e5604c0faceb4e4ee8e20ee7c422cce7739 /.eslintrc.js | |
parent | df5e82bfd1ae74840677d9a1fd64e5edbbd2bfa3 (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 1e35e787057..7df64d33af7 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', |