X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=.eslintrc.js;h=c3c51fe731d28df4f2f5268a849cd84e24849d18;hb=3832ad95c98b136ef703a29685fedebe4a5e3ba2;hp=6c8063c8a5dcb3da31ee2f12a826b4017263bdfb;hpb=225e05865f45147095b94c5d9ef75536cb5631b3;p=poolifier.git diff --git a/.eslintrc.js b/.eslintrc.js index 6c8063c8..c3c51fe7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -51,10 +51,11 @@ module.exports = { { skipWords: [ 'poolifier', - 'pioardi', 'christopher', 'ecma', + 'enum', 'jsdoc', + 'pioardi', 'readonly', 'serializable', 'unregister', @@ -69,7 +70,37 @@ module.exports = { files: ['src/**/*.ts'], extends: 'plugin:jsdoc/recommended', rules: { + '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 +125,10 @@ module.exports = { 'node/no-missing-require': 'off' } } - ] + ], + settings: { + jsdoc: { + mode: 'typescript' + } + } }