Skip to content

Commit 32f4c57

Browse files
authored
chore(eslint): remove jsdoc plugin (#4159)
We don't really need it and it makes eslint take longer.
1 parent b475bf8 commit 32f4c57

File tree

4 files changed

+4
-144
lines changed

4 files changed

+4
-144
lines changed

.eslintrc

Lines changed: 3 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@
77
"project": true
88
},
99

10-
"plugins": ["jest", "@lwc/lwc-internal", "@typescript-eslint", "import", "header", "jsdoc"],
11-
"extends": [
12-
"eslint:recommended",
13-
"plugin:@typescript-eslint/recommended-type-checked",
14-
"plugin:jsdoc/recommended-typescript"
15-
],
10+
"plugins": ["jest", "@lwc/lwc-internal", "@typescript-eslint", "import", "header"],
11+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended-type-checked"],
1612

1713
"env": {
1814
"es6": true
@@ -163,24 +159,7 @@
163159
"@typescript-eslint/no-unsafe-return": "off",
164160
"@typescript-eslint/no-unsafe-argument": "off",
165161
// This rule returns false positives with ! assertions, even with strictNullChecks(https://github.com/typescript-eslint/typescript-eslint/issues/1618) on it was complaining
166-
"@typescript-eslint/no-unnecessary-type-assertion": "off",
167-
168-
"jsdoc/require-jsdoc": ["warn", { "publicOnly": true }],
169-
"jsdoc/check-indentation": "error",
170-
"jsdoc/check-syntax": "error",
171-
"jsdoc/informative-docs": "error",
172-
"jsdoc/no-bad-blocks": [
173-
"error",
174-
{ "ignore": ["__PURE__", "__PURE__@", "ts-expect-error", "ts-ignore"] }
175-
],
176-
"jsdoc/no-blank-blocks": "error",
177-
"jsdoc/no-defaults": "error",
178-
"jsdoc/no-types": "error",
179-
"jsdoc/require-description": "error",
180-
"jsdoc/require-example": "error",
181-
"jsdoc/require-hyphen-before-param-description": ["error", "never"],
182-
"jsdoc/require-throws": "error",
183-
"jsdoc/sort-tags": "error"
162+
"@typescript-eslint/no-unnecessary-type-assertion": "off"
184163
},
185164

