Skip to content

Commit 4fbe4b0

Browse files
fix: avoid jest special comments to lint (#72)
1 parent 68e6ae8 commit 4fbe4b0

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

configs/typescript.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,13 @@ async function getTypescriptJSDocRecommendedConfig() {
8282
// typescript does it
8383
// "jsdoc/check-syntax": "error",
8484

85-
// From recommended
86-
// "jsdoc/check-tag-names": "error",
85+
// Avoid conflict with jest special comment
86+
"jsdoc/check-tag-names": [
87+
"error",
88+
{
89+
definedTags: ["jest-environment"],
90+
},
91+
],
8792

8893
// No need
8994
// "jsdoc/check-template-names": "error",

validation/code.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* @jest-environment jsdom
3+
*/
4+
15
describe("name", () => {
26
it("test #1", () => {
37
const data = { type: "coords", x: 1, y: 2 };

0 commit comments

Comments
 (0)