ecmaVersion: 2020,
sourceType: 'module'
},
- plugins: ['@typescript-eslint', 'promise', 'prettierx'],
+ plugins: [
+ '@typescript-eslint',
+ 'promise',
+ 'prettierx',
+ 'jsdoc',
+ 'spellcheck'
+ ],
extends: [
'standard',
'eslint:recommended',
ignoreMemberSort: true,
ignoreDeclarationSort: true
}
+ ],
+
+ 'spellcheck/spell-checker': [
+ 'warn',
+ {
+ skipWords: [
+ 'christopher',
+ 'ecma',
+ 'enum',
+ 'inheritdoc',
+ 'jsdoc',
+ 'pioardi',
+ 'poolifier',
+ 'readonly',
+ 'serializable',
+ 'unregister',
+ 'workerpool'
+ ],
+ skipIfMatch: ['^@.*', '^plugin:.*']
+ }
]
},
overrides: [
+ {
+ 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'
+ }
+ },
{
files: ['*.js'],
extends: 'plugin:node/recommended',
'node/no-missing-require': 'off'
}
}
- ]
+ ],
+ settings: {
+ jsdoc: {
+ mode: 'typescript'
+ }
+ }
}