186165
"overrides": [
@@ -283,73 +262,6 @@
283262
"header/header": "off"
284263
}
285264
},
286-
{
287-
// Don't complain about 3rd party JSDoc
288-
"files": ["packages/@lwc/synthetic-shadow/src/3rdparty/**"],
289-
"rules": {
290-
"jsdoc/check-alignment": "off",
291-
"jsdoc/check-indentation": "off",
292-
"jsdoc/check-syntax": "off",
293-
"jsdoc/check-values": "off",
294-
"jsdoc/informative-docs": "off",
295-
"jsdoc/no-bad-blocks": "off",
296-
"jsdoc/no-blank-blocks": "off",
297-
"jsdoc/no-defaults": "off",
298-
"jsdoc/no-types": "off",
299-
"jsdoc/require-description": "off",
300-
"jsdoc/require-hyphen-before-param-description": "off",
301-
"jsdoc/require-jsdoc": "off",
302-
"jsdoc/require-param": "off",
303-
"jsdoc/require-throws": "off",
304-
"jsdoc/sort-tags": "off"
305-
}
306-
},
307-
{
308-
"files": [
309-
// Private packages - documentation isn't required (but should still be good, if present)
310-
"packages/@lwc/integration-karma/**",
311-
"packages/@lwc/integration-tests/**",
312-
"packages/@lwc/perf-benchmarks-components/**",
313-
"packages/@lwc/perf-benchmarks/**",
314-
// TODO [W-13278716]: All top-level exports should have JSDOC enforced
315-
"packages/@lwc/engine-core/**",
316-
// "packages/@lwc/engine-server/**",
317-
// Package-level exports are documented, but not all file-level exports are, so we
318-
// should keep these disabled for now
319-
"packages/@lwc/babel-plugin-component/**",
320-
"packages/@lwc/engine-dom/**",
321-
"packages/@lwc/engine-server/**",
322-
"packages/@lwc/module-resolver/**",
323-
"packages/@lwc/shared/**",
324-
"packages/@lwc/style-compiler/**",
325-
"packages/@lwc/synthetic-shadow/**",
326-
"packages/@lwc/template-compiler/**"
327-
],
328-
"rules": {
329-
"jsdoc/require-jsdoc": "off",
330-
// TODO [W-13278716]: All JSDoc should fully describe functions
331-
"jsdoc/require-description": "off",
332-
"jsdoc/require-example": "off",
333-
"jsdoc/require-param-description": "off",
334-
"jsdoc/require-returns": "off",
335-
"jsdoc/require-throws": "off"
336-
}
337-
},
338-
// TODO [W-13278716]: Not everything *needs* an example, so I'll probably disable the rule
339-
// when the ticket is complete, but for now I want to enable by default and disable as I go.
340-
{
341-
"files": [
342-
"packages/@lwc/babel-plugin-component/**",
343-
"packages/@lwc/compiler/**",
344-
"packages/@lwc/errors/**",
345-
"packages/@lwc/engine-dom/**",
346-
"packages/@lwc/rollup-plugin/**",
347-
"packages/@lwc/wire-service/**"
348-
],
349-
"rules": {
350-
"jsdoc/require-example": "off"
351-
}
352-
},
353265
{
354266
// These files aren't JS files, but are directives used to selectively run test fixtures.
355267
// We use eslint to break CI if they are accidentally committed. Note that lint-staged

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"eslint-plugin-header": "^3.1.1",
5454
"eslint-plugin-import": "^2.29.1",
5555
"eslint-plugin-jest": "^28.2.0",
56-
"eslint-plugin-jsdoc": "^48.2.3",
5756
"glob": "^10.3.12",
5857
"husky": "^9.0.11",
5958
"isbinaryfile": "^5.0.2",

packages/@lwc/engine-dom/src/apis/create-element.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ function monkeyPatchDomAPIs() {
8282
} as Pick<Node, 'appendChild' | 'insertBefore' | 'removeChild' | 'replaceChild'>);
8383
}
8484

