Skip to content

Commit b9cd7a7

Browse files
committed
Refactor ESLint config and update changelog
1 parent 133ef6c commit b9cd7a7

File tree

2 files changed

+29
-13
lines changed

2 files changed

+29
-13
lines changed

library/.eslintrc.cjs

+28-13
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,38 @@ module.exports = {
4141
'@typescript-eslint/ban-ts-comment': 'off',
4242
'@typescript-eslint/consistent-type-imports': 'warn',
4343
'@typescript-eslint/no-non-null-assertion': 'off',
44+
45+
// Imports
4446
'no-duplicate-imports': 'off',
4547
'import/extensions': ['error', 'always'],
46-
'jsdoc/tag-lines': ['error', 'any', {
47-
'startLines': 1,
48-
}],
49-
'jsdoc/sort-tags': ['error', { 'linesBetween': 1, "tagSequence": [{ "tags": ["deprecated"] }, { "tags": ["param"] }, { "tags": ["returns"] }] }],
48+
49+
// JSDoc
50+
'jsdoc/tag-lines': ['error', 'any', { startLines: 1 }],
51+
'jsdoc/sort-tags': [
52+
'error',
53+
{
54+
linesBetween: 1,
55+
tagSequence: [
56+
{ tags: ['deprecated'] },
57+
{ tags: ['param'] },
58+
{ tags: ['returns'] },
59+
],
60+
},
61+
],
5062
// NOTE: For overloads functions, we only require a JSDoc at the top
5163
// SEE: https://github.com/gajus/eslint-plugin-jsdoc/issues/666
52-
"jsdoc/require-jsdoc": ["error", {
53-
"contexts": [
54-
'ExportNamedDeclaration[declaration.type="TSDeclareFunction"]:not(ExportNamedDeclaration[declaration.type="TSDeclareFunction"] + ExportNamedDeclaration[declaration.type="TSDeclareFunction"])',
55-
'ExportNamedDeclaration[declaration.type="FunctionDeclaration"]:not(ExportNamedDeclaration[declaration.type="TSDeclareFunction"] + ExportNamedDeclaration[declaration.type="FunctionDeclaration"])',
56-
],
57-
"require": {
58-
"FunctionDeclaration": false
59-
}
60-
}],
64+
'jsdoc/require-jsdoc': [
65+
'error',
66+
{
67+
contexts: [
68+
'ExportNamedDeclaration[declaration.type="TSDeclareFunction"]:not(ExportNamedDeclaration[declaration.type="TSDeclareFunction"] + ExportNamedDeclaration[declaration.type="TSDeclareFunction"])',
69+
'ExportNamedDeclaration[declaration.type="FunctionDeclaration"]:not(ExportNamedDeclaration[declaration.type="TSDeclareFunction"] + ExportNamedDeclaration[declaration.type="FunctionDeclaration"])',
70+
],
71+
require: {
72+
FunctionDeclaration: false,
73+
},
74+
},
75+
],
6176

6277
// Security
6378
'security/detect-object-injection': 'off', // Too many false positives

library/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ All notable changes to the library will be documented in this file.
55
## vX.X.X (Month DD, YYYY)
66

77
- Change structure of schemas, validations and transformations to make properties accessible (pull request #211)
8+
- Fix errors in JSDoc comments and add JSDoc ESLint plugin (pull request #205)
89

910
## v0.20.1 (November 2, 2023)
1011

0 commit comments

Comments
 (0)