Skip to content

Commit

Permalink
Testing eslintrc config
Browse files Browse the repository at this point in the history
  • Loading branch information
sugat009 committed Aug 21, 2024
1 parent 2e31d49 commit e3b0f56
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"build/**",
"jsdocs/**",
"shared-libs/cht-datasource/dist/**",
"shared-libs/cht-datasource/docs/**",
"tests/scalability/report*/**",
"tests/scalability/jmeter/**",
"webapp/src/ts/providers/xpath-element-path.provider.ts"
Expand Down
32 changes: 25 additions & 7 deletions shared-libs/cht-datasource/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
const JS_DOC_REQUIRED_CONTEXTS = [
'FunctionDeclaration',
'FunctionExpression',
'VariableDeclaration',
'TSInterfaceDeclaration',
'TSTypeAliasDeclaration',
'TSEnumDeclaration',
'TSMethodSignature'
];

module.exports = {
overrides: [
{
Expand All @@ -19,11 +29,6 @@ module.exports = {
settings: {
jsdoc: {
contexts: [
'VariableDeclaration',
'TSInterfaceDeclaration',
'TSTypeAliasDeclaration',
'TSEnumDeclaration',
'TSMethodSignature'
]
}
},
Expand All @@ -42,9 +47,22 @@ module.exports = {
FunctionExpression: true,
MethodDefinition: true,
},
publicOnly: true,
contexts: JS_DOC_REQUIRED_CONTEXTS,
publicOnly: true
}],
['jsdoc/check-tag-names']: ['error', { definedTags: ['typeParam'] }],
['jsdoc/require-param']: ['error', {
contexts: JS_DOC_REQUIRED_CONTEXTS,
exemptedBy: ['private', 'internal']
}],
['jsdoc/require-returns']: ['error', {
contexts: JS_DOC_REQUIRED_CONTEXTS,
exemptedBy: ['private', 'internal']
}],
['jsdoc/require-yields']: ['error', {
contexts: JS_DOC_REQUIRED_CONTEXTS,
exemptedBy: ['private', 'internal']
}],
['jsdoc/check-tag-names']: ['error', { definedTags: ['typeParam']}],
}
}
]
Expand Down
3 changes: 0 additions & 3 deletions shared-libs/cht-datasource/test/person.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,6 @@ describe('person', () => {
yield person;
}
};
const emptyMockGenerator = function* () {
// empty
};

let personGetPage: sinon.SinonStub;
let getPagedGenerator: sinon.SinonStub;
Expand Down

0 comments on commit e3b0f56

Please sign in to comment.