Skip to content

Commit 9c81d8b

Browse files
committed
Added check-types with preferred Object<> and Array<> syntax
1 parent 7059f76 commit 9c81d8b

File tree

1 file changed

+8
-28
lines changed

1 file changed

+8
-28
lines changed

index.js

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ module.exports = {
1717
'import/named': 'error',
1818
'import/default': 'error',
1919
'import/extensions': ['error', 'always', {ignorePackages: true}],
20-
21-
// validity
2220
'jsdoc/check-access': 'error',
2321
'jsdoc/check-param-names': 'error',
2422
'jsdoc/check-property-names': 'error',
@@ -32,11 +30,9 @@ module.exports = {
3230
'jsdoc/empty-tags': 'error',
3331
'jsdoc/implements-on-classes': 'error',
3432
'jsdoc/no-bad-blocks': 'error',
35-
// "jsdoc/no-undefined-types": ['error', { 'definedTypes': ['ol'] }],
36-
// this fails because of https://github.com/gajus/eslint-plugin-jsdoc/issues/559
37-
// for main source this should not be needed because tsc already checks it
33+
// "jsdoc/no-undefined-types": ['error', { 'definedTypes': ['ol'] }], // blocked by https://github.com/gajus/eslint-plugin-jsdoc/issues/559
3834
'jsdoc/require-param': 'error',
39-
'jsdoc/require-param-description': 'error', // this fails because of https://github.com/gajus/eslint-plugin-jsdoc/issues/686
35+
'jsdoc/require-param-description': 'error',
4036
'jsdoc/require-param-name': 'error',
4137
'jsdoc/require-param-type': 'error',
4238
'jsdoc/require-property': 'error',
@@ -47,31 +43,11 @@ module.exports = {
4743
'jsdoc/require-returns-check': 'error',
4844
'jsdoc/require-returns-description': 'error',
4945
'jsdoc/require-returns-type': 'error',
50-
// "jsdoc/valid-types": 'error', // this fails because of https://github.com/jsdoctypeparser/jsdoctypeparser/issues/133
51-
// for main source this should not be needed because tsc already checks it
52-
// "jsdoc/check-types": 'error', // for primitives. is aligned with mode 'typescript'. Not needed because of tsc?
53-
54-
// stylistic
46+
// "jsdoc/valid-types": 'error', // blocked by https://github.com/jsdoctypeparser/jsdoctypeparser/issues/133
47+
'jsdoc/check-types': 'error',
5548
'jsdoc/check-alignment': 'error',
5649
'jsdoc/check-examples': 'error',
5750
'jsdoc/require-hyphen-before-param-description': ['error', 'never'],
58-
59-
// turned off
60-
// "jsdoc/check-indentation": 'error', // we want indentation in certain cases
61-
// "jsdoc/check-line-alignment": 'error',
62-
// "jsdoc/check-values": 'error', // not needed
63-
// "jsdoc/match-description": 'error', // regex could get adjusted ...
64-
// "jsdoc/newline-after-description": 'error',
65-
// "jsdoc/no-defaults": 'error',
66-
// "jsdoc/no-types": 'error',
67-
// "jsdoc/require-description": 'error',
68-
// "jsdoc/require-description-complete-sentence": 'error', // some issues with description starting with line break
69-
// "jsdoc/require-example": 'error',
70-
// "jsdoc/require-file-overview": 'error',
71-
// "jsdoc/require-jsdoc": 'error',
72-
// "jsdoc/require-throws": 'error',
73-
// "jsdoc/require-yields": 'error',
74-
7551
'no-cond-assign': 'error',
7652
'no-console': 'error',
7753
'no-const-assign': 'error',
@@ -128,6 +104,10 @@ module.exports = {
128104
settings: {
129105
jsdoc: {
130106
mode: 'typescript',
107+
preferredTypes: {
108+
'[]': 'Array<>',
109+
'.<>': '<>'
110+
},
131111
tagNamePreference: {
132112
'returns': 'return',
133113
'file': 'fileoverview',

0 commit comments

Comments
 (0)