Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2021-12-02 10:41:26 +0300
committerRich Trott <rtrott@gmail.com>2021-12-05 06:04:05 +0300
commit6dae965c2d6aca0be1fc5fb2bd872fc981673298 (patch)
treeb7a374f18cf2f9354b7bc285e4514ffef157ef7c /.eslintrc.js
parent069d2bd2507b62d819b590df859e0db79fb7996f (diff)
tools: use jsdoc recommended rules
Enable all recommended JSDoc linting rules and disable the ones we don't (yet?) meet. They can be enabled one by one by removing the lines that turn them off. This requires adding --max-warnings to the ESLint invocations in Makefile and vcbuild.bat because the preset enables the recommended rules as warnings and not errors. PR-URL: https://github.com/nodejs/node/pull/41057 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to '.eslintrc.js')
-rw-r--r--.eslintrc.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
index 7df64d33af7..6d9ddbf5f41 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -35,6 +35,7 @@ Module._findPath = (request, paths, isMain) => {
module.exports = {
root: true,
+ extends: ['plugin:jsdoc/recommended'],
plugins: ['jsdoc', 'markdown', 'node-core'],
parser: '@babel/eslint-parser',
parserOptions: {
@@ -338,7 +339,22 @@ module.exports = {
'valid-typeof': ['error', { requireStringLiterals: true }],
// JSDoc rules
- 'jsdoc/check-types': 'error',
+ 'jsdoc/require-jsdoc': 'off',
+ 'jsdoc/require-param-description': 'off',
+ 'jsdoc/newline-after-description': 'off',
+ 'jsdoc/require-returns-description': 'off',
+ 'jsdoc/valid-types': 'off',
+ 'jsdoc/no-undefined-types': 'off',
+ 'jsdoc/require-param': 'off',
+ 'jsdoc/check-tag-names': 'off',
+ 'jsdoc/require-returns': 'off',
+ 'jsdoc/require-property-description': 'off',
+ 'jsdoc/check-param-names': 'off',
+ 'jsdoc/tag-lines': 'off',
+ 'jsdoc/require-returns-type': 'off',
+ 'jsdoc/check-alignment': 'off',
+ 'jsdoc/require-returns-check': 'off',
+ 'jsdoc/require-param-name': 'off',
// Custom rules from eslint-plugin-node-core
'node-core/no-unescaped-regexp-dot': 'error',