Skip to content

Commit 77158c4

Browse files
authored
feat: add plugin-jest-dom (#188)
1 parent 0893896 commit 77158c4

File tree

3 files changed

+133
-3
lines changed

3 files changed

+133
-3
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ module.exports = {
1313
'plugin:import/warnings',
1414
'plugin:import/typescript',
1515
'plugin:unicorn/recommended',
16+
'plugin:jest-dom/recommended',
1617
],
1718
globals: {
1819
globalThis: false, // false means not writable
1920
},
20-
plugins: ['ban', 'jsdoc', 'react', 'react-hooks', 'etc', 'rxjs'],
21+
plugins: ['ban', 'jsdoc', 'react', 'react-hooks', 'etc', 'rxjs', 'jest-dom'],
2122
settings: {
2223
react: {
2324
version: 'detect',

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"eslint-plugin-ban": "^1.4.0",
4242
"eslint-plugin-etc": "^1.1.7",
4343
"eslint-plugin-import": "^2.22.1",
44+
"eslint-plugin-jest-dom": "^3.6.5",
4445
"eslint-plugin-jsdoc": "^30.7.8",
4546
"eslint-plugin-react": "^7.21.4",
4647
"eslint-plugin-react-hooks": "^4.2.0",

yarn.lock

Lines changed: 130 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,21 @@
6161
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.4.tgz#9eedf27e1998d87739fb5028a5120557c06a1a64"
6262
integrity sha512-8jHII4hf+YVDsskTF6WuMB3X4Eh+PsUkC2ljq22so5rHvH+T8BzyL94VOdyFLNR8tBSVXOTbNHOKpR4TfRxVtA==
6363

64+
"@babel/runtime-corejs3@^7.10.2":
65+
version "7.12.13"
66+
resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.12.13.tgz#53d09813b7c20d616caf258e9325550ff701c039"
67+
integrity sha512-8fSpqYRETHATtNitsCXq8QQbKJP31/KnDl2Wz2Vtui9nKzjss2ysuZtyVsWjBtvkeEFo346gkwjYPab1hvrXkQ==
68+
dependencies:
69+
core-js-pure "^3.0.0"
70+
regenerator-runtime "^0.13.4"
71+
72+
"@babel/runtime@^7.10.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.9.6":
73+
version "7.12.13"
74+
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.13.tgz#0a21452352b02542db0ffb928ac2d3ca7cb6d66d"
75+
integrity sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw==
76+
dependencies:
77+
regenerator-runtime "^0.13.4"
78+
6479
"@babel/runtime@^7.11.2":
6580
version "7.11.2"
6681
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736"
@@ -237,6 +252,17 @@
237252
resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-11.0.0.tgz#719cf05fcc1abb6533610a2e0f5dd1e61eac14fe"
238253
integrity sha512-VoNqai1vR5anRF5Tuh/+SWDFk7xi7oMwHrHrbm1BprYXjB2RJsWLhUrStMssDxEl5lW/z3EUdg8RvH/IUBccSQ==
239254

255+
"@jest/types@^26.6.2":
256+
version "26.6.2"
257+
resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e"
258+
integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==
259+
dependencies:
260+
"@types/istanbul-lib-coverage" "^2.0.0"
261+
"@types/istanbul-reports" "^3.0.0"
262+
"@types/node" "*"
263+
"@types/yargs" "^15.0.0"
264+
chalk "^4.0.0"
265+
240266
"@nodelib/[email protected]":
241267
version "2.1.3"
242268
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b"
@@ -432,11 +458,49 @@
432458
resolved "https://registry.yarnpkg.com/@sourcegraph/prettierrc/-/prettierrc-3.0.3.tgz#51bfa9b2588fe35121593fa877143e6373028289"
433459
integrity sha512-FQ1/Ued4I02R0JkrHHofDN163juVxUnPALzfxPZrDZUHv+c3jHjfZhmTHEz+Wd+g3b7MFk0fkj36nZSnvPyU8A==
434460

461+
"@testing-library/dom@^7.28.1":
462+
version "7.29.4"
463+
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-7.29.4.tgz#1647c2b478789621ead7a50614ad81ab5ae5b86c"
464+
integrity sha512-CtrJRiSYEfbtNGtEsd78mk1n1v2TUbeABlNIcOCJdDfkN5/JTOwQEbbQpoSRxGqzcWPgStMvJ4mNolSuBRv1NA==
465+
dependencies:
466+
"@babel/code-frame" "^7.10.4"
467+
"@babel/runtime" "^7.12.5"
468+
"@types/aria-query" "^4.2.0"
469+
aria-query "^4.2.2"
470+
chalk "^4.1.0"
471+
dom-accessibility-api "^0.5.4"
472+
lz-string "^1.4.4"
473+
pretty-format "^26.6.2"
474+
475+
"@types/aria-query@^4.2.0":
476+
version "4.2.1"
477+
resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-4.2.1.tgz#78b5433344e2f92e8b306c06a5622c50c245bf6b"
478+
integrity sha512-S6oPal772qJZHoRZLFc/XoZW2gFvwXusYUmXPXkgxJLuEk2vOt7jc4Yo6z/vtI0EBkbPBVrJJ0B+prLIKiWqHg==
479+
435480
"@types/color-name@^1.1.1":
436481
version "1.1.1"
437482
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
438483
integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
439484

485+
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0":
486+
version "2.0.3"
487+
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762"
488+
integrity sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==
489+
490+
"@types/istanbul-lib-report@*":
491+
version "3.0.0"
492+
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686"
493+
integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==
494+
dependencies:
495+
"@types/istanbul-lib-coverage" "*"
496+
497+
"@types/istanbul-reports@^3.0.0":
498+
version "3.0.0"
499+
resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz#508b13aa344fa4976234e75dddcc34925737d821"
500+
integrity sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==
501+
dependencies:
502+
"@types/istanbul-lib-report" "*"
503+
440504
"@types/json-schema@^7.0.3":
441505
version "7.0.3"
442506
resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636"
@@ -447,6 +511,11 @@
447511
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
448512
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
449513

514+
"@types/node@*":
515+
version "14.14.25"
516+
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.25.tgz#15967a7b577ff81383f9b888aa6705d43fbbae93"
517+
integrity sha512-EPpXLOVqDvisVxtlbvzfyqSsFeQxltFbluZNRndIb8tr9KiBnYNLzrc1N3pyKUCww2RNrfHDViqDWWE1LCJQtQ==
518+
450519
"@types/node@>= 8":
451520
version "13.7.0"
452521
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.0.tgz#b417deda18cf8400f278733499ad5547ed1abec4"
@@ -467,6 +536,18 @@
467536
resolved "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d"
468537
integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==
469538

539+
"@types/yargs-parser@*":
540+
version "20.2.0"
541+
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9"
542+
integrity sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==
543+
544+
"@types/yargs@^15.0.0":
545+
version "15.0.13"
546+
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.13.tgz#34f7fec8b389d7f3c1fd08026a5763e072d3c6dc"
547+
integrity sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ==
548+
dependencies:
549+
"@types/yargs-parser" "*"
550+
470551
"@typescript-eslint/eslint-plugin@^4.9.1":
471552
version "4.9.1"
472553
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.9.1.tgz#66758cbe129b965fe9c63b04b405d0cf5280868b"
@@ -693,6 +774,14 @@ argv-formatter@~1.0.0:
693774
resolved "https://registry.npmjs.org/argv-formatter/-/argv-formatter-1.0.0.tgz#a0ca0cbc29a5b73e836eebe1cbf6c5e0e4eb82f9"
694775
integrity sha1-oMoMvCmltz6Dbuvhy/bF4OTrgvk=
695776

777+
aria-query@^4.2.2:
778+
version "4.2.2"
779+
resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-4.2.2.tgz#0d2ca6c9aceb56b8977e9fed6aed7e15bbd2f83b"
780+
integrity sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==
781+
dependencies:
782+
"@babel/runtime" "^7.10.2"
783+
"@babel/runtime-corejs3" "^7.10.2"
784+
696785
array-find-index@^1.0.1:
697786
version "1.0.2"
698787
resolved "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
@@ -955,7 +1044,7 @@ caseless@~0.12.0:
9551044
resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
9561045
integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
9571046

958-
[email protected], chalk@^4.0.0, chalk@~4.1.0:
1047+
[email protected], chalk@^4.0.0, chalk@^4.1.0, chalk@~4.1.0:
9591048
version "4.1.0"
9601049
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
9611050
integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
@@ -1276,6 +1365,11 @@ copy-concurrently@^1.0.0:
12761365
rimraf "^2.5.4"
12771366
run-queue "^1.0.0"
12781367

1368+
core-js-pure@^3.0.0:
1369+
version "3.8.3"
1370+
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.8.3.tgz#10e9e3b2592ecaede4283e8f3ad7020811587c02"
1371+
integrity sha512-V5qQZVAr9K0xu7jXg1M7qTEwuxUgqr7dUOezGaNa7i+Xn9oXAU/d1fzqD9ObuwpVQOaorO5s70ckyi1woP9lVA==
1372+
12791373
core-js@^3.6.1:
12801374
version "3.6.5"
12811375
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a"
@@ -1503,6 +1597,11 @@ doctrine@^2.1.0:
15031597
dependencies:
15041598
esutils "^2.0.2"
15051599

1600+
dom-accessibility-api@^0.5.4:
1601+
version "0.5.4"
1602+
resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.4.tgz#b06d059cdd4a4ad9a79275f9d414a5c126241166"
1603+
integrity sha512-TvrjBckDy2c6v6RLxPv5QXOnU+SmF9nBII5621Ve5fu6Z/BDrENurBEvlC1f44lKEUVqOpK4w9E5Idc5/EgkLQ==
1604+
15061605
dot-prop@^3.0.0:
15071606
version "3.0.0"
15081607
resolved "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177"
@@ -1754,6 +1853,15 @@ eslint-plugin-import@^2.22.1:
17541853
resolve "^1.17.0"
17551854
tsconfig-paths "^3.9.0"
17561855

1856+
eslint-plugin-jest-dom@^3.6.5:
1857+
version "3.6.5"
1858+
resolved "https://registry.yarnpkg.com/eslint-plugin-jest-dom/-/eslint-plugin-jest-dom-3.6.5.tgz#61459d1db52873d438983d3aa84aaa9804eff222"
1859+
integrity sha512-iaJ5aSQghp9u2ciLAseWIVu7X5tW+WwNJwMBDToK4GBfwGXXQJDLt5IBNtm6fHvC3FRzCGwvyNMIG1g5gF+icQ==
1860+
dependencies:
1861+
"@babel/runtime" "^7.9.6"
1862+
"@testing-library/dom" "^7.28.1"
1863+
requireindex "^1.2.0"
1864+
17571865
eslint-plugin-jsdoc@^30.7.8:
17581866
version "30.7.8"
17591867
resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.7.8.tgz#4a678c25ddb2c5732163f0258bb1d05edf34f61c"
@@ -3249,6 +3357,11 @@ lru-cache@^5.1.1:
32493357
dependencies:
32503358
yallist "^3.0.2"
32513359

3360+
lz-string@^1.4.4:
3361+
version "1.4.4"
3362+
resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26"
3363+
integrity sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=
3364+
32523365
macos-release@^2.2.0:
32533366
version "2.3.0"
32543367
resolved "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f"
@@ -4265,6 +4378,16 @@ prettier@^2.2.1:
42654378
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
42664379
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
42674380

4381+
pretty-format@^26.6.2:
4382+
version "26.6.2"
4383+
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93"
4384+
integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==
4385+
dependencies:
4386+
"@jest/types" "^26.6.2"
4387+
ansi-regex "^5.0.0"
4388+
ansi-styles "^4.0.0"
4389+
react-is "^17.0.1"
4390+
42684391
process-nextick-args@~2.0.0:
42694392
version "2.0.1"
42704393
resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
@@ -4418,6 +4541,11 @@ react-is@^16.8.1:
44184541
resolved "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16"
44194542
integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==
44204543

4544+
react-is@^17.0.1:
4545+
version "17.0.1"
4546+
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339"
4547+
integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==
4548+
44214549
read-cmd-shim@^1.0.1, read-cmd-shim@^1.0.5:
44224550
version "1.0.5"
44234551
resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz#87e43eba50098ba5a32d0ceb583ab8e43b961c16"
@@ -4669,7 +4797,7 @@ require-main-filename@^2.0.0:
46694797
resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
46704798
integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==
46714799

4672-
requireindex@~1.2.0:
4800+
requireindex@^1.2.0, requireindex@~1.2.0:
46734801
version "1.2.0"
46744802
resolved "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef"
46754803
integrity sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==

0 commit comments

Comments
 (0)