85-
// For some reason, JSDOC says "options.is" is a syntax error. And we can't disable the rule using
86-
// `eslint-disable-next-line` because that gets included in the JSDOC, so we need this workaround.
87-
/* eslint-disable jsdoc/valid-types */
8885
/**
8986
* EXPERIMENTAL: This function is almost identical to document.createElement with the slightly
9087
* difference that in the options, you can pass the `is` property set to a Constructor instead of
@@ -100,7 +97,6 @@ function monkeyPatchDomAPIs() {
10097
* const el = createElement('x-foo', { is: FooCtor });
10198
*/
10299
export function createElement(
103-
/* eslint-enable jsdoc/valid-types */
104100
sel: string,
105101
options: {
106102
is: typeof LightningElement;

yarn.lock

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -898,15 +898,6 @@
898898
buffer-crc32 "~0.2.3"
899899
fd-slicer2 "^1.2.0"
900900

901-
"@es-joy/jsdoccomment@~0.42.0":
902-
version "0.42.0"
903-
resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.42.0.tgz#59e878708336aaee88c2b34c894f73dbf77ae2b0"
904-
integrity sha512-R1w57YlVA6+YE01wch3GPYn6bCsrOV3YW/5oGGE2tmX6JcL9Nr+b5IikrjMPF+v9CV3ay+obImEdsDhovhJrzw==
905-
dependencies:
906-
comment-parser "1.4.1"
907-
esquery "^1.5.0"
908-
jsdoc-type-pratt-parser "~4.0.0"
909-
910901
"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
911902
version "4.4.0"
912903
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
@@ -2765,11 +2756,6 @@ archiver@^7.0.0:
27652756
tar-stream "^3.0.0"
27662757
zip-stream "^6.0.1"
27672758

2768-
are-docs-informative@^0.0.2:
2769-
version "0.0.2"
2770-
resolved "https://registry.yarnpkg.com/are-docs-informative/-/are-docs-informative-0.0.2.tgz#387f0e93f5d45280373d387a59d34c96db321963"
2771-
integrity sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==
2772-
27732759
are-we-there-yet@^3.0.0:
27742760
version "3.0.1"
27752761
resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz#679df222b278c64f2cdba1175cdc00b0d96164bd"
@@ -3811,11 +3797,6 @@ commander@^9.3.0:
38113797
resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30"
38123798
integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==
38133799

3814-
comment-parser@1.4.1:
3815-
version "1.4.1"
3816-
resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.4.1.tgz#bdafead37961ac079be11eb7ec65c4d021eaf9cc"
3817-
integrity sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==
3818-
38193800
commondir@^1.0.1:
38203801
version "1.0.1"
38213802
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
@@ -4920,21 +4901,6 @@ eslint-plugin-jest@^28.2.0:
49204901
dependencies:
49214902
"@typescript-eslint/utils" "^6.0.0"
49224903

4923-
eslint-plugin-jsdoc@^48.2.3:
4924-
version "48.2.3"
4925-
resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.3.tgz#0188d17c7a4aa7185416556589e71a954b343ecd"
4926-
integrity sha512-r9DMAmFs66VNvNqRLLjHejdnJtILrt3xGi+Qx0op0oRfFGVpOR1Hb3BC++MacseHx93d8SKYPhyrC9BS7Os2QA==
4927-
dependencies:
4928-
"@es-joy/jsdoccomment" "~0.42.0"
4929-
are-docs-informative "^0.0.2"
4930-
comment-parser "1.4.1"
4931-
debug "^4.3.4"
4932-
escape-string-regexp "^4.0.0"
4933-
esquery "^1.5.0"
4934-
is-builtin-module "^3.2.1"
4935-
semver "^7.6.0"
4936-
spdx-expression-parse "^4.0.0"
4937-
49384904
eslint-scope@^7.2.2:
49394905
version "7.2.2"
49404906
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f"
@@ -5006,7 +4972,7 @@ esprima@^4.0.0, esprima@^4.0.1:
50064972
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
50074973
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
50084974

5009-
esquery@^1.4.2, esquery@^1.5.0:
4975+
esquery@^1.4.2:
50104976
version "1.5.0"
50114977
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b"
50124978
integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==
@@ -7283,11 +7249,6 @@ jsbn@1.1.0:
72837249
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040"
72847250
integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==
72857251

7286-
jsdoc-type-pratt-parser@~4.0.0:
7287-
version "4.0.0"
7288-
resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz#136f0571a99c184d84ec84662c45c29ceff71114"
7289-
integrity sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==
7290-
72917252
jsdom@^20.0.0:
72927253
version "20.0.3"
72937254
resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-20.0.3.tgz#886a41ba1d4726f67a8858028c99489fed6ad4db"
@@ -10508,14 +10469,6 @@ spdx-expression-parse@^3.0.0:
1050810469
spdx-exceptions "^2.1.0"
1050910470
spdx-license-ids "^3.0.0"
1051010471

10511-
spdx-expression-parse@^4.0.0:
10512-
version "4.0.0"
10513-
resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz#a23af9f3132115465dac215c099303e4ceac5794"
10514-
integrity sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==
10515-
dependencies:
10516-
spdx-exceptions "^2.1.0"
10517-
spdx-license-ids "^3.0.0"
10518-
1051910472
spdx-license-ids@^3.0.0:
1052010473
version "3.0.17"
1052110474
resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz#887da8aa73218e51a1d917502d79863161a93f9c"

0 commit comments

Comments
 (0)