X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.eslintrc.js;h=a5a0075e24e5f8acb9686ccf579174e97419b6ff;hb=0e2503fc5e7d8b5884682734074e7ec6ef0cd52f;hp=6c8063c8a5dcb3da31ee2f12a826b4017263bdfb;hpb=5c5a1fb79906f18560012263239e7bd611ee8d2b;p=poolifier.git diff --git a/.eslintrc.js b/.eslintrc.js index 6c8063c8..a5a0075e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -50,11 +50,13 @@ module.exports = { 'warn', { skipWords: [ - 'poolifier', - 'pioardi', 'christopher', 'ecma', + 'enum', + 'inheritdoc', 'jsdoc', + 'pioardi', + 'poolifier', 'readonly', 'serializable', 'unregister', @@ -69,7 +71,39 @@ module.exports = { files: ['src/**/*.ts'], extends: 'plugin:jsdoc/recommended', rules: { + 'no-useless-constructor': 'off', + + 'jsdoc/match-description': [ + 'warn', + { + mainDescription: + '/^[A-Z`].+?(\\.|:)(\\n\\n.*((\\n{1,2}- .+)|(_.+_)|`.+`|\\n\\n---))?$/us', + matchDescription: '^[A-Z`].+(\\.|`.+`)$', + contexts: ['any'], + tags: { + param: true, + returns: true + } + } + ], 'jsdoc/no-types': 'error', + 'jsdoc/require-jsdoc': [ + 'warn', + { + contexts: [ + 'ClassDeclaration', + 'ClassProperty:not([accessibility=/(private|protected)/])', + 'ExportNamedDeclaration:has(VariableDeclaration)', + 'FunctionExpression', + 'MethodDefinition:not([accessibility=/(private|protected)/]) > FunctionExpression', + 'TSEnumDeclaration', + 'TSInterfaceDeclaration', + 'TSMethodSignature', + // 'TSPropertySignature', + 'TSTypeAliasDeclaration' + ] + } + ], 'jsdoc/require-param-type': 'off', 'jsdoc/require-returns-type': 'off' } @@ -94,5 +128,10 @@ module.exports = { 'node/no-missing-require': 'off' } } - ] + ], + settings: { + jsdoc: { + mode: 'typescript' + } + } }