Skip to content

Commit 59d8a78

Browse files
authored
add eslint rule (#1509)
1 parent 6e27fdd commit 59d8a78

File tree

3 files changed

+59
-5
lines changed

3 files changed

+59
-5
lines changed

.eslintrc.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
{
22
"parser": "@typescript-eslint/parser",
3-
"extends": ["eslint:recommended", "standard", "prettier", "plugin:@typescript-eslint/recommended"],
4-
"plugins": ["@typescript-eslint", "unicorn"],
3+
"extends": [
4+
"eslint:recommended",
5+
"standard",
6+
"prettier",
7+
"plugin:@typescript-eslint/recommended",
8+
"plugin:package-json/recommended"
9+
],
10+
"plugins": ["@typescript-eslint", "unicorn", "package-json"],
511
"rules": {
612
"unicorn/filename-case": "error",
713
"no-lonely-if": "error",

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
"@babel/plugin-proposal-decorators": "7.17.2",
4747
"@babel/preset-env": "7.16.11",
4848
"@babel/preset-typescript": "7.16.7",
49-
"@changesets/cli": "2.24.2",
5049
"@changesets/changelog-github": "0.4.6",
50+
"@changesets/cli": "2.24.2",
5151
"@graphql-tools/schema": "8.5.0",
5252
"@theguild/prettier-config": "0.0.2",
5353
"@types/benchmark": "2.1.1",
@@ -65,6 +65,7 @@
6565
"eslint-config-standard": "17.0.0",
6666
"eslint-plugin-import": "2.26.0",
6767
"eslint-plugin-n": "15.2.1",
68+
"eslint-plugin-package-json": "^0.1.4",
6869
"eslint-plugin-promise": "6.0.0",
6970
"eslint-plugin-unicorn": "43.0.0",
7071
"faker": "5.5.3",

yarn.lock

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4459,7 +4459,7 @@ ansi-styles@^3.2.1:
44594459
dependencies:
44604460
color-convert "^1.9.0"
44614461

4462-
ansi-styles@^4.0.0, ansi-styles@^4.1.0:
4462+
ansi-styles@^4.0.0, ansi-styles@^4.1.0, ansi-styles@^4.2.1:
44634463
version "4.3.0"
44644464
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
44654465
integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
@@ -6714,7 +6714,7 @@ diff-sequences@^27.5.1:
67146714
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327"
67156715
integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==
67166716

6717-
diff@^4.0.1:
6717+
diff@^4.0.1, diff@^4.0.2:
67186718
version "4.0.2"
67196719
resolved "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
67206720
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
@@ -6731,6 +6731,14 @@ dir-glob@^3.0.1:
67316731
dependencies:
67326732
path-type "^4.0.0"
67336733

6734+
disparity@^3.0.0:
6735+
version "3.2.0"
6736+
resolved "https://registry.yarnpkg.com/disparity/-/disparity-3.2.0.tgz#7198eaf7a873a130f8098c93061c1df8934500f2"
6737+
integrity sha512-8cl9ouncFYE7OQsYwJNiy2e15S0xN80X1Jj/N/YkoiM+VGWSyg1YzPToecKyYx2DQiJapt5IC8yi43GW23TUHQ==
6738+
dependencies:
6739+
ansi-styles "^4.2.1"
6740+
diff "^4.0.2"
6741+
67346742
dlv@^1.1.3:
67356743
version "1.1.3"
67366744
resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79"
@@ -7249,6 +7257,15 @@ eslint-plugin-n@15.2.1:
72497257
resolve "^1.10.1"
72507258
semver "^7.3.7"
72517259

7260+
eslint-plugin-package-json@^0.1.4:
7261+
version "0.1.4"
7262+
resolved "https://registry.yarnpkg.com/eslint-plugin-package-json/-/eslint-plugin-package-json-0.1.4.tgz#88ad9ec30f28795c51e9001d4d8294c78889ad7a"
7263+
integrity sha512-qdb9LUBFR3tM9OZM1AaYCkxoZnRx7PX2xqvLm49D0JbUu+EkbDur9ug+tCS2xlA1Lbt12Wff5qES81ttc/VBdg==
7264+
dependencies:
7265+
disparity "^3.0.0"
7266+
package-json-validator "^0.6.3"
7267+
requireindex "^1.2.0"
7268+
72527269
eslint-plugin-promise@6.0.0:
72537270
version "6.0.0"
72547271
resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz#017652c07c9816413a41e11c30adc42c3d55ff18"
@@ -11476,6 +11493,11 @@ minimist@^1.2.0, minimist@^1.2.5:
1147611493
resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
1147711494
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
1147811495

11496+
minimist@~0.0.1:
11497+
version "0.0.10"
11498+
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
11499+
integrity sha512-iotkTvxc+TwOm5Ieim8VnSNvCDjCK9S8G3scJ50ZthspSxa7jx50jkhYduuAtAjvfDUwSgOwf8+If99AlOEhyw==
11500+
1147911501
minipass-collect@^1.0.2:
1148011502
version "1.0.2"
1148111503
resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617"
@@ -12051,6 +12073,14 @@ open@^8.2.0:
1205112073
is-docker "^2.1.1"
1205212074
is-wsl "^2.2.0"
1205312075

12076+
optimist@~0.6.0:
12077+
version "0.6.1"
12078+
resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
12079+
integrity sha512-snN4O4TkigujZphWLN0E//nQmm7790RYaE53DdL7ZYwee2D8DDo9/EyYiKUfN3rneWUjhJnueija3G9I2i0h3g==
12080+
dependencies:
12081+
minimist "~0.0.1"
12082+
wordwrap "~0.0.2"
12083+
1205412084
optionator@^0.8.1:
1205512085
version "0.8.3"
1205612086
resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
@@ -12178,6 +12208,13 @@ p-try@^2.0.0:
1217812208
resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
1217912209
integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
1218012210

12211+
package-json-validator@^0.6.3:
12212+
version "0.6.3"
12213+
resolved "https://registry.yarnpkg.com/package-json-validator/-/package-json-validator-0.6.3.tgz#aa01a888688b81facf4f83cd7e57e8b6ad1017a1"
12214+
integrity sha512-juKiFboV4UKUvWQ+OSxstnyukhuluyuEoFmgZw1Rx21XzmwlgDWLcbl3qzjA3789IRORYhVFs7cmAO0YFGwHCg==
12215+
dependencies:
12216+
optimist "~0.6.0"
12217+
1218112218
param-case@^3.0.4:
1218212219
version "3.0.4"
1218312220
resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5"
@@ -13266,6 +13303,11 @@ require-main-filename@^2.0.0:
1326613303
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
1326713304
integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==
1326813305

13306+
requireindex@^1.2.0:
13307+
version "1.2.0"
13308+
resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef"
13309+
integrity sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==
13310+
1326913311
resize-observer-polyfill@^1.5.1:
1327013312
version "1.5.1"
1327113313
resolved "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464"
@@ -15615,6 +15657,11 @@ word-wrap@^1.2.3, word-wrap@~1.2.3:
1561515657
resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
1561615658
integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
1561715659

15660+
wordwrap@~0.0.2:
15661+
version "0.0.3"
15662+
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
15663+
integrity sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==
15664+
1561815665
worktop@0.7.0:
1561915666
version "0.7.0"
1562015667
resolved "https://registry.npmjs.org/worktop/-/worktop-0.7.0.tgz#d88fd3dcc894715f656d3b80d24433652f455a55"

0 commit comments

Comments
 (0)