Skip to content

Commit

Permalink
feat: replace jsdoc with tsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschmidt committed Nov 7, 2023
1 parent fef09e6 commit 6cefb03
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 125 deletions.
10 changes: 2 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module.exports = {
'plugin:@typescript-eslint/eslint-recommended',
'plugin:prettier/recommended',
'plugin:sonarjs/recommended',
'plugin:jsdoc/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
Expand All @@ -20,9 +19,9 @@ module.exports = {
'@typescript-eslint',
'prettier',
'sonarjs',
'jsdoc',
'prefer-arrow',
'ban',
'eslint-plugin-tsdoc',
],
settings: {
react: {
Expand Down Expand Up @@ -67,10 +66,6 @@ module.exports = {
eqeqeq: ['error', 'always'],
'guard-for-in': 'error',
'id-match': 'error',
'jsdoc/check-indentation': 'error',
'jsdoc/require-jsdoc': 'off',
'jsdoc/no-undefined-types': 'off',
'jsdoc/check-tag-names': 'off',
'max-classes-per-file': ['error', 1],
'multiline-ternary': ['error', 'never'],
'no-bitwise': 'error',
Expand Down Expand Up @@ -129,6 +124,7 @@ module.exports = {
markers: ['/'],
},
],
'tsdoc/syntax': 'warn',
},
overrides: [
{
Expand Down Expand Up @@ -176,8 +172,6 @@ module.exports = {
'@typescript-eslint/dot-notation': 'error',
'sonarjs/no-duplicate-string': 'off',
'sonarjs/no-identical-functions': 'off',
'jsdoc/require-returns': 'off',
'jsdoc/require-param': 'off',
'no-console': 'off',
'no-magic-numbers': 'off',
'prefer-arrow/prefer-arrow-functions': 'off',
Expand Down
158 changes: 43 additions & 115 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
},
"dependencies": {
"@typescript-eslint/parser": "^6.9.0",
"eslint-plugin-tsdoc": "^0.2.17",
"gently-copy": "^3.2.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.9.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-ban": "^1.6.0",
"eslint-plugin-jsdoc": "^46.8.2",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.33.2",
Expand All @@ -52,7 +52,6 @@
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-ban": "^1.6.0",
"eslint-plugin-jsdoc": "^46.8.2",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.33.2",
Expand Down
22 changes: 22 additions & 0 deletions tsdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
"tagDefinitions": [
{
"tagName": "@id",
"syntaxKind": "block"
},
{
"tagName": "@note",
"syntaxKind": "block",
"allowMultiple": true
},
{
"tagName": "@event",
"syntaxKind": "block"
},
{
"tagName": "@emits",
"syntaxKind": "block"
}
]
}

0 comments on commit 6cefb03

Please sign in to comment.