Skip to content

Commit b9ffb3a

Browse files
authored
Merge pull request #97 from jeremyvii/implement-tsdoc
Implement tsdoc
2 parents b9f224f + 0291d12 commit b9ffb3a

25 files changed

+1059
-1032
lines changed

.eslintrc.json

Lines changed: 0 additions & 38 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@
55
},
66
"search.exclude": {
77
"out": true // set this to false to include "out" folder in search results
8-
}
9-
}
8+
},
9+
"cSpell.words": [
10+
"jeremyljackson"
11+
]
12+
}

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,18 @@ you autocomplete multiple lines with the `/**` keybinding)
3838

3939
Currently the following configuration settings have been implemented:
4040

41-
| Title | Description |
42-
|--------------------------|---------------------------------------------------------------------------------|
43-
| Align Tags | Whether or not to automatically align the parameters, return, or variable tags. |
44-
| Block Comment Style | Which doc block comment style to use (`default\|drupal`). |
45-
| Column Spacing | Minimum number of spaces between columns. |
46-
| New Lines Between Tags | Whether or not to add new lines between tags. |
47-
| Default return tag | Whether or not to display a return tag. |
48-
| \*SCSS Comment Close | Type of block level comment closing to use. |
49-
| \*SCSS Comment Open | Type of block level comment opening to use. |
50-
| \*SCSS Comment Separator | Type of block level separator closing to use. |
41+
| Title | Description |
42+
|--------------------------|----------------------------------------------------------------------------------------------------------------------|
43+
| Align Tags | Whether or not to automatically align the parameters, return, or variable tags. |
44+
| Block Comment Style | Which doc block comment style to use (`default\|drupal\|tsdoc`). |
45+
| Column Spacing | Minimum number of spaces between columns. |
46+
| New Lines Between Tags | Whether or not to add new lines between tags. |
47+
| Default return tag | Whether or not to display a return tag. |
48+
| \*SCSS Comment Close | Type of block level comment closing to use. **Deprecated: Use `vs-docblockr.commentClose` targeting SCSS instead** |
49+
| \*SCSS Comment Open | Type of block level comment opening to use. **Deprecated: Use `vs-docblockr.commentOpen` targeting SCSS instead** |
50+
| \*SCSS Comment Separator | Type of block level separator closing to use. **Deprecated: Use `vs-docblockr.separator` targeting SCSS instead** |
51+
| Comment Open | Type of block level comment opening to use. |
52+
| Comment Close | Type of block level comment closing to use. |
53+
| Separator | Type of block level separator closing to use. |
5154

5255
\* *Note: VS DocBlockr does not currently support autocompletion of SASS blocks with `///`.*

eslint.config.mjs

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
2+
import tsParser from '@typescript-eslint/parser';
3+
import tsDocEslint from 'eslint-plugin-tsdoc';
4+
import path from 'node:path';
5+
import { fileURLToPath } from 'node:url';
6+
import js from '@eslint/js';
7+
import { FlatCompat } from '@eslint/eslintrc';
8+
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = path.dirname(__filename);
11+
const compat = new FlatCompat({
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all
15+
});
16+
17+
export default [
18+
...compat.extends(
19+
'eslint:recommended',
20+
'plugin:@typescript-eslint/recommended'
21+
),
22+
{
23+
plugins: {
24+
'@typescript-eslint': typescriptEslint,
25+
'tsdoc': tsDocEslint,
26+
},
27+
28+
languageOptions: {
29+
parser: tsParser,
30+
},
31+
32+
rules: {
33+
semi: ['error', 'always'],
34+
indent: ['error', 2],
35+
'lines-between-class-members': ['error', 'always'],
36+
'@typescript-eslint/member-ordering': ['error', {
37+
default: {
38+
order: 'alphabetically',
39+
40+
memberTypes: [
41+
'public-static-field',
42+
'public-instance-field',
43+
'public-constructor',
44+
'private-static-field',
45+
'private-instance-field',
46+
'private-constructor',
47+
'public-instance-method',
48+
'protected-instance-method',
49+
'private-instance-method',
50+
],
51+
},
52+
}],
53+
'tsdoc/syntax': 'error',
54+
},
55+
},
56+
];

0 commit comments

Comments
 (0)