From 4aa46d796ad74958f5569d3346b60a1f92c33892 Mon Sep 17 00:00:00 2001 From: Jesse Oberstein <7157500+joberstein@users.noreply.github.com> Date: Tue, 8 Aug 2023 01:20:50 -0400 Subject: [PATCH 1/8] feat(load): use cosmiconfig-typescript-loader v5 to remove ts-node dependency for @commitlint/load (#3633) --- @commitlint/load/package.json | 11 ++- yarn.lock | 128 ++++++---------------------------- 2 files changed, 27 insertions(+), 112 deletions(-) diff --git a/@commitlint/load/package.json b/@commitlint/load/package.json index a209abed749..d4220b7cdb9 100644 --- a/@commitlint/load/package.json +++ b/@commitlint/load/package.json @@ -36,28 +36,25 @@ "license": "MIT", "devDependencies": { "@commitlint/test": "^17.4.2", - "@commitlint/utils": "^17.4.0", "@types/lodash.isplainobject": "^4.0.7", "@types/lodash.merge": "^4.6.7", "@types/lodash.uniq": "^4.5.7", + "@types/node": "^20.4.8", "conventional-changelog-atom": "^3.0.0", - "execa": "^5.0.0" + "typescript": "^5.1.6" }, "dependencies": { "@commitlint/config-validator": "^17.6.7", "@commitlint/execute-rule": "^17.4.0", "@commitlint/resolve-extends": "^17.6.7", "@commitlint/types": "^17.4.4", - "@types/node": "20.4.7", "chalk": "^4.1.0", "cosmiconfig": "^8.0.0", - "cosmiconfig-typescript-loader": "^4.0.0", + "cosmiconfig-typescript-loader": "^5.0.0", "lodash.isplainobject": "^4.0.6", "lodash.merge": "^4.6.2", "lodash.uniq": "^4.5.0", - "resolve-from": "^5.0.0", - "ts-node": "^10.8.1", - "typescript": "^4.6.4 || ^5.0.0" + "resolve-from": "^5.0.0" }, "gitHead": "70f7f4688b51774e7ac5e40e896cdaa3f132b2bc" } diff --git a/yarn.lock b/yarn.lock index f98d08b21fd..727e69c84a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -316,13 +316,6 @@ resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@cspotcode/source-map-support@^0.8.0": - version "0.8.1" - resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" - integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== - dependencies: - "@jridgewell/trace-mapping" "0.3.9" - "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -660,7 +653,7 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/resolve-uri@3.1.0", "@jridgewell/resolve-uri@^3.0.3": +"@jridgewell/resolve-uri@3.1.0": version "3.1.0" resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== @@ -680,14 +673,6 @@ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.9": version "0.3.18" resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" @@ -1858,26 +1843,6 @@ resolved "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== -"@tsconfig/node10@^1.0.7": - version "1.0.9" - resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" - integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== - -"@tsconfig/node12@^1.0.7": - version "1.0.11" - resolved "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" - integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== - -"@tsconfig/node14@^1.0.0": - version "1.0.3" - resolved "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" - integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== - -"@tsconfig/node16@^1.0.2": - version "1.0.3" - resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" - integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== - "@types/babel__core@^7.1.14": version "7.20.0" resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.0.tgz#61bc5a4cae505ce98e1e36c5445e4bee060d8891" @@ -2083,16 +2048,16 @@ resolved "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz#e8a83f1aa8b649377bb1fb5d7bac5cb90e784dfe" integrity sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg== -"@types/node@20.4.7": - version "20.4.7" - resolved "https://registry.npmjs.org/@types/node/-/node-20.4.7.tgz#74d323a93f1391a63477b27b9aec56669c98b2ab" - integrity sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g== - "@types/node@^14.0.0": version "14.18.51" resolved "https://registry.npmjs.org/@types/node/-/node-14.18.51.tgz#cb90935b89c641201c3d07a595c3e22d1cfaa417" integrity sha512-P9bsdGFPpVtofEKlhWMVS2qqx1A/rt9QBfihWlklfHHpUpjtYse5AzFz6j4DWrARLYh6gRnw9+5+DJcrq3KvBA== +"@types/node@^20.4.8": + version "20.4.8" + resolved "https://registry.npmjs.org/@types/node/-/node-20.4.8.tgz#b5dda19adaa473a9bf0ab5cbd8f30ec7d43f5c85" + integrity sha512-0mHckf6D2DiIAzh8fM8f3HQCvMKDpK94YQ0DSVkfWTG9BZleYIWudw9cJxX8oCk9bM+vAkDyujDV6dmKHbvQpg== + "@types/normalize-package-data@^2.4.0", "@types/normalize-package-data@^2.4.1": version "2.4.1" resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" @@ -2266,16 +2231,6 @@ acorn-jsx@^5.3.2: resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@^8.1.1: - version "8.2.0" - resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - -acorn@^8.4.1: - version "8.7.1" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" - integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== - acorn@^8.9.0: version "8.10.0" resolved "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" @@ -2436,11 +2391,6 @@ are-we-there-yet@^3.0.0: delegates "^1.0.0" readable-stream "^3.6.0" -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== - argparse@^1.0.7: version "1.0.10" resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -3344,10 +3294,12 @@ core-util-is@~1.0.0: resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cosmiconfig-typescript-loader@^4.0.0: - version "4.3.0" - resolved "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.3.0.tgz#c4259ce474c9df0f32274ed162c0447c951ef073" - integrity sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q== +cosmiconfig-typescript-loader@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-5.0.0.tgz#0d3becfe022a871f7275ceb2397d692e06045dc8" + integrity sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA== + dependencies: + jiti "^1.19.1" cosmiconfig@^7.0.0: version "7.1.0" @@ -3380,11 +3332,6 @@ cp-file@^7.0.0: nested-error-stacks "^2.0.0" p-event "^4.1.0" -create-require@^1.1.0: - version "1.1.1" - resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== - cross-env@^7.0.3: version "7.0.3" resolved "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" @@ -3592,11 +3539,6 @@ diff-sequences@^29.4.3: resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz#9314bc1fabe09267ffeca9cbafc457d8499a13f2" integrity sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA== -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -5874,6 +5816,11 @@ jest@^29.6.2: import-local "^3.0.2" jest-cli "^29.6.2" +jiti@^1.19.1: + version "1.19.1" + resolved "https://registry.npmjs.org/jiti/-/jiti-1.19.1.tgz#fa99e4b76a23053e0e7cde098efe1704a14c16f1" + integrity sha512-oVhqoRDaBXf7sjkll95LHVS6Myyyb1zaunVwk4Z0+WPSW4gjS0pl01zYKHScTuyEhQsFxV5L4DR5r+YqSyqyyg== + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -6325,11 +6272,6 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" -make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - make-fetch-happen@^10.0.3, make-fetch-happen@^10.0.6: version "10.2.1" resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz#f5e3835c5e9817b617f2770870d9492d28678164" @@ -8524,25 +8466,6 @@ trim-newlines@^3.0.0: resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== -ts-node@^10.8.1: - version "10.9.1" - resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== - dependencies: - "@cspotcode/source-map-support" "^0.8.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - v8-compile-cache-lib "^3.0.1" - yn "3.1.1" - tsconfig-paths@^3.14.2: version "3.14.2" resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" @@ -8697,11 +8620,16 @@ typedarray@^0.0.6: resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78" integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== -"typescript@^4.6.4 || ^5.0.0", typescript@^5.0.2: +typescript@^5.0.2: version "5.0.2" resolved "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz#891e1a90c5189d8506af64b9ef929fca99ba1ee5" integrity sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw== +typescript@^5.1.6: + version "5.1.6" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" + integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== + uglify-js@^3.1.4: version "3.17.4" resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" @@ -8819,11 +8747,6 @@ uuid@^8.3.2: resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -v8-compile-cache-lib@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" - integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== - v8-compile-cache@2.3.0: version "2.3.0" resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" @@ -9193,11 +9116,6 @@ yargs@^17.0.0, yargs@^17.3.1, yargs@^17.6.2: y18n "^5.0.5" yargs-parser "^21.1.1" -yn@3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" From 550f63fa4e9c6ab14fbc221a276dd822049d232e Mon Sep 17 00:00:00 2001 From: escapedcat Date: Tue, 8 Aug 2023 13:25:05 +0800 Subject: [PATCH 2/8] chore: deps --- package.json | 10 ++-- yarn.lock | 154 ++++++++++++++++++++++++++++++++------------------- 2 files changed, 102 insertions(+), 62 deletions(-) diff --git a/package.json b/package.json index 4553e0c56d1..f8f85866c12 100644 --- a/package.json +++ b/package.json @@ -85,15 +85,15 @@ "devDependencies": { "@lerna/project": "^6.0.0", "@swc/core": "^1.3.74", - "@swc/jest": "^0.2.27", + "@swc/jest": "^0.2.28", "@types/jest": "^29.5.3", "@types/node": "^14.0.0", - "@typescript-eslint/eslint-plugin": "^5.0.0", - "@typescript-eslint/parser": "^5.0.0", + "@typescript-eslint/eslint-plugin": "^6.3.0", + "@typescript-eslint/parser": "^6.3.0", "cross-env": "^7.0.3", "docsify-cli": "^4.4.3", "eslint": "^8.46.0", - "eslint-config-prettier": "^8.10.0", + "eslint-config-prettier": "^9.0.0", "eslint-plugin-import": "^2.28.0", "eslint-plugin-jest": "^27.2.3", "husky": "^8.0.0", @@ -101,6 +101,6 @@ "lerna": "^6.0.0", "lint-staged": "13.2.3", "prettier": "^3.0.1", - "typescript": "^5.0.2" + "typescript": "^5.1.6" } } diff --git a/yarn.lock b/yarn.lock index 727e69c84a1..39d01eac150 100644 --- a/yarn.lock +++ b/yarn.lock @@ -316,19 +316,14 @@ resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@eslint-community/eslint-utils@^4.2.0": +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.4.0": - version "4.5.1" - resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz#cdd35dce4fa1a89a4fd42b1599eb35b3af408884" - integrity sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ== - -"@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": version "4.6.2" resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz#1816b5f6948029c5eaacb0703b850ee0cb37d8f8" integrity sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw== @@ -1823,10 +1818,10 @@ "@swc/core-win32-ia32-msvc" "1.3.74" "@swc/core-win32-x64-msvc" "1.3.74" -"@swc/jest@^0.2.27": - version "0.2.27" - resolved "https://registry.npmjs.org/@swc/jest/-/jest-0.2.27.tgz#f6cbd0b6f95cf689c3344c63fc379fa680cdbf52" - integrity sha512-Xt8EJ6Wy0NYVL8KDPcDMsuUSzyV2UAByamyy28x2iDZCJw2eVz3acedCGBYxxlPR/DNr6QbA35OSymuXhC9QVA== +"@swc/jest@^0.2.28": + version "0.2.28" + resolved "https://registry.npmjs.org/@swc/jest/-/jest-0.2.28.tgz#cf21200a6058ab0dd2555b3ee1164d149bd8534b" + integrity sha512-iCB3lvngkQldLga35krb8LPa+6gmkVXnlpfCTXOAgMaEYFagLxOIFbIO8II7dhHa8ApOv5ap8iFRETI4lVY0vw== dependencies: "@jest/create-cache-key-function" "^27.4.2" jsonc-parser "^3.2.0" @@ -1941,7 +1936,7 @@ expect "^29.0.0" pretty-format "^29.0.0" -"@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.12", "@types/json-schema@^7.0.9": version "7.0.12" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== @@ -2068,7 +2063,7 @@ resolved "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== -"@types/semver@7.5.0", "@types/semver@^7.3.12": +"@types/semver@7.5.0", "@types/semver@^7.3.12", "@types/semver@^7.5.0": version "7.5.0" resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== @@ -2109,30 +2104,33 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^5.0.0": - version "5.60.0" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.0.tgz#2f4bea6a3718bed2ba52905358d0f45cd3620d31" - integrity sha512-78B+anHLF1TI8Jn/cD0Q00TBYdMgjdOn980JfAVa9yw5sop8nyTfVOQAv6LWywkOGLclDBtv5z3oxN4w7jxyNg== - dependencies: - "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.60.0" - "@typescript-eslint/type-utils" "5.60.0" - "@typescript-eslint/utils" "5.60.0" +"@typescript-eslint/eslint-plugin@^6.3.0": + version "6.3.0" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.3.0.tgz#e751e148aab7ccaf8a7bfd370f7ce9e6bdd1f3f4" + integrity sha512-IZYjYZ0ifGSLZbwMqIip/nOamFiWJ9AH+T/GYNZBWkVcyNQOFGtSMoWV7RvY4poYCMZ/4lHzNl796WOSNxmk8A== + dependencies: + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "6.3.0" + "@typescript-eslint/type-utils" "6.3.0" + "@typescript-eslint/utils" "6.3.0" + "@typescript-eslint/visitor-keys" "6.3.0" debug "^4.3.4" - grapheme-splitter "^1.0.4" - ignore "^5.2.0" + graphemer "^1.4.0" + ignore "^5.2.4" + natural-compare "^1.4.0" natural-compare-lite "^1.4.0" - semver "^7.3.7" - tsutils "^3.21.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" -"@typescript-eslint/parser@^5.0.0": - version "5.60.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.0.tgz#08f4daf5fc6548784513524f4f2f359cebb4068a" - integrity sha512-jBONcBsDJ9UoTWrARkRRCgDz6wUggmH5RpQVlt7BimSwaTkTjwypGzKORXbR4/2Hqjk9hgwlon2rVQAjWNpkyQ== +"@typescript-eslint/parser@^6.3.0": + version "6.3.0" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.3.0.tgz#359684c443f4f848db3c4f14674f544f169c8f46" + integrity sha512-ibP+y2Gr6p0qsUkhs7InMdXrwldjxZw66wpcQq9/PzAroM45wdwyu81T+7RibNCh8oc0AgrsyCwJByncY0Ongg== dependencies: - "@typescript-eslint/scope-manager" "5.60.0" - "@typescript-eslint/types" "5.60.0" - "@typescript-eslint/typescript-estree" "5.60.0" + "@typescript-eslint/scope-manager" "6.3.0" + "@typescript-eslint/types" "6.3.0" + "@typescript-eslint/typescript-estree" "6.3.0" + "@typescript-eslint/visitor-keys" "6.3.0" debug "^4.3.4" "@typescript-eslint/scope-manager@5.60.0": @@ -2143,21 +2141,34 @@ "@typescript-eslint/types" "5.60.0" "@typescript-eslint/visitor-keys" "5.60.0" -"@typescript-eslint/type-utils@5.60.0": - version "5.60.0" - resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.0.tgz#69b09087eb12d7513d5b07747e7d47f5533aa228" - integrity sha512-X7NsRQddORMYRFH7FWo6sA9Y/zbJ8s1x1RIAtnlj6YprbToTiQnM6vxcMu7iYhdunmoC0rUWlca13D5DVHkK2g== +"@typescript-eslint/scope-manager@6.3.0": + version "6.3.0" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.3.0.tgz#6b74e338c4b88d5e1dfc1a28c570dd5cf8c86b09" + integrity sha512-WlNFgBEuGu74ahrXzgefiz/QlVb+qg8KDTpknKwR7hMH+lQygWyx0CQFoUmMn1zDkQjTBBIn75IxtWss77iBIQ== dependencies: - "@typescript-eslint/typescript-estree" "5.60.0" - "@typescript-eslint/utils" "5.60.0" + "@typescript-eslint/types" "6.3.0" + "@typescript-eslint/visitor-keys" "6.3.0" + +"@typescript-eslint/type-utils@6.3.0": + version "6.3.0" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.3.0.tgz#3bf89ccd36621ddec1b7f8246afe467c67adc247" + integrity sha512-7Oj+1ox1T2Yc8PKpBvOKWhoI/4rWFd1j7FA/rPE0lbBPXTKjdbtC+7Ev0SeBjEKkIhKWVeZSP+mR7y1Db1CdfQ== + dependencies: + "@typescript-eslint/typescript-estree" "6.3.0" + "@typescript-eslint/utils" "6.3.0" debug "^4.3.4" - tsutils "^3.21.0" + ts-api-utils "^1.0.1" "@typescript-eslint/types@5.60.0": version "5.60.0" resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.0.tgz#3179962b28b4790de70e2344465ec97582ce2558" integrity sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA== +"@typescript-eslint/types@6.3.0": + version "6.3.0" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.3.0.tgz#84517f1427923e714b8418981e493b6635ab4c9d" + integrity sha512-K6TZOvfVyc7MO9j60MkRNWyFSf86IbOatTKGrpTQnzarDZPYPVy0oe3myTMq7VjhfsUAbNUW8I5s+2lZvtx1gg== + "@typescript-eslint/typescript-estree@5.60.0": version "5.60.0" resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.0.tgz#4ddf1a81d32a850de66642d9b3ad1e3254fb1600" @@ -2171,7 +2182,33 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.60.0", "@typescript-eslint/utils@^5.10.0": +"@typescript-eslint/typescript-estree@6.3.0": + version "6.3.0" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.3.0.tgz#20e1e10e2f51cdb9e19a2751215cac92c003643c" + integrity sha512-Xh4NVDaC4eYKY4O3QGPuQNp5NxBAlEvNQYOqJquR2MePNxO11E5K3t5x4M4Mx53IZvtpW+mBxIT0s274fLUocg== + dependencies: + "@typescript-eslint/types" "6.3.0" + "@typescript-eslint/visitor-keys" "6.3.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/utils@6.3.0": + version "6.3.0" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.3.0.tgz#0898c5e374372c2092ca1b979ea7ee9cc020ce84" + integrity sha512-hLLg3BZE07XHnpzglNBG8P/IXq/ZVXraEbgY7FM0Cnc1ehM8RMdn9mat3LubJ3KBeYXXPxV1nugWbQPjGeJk6Q== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.3.0" + "@typescript-eslint/types" "6.3.0" + "@typescript-eslint/typescript-estree" "6.3.0" + semver "^7.5.4" + +"@typescript-eslint/utils@^5.10.0": version "5.60.0" resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.0.tgz#4667c5aece82f9d4f24a667602f0f300864b554c" integrity sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ== @@ -2193,6 +2230,14 @@ "@typescript-eslint/types" "5.60.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@6.3.0": + version "6.3.0" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.3.0.tgz#8d09aa3e389ae0971426124c155ac289afbe450a" + integrity sha512-kEhRRj7HnvaSjux1J9+7dBen15CdWmDnwrpyiHsFX6Qx2iW5LOBUgNefOFeh2PjWPlNwN8TOn6+4eBU3J/gupw== + dependencies: + "@typescript-eslint/types" "6.3.0" + eslint-visitor-keys "^3.4.1" + "@yarnpkg/lockfile@^1.1.0": version "1.1.0" resolved "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" @@ -3861,10 +3906,10 @@ escape-string-regexp@^4.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-prettier@^8.10.0: - version "8.10.0" - resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" - integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== +eslint-config-prettier@^9.0.0: + version "9.0.0" + resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz#eb25485946dd0c66cd216a46232dc05451518d1f" + integrity sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw== eslint-import-resolver-node@^0.3.7: version "0.3.7" @@ -4683,11 +4728,6 @@ graceful-fs@^4.2.9: resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -grapheme-splitter@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== - graphemer@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" @@ -4892,7 +4932,7 @@ ignore-walk@^5.0.1: dependencies: minimatch "^5.0.1" -ignore@^5.0.4, ignore@^5.2.0: +ignore@^5.0.4, ignore@^5.2.0, ignore@^5.2.4: version "5.2.4" resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== @@ -7863,7 +7903,7 @@ semver@7.3.4: dependencies: lru-cache "^6.0.0" -semver@7.5.4, semver@^7.5.3: +semver@7.5.4, semver@^7.5.3, semver@^7.5.4: version "7.5.4" resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -8466,6 +8506,11 @@ trim-newlines@^3.0.0: resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== +ts-api-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.1.tgz#8144e811d44c749cd65b2da305a032510774452d" + integrity sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A== + tsconfig-paths@^3.14.2: version "3.14.2" resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" @@ -8620,11 +8665,6 @@ typedarray@^0.0.6: resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78" integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg== -typescript@^5.0.2: - version "5.0.2" - resolved "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz#891e1a90c5189d8506af64b9ef929fca99ba1ee5" - integrity sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw== - typescript@^5.1.6: version "5.1.6" resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" From f279ff787bd908372813a04b756629467506f51e Mon Sep 17 00:00:00 2001 From: escapedcat Date: Tue, 8 Aug 2023 13:45:03 +0800 Subject: [PATCH 3/8] revert: eslint-config-prettier to v8 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f8f85866c12..d77d72d84d5 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "cross-env": "^7.0.3", "docsify-cli": "^4.4.3", "eslint": "^8.46.0", - "eslint-config-prettier": "^9.0.0", + "eslint-config-prettier": "^8.10.0", "eslint-plugin-import": "^2.28.0", "eslint-plugin-jest": "^27.2.3", "husky": "^8.0.0", diff --git a/yarn.lock b/yarn.lock index 39d01eac150..dc10ff428a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3906,10 +3906,10 @@ escape-string-regexp@^4.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-prettier@^9.0.0: - version "9.0.0" - resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz#eb25485946dd0c66cd216a46232dc05451518d1f" - integrity sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw== +eslint-config-prettier@^8.10.0: + version "8.10.0" + resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" + integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== eslint-import-resolver-node@^0.3.7: version "0.3.7" From 77f9e11f15e74818330c4e9b1a90feca22be4c92 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Tue, 8 Aug 2023 12:01:00 +0100 Subject: [PATCH 4/8] docs: fix bold formatting in "level" fields (#3635) --- @commitlint/config-conventional/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/@commitlint/config-conventional/README.md b/@commitlint/config-conventional/README.md index 0ee15a977c9..966679eff0f 100644 --- a/@commitlint/config-conventional/README.md +++ b/@commitlint/config-conventional/README.md @@ -136,7 +136,7 @@ echo "fix: some message" # passes - **condition**: `footer` should have a leading blank line - **rule**: `always` -- level: `warning` +- **level**: `warning` ```sh echo "fix: some message @@ -151,7 +151,7 @@ BREAKING CHANGE: It will be significant" # passes - **condition**: `footer` each line has `value` or less characters - **rule**: `always` -- level: `error` +- **level**: `error` - **value** ``` @@ -174,7 +174,7 @@ but still no line is too long" # passes - **condition**: `body` should have a leading blank line - **rule**: `always` -- level: `warning` +- **level**: `warning` ```sh echo "fix: some message @@ -189,7 +189,7 @@ body" # passes - **condition**: `body` each line has `value` or less characters - **rule**: `always` -- level: `error` +- **level**: `error` - **value** ``` From cd854cb73d93396c166bdfef442bc92b1833cc72 Mon Sep 17 00:00:00 2001 From: escapedcat Date: Wed, 9 Aug 2023 15:03:09 +0800 Subject: [PATCH 5/8] revert: prettier to v2 to not break lerna v6 publish --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d77d72d84d5..907ec7b7518 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "jest": "^29.6.2", "lerna": "^6.0.0", "lint-staged": "13.2.3", - "prettier": "^3.0.1", + "prettier": "^2.8.8", "typescript": "^5.1.6" } } diff --git a/yarn.lock b/yarn.lock index dc10ff428a1..dd3c8d7a2d1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7367,10 +7367,10 @@ prepend-http@^2.0.0: resolved "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -prettier@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/prettier/-/prettier-3.0.1.tgz#65271fc9320ce4913c57747a70ce635b30beaa40" - integrity sha512-fcOWSnnpCrovBsmFZIGIy9UqK2FaI7Hqax+DIO0A9UxeVoY4iweyaFjS5TavZN97Hfehph0nhsZnjlVKzEQSrQ== +prettier@^2.8.8: + version "2.8.8" + resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== pretty-format@^29.0.0, pretty-format@^29.5.0: version "29.5.0" From ae55dd949d82bdce88ffb14f6043b49198120c37 Mon Sep 17 00:00:00 2001 From: escapedcat Date: Wed, 9 Aug 2023 15:06:24 +0800 Subject: [PATCH 6/8] chore: deps --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 907ec7b7518..2adaf110bdb 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "cross-env": "^7.0.3", "docsify-cli": "^4.4.3", "eslint": "^8.46.0", - "eslint-config-prettier": "^8.10.0", + "eslint-config-prettier": "^9.0.0", "eslint-plugin-import": "^2.28.0", "eslint-plugin-jest": "^27.2.3", "husky": "^8.0.0", diff --git a/yarn.lock b/yarn.lock index dd3c8d7a2d1..7e68486830d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3906,10 +3906,10 @@ escape-string-regexp@^4.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-prettier@^8.10.0: - version "8.10.0" - resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" - integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== +eslint-config-prettier@^9.0.0: + version "9.0.0" + resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz#eb25485946dd0c66cd216a46232dc05451518d1f" + integrity sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw== eslint-import-resolver-node@^0.3.7: version "0.3.7" From 173d41681fa755c97ae090beeea258683b94d514 Mon Sep 17 00:00:00 2001 From: escapedcat Date: Wed, 9 Aug 2023 15:29:38 +0800 Subject: [PATCH 7/8] chore: prettier v2 changes --- @commitlint/cli/src/cli.test.ts | 52 +++++++++---------- @commitlint/cli/src/cli.ts | 18 +++---- .../config-validator/src/formatErrors.ts | 4 +- .../config-validator/src/validate.test.ts | 2 +- @commitlint/config-validator/src/validate.ts | 6 +-- @commitlint/cz-commitlint/src/Process.test.ts | 8 +-- @commitlint/cz-commitlint/src/Process.ts | 2 +- .../cz-commitlint/src/Question.test.ts | 24 ++++----- @commitlint/cz-commitlint/src/Question.ts | 8 +-- @commitlint/cz-commitlint/src/SectionBody.ts | 2 +- .../cz-commitlint/src/SectionFooter.test.ts | 30 +++++------ .../cz-commitlint/src/SectionFooter.ts | 10 ++-- .../cz-commitlint/src/SectionHeader.test.ts | 6 +-- .../cz-commitlint/src/SectionHeader.ts | 6 +-- .../services/getRuleQuestionConfig.test.ts | 6 +-- .../src/services/getRuleQuestionConfig.ts | 2 +- .../cz-commitlint/src/store/prompts.test.ts | 6 +-- .../cz-commitlint/src/store/prompts.ts | 2 +- .../cz-commitlint/src/store/rules.test.ts | 2 +- .../src/utils/leading-blank-fn.ts | 2 +- .../cz-commitlint/src/utils/rules.test.ts | 6 +-- @commitlint/cz-commitlint/src/utils/rules.ts | 10 ++-- @commitlint/ensure/src/case.test.ts | 28 +++++----- @commitlint/ensure/src/case.ts | 2 +- .../ensure/src/max-line-length.test.ts | 4 +- @commitlint/execute-rule/src/index.ts | 2 +- @commitlint/format/src/format.test.ts | 24 ++++----- @commitlint/format/src/format.ts | 8 +-- @commitlint/is-ignored/src/defaults.ts | 2 +- @commitlint/is-ignored/src/is-ignored.test.ts | 28 +++++----- @commitlint/is-ignored/src/is-ignored.ts | 6 +-- @commitlint/lint/src/lint.test.ts | 22 ++++---- @commitlint/lint/src/lint.ts | 42 +++++++-------- @commitlint/load/src/load.test.ts | 28 +++++----- @commitlint/load/src/load.ts | 6 +-- @commitlint/load/src/utils/load-config.ts | 2 +- .../load/src/utils/load-parser-opts.ts | 6 +-- .../load/src/utils/load-plugin.test.ts | 20 +++---- @commitlint/load/src/utils/load-plugin.ts | 6 +-- @commitlint/load/src/utils/plugin-naming.ts | 6 +-- @commitlint/message/src/index.test.ts | 2 +- @commitlint/parse/src/index.ts | 2 +- @commitlint/prompt/src/input.test.ts | 4 +- @commitlint/prompt/src/input.ts | 2 +- .../prompt/src/inquirer/InputCustomPrompt.ts | 6 +-- .../prompt/src/library/get-forced-case-fn.ts | 2 +- .../src/library/get-forced-leading-fn.ts | 2 +- @commitlint/prompt/src/library/get-prompt.ts | 4 +- @commitlint/prompt/src/library/meta.ts | 2 +- @commitlint/prompt/src/library/utils.test.ts | 14 ++--- @commitlint/prompt/src/library/utils.ts | 14 ++--- @commitlint/read/src/get-edit-commit.ts | 2 +- @commitlint/read/src/get-edit-file-path.ts | 2 +- @commitlint/read/src/get-history-commits.ts | 2 +- @commitlint/read/src/read.ts | 2 +- @commitlint/read/src/stream-to-promise.ts | 2 +- @commitlint/resolve-extends/src/index.test.ts | 2 +- @commitlint/resolve-extends/src/index.ts | 12 ++--- @commitlint/rules/src/body-case.ts | 2 +- @commitlint/rules/src/body-full-stop.ts | 2 +- @commitlint/rules/src/body-max-length.ts | 2 +- @commitlint/rules/src/body-max-line-length.ts | 2 +- @commitlint/rules/src/body-min-length.ts | 2 +- .../rules/src/footer-leading-blank.test.ts | 2 +- @commitlint/rules/src/footer-max-length.ts | 2 +- .../rules/src/footer-max-line-length.ts | 2 +- @commitlint/rules/src/footer-min-length.ts | 2 +- @commitlint/rules/src/header-case.test.ts | 2 +- @commitlint/rules/src/header-case.ts | 2 +- @commitlint/rules/src/header-full-stop.ts | 2 +- @commitlint/rules/src/header-max-length.ts | 2 +- @commitlint/rules/src/header-min-length.ts | 2 +- @commitlint/rules/src/index.test.ts | 2 +- @commitlint/rules/src/scope-case.ts | 4 +- @commitlint/rules/src/scope-enum.ts | 2 +- @commitlint/rules/src/scope-max-length.ts | 2 +- @commitlint/rules/src/scope-min-length.ts | 2 +- @commitlint/rules/src/signed-off-by.test.ts | 8 +-- @commitlint/rules/src/signed-off-by.ts | 4 +- @commitlint/rules/src/subject-case.test.ts | 30 +++++------ @commitlint/rules/src/subject-case.ts | 2 +- .../rules/src/subject-full-stop.test.ts | 4 +- @commitlint/rules/src/subject-full-stop.ts | 2 +- @commitlint/rules/src/subject-max-length.ts | 2 +- @commitlint/rules/src/subject-min-length.ts | 2 +- @commitlint/rules/src/trailer-exists.test.ts | 16 +++--- @commitlint/rules/src/trailer-exists.ts | 2 +- @commitlint/rules/src/type-case.ts | 2 +- @commitlint/rules/src/type-enum.ts | 2 +- @commitlint/rules/src/type-max-length.ts | 2 +- @commitlint/rules/src/type-min-length.ts | 2 +- @commitlint/travis-cli/src/cli.test.ts | 16 +++--- @commitlint/travis-cli/src/cli.ts | 4 +- @commitlint/types/src/format.ts | 2 +- @commitlint/types/src/parse.ts | 2 +- @commitlint/types/src/rules.ts | 4 +- @packages/test/src/git.ts | 2 +- @packages/test/src/npm.ts | 8 +-- docs/reference-api.md | 22 ++++---- 99 files changed, 357 insertions(+), 357 deletions(-) diff --git a/@commitlint/cli/src/cli.test.ts b/@commitlint/cli/src/cli.test.ts index 129e25c49d6..55acc263a91 100644 --- a/@commitlint/cli/src/cli.test.ts +++ b/@commitlint/cli/src/cli.test.ts @@ -69,7 +69,7 @@ test('should produce help for problems', async () => { const cwd = await gitBootstrap('fixtures/default'); const actual = await cli([], {cwd})('foo: bar'); expect(actual.stdout).toContain( - 'Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint', + 'Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint' ); expect(actual.exitCode).toBe(1); }); @@ -78,10 +78,10 @@ test('should produce help for problems with correct helpurl', async () => { const cwd = await gitBootstrap('fixtures/default'); const actual = await cli( ['-H https://github.com/conventional-changelog/commitlint/#testhelpurl'], - {cwd}, + {cwd} )('foo: bar'); expect(actual.stdout).toContain( - 'Get help: https://github.com/conventional-changelog/commitlint/#testhelpurl', + 'Get help: https://github.com/conventional-changelog/commitlint/#testhelpurl' ); expect(actual.exitCode).toBe(1); }); @@ -152,7 +152,7 @@ test('should work with husky commitmsg hook and git commit', async () => { const commit = await execa( 'git', ['commit', '-m', '"test: this should work"'], - {cwd}, + {cwd} ); expect(commit).toBeTruthy(); @@ -168,7 +168,7 @@ test('should work with husky commitmsg hook in sub packages', async () => { const commit = await execa( 'git', ['commit', '-m', '"test: this should work"'], - {cwd}, + {cwd} ); expect(commit).toBeTruthy(); }); @@ -177,7 +177,7 @@ test('should work with husky via commitlint -e $GIT_PARAMS', async () => { const cwd = await gitBootstrap('fixtures/husky/integration'); await writePkg( {husky: {hooks: {'commit-msg': `'${bin}' -e $GIT_PARAMS`}}}, - {cwd}, + {cwd} ); // await execa('npm', ['install'], {cwd}); // npm install is failing on windows machines @@ -185,7 +185,7 @@ test('should work with husky via commitlint -e $GIT_PARAMS', async () => { const commit = await execa( 'git', ['commit', '-m', '"test: this should work"'], - {cwd}, + {cwd} ); expect(commit).toBeTruthy(); }); @@ -194,7 +194,7 @@ test('should work with husky via commitlint -e %GIT_PARAMS%', async () => { const cwd = await gitBootstrap('fixtures/husky/integration'); await writePkg( {husky: {hooks: {'commit-msg': `'${bin}' -e %GIT_PARAMS%`}}}, - {cwd}, + {cwd} ); // await execa('npm', ['install'], {cwd}); // npm install is failing on windows machines @@ -202,7 +202,7 @@ test('should work with husky via commitlint -e %GIT_PARAMS%', async () => { const commit = await execa( 'git', ['commit', '-m', '"test: this should work"'], - {cwd}, + {cwd} ); expect(commit).toBeTruthy(); }); @@ -211,7 +211,7 @@ test('should work with husky via commitlint -e $HUSKY_GIT_PARAMS', async () => { const cwd = await gitBootstrap('fixtures/husky/integration'); await writePkg( {husky: {hooks: {'commit-msg': `'${bin}' -e $HUSKY_GIT_PARAMS`}}}, - {cwd}, + {cwd} ); // await execa('npm', ['install'], {cwd}); // npm install is failing on windows machines @@ -219,7 +219,7 @@ test('should work with husky via commitlint -e $HUSKY_GIT_PARAMS', async () => { const commit = await execa( 'git', ['commit', '-m', '"test: this should work"'], - {cwd}, + {cwd} ); expect(commit).toBeTruthy(); }); @@ -228,7 +228,7 @@ test('should work with husky via commitlint -e %HUSKY_GIT_PARAMS%', async () => const cwd = await gitBootstrap('fixtures/husky/integration'); await writePkg( {husky: {hooks: {'commit-msg': `'${bin}' -e %HUSKY_GIT_PARAMS%`}}}, - {cwd}, + {cwd} ); // await execa('npm', ['install'], {cwd}); // npm install is failing on windows machines @@ -236,7 +236,7 @@ test('should work with husky via commitlint -e %HUSKY_GIT_PARAMS%', async () => const commit = await execa( 'git', ['commit', '-m', '"test: this should work"'], - {cwd}, + {cwd} ); expect(commit).toBeTruthy(); }); @@ -255,7 +255,7 @@ test('should allow reading of environment variables for edit file, failing if in const cwd = await gitBootstrap('fixtures/simple'); await fs.writeFile( path.join(cwd, 'commit-msg-file'), - 'foo: bar\n\nFoo bar bizz buzz.\n\nCloses #123.', + 'foo: bar\n\nFoo bar bizz buzz.\n\nCloses #123.' ); const actual = await cli(['--env', 'variable'], { cwd, @@ -267,7 +267,7 @@ test('should allow reading of environment variables for edit file, failing if in test('should pick up parser preset and fail accordingly', async () => { const cwd = await gitBootstrap('fixtures/parser-preset'); const actual = await cli(['--parser-preset', './parser-preset'], {cwd})( - 'type(scope): subject', + 'type(scope): subject' ); expect(actual.exitCode).toBe(1); expect(actual.stdout).toContain('may not be empty'); @@ -276,7 +276,7 @@ test('should pick up parser preset and fail accordingly', async () => { test('should pick up parser preset and succeed accordingly', async () => { const cwd = await gitBootstrap('fixtures/parser-preset'); const actual = await cli(['--parser-preset', './parser-preset'], {cwd})( - '----type(scope): subject', + '----type(scope): subject' ); expect(actual.exitCode).toBe(0); }); @@ -322,7 +322,7 @@ test('should handle --amend with signoff', async () => { await execa( 'git', ['commit', '-m', '"test: this should work"', '--signoff'], - {cwd}, + {cwd} ); const commit = await execa('git', ['commit', '--amend', '--no-edit'], {cwd}); @@ -342,7 +342,7 @@ test("it doesn't use parserOpts.commentChar when using edit mode", async () => { const cwd = await gitBootstrap('fixtures/comment-char'); await fs.writeFile( path.join(cwd, '.git', 'COMMIT_EDITMSG'), - 'header: foo\n\n$body\n', + 'header: foo\n\n$body\n' ); const actual = await cli(['--edit', '.git/COMMIT_EDITMSG'], {cwd})(); @@ -355,7 +355,7 @@ test('it uses core.commentChar git config when using edit mode', async () => { await execa('git', ['config', '--local', 'core.commentChar', '$'], {cwd}); await fs.writeFile( path.join(cwd, '.git', 'COMMIT_EDITMSG'), - 'header: foo\n\n$body\n', + 'header: foo\n\n$body\n' ); const actual = await cli(['--edit', '.git/COMMIT_EDITMSG'], {cwd})(); @@ -367,7 +367,7 @@ test('it falls back to # for core.commentChar when using edit mode', async () => const cwd = await gitBootstrap('fixtures/comment-char'); await fs.writeFile( path.join(cwd, '.git', 'COMMIT_EDITMSG'), - 'header: foo\n\n#body\n', + 'header: foo\n\n#body\n' ); const actual = await cli(['--edit', '.git/COMMIT_EDITMSG'], {cwd})(); @@ -408,7 +408,7 @@ test('should fail for invalid formatters from configuration', async () => { const actual = await cli([], {cwd})('foo: bar'); expect(actual.stderr).toContain( - 'Using format custom-formatter, but cannot find the module', + 'Using format custom-formatter, but cannot find the module' ); expect(actual.stdout).toEqual(''); expect(actual.exitCode).toBe(1); @@ -449,7 +449,7 @@ test('should fail for invalid formatters from flags', async () => { const actual = await cli(['--format', 'through-flag'], {cwd})('foo: bar'); expect(actual.stderr).toContain( - 'Using format through-flag, but cannot find the module', + 'Using format through-flag, but cannot find the module' ); expect(actual.stdout).toEqual(''); expect(actual.exitCode).toBe(1); @@ -458,11 +458,11 @@ test('should fail for invalid formatters from flags', async () => { test('should work with absolute formatter path', async () => { const formatterPath = path.resolve( __dirname, - '../fixtures/custom-formatter/formatters/custom.js', + '../fixtures/custom-formatter/formatters/custom.js' ); const cwd = await gitBootstrap('fixtures/custom-formatter'); const actual = await cli(['--format', formatterPath], {cwd})( - 'test: this should work', + 'test: this should work' ); expect(actual.stdout).toContain('custom-formatter-ok'); @@ -472,10 +472,10 @@ test('should work with absolute formatter path', async () => { test('should work with relative formatter path', async () => { const cwd = path.resolve( await gitBootstrap('fixtures/custom-formatter'), - './formatters', + './formatters' ); const actual = await cli(['--format', './custom.js'], {cwd})( - 'test: this should work', + 'test: this should work' ); expect(actual.stdout).toContain('custom-formatter-ok'); diff --git a/@commitlint/cli/src/cli.ts b/@commitlint/cli/src/cli.ts index 2bcb2da73e0..f4e1c025ae1 100644 --- a/@commitlint/cli/src/cli.ts +++ b/@commitlint/cli/src/cli.ts @@ -120,14 +120,14 @@ const cli = yargs .version( 'version', 'display version information', - `${pkg.name}@${pkg.version}`, + `${pkg.name}@${pkg.version}` ) .alias('v', 'version') .help('help') .alias('h', 'help') .usage(`${pkg.name}@${pkg.version} - ${pkg.description}\n`) .usage( - `[input] reads from stdin if --edit, --env, --from and --to are omitted`, + `[input] reads from stdin if --edit, --env, --from and --to are omitted` ) .strict(); @@ -204,7 +204,7 @@ async function main(args: MainArgs): Promise { if (messages.length === 0 && !checkFromRepository(flags)) { const err = new CliError( '[input] is required: supply via stdin, or --env or --edit or --from and --to', - pkg.name, + pkg.name ); yargs.showHelp('log'); console.log(err.message); @@ -249,7 +249,7 @@ async function main(args: MainArgs): Promise { if (!execaError.failed || execaError.exitCode !== 1) { console.warn( 'Could not determine core.commentChar git configuration', - e, + e ); } opts.parserOpts.commentChar = gitDefaultCommentChar; @@ -257,7 +257,7 @@ async function main(args: MainArgs): Promise { } const results = await Promise.all( - messages.map((message) => lint(message, loaded.rules, opts)), + messages.map((message) => lint(message, loaded.rules, opts)) ); if (Object.keys(loaded.rules).length === 0) { @@ -305,7 +305,7 @@ async function main(args: MainArgs): Promise { errorCount: 0, warningCount: 0, results: [], - }, + } ); const helpUrl = flags['help-url']?.trim() || loaded.helpUrl; @@ -361,7 +361,7 @@ function getEditValue(flags: CliFlags) { if (flags.env) { if (!(flags.env in process.env)) { throw new Error( - `Received '${flags.env}' as value for -E | --env, but environment variable '${flags.env}' is not available globally`, + `Received '${flags.env}' as value for -E | --env, but environment variable '${flags.env}' is not available globally` ); } return process.env[flags.env]; @@ -395,7 +395,7 @@ function getEditValue(flags: CliFlags) { return process.env.HUSKY_GIT_PARAMS; } throw new Error( - `Received ${edit} as value for -e | --edit, but GIT_PARAMS or HUSKY_GIT_PARAMS are not available globally.`, + `Received ${edit} as value for -e | --edit, but GIT_PARAMS or HUSKY_GIT_PARAMS are not available globally.` ); } return edit; @@ -403,7 +403,7 @@ function getEditValue(flags: CliFlags) { function getSeed(flags: CliFlags): UserConfig { const n = (flags.extends || []).filter( - (i): i is string => typeof i === 'string', + (i): i is string => typeof i === 'string' ); return n.length > 0 ? {extends: n, parserPreset: flags['parser-preset']} diff --git a/@commitlint/config-validator/src/formatErrors.ts b/@commitlint/config-validator/src/formatErrors.ts index d9086fd076e..9c9943d11f3 100644 --- a/@commitlint/config-validator/src/formatErrors.ts +++ b/@commitlint/config-validator/src/formatErrors.ts @@ -32,12 +32,12 @@ export function formatErrors(errors: ErrorObject[]): string { : error.instancePath) || 'Config'; if (error.keyword === 'typeof') { return `"${field}" should be a ${error.schema}. Value: ${JSON.stringify( - error.data, + error.data )}`; } return `"${field}" ${error.message}. Value: ${JSON.stringify( - error.data, + error.data )}`; }) .map((message) => `\t- ${message}.\n`) diff --git a/@commitlint/config-validator/src/validate.test.ts b/@commitlint/config-validator/src/validate.test.ts index bfe9fa7ede8..93203951ae1 100644 --- a/@commitlint/config-validator/src/validate.test.ts +++ b/@commitlint/config-validator/src/validate.test.ts @@ -61,7 +61,7 @@ describe('validation should pass for', () => { describe('validation should fail for', () => { test.each(Object.entries(invalidSchemas))('%s', (file, config) => { expect(() => - validateConfig(`${file}.js`, config), + validateConfig(`${file}.js`, config) ).toThrowErrorMatchingSnapshot(); }); }); diff --git a/@commitlint/config-validator/src/validate.ts b/@commitlint/config-validator/src/validate.ts index 714a845e967..256e2ffe2b0 100644 --- a/@commitlint/config-validator/src/validate.ts +++ b/@commitlint/config-validator/src/validate.ts @@ -15,7 +15,7 @@ const TYPE_OF = [ export function validateConfig( source: string, - config: unknown, + config: unknown ): asserts config is UserConfig { const ajv = new Ajv({ meta: false, @@ -40,8 +40,8 @@ export function validateConfig( if (!isValid && validate.errors && validate.errors.length) { throw new Error( `Commitlint configuration in ${source} is invalid:\n${formatErrors( - validate.errors, - )}`, + validate.errors + )}` ); } } diff --git a/@commitlint/cz-commitlint/src/Process.test.ts b/@commitlint/cz-commitlint/src/Process.test.ts index 5d640468b94..323ea4f1899 100644 --- a/@commitlint/cz-commitlint/src/Process.test.ts +++ b/@commitlint/cz-commitlint/src/Process.test.ts @@ -215,9 +215,9 @@ describe('conventional-changlog', () => { return process(rules as any, prompts, InquirerFactory(answers) as any).then( (commitMessage) => { expect(commitMessage).toBe( - 'refactor(prompt): refactor prompt based on inquirer\n\ninspired by commitizen/cz-conventional-changelog\n\nBREAKING CHANGE: refactor types\nhttps://github.com/conventional-changelog/commitlint/issues/94', + 'refactor(prompt): refactor prompt based on inquirer\n\ninspired by commitizen/cz-conventional-changelog\n\nBREAKING CHANGE: refactor types\nhttps://github.com/conventional-changelog/commitlint/issues/94' ); - }, + } ); }); @@ -234,10 +234,10 @@ describe('conventional-changlog', () => { return process(rules as any, prompts, InquirerFactory(answers) as any).then( () => { expect(mockShowValidation).toHaveBeenCalledWith( - 'subject can not be empty', + 'subject can not be empty' ); expect(mockShowTitle).toHaveBeenCalledTimes(3); - }, + } ); }); }); diff --git a/@commitlint/cz-commitlint/src/Process.ts b/@commitlint/cz-commitlint/src/Process.ts index 86b3455df8d..f1ec42d36f1 100644 --- a/@commitlint/cz-commitlint/src/Process.ts +++ b/@commitlint/cz-commitlint/src/Process.ts @@ -18,7 +18,7 @@ import {setRules} from './store/rules'; export default async function ( rules: QualifiedRules, prompts: UserPromptConfig, - inquirer: Inquirer, + inquirer: Inquirer ): Promise { setRules(rules); setPromptConfig(prompts); diff --git a/@commitlint/cz-commitlint/src/Question.test.ts b/@commitlint/cz-commitlint/src/Question.test.ts index 157e9008972..18516eda481 100644 --- a/@commitlint/cz-commitlint/src/Question.test.ts +++ b/@commitlint/cz-commitlint/src/Question.test.ts @@ -26,7 +26,7 @@ describe('name', () => { () => new Question('' as any, { ...QUESTION_CONFIG, - }), + }) ).toThrow(); expect( @@ -37,8 +37,8 @@ describe('name', () => { } as any, { ...QUESTION_CONFIG, - }, - ), + } + ) ).toThrow(); }); @@ -46,7 +46,7 @@ describe('name', () => { expect( new Question('test' as any, { ...QUESTION_CONFIG, - }).question, + }).question ).toHaveProperty('name', 'test'); }); }); @@ -128,7 +128,7 @@ describe('message', () => { }).question; expect(question).toHaveProperty('message', expect.any(Function)); expect((question.message as any)()).toBe( - 'please input (press enter to skip):\n', + 'please input (press enter to skip):\n' ); }); @@ -158,7 +158,7 @@ describe('message', () => { } as any).question; expect(question).toHaveProperty('message', expect.any(Function)); expect((question.message as any)()).toBe( - 'please input: 10 chars at least\n', + 'please input: 10 chars at least\n' ); }); @@ -171,7 +171,7 @@ describe('message', () => { } as any).question; expect(question).toHaveProperty('message', expect.any(Function)); expect((question.message as any)()).toBe( - 'please input (press enter to skip): 10 chars at least, upper 80 chars\n', + 'please input (press enter to skip): 10 chars at least, upper 80 chars\n' ); }); @@ -306,7 +306,7 @@ describe('transformer', () => { }).question; expect( - (question as InputQuestionOptions)?.transformer?.('xxxx', {}, {}), + (question as InputQuestionOptions)?.transformer?.('xxxx', {}, {}) ).toBe('Xxxx!'); }); @@ -317,7 +317,7 @@ describe('transformer', () => { }).question; expect( - (question as InputQuestionOptions)?.transformer?.('xxx', {}, {}), + (question as InputQuestionOptions)?.transformer?.('xxx', {}, {}) ).toEqual(chalk.green(`(3) xxx`)); question = new Question('body', { @@ -326,7 +326,7 @@ describe('transformer', () => { }).question; expect( - (question as InputQuestionOptions)?.transformer?.('xxx', {}, {}), + (question as InputQuestionOptions)?.transformer?.('xxx', {}, {}) ).toEqual(chalk.green(`(3) xxx`)); }); @@ -337,7 +337,7 @@ describe('transformer', () => { }).question; expect( - (question as InputQuestionOptions)?.transformer?.('xxxxxx', {}, {}), + (question as InputQuestionOptions)?.transformer?.('xxxxxx', {}, {}) ).toEqual(chalk.red(`(6) xxxxxx`)); question = new Question('body', { @@ -346,7 +346,7 @@ describe('transformer', () => { }).question; expect( - (question as InputQuestionOptions)?.transformer?.('x', {}, {}), + (question as InputQuestionOptions)?.transformer?.('x', {}, {}) ).toEqual(chalk.red(`(1) x`)); }); }); diff --git a/@commitlint/cz-commitlint/src/Question.ts b/@commitlint/cz-commitlint/src/Question.ts index 136d5ffa1c1..5ed72223a4a 100644 --- a/@commitlint/cz-commitlint/src/Question.ts +++ b/@commitlint/cz-commitlint/src/Question.ts @@ -48,7 +48,7 @@ export default class Question { minLength, multipleValueDelimiters, multipleSelectDefaultDelimiter, - }: QuestionConfig, + }: QuestionConfig ) { if (!name || typeof name !== 'string') throw new Error('Question: name is required'); @@ -163,7 +163,7 @@ export default class Question { new RegExp(`[^${this.multipleValueDelimiters.source}]+`, 'g'), (segment) => { return casedSegments[segments.indexOf(segment)]; - }, + } ); } else { toCased = this.caseFn(input); @@ -192,12 +192,12 @@ export default class Question { const messages = []; if (this.minLength > 0 && this.getMessage('min')) { messages.push( - this.getMessage('min').replace(/%d/g, this.minLength + ''), + this.getMessage('min').replace(/%d/g, this.minLength + '') ); } if (this.maxLength < Infinity && this.getMessage('max')) { messages.push( - this.getMessage('max').replace(/%d/g, this.maxLength + ''), + this.getMessage('max').replace(/%d/g, this.maxLength + '') ); } diff --git a/@commitlint/cz-commitlint/src/SectionBody.ts b/@commitlint/cz-commitlint/src/SectionBody.ts index 92d9e7f4ed6..d5f00a3e18e 100644 --- a/@commitlint/cz-commitlint/src/SectionBody.ts +++ b/@commitlint/cz-commitlint/src/SectionBody.ts @@ -29,7 +29,7 @@ export function combineCommitMessage(answers: Answers): string { trim: true, indent: '', }) - : commitBody.trim(), + : commitBody.trim() ); } else { return ''; diff --git a/@commitlint/cz-commitlint/src/SectionFooter.test.ts b/@commitlint/cz-commitlint/src/SectionFooter.test.ts index 8846f870be0..06752401d54 100644 --- a/@commitlint/cz-commitlint/src/SectionFooter.test.ts +++ b/@commitlint/cz-commitlint/src/SectionFooter.test.ts @@ -68,12 +68,12 @@ describe('getQuestions', () => { expect( (questions[1].when as any)({ isBreaking: false, - }), + }) ).toBe(false); expect( (questions[1].when as any)({ isBreaking: true, - }), + }) ).toBe(true); }); @@ -95,20 +95,20 @@ describe('getQuestions', () => { expect( (questions[1].when as any)({ isBreaking: true, - }), + }) ).toBe(true); expect( (questions[1].when as any)({ isBreaking: true, body: 'xxx', - }), + }) ).toBe(false); expect( (questions[1].when as any)({ isBreaking: false, - }), + }) ).toBe(false); }); @@ -146,12 +146,12 @@ describe('getQuestions', () => { expect( (questions[1].when as any)({ isIssueAffected: false, - }), + }) ).toBe(false); expect( (questions[1].when as any)({ isIssueAffected: true, - }), + }) ).toBe(true); }); @@ -176,21 +176,21 @@ describe('getQuestions', () => { expect( (questions[1].when as any)({ isIssueAffected: true, - }), + }) ).toBe(true); expect( (questions[1].when as any)({ isIssueAffected: true, body: 'xxx', - }), + }) ).toBe(false); expect( (questions[1].when as any)({ isIssueAffected: false, breaking: 'xxxxx', - }), + }) ).toBe(false); }); }); @@ -215,7 +215,7 @@ describe('combineCommitMessage', () => { footer: 'Other footer information.', }); expect(commitMessage).toBe( - 'BREAKING CHANGE: xxxxxx\nhttps://github.com/conventional-changelog/commitlint/issues/2507\nOther footer information.', + 'BREAKING CHANGE: xxxxxx\nhttps://github.com/conventional-changelog/commitlint/issues/2507\nOther footer information.' ); }); @@ -230,7 +230,7 @@ describe('combineCommitMessage', () => { footer: 'Other footer information.', }); expect(commitMessage).toBe( - 'BREAKING\nCHANGE:\nxxxxxx\nhttps://github.com/conventional-changelog/commitlint/issues/2507\nOther\nfooter\ninformation.', + 'BREAKING\nCHANGE:\nxxxxxx\nhttps://github.com/conventional-changelog/commitlint/issues/2507\nOther\nfooter\ninformation.' ); }); @@ -246,7 +246,7 @@ describe('combineCommitMessage', () => { footer: 'Other footer information.', }); expect(commitMessage).toBe( - '\nBREAKING\nCHANGE:\nxxxxxx\nhttps://github.com/conventional-changelog/commitlint/issues/2507\nOther\nfooter\ninformation.', + '\nBREAKING\nCHANGE:\nxxxxxx\nhttps://github.com/conventional-changelog/commitlint/issues/2507\nOther\nfooter\ninformation.' ); }); @@ -257,7 +257,7 @@ describe('combineCommitMessage', () => { footer: 'Other footer information.', }); expect(commitMessage).toBe( - 'https://github.com/conventional-changelog/commitlint/issues/2507\nOther footer information.', + 'https://github.com/conventional-changelog/commitlint/issues/2507\nOther footer information.' ); }); @@ -308,7 +308,7 @@ describe('FooterQuestion', () => { (lastQuestion.message as any)(answers); expect(lastQuestion?.validate?.(''.padEnd(10, 'z'), answers)).toBe( - 'footer: footer over limit 11', + 'footer: footer over limit 11' ); }); }); diff --git a/@commitlint/cz-commitlint/src/SectionFooter.ts b/@commitlint/cz-commitlint/src/SectionFooter.ts index 5548982e9f2..de184cd07f8 100644 --- a/@commitlint/cz-commitlint/src/SectionFooter.ts +++ b/@commitlint/cz-commitlint/src/SectionFooter.ts @@ -15,7 +15,7 @@ export class FooterQuestion extends Question { name: PromptName, questionConfig: QuestionConfig, footerMaxLength?: number, - footerMinLength?: number, + footerMinLength?: number ) { super(name, questionConfig); this.footerMaxLength = footerMaxLength ?? Infinity; @@ -115,7 +115,7 @@ export function getQuestions(): Array { name, questionConfigs, footerMaxLength, - footerMinLength, + footerMinLength ); return instance.question; @@ -142,7 +142,7 @@ export function combineCommitMessage(answers: Answers): string { trim: true, indent: '', }) - : message.trim(), + : message.trim() ); } @@ -154,7 +154,7 @@ export function combineCommitMessage(answers: Answers): string { trim: true, indent: '', }) - : issues.trim(), + : issues.trim() ); } @@ -166,7 +166,7 @@ export function combineCommitMessage(answers: Answers): string { trim: true, indent: '', }) - : footer, + : footer ); } diff --git a/@commitlint/cz-commitlint/src/SectionHeader.test.ts b/@commitlint/cz-commitlint/src/SectionHeader.test.ts index 6db148ab03e..6b370b956a3 100644 --- a/@commitlint/cz-commitlint/src/SectionHeader.test.ts +++ b/@commitlint/cz-commitlint/src/SectionHeader.test.ts @@ -51,7 +51,7 @@ describe('getQuestionConfig', () => { expect(config).toEqual( expect.objectContaining({ multipleValueDelimiters: /\/|\\|,/g, - }), + }) ); }); @@ -66,7 +66,7 @@ describe('getQuestionConfig', () => { expect(config).toEqual( expect.objectContaining({ multipleSelectDefaultDelimiter: '/', - }), + }) ); }); @@ -148,7 +148,7 @@ describe('HeaderQuestion', () => { const lastQuestion = questions[2]; (lastQuestion.message as any)(answers); expect(lastQuestion?.validate?.(''.padEnd(10, 'z'), answers)).toBe( - 'subject: subject over limit 6', + 'subject: subject over limit 6' ); }); }); diff --git a/@commitlint/cz-commitlint/src/SectionHeader.ts b/@commitlint/cz-commitlint/src/SectionHeader.ts index 507bd2b9909..c3483cc79d3 100644 --- a/@commitlint/cz-commitlint/src/SectionHeader.ts +++ b/@commitlint/cz-commitlint/src/SectionHeader.ts @@ -11,7 +11,7 @@ export class HeaderQuestion extends Question { name: PromptName, questionConfig: QuestionConfig, headerMaxLength?: number, - headerMinLength?: number, + headerMinLength?: number ) { super(name, questionConfig); this.headerMaxLength = headerMaxLength ?? Infinity; @@ -54,7 +54,7 @@ export function getQuestions(): Array { name, questionConfig, headerRuleQuestionConfig.maxLength, - headerRuleQuestionConfig.minLength, + headerRuleQuestionConfig.minLength ); questions.push(instance.question); } @@ -63,7 +63,7 @@ export function getQuestions(): Array { } export function getQuestionConfig( - name: RuleField, + name: RuleField ): ReturnType { const questionConfig = getRuleQuestionConfig(name); diff --git a/@commitlint/cz-commitlint/src/services/getRuleQuestionConfig.test.ts b/@commitlint/cz-commitlint/src/services/getRuleQuestionConfig.test.ts index e39da560246..6518b58483b 100644 --- a/@commitlint/cz-commitlint/src/services/getRuleQuestionConfig.test.ts +++ b/@commitlint/cz-commitlint/src/services/getRuleQuestionConfig.test.ts @@ -204,21 +204,21 @@ describe('enum list', () => { expect(enumList).toEqual([ { name: expect.stringMatching( - new RegExp(`^cli:[\\s]{${LONGEST - 4 + 4}}Test CLI$`), + new RegExp(`^cli:[\\s]{${LONGEST - 4 + 4}}Test CLI$`) ), value: 'cli', short: 'cli', }, { name: expect.stringMatching( - new RegExp(`^core:[\\s]{${LONGEST - 5 + 4}}Test CORE$`), + new RegExp(`^core:[\\s]{${LONGEST - 5 + 4}}Test CORE$`) ), value: 'core', short: 'core', }, { name: expect.stringMatching( - new RegExp(`^${longestItem}:[\\s]{${-1 + 4}}Test$`), + new RegExp(`^${longestItem}:[\\s]{${-1 + 4}}Test$`) ), value: longestItem, short: longestItem, diff --git a/@commitlint/cz-commitlint/src/services/getRuleQuestionConfig.ts b/@commitlint/cz-commitlint/src/services/getRuleQuestionConfig.ts index f906eced157..8edbef8b16e 100644 --- a/@commitlint/cz-commitlint/src/services/getRuleQuestionConfig.ts +++ b/@commitlint/cz-commitlint/src/services/getRuleQuestionConfig.ts @@ -39,7 +39,7 @@ export default function (rulePrefix: RuleField): QuestionConfig | null { if (enumDescriptions) { const enumNames = Object.keys(enumDescriptions); const longest = Math.max( - ...enumRuleList.map((enumName) => enumName.length), + ...enumRuleList.map((enumName) => enumName.length) ); // TODO emoji + title enumList = enumRuleList diff --git a/@commitlint/cz-commitlint/src/store/prompts.test.ts b/@commitlint/cz-commitlint/src/store/prompts.test.ts index 8adcdec4a51..e02741c9f94 100644 --- a/@commitlint/cz-commitlint/src/store/prompts.test.ts +++ b/@commitlint/cz-commitlint/src/store/prompts.test.ts @@ -53,10 +53,10 @@ describe('setPromptConfig', () => { setPromptConfig(promptConfig); expect(getPromptMessages()['emptyWarning']).toBe( - promptConfig.messages.emptyWarning, + promptConfig.messages.emptyWarning ); expect(getPromptMessages()['lowerLimitWarning']).toBe( - initialMessages['lowerLimitWarning'], + initialMessages['lowerLimitWarning'] ); }); @@ -73,7 +73,7 @@ describe('setPromptConfig', () => { setPromptConfig(promptConfig as any); expect(getPromptMessages()['emptyWarning']).toBe( - promptConfig.messages.emptyWarning, + promptConfig.messages.emptyWarning ); expect(getPromptMessages()['min']).toBe(initialMessages['min']); }); diff --git a/@commitlint/cz-commitlint/src/store/prompts.ts b/@commitlint/cz-commitlint/src/store/prompts.ts index 14d59a955ba..2a5dd844856 100644 --- a/@commitlint/cz-commitlint/src/store/prompts.ts +++ b/@commitlint/cz-commitlint/src/store/prompts.ts @@ -32,7 +32,7 @@ export function setPromptConfig(newPromptConfig: UserPromptConfig): void { !/^\/|\\|,$/.test(settings['scopeEnumSeparator']) ) { console.log( - `prompt.settings.scopeEnumSeparator must be one of ',', '\\', '/'.`, + `prompt.settings.scopeEnumSeparator must be one of ',', '\\', '/'.` ); process.exit(1); } diff --git a/@commitlint/cz-commitlint/src/store/rules.test.ts b/@commitlint/cz-commitlint/src/store/rules.test.ts index c8c42ef2e3e..1d12a9e8515 100644 --- a/@commitlint/cz-commitlint/src/store/rules.test.ts +++ b/@commitlint/cz-commitlint/src/store/rules.test.ts @@ -19,7 +19,7 @@ describe('getRule', () => { expect(getRule('body', 'max-length')).toBe(rules['body-max-length']); expect(getRule('footer', 'max-line-length')).toBe( - rules['footer-max-line-length'], + rules['footer-max-line-length'] ); expect(getRule('subject', 'empty')).toBe(rules['subject-empty']); }); diff --git a/@commitlint/cz-commitlint/src/utils/leading-blank-fn.ts b/@commitlint/cz-commitlint/src/utils/leading-blank-fn.ts index 5f52a4aa628..e12c5712764 100644 --- a/@commitlint/cz-commitlint/src/utils/leading-blank-fn.ts +++ b/@commitlint/cz-commitlint/src/utils/leading-blank-fn.ts @@ -7,7 +7,7 @@ import {ruleIsActive, ruleIsNotApplicable} from './rules'; * @return transform function applying the leading */ export default function getLeadingBlankFn( - rule?: Rule, + rule?: Rule ): (input: string) => string { if (!rule || !ruleIsActive(rule)) { return (input: string): string => input; diff --git a/@commitlint/cz-commitlint/src/utils/rules.test.ts b/@commitlint/cz-commitlint/src/utils/rules.test.ts index 27999e9c5bb..880551a531a 100644 --- a/@commitlint/cz-commitlint/src/utils/rules.test.ts +++ b/@commitlint/cz-commitlint/src/utils/rules.test.ts @@ -16,7 +16,7 @@ test('ruleIsDisabled', () => { expect(ruleIsDisabled([RuleConfigSeverity.Disabled, 'always'])).toBe(true); expect(ruleIsDisabled([RuleConfigSeverity.Error] as any)).toBe(false); expect(ruleIsDisabled([RuleConfigSeverity.Error, 'always'] as any)).toBe( - false, + false ); }); @@ -41,14 +41,14 @@ test('ruleIsNotApplicable', () => { expect(ruleIsNotApplicable([RuleConfigSeverity.Error, 'never'])).toBe(true); expect(ruleIsNotApplicable([RuleConfigSeverity.Warning, 'never'])).toBe(true); expect(ruleIsNotApplicable([RuleConfigSeverity.Disabled, 'never'])).toBe( - true, + true ); expect(ruleIsNotApplicable(undefined as any)).toBe(false); expect(ruleIsNotApplicable('' as any)).toBe(false); expect(ruleIsNotApplicable([RuleConfigSeverity.Error] as any)).toBe(false); expect(ruleIsNotApplicable([RuleConfigSeverity.Error, 'always'])).toBe(false); expect(ruleIsNotApplicable([RuleConfigSeverity.Error, 'always', 100])).toBe( - false, + false ); }); diff --git a/@commitlint/cz-commitlint/src/utils/rules.ts b/@commitlint/cz-commitlint/src/utils/rules.ts index d2c2e6fe4c4..b9758e2184d 100644 --- a/@commitlint/cz-commitlint/src/utils/rules.ts +++ b/@commitlint/cz-commitlint/src/utils/rules.ts @@ -2,7 +2,7 @@ import {RuleConfigSeverity} from '@commitlint/types'; import {Rule} from '../types'; export function ruleIsDisabled( - rule: Rule, + rule: Rule ): rule is Readonly<[RuleConfigSeverity.Disabled]> { if (rule && Array.isArray(rule) && rule[0] === RuleConfigSeverity.Disabled) { return true; @@ -16,7 +16,7 @@ export function ruleIsDisabled( * @return if the rule definition is active */ export function ruleIsActive( - rule: T, + rule: T ): rule is Exclude> { if (rule && Array.isArray(rule)) { return rule[0] > RuleConfigSeverity.Disabled; @@ -30,7 +30,7 @@ export function ruleIsActive( * @return if the rule definition is applicable */ export function ruleIsApplicable( - rule: Rule, + rule: Rule ): rule is | Readonly<[RuleConfigSeverity, 'always']> | Readonly<[RuleConfigSeverity, 'always', unknown]> { @@ -46,7 +46,7 @@ export function ruleIsApplicable( * @return if the rule definition is applicable */ export function ruleIsNotApplicable( - rule: Rule, + rule: Rule ): rule is | Readonly<[RuleConfigSeverity, 'never']> | Readonly<[RuleConfigSeverity, 'never', unknown]> { @@ -57,7 +57,7 @@ export function ruleIsNotApplicable( } export function enumRuleIsActive( - rule: Rule, + rule: Rule ): rule is Readonly< [RuleConfigSeverity.Warning | RuleConfigSeverity.Error, 'always', string[]] > { diff --git a/@commitlint/ensure/src/case.test.ts b/@commitlint/ensure/src/case.test.ts index 5a800da60e8..532916dcec9 100644 --- a/@commitlint/ensure/src/case.test.ts +++ b/@commitlint/ensure/src/case.test.ts @@ -163,7 +163,7 @@ test('true for `Any_CASE_iN_back-quotes` on start-case', () => { test('true for lowercase `Any_CASE_iN_back-quotes` lowercase on lowercase', () => { const actual = ensure( 'lowercase `Any_CASE_iN_back-quotes` lowercase', - 'lowercase', + 'lowercase' ); expect(actual).toBe(true); }); @@ -171,7 +171,7 @@ test('true for lowercase `Any_CASE_iN_back-quotes` lowercase on lowercase', () = test('false for UPPERCASE `Any_CASE_iN_back-quotes` UPPERCASE on lowercase', () => { const actual = ensure( 'UPPERCASE `Any_CASE_iN_back-quotes` UPPERCASE', - 'lowercase', + 'lowercase' ); expect(actual).toBe(false); }); @@ -179,7 +179,7 @@ test('false for UPPERCASE `Any_CASE_iN_back-quotes` UPPERCASE on lowercase', () test('true for UPPERCASE `Any_CASE_iN_back-quotes` UPPERCASE on uppercase', () => { const actual = ensure( 'UPPERCASE `Any_CASE_iN_back-quotes` UPPERCASE', - 'uppercase', + 'uppercase' ); expect(actual).toBe(true); }); @@ -187,7 +187,7 @@ test('true for UPPERCASE `Any_CASE_iN_back-quotes` UPPERCASE on uppercase', () = test('false for lowercase `Any_CASE_iN_back-quotes` lowercase on uppercase', () => { const actual = ensure( 'lowercase `Any_CASE_iN_back-quotes` lowercase', - 'uppercase', + 'uppercase' ); expect(actual).toBe(false); }); @@ -200,7 +200,7 @@ test('true for fooBar`Any_CASE_iN_back-quotes`fooBar on camel-case', () => { test('false for Foo Bar`Any_CASE_iN_back-quotes` Foo Bar on camel-case', () => { const actual = ensure( 'Foo Bar`Any_CASE_iN_back-quotes` Foo Bar', - 'camel-case', + 'camel-case' ); expect(actual).toBe(false); }); @@ -208,7 +208,7 @@ test('false for Foo Bar`Any_CASE_iN_back-quotes` Foo Bar on camel-case', () => { test('true for foo-bar`Any_CASE_iN_back-quotes`foo-bar on kebab-case', () => { const actual = ensure( 'foo-bar`Any_CASE_iN_back-quotes`foo-bar', - 'kebab-case', + 'kebab-case' ); expect(actual).toBe(true); }); @@ -216,7 +216,7 @@ test('true for foo-bar`Any_CASE_iN_back-quotes`foo-bar on kebab-case', () => { test('false for Foo Bar `Any_CASE_iN_back-quotes` Foo Bar on kebab-case', () => { const actual = ensure( 'Foo Bar `Any_CASE_iN_back-quotes` Foo Bar', - 'kebab-case', + 'kebab-case' ); expect(actual).toBe(false); }); @@ -224,7 +224,7 @@ test('false for Foo Bar `Any_CASE_iN_back-quotes` Foo Bar on kebab-case', () => test('true for foo_bar`Any_CASE_iN_back-quotes`foo_bar on snake-case', () => { const actual = ensure( 'foo_bar`Any_CASE_iN_back-quotes`foo_bar', - 'snake-case', + 'snake-case' ); expect(actual).toBe(true); }); @@ -232,7 +232,7 @@ test('true for foo_bar`Any_CASE_iN_back-quotes`foo_bar on snake-case', () => { test('false for Foo Bar `Any_CASE_iN_back-quotes` Foo Bar on snake-case', () => { const actual = ensure( 'Foo Bar `Any_CASE_iN_back-quotes` Foo Bar', - 'snake-case', + 'snake-case' ); expect(actual).toBe(false); }); @@ -240,7 +240,7 @@ test('false for Foo Bar `Any_CASE_iN_back-quotes` Foo Bar on snake-case', () => test('true for PascalCase`Any_CASE_iN_back-quotes`PascalCase on pascal-case', () => { const actual = ensure( 'PascalCase`Any_CASE_iN_back-quotes`PascalCase', - 'pascal-case', + 'pascal-case' ); expect(actual).toBe(true); }); @@ -248,7 +248,7 @@ test('true for PascalCase`Any_CASE_iN_back-quotes`PascalCase on pascal-case', () test('false for Foo Bar `Any_CASE_iN_back-quotes` Foo Bar on pascal-case', () => { const actual = ensure( 'Foo Bar `Any_CASE_iN_back-quotes` Foo Bar', - 'pascal-case', + 'pascal-case' ); expect(actual).toBe(false); }); @@ -256,7 +256,7 @@ test('false for Foo Bar `Any_CASE_iN_back-quotes` Foo Bar on pascal-case', () => test('true for Foo Bar`Any_CASE_iN_back-quotes` Foo Bar on start-case', () => { const actual = ensure( 'Foo Bar `Any_CASE_iN_back-quotes`Foo Bar', - 'start-case', + 'start-case' ); expect(actual).toBe(true); }); @@ -264,7 +264,7 @@ test('true for Foo Bar`Any_CASE_iN_back-quotes` Foo Bar on start-case', () => { test('false for foo_bar`Any_CASE_iN_back-quotes`foo_bar on start-case', () => { const actual = ensure( 'foo_bar`Any_CASE_iN_back-quotes`foo_bar', - 'start-case', + 'start-case' ); expect(actual).toBe(false); }); @@ -272,7 +272,7 @@ test('false for foo_bar`Any_CASE_iN_back-quotes`foo_bar on start-case', () => { test('true for lowercase `Any_CASE_iN_back-quotes` `Any_CASE_iN_back-quotes` lowercase on lowercase', () => { const actual = ensure( 'lowercase `Any_CASE_iN_back-quotes` `Any_CASE_iN_back-quotes` lowercase', - 'lowercase', + 'lowercase' ); expect(actual).toBe(true); }); diff --git a/@commitlint/ensure/src/case.ts b/@commitlint/ensure/src/case.ts index 3e0ee9c5eaa..fcd8b35827b 100644 --- a/@commitlint/ensure/src/case.ts +++ b/@commitlint/ensure/src/case.ts @@ -5,7 +5,7 @@ export default ensureCase; function ensureCase( raw: string = '', - target: TargetCaseType = 'lowercase', + target: TargetCaseType = 'lowercase' ): boolean { // We delete any content together with quotes because he can contains proper names (example `refactor: `Eslint` configuration`). // We need trim string because content with quotes can be at the beginning or end of a line diff --git a/@commitlint/ensure/src/max-line-length.test.ts b/@commitlint/ensure/src/max-line-length.test.ts index d2feb18809d..b852599660d 100644 --- a/@commitlint/ensure/src/max-line-length.test.ts +++ b/@commitlint/ensure/src/max-line-length.test.ts @@ -30,7 +30,7 @@ test('false for ab/\nab/\nab 1', () => { `ab ab ab`, - 2, + 2 ); expect(actual).toBe(true); @@ -41,7 +41,7 @@ test('true for ab/\nab/\nab 2', () => { `ab ab ab`, - 2, + 2 ); expect(actual).toBe(true); diff --git a/@commitlint/execute-rule/src/index.ts b/@commitlint/execute-rule/src/index.ts index 98cfe479eef..47029f4b890 100644 --- a/@commitlint/execute-rule/src/index.ts +++ b/@commitlint/execute-rule/src/index.ts @@ -7,7 +7,7 @@ type ExecutedRule = readonly [string, T]; export default execute; export async function execute( - rule?: Rule, + rule?: Rule ): Promise | null> { if (!Array.isArray(rule)) { return null; diff --git a/@commitlint/format/src/format.test.ts b/@commitlint/format/src/format.test.ts index 007fd1acfa5..eea046405ea 100644 --- a/@commitlint/format/src/format.test.ts +++ b/@commitlint/format/src/format.test.ts @@ -27,7 +27,7 @@ test('returns empty summary if verbose', () => { }, { verbose: true, - }, + } ); expect(actual).toContain('0 problems, 0 warnings'); @@ -117,7 +117,7 @@ test('uses signs as configured', () => { }, ], }, - options, + options ); const actualWarning = format( @@ -134,7 +134,7 @@ test('uses signs as configured', () => { }, ], }, - options, + options ); expect(actualError).toContain('ERR'); @@ -196,11 +196,11 @@ test('format result prints help for errors', () => { }, { helpUrl: 'https://example.com', - }, + } ); expect(actual).toEqual( - expect.arrayContaining([expect.stringContaining('Get help:')]), + expect.arrayContaining([expect.stringContaining('Get help:')]) ); }); @@ -217,11 +217,11 @@ test('format result prints help for warnings', () => { }, { helpUrl: 'https://example.com', - }, + } ); expect(actual).toEqual( - expect.arrayContaining([expect.stringContaining('Get help:')]), + expect.arrayContaining([expect.stringContaining('Get help:')]) ); }); @@ -240,11 +240,11 @@ test('format result help cotains options.helpUrl', () => { }, { helpUrl, - }, + } ); expect(actual).toEqual( - expect.arrayContaining([expect.stringContaining(helpUrl)]), + expect.arrayContaining([expect.stringContaining(helpUrl)]) ); }); @@ -254,7 +254,7 @@ test('format result omits help for empty problems', () => { }); expect(actual).not.toEqual( - expect.arrayContaining([expect.stringContaining('Get help:')]), + expect.arrayContaining([expect.stringContaining('Get help:')]) ); }); @@ -271,10 +271,10 @@ test('format result should not contain `Get help` prefix if helpUrl is not provi }, { helpUrl: '', - }, + } ); expect(actual).not.toEqual( - expect.arrayContaining([expect.stringContaining('Get help:')]), + expect.arrayContaining([expect.stringContaining('Get help:')]) ); }); diff --git a/@commitlint/format/src/format.ts b/@commitlint/format/src/format.ts index b6ea687c1db..e3fa2dd266a 100644 --- a/@commitlint/format/src/format.ts +++ b/@commitlint/format/src/format.ts @@ -12,7 +12,7 @@ const DEFAULT_COLORS = ['white', 'yellow', 'red'] as const; export function format( report: FormattableReport = {}, - options: FormatOptions = {}, + options: FormatOptions = {} ): string { const {results = []} = report; const fi = (result: FormattableResult & WithInput) => @@ -24,14 +24,14 @@ export function format( .map((result) => [...fi(result), ...fr(result)]) .reduce( (acc, item) => (Array.isArray(item) ? [...acc, ...item] : [...acc, item]), - [], + [] ) .join('\n'); } function formatInput( result: FormattableResult & WithInput, - options: FormatOptions = {}, + options: FormatOptions = {} ): string[] { const {color: enabled = true} = options; const {errors = [], warnings = [], input = ''} = result; @@ -54,7 +54,7 @@ function formatInput( export function formatResult( result: FormattableResult = {}, - options: FormatOptions = {}, + options: FormatOptions = {} ): string[] { const { signs = DEFAULT_SIGNS, diff --git a/@commitlint/is-ignored/src/defaults.ts b/@commitlint/is-ignored/src/defaults.ts index cbbb3276212..31d419e52bb 100644 --- a/@commitlint/is-ignored/src/defaults.ts +++ b/@commitlint/is-ignored/src/defaults.ts @@ -16,7 +16,7 @@ const test = (r: RegExp): ((c: string) => boolean) => r.test.bind(r); export const wildcards: Matcher[] = [ test( - /^((Merge pull request)|(Merge (.*?) into (.*?)|(Merge branch (.*?)))(?:\r?\n)*$)/m, + /^((Merge pull request)|(Merge (.*?) into (.*?)|(Merge branch (.*?)))(?:\r?\n)*$)/m ), test(/^(Merge tag (.*?))(?:\r?\n)*$/m), test(/^(R|r)evert (.*)/), diff --git a/@commitlint/is-ignored/src/is-ignored.test.ts b/@commitlint/is-ignored/src/is-ignored.test.ts index d4a359af496..833ab04c496 100644 --- a/@commitlint/is-ignored/src/is-ignored.test.ts +++ b/@commitlint/is-ignored/src/is-ignored.test.ts @@ -30,7 +30,7 @@ const AMENDED_VERSION_MESSAGES = VERSION_MESSAGES.reduce( ...AMENDMENTS.map((amendment) => `${message}\n\n${amendment}`), ]; }, - [], + [] ); test('should return false when called without arguments', () => { @@ -66,7 +66,7 @@ test('should return true for merged PRs', () => { test('should return true for branch merges with newline characters and more characters after it', () => { expect(isIgnored("Merge branch 'ctrom-YarnBuild'\n ")).toBe(true); expect(isIgnored("Merge branch 'ctrom-YarnBuild'\r\n # some comment")).toBe( - true, + true ); }); @@ -93,13 +93,13 @@ test('should return true for tag merges with newline characters and more charact test('should return true for revert commits', () => { expect( isIgnored( - `Revert "docs: add recipe for linting of all commits in a PR (#36)"\n\nThis reverts commit 1e69d542c16c2a32acfd139e32efa07a45f19111.`, - ), + `Revert "docs: add recipe for linting of all commits in a PR (#36)"\n\nThis reverts commit 1e69d542c16c2a32acfd139e32efa07a45f19111.` + ) ).toBe(true); expect( isIgnored( - `revert "docs: add recipe for linting of all commits in a PR (#36)"\n\nThis reverts commit 1e69d542c16c2a32acfd139e32efa07a45f19111.`, - ), + `revert "docs: add recipe for linting of all commits in a PR (#36)"\n\nThis reverts commit 1e69d542c16c2a32acfd139e32efa07a45f19111.` + ) ).toBe(true); }); @@ -109,16 +109,16 @@ test('should ignore npm semver commits', () => { test('should ignore npm semver commits with chore', () => { VERSION_MESSAGES.forEach((message) => - expect(isIgnored(`chore: ${message}`)).toBe(true), + expect(isIgnored(`chore: ${message}`)).toBe(true) ); VERSION_MESSAGES.forEach((message) => - expect(isIgnored(`chore(release): ${message}`)).toBe(true), + expect(isIgnored(`chore(release): ${message}`)).toBe(true) ); }); test('should ignore npm semver commits with footers', () => { AMENDED_VERSION_MESSAGES.forEach((message) => - expect(isIgnored(message)).toBe(true), + expect(isIgnored(message)).toBe(true) ); }); @@ -132,10 +132,10 @@ test('should return true squash commits', () => { test('should return true for bitbucket merge commits', () => { expect( - isIgnored('Merged in feature/facebook-friends-sync (pull request #8)'), + isIgnored('Merged in feature/facebook-friends-sync (pull request #8)') ).toBe(true); expect( - isIgnored('Merged develop into feature/component-form-select-card'), + isIgnored('Merged develop into feature/component-form-select-card') ).toBe(true); expect(isIgnored('Automatic merge')).toBe(true); }); @@ -161,7 +161,7 @@ test('should return false for ignored message if defaults is false', () => { expect( isIgnored('Auto-merged develop into master', { defaults: false, - }), + }) ).toBe(false); }); @@ -169,7 +169,7 @@ test('should return false for ignored message if custom ignores and defaults is expect( isIgnored('Auto-merged develop into master', { defaults: false, - }), + }) ).toBe(false); }); @@ -187,7 +187,7 @@ test('should return true for custom ignores as function', () => { expect( isIgnored(ignoredString, { ignores: [(c) => c === ignoredString], - }), + }) ).toBe(true); }); diff --git a/@commitlint/is-ignored/src/is-ignored.ts b/@commitlint/is-ignored/src/is-ignored.ts index 17b588e1d15..716b45b9d09 100644 --- a/@commitlint/is-ignored/src/is-ignored.ts +++ b/@commitlint/is-ignored/src/is-ignored.ts @@ -3,13 +3,13 @@ import {IsIgnoredOptions} from '@commitlint/types'; export default function isIgnored( commit: string = '', - opts: IsIgnoredOptions = {}, + opts: IsIgnoredOptions = {} ): boolean { const ignores = typeof opts.ignores === 'undefined' ? [] : opts.ignores; if (!Array.isArray(ignores)) { throw new Error( - `ignores must be of type array, received ${ignores} of type ${typeof ignores}`, + `ignores must be of type array, received ${ignores} of type ${typeof ignores}` ); } @@ -19,7 +19,7 @@ export default function isIgnored( throw new Error( `ignores must be array of type function, received items of type: ${invalids .map((i) => typeof i) - .join(', ')}`, + .join(', ')}` ); } diff --git a/@commitlint/lint/src/lint.test.ts b/@commitlint/lint/src/lint.test.ts index 90e6e230f16..ea94b0b9c4f 100644 --- a/@commitlint/lint/src/lint.test.ts +++ b/@commitlint/lint/src/lint.test.ts @@ -48,7 +48,7 @@ test('negative on ignored message, disabled ignored messages and broken rule', a }, { defaultIgnores: false, - }, + } ); expect(actual.valid).toBe(false); }); @@ -62,7 +62,7 @@ test('positive on custom ignored message and broken rule', async () => { }, { ignores: [(c) => c === ignoredMessage], - }, + } ); expect(actual.valid).toBe(true); expect(actual.input).toBe(ignoredMessage); @@ -79,7 +79,7 @@ test('positive on stub message and opts', async () => { parserOpts: { headerPattern: /^(\w*)(?:\((.*)\))?-(.*)$/, }, - }, + } ); expect(actual.valid).toBe(true); }); @@ -134,7 +134,7 @@ test('throws for rule with out of range level', async () => { await expect(error).rejects.toThrow('rule type-enum must be between 0 and 2'); await expect(error).rejects.toThrow( - 'rule header-max-length must be between 0 and 2', + 'rule header-max-length must be between 0 and 2' ); }); @@ -156,7 +156,7 @@ test('throws for rule with out of range condition', async () => { await expect(error).rejects.toThrow('type-enum must be "always" or "never"'); await expect(error).rejects.toThrow( - 'header-max-length must be "always" or "never"', + 'header-max-length must be "always" or "never"' ); }); @@ -186,7 +186,7 @@ test('succeds for custom issue prefix', async () => { parserOpts: { issuePrefixes: ['REF-'], }, - }, + } ); expect(report.valid).toBe(true); @@ -202,7 +202,7 @@ test('fails for custom issue prefix', async () => { parserOpts: { issuePrefixes: ['REF-'], }, - }, + } ); expect(report.valid).toBe(false); @@ -222,7 +222,7 @@ test('fails for custom plugin rule', async () => { }, }, }, - }, + } ); expect(report.valid).toBe(false); @@ -242,7 +242,7 @@ test('passes for custom plugin rule', async () => { }, }, }, - }, + } ); expect(report.valid).toBe(true); @@ -281,7 +281,7 @@ test('returns original message with commit header, body and footer, parsing comm parserOpts: { commentChar: '#', }, - }, + } ); expect(report.input).toBe(expected); @@ -301,7 +301,7 @@ test('passes for async rule', async () => { }, }, }, - }, + } ); expect(report.valid).toBe(true); diff --git a/@commitlint/lint/src/lint.ts b/@commitlint/lint/src/lint.ts index 5dcd651e6d0..4c4ffd39056 100644 --- a/@commitlint/lint/src/lint.ts +++ b/@commitlint/lint/src/lint.ts @@ -17,7 +17,7 @@ import { export default async function lint( message: string, rawRulesConfig?: QualifiedRules, - rawOpts?: LintOptions, + rawOpts?: LintOptions ): Promise { const opts = rawOpts ? rawOpts @@ -57,14 +57,14 @@ export default async function lint( } const allRules: Map> = new Map( - Object.entries(defaultRules), + Object.entries(defaultRules) ); if (opts.plugins) { Object.values(opts.plugins).forEach((plugin) => { if (plugin.rules) { Object.keys(plugin.rules).forEach((ruleKey) => - allRules.set(ruleKey, plugin.rules[ruleKey]), + allRules.set(ruleKey, plugin.rules[ruleKey]) ); } }); @@ -72,15 +72,15 @@ export default async function lint( // Find invalid rules configs const missing = Object.keys(rulesConfig).filter( - (name) => typeof allRules.get(name) !== 'function', + (name) => typeof allRules.get(name) !== 'function' ); if (missing.length > 0) { const names = [...allRules.keys()]; throw new RangeError( `Found invalid rule names: ${missing.join( - ', ', - )}. Supported rule names are: ${names.join(', ')}`, + ', ' + )}. Supported rule names are: ${names.join(', ')}` ); } @@ -89,8 +89,8 @@ export default async function lint( if (!Array.isArray(config)) { return new Error( `config for rule ${name} must be array, received ${util.inspect( - config, - )} of type ${typeof config}`, + config + )} of type ${typeof config}` ); } @@ -105,40 +105,40 @@ export default async function lint( if (typeof level !== 'number' || isNaN(level)) { return new Error( `level for rule ${name} must be number, received ${util.inspect( - level, - )} of type ${typeof level}`, + level + )} of type ${typeof level}` ); } if (config.length < 2 || config.length > 3) { return new Error( `config for rule ${name} must be 2 or 3 items long, received ${util.inspect( - config, - )} of length ${config.length}`, + config + )} of length ${config.length}` ); } if (level < 0 || level > 2) { return new RangeError( `level for rule ${name} must be between 0 and 2, received ${util.inspect( - level, - )}`, + level + )}` ); } if (typeof when !== 'string') { return new Error( `condition for rule ${name} must be string, received ${util.inspect( - when, - )} of type ${typeof when}`, + when + )} of type ${typeof when}` ); } if (when !== 'never' && when !== 'always') { return new Error( `condition for rule ${name} must be "always" or "never", received ${util.inspect( - when, - )}`, + when + )}` ); } @@ -176,14 +176,14 @@ export default async function lint( }); const results = (await Promise.all(pendingResults)).filter( - (result): result is LintRuleOutcome => result !== null, + (result): result is LintRuleOutcome => result !== null ); const errors = results.filter( - (result) => result.level === 2 && !result.valid, + (result) => result.level === 2 && !result.valid ); const warnings = results.filter( - (result) => result.level === 1 && !result.valid, + (result) => result.level === 1 && !result.valid ); const valid = errors.length === 0; diff --git a/@commitlint/load/src/load.test.ts b/@commitlint/load/src/load.test.ts index 0ea9bafc0d2..a2ec33d1b07 100644 --- a/@commitlint/load/src/load.test.ts +++ b/@commitlint/load/src/load.test.ts @@ -97,7 +97,7 @@ test('plugins should be loaded from local', async () => { test: expect.any(Function), }, }, - }), + }) ); }); @@ -133,7 +133,7 @@ test('local plugins should be loaded from shareable configs', async () => { 'is-positive': expect.any(Function), }, }, - }), + }) ); }); @@ -141,7 +141,7 @@ test('uses seed with parserPreset', async () => { const cwd = await gitBootstrap('fixtures/parser-preset'); const {parserPreset: actual} = await load( {parserPreset: './conventional-changelog-custom'}, - {cwd}, + {cwd} ); expect(actual).toBeDefined(); @@ -426,11 +426,11 @@ test('resolves parser preset from conventional commits', async () => { expect(actual.parserPreset).toBeDefined(); expect(actual.parserPreset!.name).toBe( - 'conventional-changelog-conventionalcommits', + 'conventional-changelog-conventionalcommits' ); expect(typeof actual.parserPreset!.parserOpts).toBe('object'); expect((actual.parserPreset!.parserOpts as any).headerPattern).toEqual( - /^(\w*)(?:\((.*)\))?!?: (.*)$/, + /^(\w*)(?:\((.*)\))?!?: (.*)$/ ); }); @@ -442,16 +442,16 @@ test('resolves parser preset from conventional angular', async () => { expect(actual.parserPreset!.name).toBe('conventional-changelog-angular'); expect(typeof actual.parserPreset!.parserOpts).toBe('object'); expect((actual.parserPreset!.parserOpts as any).headerPattern).toEqual( - /^(\w*)(?:\((.*)\))?: (.*)$/, + /^(\w*)(?:\((.*)\))?: (.*)$/ ); }); test('recursive resolves parser preset from conventional atom', async () => { const cwd = await gitBootstrap( - 'fixtures/recursive-parser-preset-conventional-atom', + 'fixtures/recursive-parser-preset-conventional-atom' ); await npm.installModules( - path.resolve(cwd, 'first-extended', 'second-extended'), + path.resolve(cwd, 'first-extended', 'second-extended') ); const actual = await load({}, {cwd}); @@ -460,23 +460,23 @@ test('recursive resolves parser preset from conventional atom', async () => { expect(actual.parserPreset!.name).toBe('conventional-changelog-atom'); expect(typeof actual.parserPreset!.parserOpts).toBe('object'); expect((actual.parserPreset!.parserOpts as any).headerPattern).toEqual( - /^(:.*?:) (.*)$/, + /^(:.*?:) (.*)$/ ); }); test('resolves parser preset from conventional commits without factory support', async () => { const cwd = await npmBootstrap( - 'fixtures/parser-preset-conventional-without-factory', + 'fixtures/parser-preset-conventional-without-factory' ); const actual = await load({}, {cwd}); expect(actual.parserPreset).toBeDefined(); expect(actual.parserPreset!.name).toBe( - 'conventional-changelog-conventionalcommits', + 'conventional-changelog-conventionalcommits' ); expect(typeof actual.parserPreset!.parserOpts).toBe('object'); expect((actual.parserPreset!.parserOpts as any).headerPattern).toEqual( - /^(\w*)(?:\((.*)\))?!?: (.*)$/, + /^(\w*)(?:\((.*)\))?!?: (.*)$/ ); }); @@ -485,7 +485,7 @@ test('helpUrl should be loaded from the shareable config', async () => { const actual = await load({}, {cwd}); expect(actual.helpUrl).toStrictEqual( - 'https://github.com/conventional-changelog/commitlint', + 'https://github.com/conventional-changelog/commitlint' ); }); @@ -494,6 +494,6 @@ test('default helpUrl should be loaded if not provided in shareable configs', as const actual = await load({}, {cwd}); expect(actual.helpUrl).toStrictEqual( - 'https://github.com/conventional-changelog/commitlint/#what-is-commitlint', + 'https://github.com/conventional-changelog/commitlint/#what-is-commitlint' ); }); diff --git a/@commitlint/load/src/load.ts b/@commitlint/load/src/load.ts index 7f03e6248b9..4c927fdc2f7 100644 --- a/@commitlint/load/src/load.ts +++ b/@commitlint/load/src/load.ts @@ -19,7 +19,7 @@ import loadPlugin from './utils/load-plugin'; export default async function load( seed: UserConfig = {}, - options: LoadOptions = {}, + options: LoadOptions = {} ): Promise { const cwd = typeof options.cwd === 'undefined' ? process.cwd() : options.cwd; const loaded = await loadConfig(cwd, options.file); @@ -38,7 +38,7 @@ export default async function load( rules: {}, }, config, - seed, + seed ); // Resolve parserPreset key @@ -76,7 +76,7 @@ export default async function load( const rules = ( await Promise.all( - Object.entries(extended.rules || {}).map((entry) => executeRule(entry)), + Object.entries(extended.rules || {}).map((entry) => executeRule(entry)) ) ).reduce((registry, item) => { // type of `item` can be null, but Object.entries always returns key pair diff --git a/@commitlint/load/src/utils/load-config.ts b/@commitlint/load/src/utils/load-config.ts index c5dad119bd6..f34ca1c5802 100644 --- a/@commitlint/load/src/utils/load-config.ts +++ b/@commitlint/load/src/utils/load-config.ts @@ -10,7 +10,7 @@ export interface LoadConfigResult { export async function loadConfig( cwd: string, - configPath?: string, + configPath?: string ): Promise { const moduleName = 'commitlint'; const tsLoader = TypeScriptLoader(); diff --git a/@commitlint/load/src/utils/load-parser-opts.ts b/@commitlint/load/src/utils/load-parser-opts.ts index 61376d997f5..11bcdcb119a 100644 --- a/@commitlint/load/src/utils/load-parser-opts.ts +++ b/@commitlint/load/src/utils/load-parser-opts.ts @@ -7,10 +7,10 @@ function isObjectLike(obj: unknown): obj is Record { } function isParserOptsFunction( - obj: T, + obj: T ): obj is T & { parserOpts: ( - cb: (_: never, parserOpts: Record) => unknown, + cb: (_: never, parserOpts: Record) => unknown ) => Record | undefined; } { return typeof obj.parserOpts === 'function'; @@ -21,7 +21,7 @@ export async function loadParserOpts( | string | Awaitable | (() => Awaitable) - | undefined, + | undefined ): Promise { if (typeof pendingParser === 'function') { return loadParserOpts(pendingParser()); diff --git a/@commitlint/load/src/utils/load-plugin.test.ts b/@commitlint/load/src/utils/load-plugin.test.ts index c2f63aa50a2..7c78d87f2fc 100644 --- a/@commitlint/load/src/utils/load-plugin.test.ts +++ b/@commitlint/load/src/utils/load-plugin.test.ts @@ -17,7 +17,7 @@ jest.mock( }; return {rules: {rule}}; }, - {virtual: true}, + {virtual: true} ); jest.mock( @@ -28,7 +28,7 @@ jest.mock( }; return {rules: {syncRule}}; }, - {virtual: true}, + {virtual: true} ); jest.mock( @@ -39,7 +39,7 @@ jest.mock( }; return {rules: {asyncRule}}; }, - {virtual: true}, + {virtual: true} ); test('should load a plugin when referenced by short name', () => { @@ -69,36 +69,36 @@ test('should load a plugin with an async rule', () => { test('should throw an error when a plugin has whitespace', () => { expect(() => loadPlugin({}, 'whitespace ')).toThrow( - "Whitespace found in plugin name 'whitespace '", + "Whitespace found in plugin name 'whitespace '" ); expect(() => loadPlugin({}, 'whitespace\t')).toThrow( - 'Whitespace found in plugin name', + 'Whitespace found in plugin name' ); expect(() => loadPlugin({}, 'whitespace\n')).toThrow( - 'Whitespace found in plugin name', + 'Whitespace found in plugin name' ); expect(() => loadPlugin({}, 'whitespace\r')).toThrow( - 'Whitespace found in plugin name', + 'Whitespace found in plugin name' ); }); test("should throw an error when a plugin doesn't exist", () => { expect(() => loadPlugin({}, 'nonexistentplugin')).toThrow( - 'Failed to load plugin', + 'Failed to load plugin' ); }); test('should load a scoped plugin when referenced by short name', () => { const plugins = loadPlugin({}, '@scope/example'); expect(plugins['@scope/example']).toBe( - require('@scope/commitlint-plugin-example'), + require('@scope/commitlint-plugin-example') ); }); test('should load a scoped plugin when referenced by long name', () => { const plugins = loadPlugin({}, '@scope/commitlint-plugin-example'); expect(plugins['@scope/example']).toBe( - require('@scope/commitlint-plugin-example'), + require('@scope/commitlint-plugin-example') ); }); diff --git a/@commitlint/load/src/utils/load-plugin.ts b/@commitlint/load/src/utils/load-plugin.ts index 00b0f121c26..f76a19e39dc 100644 --- a/@commitlint/load/src/utils/load-plugin.ts +++ b/@commitlint/load/src/utils/load-plugin.ts @@ -7,7 +7,7 @@ import {PluginRecords} from '@commitlint/types'; export default function loadPlugin( plugins: PluginRecords, pluginName: string, - debug: boolean = false, + debug: boolean = false ): PluginRecords { const longName = normalizePackageName(pluginName); const shortName = getShorthandName(longName); @@ -61,8 +61,8 @@ export default function loadPlugin( console.log( chalk.blue( - `Loaded plugin ${pluginName} (${loadedPluginAndVersion}) (from ${resolvedPath})`, - ), + `Loaded plugin ${pluginName} (${loadedPluginAndVersion}) (from ${resolvedPath})` + ) ); } diff --git a/@commitlint/load/src/utils/plugin-naming.ts b/@commitlint/load/src/utils/plugin-naming.ts index 5aafe59650d..ecf42784b42 100644 --- a/@commitlint/load/src/utils/plugin-naming.ts +++ b/@commitlint/load/src/utils/plugin-naming.ts @@ -38,14 +38,14 @@ export function normalizePackageName(name: string) { */ const scopedPackageShortcutRegex = new RegExp( `^(@[^/]+)(?:/(?:${prefix})?)?$`, - 'u', + 'u' ), scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, 'u'); if (scopedPackageShortcutRegex.test(normalizedName)) { normalizedName = normalizedName.replace( scopedPackageShortcutRegex, - `$1/${prefix}`, + `$1/${prefix}` ); } else if (!scopedPackageNameRegex.test(normalizedName.split('/')[1])) { /** @@ -54,7 +54,7 @@ export function normalizePackageName(name: string) { */ normalizedName = normalizedName.replace( /^@([^/]+)\/(.*)$/u, - `@$1/${prefix}-$2`, + `@$1/${prefix}-$2` ); } } else if (normalizedName.indexOf(`${prefix}-`) !== 0) { diff --git a/@commitlint/message/src/index.test.ts b/@commitlint/message/src/index.test.ts index f7379262afe..04c74201faa 100644 --- a/@commitlint/message/src/index.test.ts +++ b/@commitlint/message/src/index.test.ts @@ -10,6 +10,6 @@ test('should return an empty string for empty input array', () => { test('should filter falsy values', () => { expect(message([null, 'some', undefined, 'message', null])).toBe( - 'some message', + 'some message' ); }); diff --git a/@commitlint/parse/src/index.ts b/@commitlint/parse/src/index.ts index 506e14f33cd..52b3ac17a87 100644 --- a/@commitlint/parse/src/index.ts +++ b/@commitlint/parse/src/index.ts @@ -6,7 +6,7 @@ const defaultChangelogOpts = require('conventional-changelog-angular'); export async function parse( message: string, parser: Parser = sync, - parserOpts?: ParserOptions, + parserOpts?: ParserOptions ): Promise { const defaultOpts = (await defaultChangelogOpts).parserOpts; const opts = { diff --git a/@commitlint/prompt/src/input.test.ts b/@commitlint/prompt/src/input.test.ts index df951b5708b..cde2a5efb22 100644 --- a/@commitlint/prompt/src/input.test.ts +++ b/@commitlint/prompt/src/input.test.ts @@ -10,7 +10,7 @@ jest.mock( }, { virtual: true, - }, + } ); test('should work with all fields filled', async () => { @@ -56,7 +56,7 @@ test('should fail without type', async () => { expect(message).toEqual(''); expect(console.error).toHaveBeenCalledTimes(1); expect(console.error).toHaveBeenLastCalledWith( - new Error(`⚠ ${chalk.bold('type')} may not be empty.`), + new Error(`⚠ ${chalk.bold('type')} may not be empty.`) ); spy.mockRestore(); }); diff --git a/@commitlint/prompt/src/input.ts b/@commitlint/prompt/src/input.ts index a0c3cd4bc6f..702c04608f8 100644 --- a/@commitlint/prompt/src/input.ts +++ b/@commitlint/prompt/src/input.ts @@ -21,7 +21,7 @@ export async function input(prompter: PromptModule): Promise { const headerParts = ['type', 'scope', 'subject']; const headerLengthRule = getRules('header', rules).find( - getHasName('max-length'), + getHasName('max-length') ); const maxLength = getMaxLength(headerLengthRule); diff --git a/@commitlint/prompt/src/inquirer/InputCustomPrompt.ts b/@commitlint/prompt/src/inquirer/InputCustomPrompt.ts index ca65f8e2dfe..7ad5700d813 100644 --- a/@commitlint/prompt/src/inquirer/InputCustomPrompt.ts +++ b/@commitlint/prompt/src/inquirer/InputCustomPrompt.ts @@ -16,7 +16,7 @@ interface KeyDescriptor { } export default class InputCustomPrompt< - TQuestion extends InputCustomOptions = InputCustomOptions, + TQuestion extends InputCustomOptions = InputCustomOptions > extends InputPrompt { private lineSubscription: Subscription; private readonly tabCompletion: string[]; @@ -24,7 +24,7 @@ export default class InputCustomPrompt< constructor( question: TQuestion, readLine: ReadlineInterface, - answers: Answers, + answers: Answers ) { super(question, readLine, answers); @@ -38,7 +38,7 @@ export default class InputCustomPrompt< const events = observe(this.rl); this.lineSubscription = events.keypress.subscribe( - this.onKeyPress2.bind(this), + this.onKeyPress2.bind(this) ); this.tabCompletion = (this.opt.tabCompletion || []) .map((item) => item.value) diff --git a/@commitlint/prompt/src/library/get-forced-case-fn.ts b/@commitlint/prompt/src/library/get-forced-case-fn.ts index 23ffdd0a398..2fb39c607c2 100644 --- a/@commitlint/prompt/src/library/get-forced-case-fn.ts +++ b/@commitlint/prompt/src/library/get-forced-case-fn.ts @@ -9,7 +9,7 @@ import type {TargetCaseType} from '@commitlint/types'; * @return transform function applying the enforced case */ export default function getForcedCaseFn( - rule?: RuleEntry, + rule?: RuleEntry ): (input: string) => string { const noop = (input: string) => input; diff --git a/@commitlint/prompt/src/library/get-forced-leading-fn.ts b/@commitlint/prompt/src/library/get-forced-leading-fn.ts index 7356b2ce375..8a37906609d 100644 --- a/@commitlint/prompt/src/library/get-forced-leading-fn.ts +++ b/@commitlint/prompt/src/library/get-forced-leading-fn.ts @@ -7,7 +7,7 @@ import {ruleIsActive, ruleIsNotApplicable} from './utils'; * @return transform function applying the leading */ export default function getForcedLeadingFn( - rule?: RuleEntry, + rule?: RuleEntry ): (input: string) => string { if (!rule || !ruleIsActive(rule)) { return (input: string): string => input; diff --git a/@commitlint/prompt/src/library/get-prompt.ts b/@commitlint/prompt/src/library/get-prompt.ts index ecb33798e41..abaf4ce82b7 100644 --- a/@commitlint/prompt/src/library/get-prompt.ts +++ b/@commitlint/prompt/src/library/get-prompt.ts @@ -28,7 +28,7 @@ const EOL = '\n'; export default function getPrompt( type: ResultPart, rules: RuleEntry[] = [], - settings: InputSetting = {}, + settings: InputSetting = {} ): InputCustomOptions | null { const emptyRule = rules.filter(getHasName('empty')).find(ruleIsActive); @@ -42,7 +42,7 @@ export default function getPrompt( const forceCaseFn = getForcedCaseFn(rules.find(getHasName('case'))); const forceLeadingBlankFn = getForcedLeadingFn( - rules.find(getHasName('leading-blank')), + rules.find(getHasName('leading-blank')) ); const maxLengthRule = rules.find(getHasName('max-length')); diff --git a/@commitlint/prompt/src/library/meta.ts b/@commitlint/prompt/src/library/meta.ts index dd0f294d49b..61c9a412eb5 100644 --- a/@commitlint/prompt/src/library/meta.ts +++ b/@commitlint/prompt/src/library/meta.ts @@ -13,6 +13,6 @@ export default function meta(settings: Record): string { const [name, value] = item; return typeof value === 'boolean' ? `[${name}]` : `[${name}=${value}]`; }) - .join(' '), + .join(' ') ); } diff --git a/@commitlint/prompt/src/library/utils.test.ts b/@commitlint/prompt/src/library/utils.test.ts index 10ae36b10e6..3d693134566 100644 --- a/@commitlint/prompt/src/library/utils.test.ts +++ b/@commitlint/prompt/src/library/utils.test.ts @@ -44,29 +44,29 @@ test('getRuleName', () => { test('ruleIsActive', () => { expect(ruleIsActive(['', [RuleConfigSeverity.Error, 'always', 100]])).toBe( - true, + true ); expect(ruleIsActive(['', [RuleConfigSeverity.Warning, 'never', 100]])).toBe( - true, + true ); expect(ruleIsActive(['', [RuleConfigSeverity.Disabled, 'always', 100]])).toBe( - false, + false ); expect(ruleIsActive(['', [RuleConfigSeverity.Error]] as any)).toBe(true); }); test('getMaxLength', () => { expect(getMaxLength(['', [RuleConfigSeverity.Error, 'always', 100]])).toBe( - 100, + 100 ); expect(getMaxLength(['', [RuleConfigSeverity.Warning, 'never', 100]])).toBe( - Infinity, + Infinity ); expect(getMaxLength(['', [RuleConfigSeverity.Disabled, 'always', 100]])).toBe( - Infinity, + Infinity ); expect(getMaxLength(['', [RuleConfigSeverity.Error, 100]] as any)).toBe( - Infinity, + Infinity ); const rules: any = { diff --git a/@commitlint/prompt/src/library/utils.ts b/@commitlint/prompt/src/library/utils.ts index bff355329aa..089bd1b8001 100644 --- a/@commitlint/prompt/src/library/utils.ts +++ b/@commitlint/prompt/src/library/utils.ts @@ -27,7 +27,7 @@ export function getRulePrefix(id: string): string | null { */ export function getHasName(name: string) { return ( - rule: RuleEntry, + rule: RuleEntry ): rule is Exclude => getRuleName(rule[0]) === name; } @@ -37,7 +37,7 @@ export function getHasName(name: string) { * @return if the rule definition is active */ export function ruleIsActive( - rule: T, + rule: T ): rule is Exclude]> { const [, value] = rule; if (value && Array.isArray(value)) { @@ -52,7 +52,7 @@ export function ruleIsActive( * @return if the rule definition is applicable */ export function ruleIsApplicable( - rule: RuleEntry, + rule: RuleEntry ): rule is | [string, Readonly<[RuleConfigSeverity, 'always']>] | [string, Readonly<[RuleConfigSeverity, 'always', unknown]>] { @@ -69,7 +69,7 @@ export function ruleIsApplicable( * @return if the rule definition is applicable */ export function ruleIsNotApplicable( - rule: RuleEntry, + rule: RuleEntry ): rule is | [string, Readonly<[RuleConfigSeverity, 'never']>] | [string, Readonly<[RuleConfigSeverity, 'never', unknown]>] { @@ -81,12 +81,12 @@ export function ruleIsNotApplicable( } export function enumRuleIsActive( - rule: RuleEntry, + rule: RuleEntry ): rule is [ string, Readonly< [RuleConfigSeverity.Warning | RuleConfigSeverity.Error, 'always', string[]] - >, + > ] { return ( ruleIsActive(rule) && @@ -104,7 +104,7 @@ export function enumRuleIsActive( */ export function getRules(prefix: string, rules: QualifiedRules): RuleEntry[] { return Object.entries(rules).filter( - (rule): rule is RuleEntry => getRulePrefix(rule[0]) === prefix, + (rule): rule is RuleEntry => getRulePrefix(rule[0]) === prefix ); } diff --git a/@commitlint/read/src/get-edit-commit.ts b/@commitlint/read/src/get-edit-commit.ts index 246f6e3d740..81041db9269 100644 --- a/@commitlint/read/src/get-edit-commit.ts +++ b/@commitlint/read/src/get-edit-commit.ts @@ -5,7 +5,7 @@ import {getEditFilePath} from './get-edit-file-path'; // Get recently edited commit message export async function getEditCommit( cwd?: string, - edit?: boolean | string, + edit?: boolean | string ): Promise { const top = await toplevel(cwd); diff --git a/@commitlint/read/src/get-edit-file-path.ts b/@commitlint/read/src/get-edit-file-path.ts index 3e3836ea41d..d90ac6b7b39 100644 --- a/@commitlint/read/src/get-edit-file-path.ts +++ b/@commitlint/read/src/get-edit-file-path.ts @@ -5,7 +5,7 @@ import fs from 'fs-extra'; // Get path to recently edited commit message file export async function getEditFilePath( top: string, - edit?: boolean | string, + edit?: boolean | string ): Promise { if (typeof edit === 'string') { return path.resolve(top, edit); diff --git a/@commitlint/read/src/get-history-commits.ts b/@commitlint/read/src/get-history-commits.ts index 31189c19d32..21616b466f5 100644 --- a/@commitlint/read/src/get-history-commits.ts +++ b/@commitlint/read/src/get-history-commits.ts @@ -4,7 +4,7 @@ import {streamToPromise} from './stream-to-promise'; // Get commit messages from history export async function getHistoryCommits( options: gitRawCommits.GitOptions, - opts: {cwd?: string} = {}, + opts: {cwd?: string} = {} ): Promise { return streamToPromise(gitRawCommits(options, {cwd: opts.cwd})); } diff --git a/@commitlint/read/src/read.ts b/@commitlint/read/src/read.ts index 0beb1ed06fd..5985bf44632 100644 --- a/@commitlint/read/src/read.ts +++ b/@commitlint/read/src/read.ts @@ -13,7 +13,7 @@ interface GetCommitMessageOptions { // Get commit messages export default async function getCommitMessages( - settings: GetCommitMessageOptions, + settings: GetCommitMessageOptions ): Promise { const {cwd, from, to, edit, gitLogArgs} = settings; diff --git a/@commitlint/read/src/stream-to-promise.ts b/@commitlint/read/src/stream-to-promise.ts index 4c076ec8f9d..afa8c634466 100644 --- a/@commitlint/read/src/stream-to-promise.ts +++ b/@commitlint/read/src/stream-to-promise.ts @@ -6,6 +6,6 @@ export function streamToPromise(stream: Readable): Promise { stream .on('data', (chunk) => data.push(chunk.toString('utf-8'))) .on('error', reject) - .on('end', () => resolve(data)), + .on('end', () => resolve(data)) ); } diff --git a/@commitlint/resolve-extends/src/index.test.ts b/@commitlint/resolve-extends/src/index.test.ts index e5ece04f851..3e553ca1659 100644 --- a/@commitlint/resolve-extends/src/index.test.ts +++ b/@commitlint/resolve-extends/src/index.test.ts @@ -26,7 +26,7 @@ test('falls back to global install', async () => { test('fails for missing extends', async () => { expect(() => resolveExtends({extends: ['@commitlint/foo-bar']})).toThrow( - /Cannot find module "@commitlint\/foo-bar" from/, + /Cannot find module "@commitlint\/foo-bar" from/ ); }); diff --git a/@commitlint/resolve-extends/src/index.ts b/@commitlint/resolve-extends/src/index.ts index 873d63d71d7..8f1c9b6770a 100644 --- a/@commitlint/resolve-extends/src/index.ts +++ b/@commitlint/resolve-extends/src/index.ts @@ -19,7 +19,7 @@ export interface ResolveExtendsContext { export default function resolveExtends( config: UserConfig = {}, - context: ResolveExtendsContext = {}, + context: ResolveExtendsContext = {} ): UserConfig { const {extends: e} = config; const extended = loadExtends(config, context); @@ -35,13 +35,13 @@ export default function resolveExtends( return srcValue; } }), - e ? {extends: e} : {}, + e ? {extends: e} : {} ); } function loadExtends( config: UserConfig = {}, - context: ResolveExtendsContext = {}, + context: ResolveExtendsContext = {} ): UserConfig[] { const {extends: e} = config; const ext = e ? (Array.isArray(e) ? e : [e]) : []; @@ -93,7 +93,7 @@ function getId(raw: string = '', prefix: string = ''): string { function resolveConfig( raw: string, - context: ResolveExtendsContext = {}, + context: ResolveExtendsContext = {} ): string { const resolve = context.resolve || resolveId; const id = getId(raw, context.prefix); @@ -104,7 +104,7 @@ function resolveConfig( const legacy = getId(raw, 'conventional-changelog-lint-config'); const resolved = resolve(legacy, context); console.warn( - `Resolving ${raw} to legacy config ${legacy}. To silence this warning raise an issue at 'npm repo ${legacy}' to rename to ${id}.`, + `Resolving ${raw} to legacy config ${legacy}. To silence this warning raise an issue at 'npm repo ${legacy}' to rename to ${id}.` ); return resolved; } @@ -112,7 +112,7 @@ function resolveConfig( function resolveId( id: string, - context: {cwd?: string; resolveGlobal?: (id: string) => string | void} = {}, + context: {cwd?: string; resolveGlobal?: (id: string) => string | void} = {} ): string { const cwd = context.cwd || process.cwd(); const localPath = resolveFromSilent(cwd, id); diff --git a/@commitlint/rules/src/body-case.ts b/@commitlint/rules/src/body-case.ts index b840d8cfeec..6c0291c22d4 100644 --- a/@commitlint/rules/src/body-case.ts +++ b/@commitlint/rules/src/body-case.ts @@ -7,7 +7,7 @@ const negated = (when?: string) => when === 'never'; export const bodyCase: SyncRule = ( parsed, when = 'always', - value = [], + value = [] ) => { const {body} = parsed; diff --git a/@commitlint/rules/src/body-full-stop.ts b/@commitlint/rules/src/body-full-stop.ts index f0607f6e7c3..61d79ec7c8c 100644 --- a/@commitlint/rules/src/body-full-stop.ts +++ b/@commitlint/rules/src/body-full-stop.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const bodyFullStop: SyncRule = ( parsed, when = 'always', - value = '.', + value = '.' ) => { const input = parsed.body; diff --git a/@commitlint/rules/src/body-max-length.ts b/@commitlint/rules/src/body-max-length.ts index 632f2548699..91211290564 100644 --- a/@commitlint/rules/src/body-max-length.ts +++ b/@commitlint/rules/src/body-max-length.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const bodyMaxLength: SyncRule = ( parsed, _when = undefined, - value = 0, + value = 0 ) => { const input = parsed.body; diff --git a/@commitlint/rules/src/body-max-line-length.ts b/@commitlint/rules/src/body-max-line-length.ts index 35e53b98ff3..5e937ef7e9e 100644 --- a/@commitlint/rules/src/body-max-line-length.ts +++ b/@commitlint/rules/src/body-max-line-length.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const bodyMaxLineLength: SyncRule = ( parsed, _when = undefined, - value = 0, + value = 0 ) => { const input = parsed.body; diff --git a/@commitlint/rules/src/body-min-length.ts b/@commitlint/rules/src/body-min-length.ts index aec46124991..f769e1a4a93 100644 --- a/@commitlint/rules/src/body-min-length.ts +++ b/@commitlint/rules/src/body-min-length.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const bodyMinLength: SyncRule = ( parsed, _when = undefined, - value = 0, + value = 0 ) => { if (!parsed.body) { return [true]; diff --git a/@commitlint/rules/src/footer-leading-blank.test.ts b/@commitlint/rules/src/footer-leading-blank.test.ts index 1b6ee82adfb..dcfd0430bac 100644 --- a/@commitlint/rules/src/footer-leading-blank.test.ts +++ b/@commitlint/rules/src/footer-leading-blank.test.ts @@ -165,7 +165,7 @@ test('with double blank line before footer and double line in body should succee test('with body containing comments should succeed for "always"', async () => { const [actual] = footerLeadingBlank( await parsed.withBodyWithComment, - 'always', + 'always' ); const expected = true; expect(actual).toEqual(expected); diff --git a/@commitlint/rules/src/footer-max-length.ts b/@commitlint/rules/src/footer-max-length.ts index 88e9d255ca8..43520ae5463 100644 --- a/@commitlint/rules/src/footer-max-length.ts +++ b/@commitlint/rules/src/footer-max-length.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const footerMaxLength: SyncRule = ( parsed, _when = undefined, - value = 0, + value = 0 ) => { const input = parsed.footer; diff --git a/@commitlint/rules/src/footer-max-line-length.ts b/@commitlint/rules/src/footer-max-line-length.ts index 338e343831c..34aea097dd3 100644 --- a/@commitlint/rules/src/footer-max-line-length.ts +++ b/@commitlint/rules/src/footer-max-line-length.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const footerMaxLineLength: SyncRule = ( parsed, _when = undefined, - value = 0, + value = 0 ) => { const input = parsed.footer; diff --git a/@commitlint/rules/src/footer-min-length.ts b/@commitlint/rules/src/footer-min-length.ts index f4420b2f529..9959cb788c2 100644 --- a/@commitlint/rules/src/footer-min-length.ts +++ b/@commitlint/rules/src/footer-min-length.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const footerMinLength: SyncRule = ( parsed, _when = undefined, - value = 0, + value = 0 ) => { if (!parsed.footer) { return [true]; diff --git a/@commitlint/rules/src/header-case.test.ts b/@commitlint/rules/src/header-case.test.ts index 824d107a5e8..49fcde9dbbe 100644 --- a/@commitlint/rules/src/header-case.test.ts +++ b/@commitlint/rules/src/header-case.test.ts @@ -227,7 +227,7 @@ test('should use expected message with "always"', async () => { const [, message] = headerCase( await parsed.uppercase, 'always', - 'lower-case', + 'lower-case' ); expect(message).toContain('must be lower-case'); }); diff --git a/@commitlint/rules/src/header-case.ts b/@commitlint/rules/src/header-case.ts index 73d53c953a0..cb907c9e40a 100644 --- a/@commitlint/rules/src/header-case.ts +++ b/@commitlint/rules/src/header-case.ts @@ -7,7 +7,7 @@ const negated = (when?: string) => when === 'never'; export const headerCase: SyncRule = ( parsed, when = 'always', - value = [], + value = [] ) => { const {header} = parsed; diff --git a/@commitlint/rules/src/header-full-stop.ts b/@commitlint/rules/src/header-full-stop.ts index 052ce6ccd26..3b2880a9c9c 100644 --- a/@commitlint/rules/src/header-full-stop.ts +++ b/@commitlint/rules/src/header-full-stop.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const headerFullStop: SyncRule = ( parsed, when = 'always', - value = '.', + value = '.' ) => { const {header} = parsed; const negated = when === 'never'; diff --git a/@commitlint/rules/src/header-max-length.ts b/@commitlint/rules/src/header-max-length.ts index dbb4744c9bc..64855e6615b 100644 --- a/@commitlint/rules/src/header-max-length.ts +++ b/@commitlint/rules/src/header-max-length.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const headerMaxLength: SyncRule = ( parsed, _when = undefined, - value = 0, + value = 0 ) => { return [ maxLength(parsed.header, value), diff --git a/@commitlint/rules/src/header-min-length.ts b/@commitlint/rules/src/header-min-length.ts index 3a71d3add7e..cc84ef56e7f 100644 --- a/@commitlint/rules/src/header-min-length.ts +++ b/@commitlint/rules/src/header-min-length.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const headerMinLength: SyncRule = ( parsed, _when = undefined, - value = 0, + value = 0 ) => { return [ minLength(parsed.header, value), diff --git a/@commitlint/rules/src/index.test.ts b/@commitlint/rules/src/index.test.ts index 09f6dad0c0b..e31802ebd89 100644 --- a/@commitlint/rules/src/index.test.ts +++ b/@commitlint/rules/src/index.test.ts @@ -17,7 +17,7 @@ test('rules export functions', () => { test('all rules are present in documentation', () => { const file = fs.readFileSync( path.join(__dirname, '../../../docs/reference-rules.md'), - 'utf-8', + 'utf-8' ); const results = file .split(/(\n|\r)/) diff --git a/@commitlint/rules/src/scope-case.ts b/@commitlint/rules/src/scope-case.ts index f5177e631ec..9bac0d3db20 100644 --- a/@commitlint/rules/src/scope-case.ts +++ b/@commitlint/rules/src/scope-case.ts @@ -7,7 +7,7 @@ const negated = (when?: string) => when === 'never'; export const scopeCase: SyncRule = ( parsed, when = 'always', - value = [], + value = [] ) => { const {scope} = parsed; @@ -32,7 +32,7 @@ export const scopeCase: SyncRule = ( const result = checks.some((check) => { const r = scopeSegments.every( - (segment) => delimiters.test(segment) || ensureCase(segment, check.case), + (segment) => delimiters.test(segment) || ensureCase(segment, check.case) ); return negated(check.when) ? !r : r; diff --git a/@commitlint/rules/src/scope-enum.ts b/@commitlint/rules/src/scope-enum.ts index 9fc36a9726f..e368df5a6a5 100644 --- a/@commitlint/rules/src/scope-enum.ts +++ b/@commitlint/rules/src/scope-enum.ts @@ -5,7 +5,7 @@ import {SyncRule} from '@commitlint/types'; export const scopeEnum: SyncRule = ( parsed, when = 'always', - value = [], + value = [] ) => { if (!parsed.scope) { return [true, '']; diff --git a/@commitlint/rules/src/scope-max-length.ts b/@commitlint/rules/src/scope-max-length.ts index de0174273eb..917d548f918 100644 --- a/@commitlint/rules/src/scope-max-length.ts +++ b/@commitlint/rules/src/scope-max-length.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const scopeMaxLength: SyncRule = ( parsed, _when = undefined, - value = 0, + value = 0 ) => { const input = parsed.scope; diff --git a/@commitlint/rules/src/scope-min-length.ts b/@commitlint/rules/src/scope-min-length.ts index bcbac327eff..55a69da3e9a 100644 --- a/@commitlint/rules/src/scope-min-length.ts +++ b/@commitlint/rules/src/scope-min-length.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const scopeMinLength: SyncRule = ( parsed, _when = undefined, - value = 0, + value = 0 ) => { const input = parsed.scope; if (!input) { diff --git a/@commitlint/rules/src/signed-off-by.test.ts b/@commitlint/rules/src/signed-off-by.test.ts index d5f1d9ebb68..29fc6655017 100644 --- a/@commitlint/rules/src/signed-off-by.test.ts +++ b/@commitlint/rules/src/signed-off-by.test.ts @@ -55,7 +55,7 @@ test('without against "always signed-off-by" should fail', async () => { const [actual] = signedOffBy( await parsed.without, 'always', - 'Signed-off-by:', + 'Signed-off-by:' ); const expected = false; expect(actual).toEqual(expected); @@ -71,7 +71,7 @@ test('trailing comments should be ignored', async () => { const [actual] = signedOffBy( await parsed.withSignoffAndComments, 'always', - 'Signed-off-by:', + 'Signed-off-by:' ); const expected = true; expect(actual).toEqual(expected); @@ -81,7 +81,7 @@ test('inSubject against "always signed-off-by" should fail', async () => { const [actual] = signedOffBy( await parsed.inSubject, 'always', - 'Signed-off-by:', + 'Signed-off-by:' ); const expected = false; expect(actual).toEqual(expected); @@ -91,7 +91,7 @@ test('inSubject against "never signed-off-by" should succeed', async () => { const [actual] = signedOffBy( await parsed.inSubject, 'never', - 'Signed-off-by:', + 'Signed-off-by:' ); const expected = true; expect(actual).toEqual(expected); diff --git a/@commitlint/rules/src/signed-off-by.ts b/@commitlint/rules/src/signed-off-by.ts index db7ed341a6b..674a2061974 100644 --- a/@commitlint/rules/src/signed-off-by.ts +++ b/@commitlint/rules/src/signed-off-by.ts @@ -5,14 +5,14 @@ import {SyncRule} from '@commitlint/types'; export const signedOffBy: SyncRule = ( parsed, when = 'always', - value = '', + value = '' ) => { const lines = toLines(parsed.raw).filter( (ln) => // skip comments !ln.startsWith('#') && // ignore empty lines - Boolean(ln), + Boolean(ln) ); const last = lines[lines.length - 1]; diff --git a/@commitlint/rules/src/subject-case.test.ts b/@commitlint/rules/src/subject-case.test.ts index 224f9d86445..d7054f3a0fe 100644 --- a/@commitlint/rules/src/subject-case.test.ts +++ b/@commitlint/rules/src/subject-case.test.ts @@ -87,7 +87,7 @@ test('with lowercase unicode subject should fail for "always uppercase"', async const [actual] = subjectCase( await parsed.lowercase_unicode, 'always', - 'upper-case', + 'upper-case' ); const expected = false; expect(actual).toEqual(expected); @@ -151,7 +151,7 @@ test('with uppercase unicode subject should fail for "always lowercase"', async const [actual] = subjectCase( await parsed.uppercase_unicode, 'always', - 'lower-case', + 'lower-case' ); const expected = false; expect(actual).toEqual(expected); @@ -197,7 +197,7 @@ test('with camelcase unicode subject should fail for "always sentencecase"', asy const [actual] = subjectCase( await parsed.camelcase_unicode, 'always', - 'sentence-case', + 'sentence-case' ); const expected = false; expect(actual).toEqual(expected); @@ -207,7 +207,7 @@ test('with kebabcase unicode subject should fail for "always camelcase"', async const [actual] = subjectCase( await parsed.kebabcase_unicode, 'always', - 'camel-case', + 'camel-case' ); const expected = false; expect(actual).toEqual(expected); @@ -229,7 +229,7 @@ test('with pascalcase subject should succeed for "always pascalcase"', async () const [actual] = subjectCase( await parsed.pascalcase, 'always', - 'pascal-case', + 'pascal-case' ); const expected = true; expect(actual).toEqual(expected); @@ -257,7 +257,7 @@ test('with pascalcase unicode subject should fail for "always uppercase"', async const [actual] = subjectCase( await parsed.pascalcase_unicode, 'always', - 'upper-case', + 'upper-case' ); const expected = false; expect(actual).toEqual(expected); @@ -303,7 +303,7 @@ test('with snakecase unicode subject should fail for "never lowercase"', async ( const [actual] = subjectCase( await parsed.snakecase_unicode, 'never', - 'lower-case', + 'lower-case' ); const expected = false; expect(actual).toEqual(expected); @@ -355,7 +355,7 @@ test('with startcase unicode subject should fail for "always pascalcase"', async const [actual] = subjectCase( await parsed.startcase_unicode, 'always', - 'pascal-case', + 'pascal-case' ); const expected = false; expect(actual).toEqual(expected); @@ -365,7 +365,7 @@ test('with sentencecase subject should succeed for "always sentence-case"', asyn const [actual] = subjectCase( await parsed.sentencecase, 'always', - 'sentence-case', + 'sentence-case' ); const expected = true; expect(actual).toEqual(expected); @@ -375,7 +375,7 @@ test('with sentencecase subject should fail for "never sentencecase"', async () const [actual] = subjectCase( await parsed.sentencecase, 'never', - 'sentence-case', + 'sentence-case' ); const expected = false; expect(actual).toEqual(expected); @@ -385,7 +385,7 @@ test('with sentencecase subject should fail for "always pascalcase"', async () = const [actual] = subjectCase( await parsed.sentencecase, 'always', - 'pascal-case', + 'pascal-case' ); const expected = false; expect(actual).toEqual(expected); @@ -395,7 +395,7 @@ test('with sentencecase subject should succeed for "never camelcase"', async () const [actual] = subjectCase( await parsed.sentencecase, 'never', - 'camel-case', + 'camel-case' ); const expected = true; expect(actual).toEqual(expected); @@ -405,7 +405,7 @@ test('with sentencecase unicode subject should fail for "always camelcase"', asy const [actual] = subjectCase( await parsed.sentencecase_unicode, 'always', - 'camel-case', + 'camel-case' ); const expected = false; expect(actual).toEqual(expected); @@ -415,7 +415,7 @@ test('should use expected message with "always"', async () => { const [, message] = subjectCase( await parsed.uppercase, 'always', - 'lower-case', + 'lower-case' ); expect(message).toContain('must be lower-case'); }); @@ -424,7 +424,7 @@ test('should use expected message with "never"', async () => { const [, message] = subjectCase( await parsed.uppercase, 'never', - 'upper-case', + 'upper-case' ); expect(message).toContain('must not be upper-case'); }); diff --git a/@commitlint/rules/src/subject-case.ts b/@commitlint/rules/src/subject-case.ts index 3c3d3fe682b..13e7de850a7 100644 --- a/@commitlint/rules/src/subject-case.ts +++ b/@commitlint/rules/src/subject-case.ts @@ -24,7 +24,7 @@ const negated = (when?: string) => when === 'never'; export const subjectCase: SyncRule = ( parsed, when = 'always', - value = [], + value = [] ) => { const {subject} = parsed; diff --git a/@commitlint/rules/src/subject-full-stop.test.ts b/@commitlint/rules/src/subject-full-stop.test.ts index 0f17fa4cf2e..fadae4ac856 100644 --- a/@commitlint/rules/src/subject-full-stop.test.ts +++ b/@commitlint/rules/src/subject-full-stop.test.ts @@ -57,7 +57,7 @@ test('commit message title with standard scope and full-stop against "never ." s const [actual] = subjectFullStop( await parsed.standardScopeWith, 'never', - '.', + '.' ); const expected = false; expect(actual).toEqual(expected); @@ -67,7 +67,7 @@ test('commit message title with non standard scope and full-stop against "never const [actual] = subjectFullStop( await parsed.nonStandardScopeWith, 'never', - '.', + '.' ); const expected = false; expect(actual).toEqual(expected); diff --git a/@commitlint/rules/src/subject-full-stop.ts b/@commitlint/rules/src/subject-full-stop.ts index 040d78ed38d..c00161f5ab1 100644 --- a/@commitlint/rules/src/subject-full-stop.ts +++ b/@commitlint/rules/src/subject-full-stop.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const subjectFullStop: SyncRule = ( parsed, when = 'always', - value = '.', + value = '.' ) => { const colonIndex = parsed.header.indexOf(':'); if (colonIndex > 0 && colonIndex === parsed.header.length - 1) { diff --git a/@commitlint/rules/src/subject-max-length.ts b/@commitlint/rules/src/subject-max-length.ts index f07d331afa1..86d27ed60c5 100644 --- a/@commitlint/rules/src/subject-max-length.ts +++ b/@commitlint/rules/src/subject-max-length.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const subjectMaxLength: SyncRule = ( parsed, _when = undefined, - value = 0, + value = 0 ) => { const input = parsed.subject; diff --git a/@commitlint/rules/src/subject-min-length.ts b/@commitlint/rules/src/subject-min-length.ts index c92e6c81d06..98310a4fb3d 100644 --- a/@commitlint/rules/src/subject-min-length.ts +++ b/@commitlint/rules/src/subject-min-length.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const subjectMinLength: SyncRule = ( parsed, _when = undefined, - value = 0, + value = 0 ) => { const input = parsed.subject; if (!input) { diff --git a/@commitlint/rules/src/trailer-exists.test.ts b/@commitlint/rules/src/trailer-exists.test.ts index 8773501f58b..f97ab83be12 100644 --- a/@commitlint/rules/src/trailer-exists.test.ts +++ b/@commitlint/rules/src/trailer-exists.test.ts @@ -33,7 +33,7 @@ test('empty against "always trailer-exists" should fail', async () => { const [actual] = trailerExists( await parsed.empty, 'always', - 'Signed-off-by:', + 'Signed-off-by:' ); const expected = false; @@ -62,7 +62,7 @@ test('without against "always trailer-exists" should fail', async () => { const [actual] = trailerExists( await parsed.without, 'always', - 'Signed-off-by:', + 'Signed-off-by:' ); const expected = false; @@ -73,7 +73,7 @@ test('without against "never trailer-exists" should succeed', async () => { const [actual] = trailerExists( await parsed.without, 'never', - 'Signed-off-by:', + 'Signed-off-by:' ); const expected = true; @@ -84,7 +84,7 @@ test('comments and other trailers should be ignored', async () => { const [actual] = trailerExists( await parsed.withSignoffAndNoise, 'always', - 'Signed-off-by:', + 'Signed-off-by:' ); const expected = true; @@ -95,7 +95,7 @@ test('inSubject against "always trailer-exists" should fail', async () => { const [actual] = trailerExists( await parsed.inSubject, 'always', - 'Signed-off-by:', + 'Signed-off-by:' ); const expected = false; @@ -106,7 +106,7 @@ test('inSubject against "never trailer-exists" should succeed', async () => { const [actual] = trailerExists( await parsed.inSubject, 'never', - 'Signed-off-by:', + 'Signed-off-by:' ); const expected = true; @@ -117,7 +117,7 @@ test('inBody against "always trailer-exists" should fail', async () => { const [actual] = trailerExists( await parsed.inBody, 'always', - 'Signed-off-by:', + 'Signed-off-by:' ); const expected = false; @@ -128,7 +128,7 @@ test('inBody against "never trailer-exists" should succeed', async () => { const [actual] = trailerExists( await parsed.inBody, 'never', - 'Signed-off-by:', + 'Signed-off-by:' ); const expected = true; diff --git a/@commitlint/rules/src/trailer-exists.ts b/@commitlint/rules/src/trailer-exists.ts index b4d1bd42532..2b78da87a8a 100644 --- a/@commitlint/rules/src/trailer-exists.ts +++ b/@commitlint/rules/src/trailer-exists.ts @@ -6,7 +6,7 @@ import {SyncRule} from '@commitlint/types'; export const trailerExists: SyncRule = ( parsed, when = 'always', - value = '', + value = '' ) => { const trailers = execa.sync('git', ['interpret-trailers', '--parse'], { input: parsed.raw, diff --git a/@commitlint/rules/src/type-case.ts b/@commitlint/rules/src/type-case.ts index f4ae1da0196..71aa2fafdc6 100644 --- a/@commitlint/rules/src/type-case.ts +++ b/@commitlint/rules/src/type-case.ts @@ -7,7 +7,7 @@ const negated = (when?: string) => when === 'never'; export const typeCase: SyncRule = ( parsed, when = 'always', - value = [], + value = [] ) => { const {type} = parsed; diff --git a/@commitlint/rules/src/type-enum.ts b/@commitlint/rules/src/type-enum.ts index 4e509c1edb4..c4a8f9aa180 100644 --- a/@commitlint/rules/src/type-enum.ts +++ b/@commitlint/rules/src/type-enum.ts @@ -5,7 +5,7 @@ import {SyncRule} from '@commitlint/types'; export const typeEnum: SyncRule = ( parsed, when = 'always', - value = [], + value = [] ) => { const {type: input} = parsed; diff --git a/@commitlint/rules/src/type-max-length.ts b/@commitlint/rules/src/type-max-length.ts index 016af9cde8f..1e4d27766f2 100644 --- a/@commitlint/rules/src/type-max-length.ts +++ b/@commitlint/rules/src/type-max-length.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const typeMaxLength: SyncRule = ( parsed, _when = undefined, - value = 0, + value = 0 ) => { const input = parsed.type; diff --git a/@commitlint/rules/src/type-min-length.ts b/@commitlint/rules/src/type-min-length.ts index c05370003a8..f7ff3ea38b7 100644 --- a/@commitlint/rules/src/type-min-length.ts +++ b/@commitlint/rules/src/type-min-length.ts @@ -4,7 +4,7 @@ import {SyncRule} from '@commitlint/types'; export const typeMinLength: SyncRule = ( parsed, _when = undefined, - value = 0, + value = 0 ) => { const input = parsed.type; if (!input) { diff --git a/@commitlint/travis-cli/src/cli.test.ts b/@commitlint/travis-cli/src/cli.test.ts index 83f507487fd..cd7d7704d17 100644 --- a/@commitlint/travis-cli/src/cli.test.ts +++ b/@commitlint/travis-cli/src/cli.test.ts @@ -29,7 +29,7 @@ const cli = async (config: execa.Options = {}, args: string[] = []) => { throw new Error([err.stdout, err.stderr].join('\n')); } else { throw new Error( - `An unknown error occured while running '${bin} ${args.join(' ')}'`, + `An unknown error occured while running '${bin} ${args.join(' ')}'` ); } } @@ -42,7 +42,7 @@ test('should throw when not on travis ci', async () => { }; await expect(cli({env})).rejects.toThrow( - '@commitlint/travis-cli is intended to be used on Travis CI', + '@commitlint/travis-cli is intended to be used on Travis CI' ); }); @@ -53,7 +53,7 @@ test('should throw when on travis ci, but env vars are missing', async () => { }; await expect(cli({env})).rejects.toThrow( - 'TRAVIS_COMMIT, TRAVIS_COMMIT_RANGE, TRAVIS_EVENT_TYPE, TRAVIS_REPO_SLUG, TRAVIS_PULL_REQUEST_SLUG', + 'TRAVIS_COMMIT, TRAVIS_COMMIT_RANGE, TRAVIS_EVENT_TYPE, TRAVIS_REPO_SLUG, TRAVIS_PULL_REQUEST_SLUG' ); }); @@ -62,7 +62,7 @@ test('should call git with expected args', async () => { 'https://github.com/conventional-changelog/commitlint.git', ['--depth=10'], __dirname, - TRAVIS_COMMITLINT_GIT_BIN, + TRAVIS_COMMITLINT_GIT_BIN ); const result = await cli({ @@ -84,7 +84,7 @@ test('should call git with expected args on pull_request', async () => { 'https://github.com/conventional-changelog/commitlint.git', ['--depth=10'], __dirname, - TRAVIS_COMMITLINT_GIT_BIN, + TRAVIS_COMMITLINT_GIT_BIN ); const result = await cli({ @@ -112,7 +112,7 @@ test('should call git with extra expected args on pull_request', async () => { 'https://github.com/conventional-changelog/commitlint.git', ['--depth=10'], __dirname, - TRAVIS_COMMITLINT_GIT_BIN, + TRAVIS_COMMITLINT_GIT_BIN ); const result = await cli( @@ -120,7 +120,7 @@ test('should call git with extra expected args on pull_request', async () => { cwd, env: {...validBaseEnv, TRAVIS_EVENT_TYPE: 'pull_request'}, }, - ['--config', './config/commitlint.config.js'], + ['--config', './config/commitlint.config.js'] ); const invocations = await getInvocations(result.stdout); expect(invocations.length).toBe(3); @@ -151,6 +151,6 @@ function getInvocations(stdout: string): string[][] { .split(',') .map((fragment) => fragment.trim()) .map((fragment) => fragment.substring(1, fragment.length - 1)) - .filter(Boolean), + .filter(Boolean) ); } diff --git a/@commitlint/travis-cli/src/cli.ts b/@commitlint/travis-cli/src/cli.ts index f5ce70c476c..22ccea6c87f 100644 --- a/@commitlint/travis-cli/src/cli.ts +++ b/@commitlint/travis-cli/src/cli.ts @@ -97,7 +97,7 @@ async function stash() { function validate() { if (process.env.CI !== 'true' || process.env.TRAVIS !== 'true') { throw new Error( - `@commitlint/travis-cli is intended to be used on Travis CI`, + `@commitlint/travis-cli is intended to be used on Travis CI` ); } @@ -106,7 +106,7 @@ function validate() { if (missing.length > 0) { const stanza = missing.length > 1 ? 'they were not' : 'it was not'; throw new Error( - `Expected ${missing.join(', ')} to be defined globally, ${stanza}.`, + `Expected ${missing.join(', ')} to be defined globally, ${stanza}.` ); } } diff --git a/@commitlint/types/src/format.ts b/@commitlint/types/src/format.ts index cee98cbbade..7180cb3b821 100644 --- a/@commitlint/types/src/format.ts +++ b/@commitlint/types/src/format.ts @@ -4,7 +4,7 @@ import {RuleConfigSeverity} from './rules'; export type Formatter = ( report: FormattableReport, - options: FormatOptions, + options: FormatOptions ) => string; export interface FormattableProblem { diff --git a/@commitlint/types/src/parse.ts b/@commitlint/types/src/parse.ts index 99f44472492..3eb026247ef 100644 --- a/@commitlint/types/src/parse.ts +++ b/@commitlint/types/src/parse.ts @@ -29,7 +29,7 @@ export interface CommitReference { export type Parser = ( message: string, - options: ParserOptions, + options: ParserOptions ) => Omit; export interface ParserOptions { diff --git a/@commitlint/types/src/rules.ts b/@commitlint/types/src/rules.ts index 60f13c45637..d0df4d0402b 100644 --- a/@commitlint/types/src/rules.ts +++ b/@commitlint/types/src/rules.ts @@ -17,7 +17,7 @@ export type RuleType = 'async' | 'sync' | 'either'; export type BaseRule = ( parsed: Commit, when?: RuleConfigCondition, - value?: Value, + value?: Value ) => Type extends 'either' ? RuleOutcome | Promise : Type extends 'async' @@ -70,7 +70,7 @@ export type QualifiedRuleConfig = export type RuleConfig< V = RuleConfigQuality.Qualified, - T = void, + T = void > = V extends RuleConfigQuality.Qualified ? RuleConfigTuple : QualifiedRuleConfig; diff --git a/@packages/test/src/git.ts b/@packages/test/src/git.ts index 6f09c5b8a43..e0ba9f7dbdd 100644 --- a/@packages/test/src/git.ts +++ b/@packages/test/src/git.ts @@ -13,7 +13,7 @@ export async function clone( source: string, args: string[], directory?: string, - gitCommand = 'git', + gitCommand = 'git' ) { const cwd = await fix.bootstrap(undefined, directory); diff --git a/@packages/test/src/npm.ts b/@packages/test/src/npm.ts index ac935165357..5e7da3a4ee5 100644 --- a/@packages/test/src/npm.ts +++ b/@packages/test/src/npm.ts @@ -10,7 +10,7 @@ export async function installModules(cwd: string) { if (await fs.pathExists(manifestPath)) { const {dependencies = {}, devDependencies = {}} = await fs.readJson( - manifestPath, + manifestPath ); const deps = Object.keys({...dependencies, ...devDependencies}); await Promise.all( @@ -32,7 +32,7 @@ export async function installModules(cwd: string) { await fs.mkdirp(path.join(targetPath, '..')); await fs.symlink(sourcePath, targetPath); - }), + }) ); } } @@ -45,7 +45,7 @@ export async function bootstrap(fixture: string, directory?: string) { function findParentPath( parentPath: string, - dirname: string, + dirname: string ): string | undefined { const rawFragments = parentPath.split(path.sep); @@ -61,7 +61,7 @@ function findParentPath( return {fragments, matched}; }, - {fragments: rawFragments, matched: false}, + {fragments: rawFragments, matched: false} ); return matched ? fragments.join(path.sep) : undefined; diff --git a/docs/reference-api.md b/docs/reference-api.md index c73d1521d69..794ceb33153 100644 --- a/docs/reference-api.md +++ b/docs/reference-api.md @@ -104,7 +104,7 @@ format( }, { color: false, - }, + } ); /* => [ '✖ This will show up red as it has level 2 [some-error]', @@ -258,12 +258,12 @@ load({extends: ['./package']}).then((config) => console.log(config)); // => { extends: ['./package', './package-b'], rules: {} } load({parserPreset: './parser-preset.js'}).then((config) => - console.log(config), + console.log(config) ); // => { extends: [], rules: {}, parserPreset: {name: './parser-preset.js', path: './parser-preset.js', opts: {}}} load({}, {file: '.commitlintrc.yml', cwd: process.cwd()}).then((config) => - console.log(config), + console.log(config) ); // => { extends: [], rules: { 'body-leading-blank': [ 1, 'always' ] }, formatter: '@commitlint/format', plugins: {} } ``` @@ -305,7 +305,7 @@ read({edit: true}).then((messages) => console.log(messages)); // => ['I did something\n\n'] read({edit: './git/GITGUI_EDITMESSAGE'}).then((messages) => - console.log(messages), + console.log(messages) ); // => ['I did something via git gui\n\n'] @@ -369,12 +369,12 @@ lint('foo: bar').then((report) => console.log(report)); // => { valid: true, errors: [], warnings: [] } lint('foo: bar', {'type-enum': [1, 'always', ['foo']]}).then((report) => - console.log(report), + console.log(report) ); // => { valid: true, errors: [], warnings: [] } lint('foo: bar', {'type-enum': [1, 'always', ['bar']]}).then((report) => - console.log(report), + console.log(report) ); /* => { valid: true, @@ -394,7 +394,7 @@ const opts = { }; lint('foo-bar', {'type-enum': [2, 'always', ['foo']]}, opts).then((report) => - console.log(report), + console.log(report) ); // => { valid: true, errors: [], warnings: [] } ``` @@ -414,8 +414,8 @@ load(CONFIG) lint( 'foo: bar', opts.rules, - opts.parserPreset ? {parserOpts: opts.parserPreset.parserOpts} : {}, - ), + opts.parserPreset ? {parserOpts: opts.parserPreset.parserOpts} : {} + ) ) .then((report) => console.log(report)); /* => @@ -442,7 +442,7 @@ const RULES = { const check = (commit) => lint(commit, RULES); read({to: 'HEAD', from: 'HEAD~2'}).then((commits) => - Promise.all(commits.map(check)), + Promise.all(commits.map(check)) ); ``` @@ -459,7 +459,7 @@ Promise.all([load(), read({from: 'HEAD~1'})]) return lint( commit, rules, - parserPreset ? {parserOpts: parserPreset.parserOpts} : {}, + parserPreset ? {parserOpts: parserPreset.parserOpts} : {} ); }) .then((report) => console.log(JSON.stringify(result.valid))); From b12ec06a3a20b8c343ffcaa7fc354ea5bc53e9f2 Mon Sep 17 00:00:00 2001 From: escapedcat Date: Wed, 9 Aug 2023 16:23:56 +0800 Subject: [PATCH 8/8] v17.7.0 --- @alias/commitlint-config-angular/CHANGELOG.md | 8 ++++++++ @alias/commitlint-config-angular/package.json | 4 ++-- .../commitlint-config-lerna-scopes/CHANGELOG.md | 8 ++++++++ .../commitlint-config-lerna-scopes/package.json | 4 ++-- .../commitlint-config-patternplate/CHANGELOG.md | 8 ++++++++ .../commitlint-config-patternplate/package.json | 4 ++-- @alias/commitlint/CHANGELOG.md | 8 ++++++++ @alias/commitlint/package.json | 4 ++-- @commitlint/cli/CHANGELOG.md | 8 ++++++++ @commitlint/cli/package.json | 6 +++--- @commitlint/config-angular/CHANGELOG.md | 8 ++++++++ @commitlint/config-angular/package.json | 4 ++-- @commitlint/config-conventional/CHANGELOG.md | 8 ++++++++ @commitlint/config-conventional/package.json | 4 ++-- @commitlint/config-lerna-scopes/CHANGELOG.md | 8 ++++++++ @commitlint/config-lerna-scopes/package.json | 2 +- @commitlint/config-patternplate/CHANGELOG.md | 8 ++++++++ @commitlint/config-patternplate/package.json | 4 ++-- @commitlint/config-pnpm-scopes/CHANGELOG.md | 8 ++++++++ @commitlint/config-pnpm-scopes/package.json | 2 +- @commitlint/core/CHANGELOG.md | 8 ++++++++ @commitlint/core/package.json | 6 +++--- @commitlint/cz-commitlint/CHANGELOG.md | 8 ++++++++ @commitlint/cz-commitlint/package.json | 4 ++-- @commitlint/is-ignored/CHANGELOG.md | 8 ++++++++ @commitlint/is-ignored/package.json | 4 ++-- @commitlint/lint/CHANGELOG.md | 8 ++++++++ @commitlint/lint/package.json | 8 ++++---- @commitlint/load/CHANGELOG.md | 11 +++++++++++ @commitlint/load/package.json | 2 +- @commitlint/parse/CHANGELOG.md | 8 ++++++++ @commitlint/parse/package.json | 2 +- @commitlint/prompt-cli/CHANGELOG.md | 8 ++++++++ @commitlint/prompt-cli/package.json | 4 ++-- @commitlint/prompt/CHANGELOG.md | 8 ++++++++ @commitlint/prompt/package.json | 6 +++--- @commitlint/rules/CHANGELOG.md | 8 ++++++++ @commitlint/rules/package.json | 4 ++-- @commitlint/travis-cli/CHANGELOG.md | 8 ++++++++ @commitlint/travis-cli/package.json | 4 ++-- @packages/test-environment/CHANGELOG.md | 8 ++++++++ @packages/test-environment/package.json | 2 +- CHANGELOG.md | 17 +++++++++++++++++ lerna.json | 2 +- 44 files changed, 231 insertions(+), 43 deletions(-) diff --git a/@alias/commitlint-config-angular/CHANGELOG.md b/@alias/commitlint-config-angular/CHANGELOG.md index f5ce4944c10..425dde0e3eb 100644 --- a/@alias/commitlint-config-angular/CHANGELOG.md +++ b/@alias/commitlint-config-angular/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package commitlint-config-angular + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package commitlint-config-angular diff --git a/@alias/commitlint-config-angular/package.json b/@alias/commitlint-config-angular/package.json index e4dce13d605..1992de40e86 100644 --- a/@alias/commitlint-config-angular/package.json +++ b/@alias/commitlint-config-angular/package.json @@ -1,6 +1,6 @@ { "name": "commitlint-config-angular", - "version": "17.6.7", + "version": "17.7.0", "description": "Shareable commitlint config enforcing the angular commit convention", "files": [ "index.js" @@ -30,7 +30,7 @@ "node": ">=v14" }, "dependencies": { - "@commitlint/config-angular": "^17.6.7" + "@commitlint/config-angular": "^17.7.0" }, "devDependencies": { "@commitlint/utils": "^17.4.0" diff --git a/@alias/commitlint-config-lerna-scopes/CHANGELOG.md b/@alias/commitlint-config-lerna-scopes/CHANGELOG.md index f0e6fe2494d..ac6cc389cd5 100644 --- a/@alias/commitlint-config-lerna-scopes/CHANGELOG.md +++ b/@alias/commitlint-config-lerna-scopes/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package commitlint-config-lerna-scopes + + + + + ## [17.6.6](https://github.com/conventional-changelog/commitlint/compare/v17.6.5...v17.6.6) (2023-06-24) **Note:** Version bump only for package commitlint-config-lerna-scopes diff --git a/@alias/commitlint-config-lerna-scopes/package.json b/@alias/commitlint-config-lerna-scopes/package.json index 95e16532bf7..1fd1baeb7e0 100644 --- a/@alias/commitlint-config-lerna-scopes/package.json +++ b/@alias/commitlint-config-lerna-scopes/package.json @@ -1,6 +1,6 @@ { "name": "commitlint-config-lerna-scopes", - "version": "17.6.6", + "version": "17.7.0", "description": "Shareable commitlint config enforcing lerna package names as scopes", "files": [ "index.js" @@ -30,7 +30,7 @@ "node": ">=v14" }, "dependencies": { - "@commitlint/config-lerna-scopes": "^17.6.6" + "@commitlint/config-lerna-scopes": "^17.7.0" }, "devDependencies": { "@commitlint/utils": "^17.4.0" diff --git a/@alias/commitlint-config-patternplate/CHANGELOG.md b/@alias/commitlint-config-patternplate/CHANGELOG.md index cfccbd168c6..be691e38ed1 100644 --- a/@alias/commitlint-config-patternplate/CHANGELOG.md +++ b/@alias/commitlint-config-patternplate/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package commitlint-config-patternplate + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package commitlint-config-patternplate diff --git a/@alias/commitlint-config-patternplate/package.json b/@alias/commitlint-config-patternplate/package.json index 8ec41ba616d..7e7cbba8fce 100644 --- a/@alias/commitlint-config-patternplate/package.json +++ b/@alias/commitlint-config-patternplate/package.json @@ -1,6 +1,6 @@ { "name": "commitlint-config-patternplate", - "version": "17.6.7", + "version": "17.7.0", "description": "Lint your commits, patternplate-style", "files": [ "index.js" @@ -30,7 +30,7 @@ "node": ">=v14" }, "dependencies": { - "@commitlint/config-patternplate": "^17.6.7" + "@commitlint/config-patternplate": "^17.7.0" }, "devDependencies": { "@commitlint/utils": "^17.4.0" diff --git a/@alias/commitlint/CHANGELOG.md b/@alias/commitlint/CHANGELOG.md index 2e27c348038..901f6ea1d3e 100644 --- a/@alias/commitlint/CHANGELOG.md +++ b/@alias/commitlint/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package commitlint + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package commitlint diff --git a/@alias/commitlint/package.json b/@alias/commitlint/package.json index 919706f2ca8..d7763c311ba 100644 --- a/@alias/commitlint/package.json +++ b/@alias/commitlint/package.json @@ -1,6 +1,6 @@ { "name": "commitlint", - "version": "17.6.7", + "version": "17.7.0", "description": "Lint your commit messages", "files": [ "cli.js" @@ -35,7 +35,7 @@ }, "license": "MIT", "dependencies": { - "@commitlint/cli": "^17.6.7", + "@commitlint/cli": "^17.7.0", "@commitlint/types": "^17.4.4" }, "devDependencies": { diff --git a/@commitlint/cli/CHANGELOG.md b/@commitlint/cli/CHANGELOG.md index fb38566df34..14bebbffcbe 100644 --- a/@commitlint/cli/CHANGELOG.md +++ b/@commitlint/cli/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/cli + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package @commitlint/cli diff --git a/@commitlint/cli/package.json b/@commitlint/cli/package.json index 3de5a56585b..0fd97271a59 100644 --- a/@commitlint/cli/package.json +++ b/@commitlint/cli/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/cli", - "version": "17.6.7", + "version": "17.7.0", "description": "Lint your commit messages", "files": [ "index.js", @@ -48,8 +48,8 @@ }, "dependencies": { "@commitlint/format": "^17.4.4", - "@commitlint/lint": "^17.6.7", - "@commitlint/load": "^17.6.7", + "@commitlint/lint": "^17.7.0", + "@commitlint/load": "^17.7.0", "@commitlint/read": "^17.5.1", "@commitlint/types": "^17.4.4", "execa": "^5.0.0", diff --git a/@commitlint/config-angular/CHANGELOG.md b/@commitlint/config-angular/CHANGELOG.md index 215fc0b5e64..a57d161d088 100644 --- a/@commitlint/config-angular/CHANGELOG.md +++ b/@commitlint/config-angular/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/config-angular + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package @commitlint/config-angular diff --git a/@commitlint/config-angular/package.json b/@commitlint/config-angular/package.json index b9f1b7d8b00..c57dbfb994f 100644 --- a/@commitlint/config-angular/package.json +++ b/@commitlint/config-angular/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/config-angular", - "version": "17.6.7", + "version": "17.7.0", "description": "Shareable commitlint config enforcing the angular commit convention", "files": [ "index.js" @@ -30,7 +30,7 @@ "node": ">=v14" }, "devDependencies": { - "@commitlint/lint": "^17.6.7", + "@commitlint/lint": "^17.7.0", "@commitlint/utils": "^17.4.0" }, "dependencies": { diff --git a/@commitlint/config-conventional/CHANGELOG.md b/@commitlint/config-conventional/CHANGELOG.md index e4657503afc..253e2d4449e 100644 --- a/@commitlint/config-conventional/CHANGELOG.md +++ b/@commitlint/config-conventional/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/config-conventional + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package @commitlint/config-conventional diff --git a/@commitlint/config-conventional/package.json b/@commitlint/config-conventional/package.json index 5f141292de7..77092c65181 100644 --- a/@commitlint/config-conventional/package.json +++ b/@commitlint/config-conventional/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/config-conventional", - "version": "17.6.7", + "version": "17.7.0", "description": "Shareable commitlint config enforcing conventional commits", "files": [ "index.js" @@ -33,7 +33,7 @@ "node": ">=v14" }, "devDependencies": { - "@commitlint/lint": "^17.6.7", + "@commitlint/lint": "^17.7.0", "@commitlint/utils": "^17.4.0" }, "dependencies": { diff --git a/@commitlint/config-lerna-scopes/CHANGELOG.md b/@commitlint/config-lerna-scopes/CHANGELOG.md index 42741ec1e20..e7874800a36 100644 --- a/@commitlint/config-lerna-scopes/CHANGELOG.md +++ b/@commitlint/config-lerna-scopes/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/config-lerna-scopes + + + + + ## [17.6.6](https://github.com/conventional-changelog/commitlint/compare/v17.6.5...v17.6.6) (2023-06-24) **Note:** Version bump only for package @commitlint/config-lerna-scopes diff --git a/@commitlint/config-lerna-scopes/package.json b/@commitlint/config-lerna-scopes/package.json index 9960dd14a29..af4b5843a01 100644 --- a/@commitlint/config-lerna-scopes/package.json +++ b/@commitlint/config-lerna-scopes/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/config-lerna-scopes", - "version": "17.6.6", + "version": "17.7.0", "description": "Shareable commitlint config enforcing lerna package and workspace names as scopes", "files": [ "index.js" diff --git a/@commitlint/config-patternplate/CHANGELOG.md b/@commitlint/config-patternplate/CHANGELOG.md index 71b19d6dbd3..9f671c1212e 100644 --- a/@commitlint/config-patternplate/CHANGELOG.md +++ b/@commitlint/config-patternplate/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/config-patternplate + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package @commitlint/config-patternplate diff --git a/@commitlint/config-patternplate/package.json b/@commitlint/config-patternplate/package.json index f1a074d8f4e..13474dc3ada 100644 --- a/@commitlint/config-patternplate/package.json +++ b/@commitlint/config-patternplate/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/config-patternplate", - "version": "17.6.7", + "version": "17.7.0", "description": "Lint your commits, patternplate-style", "files": [ "index.js" @@ -30,7 +30,7 @@ "node": ">=v14" }, "dependencies": { - "@commitlint/config-angular": "^17.6.7", + "@commitlint/config-angular": "^17.7.0", "glob": "^8.0.3", "lodash.merge": "^4.6.2" }, diff --git a/@commitlint/config-pnpm-scopes/CHANGELOG.md b/@commitlint/config-pnpm-scopes/CHANGELOG.md index 99eff9d0b11..08bfb1c282e 100644 --- a/@commitlint/config-pnpm-scopes/CHANGELOG.md +++ b/@commitlint/config-pnpm-scopes/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/config-pnpm-scopes + + + + + # [17.5.0](https://github.com/conventional-changelog/commitlint/compare/v17.4.4...v17.5.0) (2023-03-22) diff --git a/@commitlint/config-pnpm-scopes/package.json b/@commitlint/config-pnpm-scopes/package.json index 886873d8ed3..7409d17816c 100644 --- a/@commitlint/config-pnpm-scopes/package.json +++ b/@commitlint/config-pnpm-scopes/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/config-pnpm-scopes", - "version": "17.5.0", + "version": "17.7.0", "description": "Shareable commitlint config enforcing pnpm workspaces names as scopes", "files": [ "index.js" diff --git a/@commitlint/core/CHANGELOG.md b/@commitlint/core/CHANGELOG.md index 3e39bf7647d..aff346086bc 100644 --- a/@commitlint/core/CHANGELOG.md +++ b/@commitlint/core/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/core + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package @commitlint/core diff --git a/@commitlint/core/package.json b/@commitlint/core/package.json index 6b66a24a782..c1a1afa5899 100644 --- a/@commitlint/core/package.json +++ b/@commitlint/core/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/core", - "version": "17.6.7", + "version": "17.7.0", "description": "Lint your commit messages", "main": "lib/core.js", "types": "lib/core.d.ts", @@ -36,8 +36,8 @@ "license": "MIT", "dependencies": { "@commitlint/format": "^17.4.4", - "@commitlint/lint": "^17.6.7", - "@commitlint/load": "^17.6.7", + "@commitlint/lint": "^17.7.0", + "@commitlint/load": "^17.7.0", "@commitlint/read": "^17.5.1" }, "devDependencies": { diff --git a/@commitlint/cz-commitlint/CHANGELOG.md b/@commitlint/cz-commitlint/CHANGELOG.md index 5117349b71a..cbb1c9b7379 100644 --- a/@commitlint/cz-commitlint/CHANGELOG.md +++ b/@commitlint/cz-commitlint/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/cz-commitlint + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package @commitlint/cz-commitlint diff --git a/@commitlint/cz-commitlint/package.json b/@commitlint/cz-commitlint/package.json index ab8eb86cee2..0c8e5bccc71 100644 --- a/@commitlint/cz-commitlint/package.json +++ b/@commitlint/cz-commitlint/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/cz-commitlint", - "version": "17.6.7", + "version": "17.7.0", "description": "Commitizen adapter using the commitlint.config.js", "main": "./lib/index.js", "files": [ @@ -38,7 +38,7 @@ }, "dependencies": { "@commitlint/ensure": "^17.6.7", - "@commitlint/load": "^17.6.7", + "@commitlint/load": "^17.7.0", "@commitlint/types": "^17.4.4", "chalk": "^4.1.0", "lodash.isplainobject": "^4.0.6", diff --git a/@commitlint/is-ignored/CHANGELOG.md b/@commitlint/is-ignored/CHANGELOG.md index 8d5acf820fc..dc0e6966d0d 100644 --- a/@commitlint/is-ignored/CHANGELOG.md +++ b/@commitlint/is-ignored/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/is-ignored + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package @commitlint/is-ignored diff --git a/@commitlint/is-ignored/package.json b/@commitlint/is-ignored/package.json index 7a557897ff0..d8d75cc0bc6 100644 --- a/@commitlint/is-ignored/package.json +++ b/@commitlint/is-ignored/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/is-ignored", - "version": "17.6.7", + "version": "17.7.0", "description": "Lint your commit messages", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -35,7 +35,7 @@ }, "license": "MIT", "devDependencies": { - "@commitlint/parse": "^17.6.7", + "@commitlint/parse": "^17.7.0", "@commitlint/test": "^17.4.2", "@commitlint/utils": "^17.4.0", "@types/semver": "7.5.0" diff --git a/@commitlint/lint/CHANGELOG.md b/@commitlint/lint/CHANGELOG.md index c2f52037a23..0fdd9e7b931 100644 --- a/@commitlint/lint/CHANGELOG.md +++ b/@commitlint/lint/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/lint + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package @commitlint/lint diff --git a/@commitlint/lint/package.json b/@commitlint/lint/package.json index fa99ad67507..92526c6c5d0 100644 --- a/@commitlint/lint/package.json +++ b/@commitlint/lint/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/lint", - "version": "17.6.7", + "version": "17.7.0", "description": "Lint a string against commitlint rules", "main": "lib/lint.js", "types": "lib/lint.d.ts", @@ -39,9 +39,9 @@ "@commitlint/utils": "^17.4.0" }, "dependencies": { - "@commitlint/is-ignored": "^17.6.7", - "@commitlint/parse": "^17.6.7", - "@commitlint/rules": "^17.6.7", + "@commitlint/is-ignored": "^17.7.0", + "@commitlint/parse": "^17.7.0", + "@commitlint/rules": "^17.7.0", "@commitlint/types": "^17.4.4" }, "gitHead": "70f7f4688b51774e7ac5e40e896cdaa3f132b2bc" diff --git a/@commitlint/load/CHANGELOG.md b/@commitlint/load/CHANGELOG.md index cd519514248..0201dcf31c7 100644 --- a/@commitlint/load/CHANGELOG.md +++ b/@commitlint/load/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + + +### Features + +* **load:** use cosmiconfig-typescript-loader v5 to remove ts-node dependency for @commitlint/load ([#3633](https://github.com/conventional-changelog/commitlint/issues/3633)) ([4aa46d7](https://github.com/conventional-changelog/commitlint/commit/4aa46d796ad74958f5569d3346b60a1f92c33892)) + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package @commitlint/load diff --git a/@commitlint/load/package.json b/@commitlint/load/package.json index d4220b7cdb9..23bf2d835e3 100644 --- a/@commitlint/load/package.json +++ b/@commitlint/load/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/load", - "version": "17.6.7", + "version": "17.7.0", "description": "Load shared commitlint configuration", "main": "lib/load.js", "types": "lib/load.d.ts", diff --git a/@commitlint/parse/CHANGELOG.md b/@commitlint/parse/CHANGELOG.md index 05636c9527a..fcb694623e5 100644 --- a/@commitlint/parse/CHANGELOG.md +++ b/@commitlint/parse/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/parse + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package @commitlint/parse diff --git a/@commitlint/parse/package.json b/@commitlint/parse/package.json index 5b62d4fbebb..d2ed7ca0fe6 100644 --- a/@commitlint/parse/package.json +++ b/@commitlint/parse/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/parse", - "version": "17.6.7", + "version": "17.7.0", "description": "Lint your commit messages", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/@commitlint/prompt-cli/CHANGELOG.md b/@commitlint/prompt-cli/CHANGELOG.md index cb5be308a0a..dd375945126 100644 --- a/@commitlint/prompt-cli/CHANGELOG.md +++ b/@commitlint/prompt-cli/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/prompt-cli + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package @commitlint/prompt-cli diff --git a/@commitlint/prompt-cli/package.json b/@commitlint/prompt-cli/package.json index a354f834d7d..90bf818595b 100644 --- a/@commitlint/prompt-cli/package.json +++ b/@commitlint/prompt-cli/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/prompt-cli", - "version": "17.6.7", + "version": "17.7.0", "description": "commit prompt using commitlint.config.js", "files": [ "cli.js" @@ -36,7 +36,7 @@ "@commitlint/utils": "^17.4.0" }, "dependencies": { - "@commitlint/prompt": "^17.6.7", + "@commitlint/prompt": "^17.7.0", "execa": "^5.0.0", "inquirer": "^6.5.2" }, diff --git a/@commitlint/prompt/CHANGELOG.md b/@commitlint/prompt/CHANGELOG.md index 7af40180d5f..b91b7356465 100644 --- a/@commitlint/prompt/CHANGELOG.md +++ b/@commitlint/prompt/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/prompt + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package @commitlint/prompt diff --git a/@commitlint/prompt/package.json b/@commitlint/prompt/package.json index f4642a0883d..0c45096cde0 100644 --- a/@commitlint/prompt/package.json +++ b/@commitlint/prompt/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/prompt", - "version": "17.6.7", + "version": "17.7.0", "description": "commitizen prompt using commitlint.config.js", "main": "./lib/index.js", "files": [ @@ -37,7 +37,7 @@ "node": ">=v14" }, "devDependencies": { - "@commitlint/config-angular": "^17.6.7", + "@commitlint/config-angular": "^17.7.0", "@commitlint/types": "^14.0.0", "@commitlint/utils": "^17.4.0", "@types/inquirer": "^6.5.0", @@ -46,7 +46,7 @@ }, "dependencies": { "@commitlint/ensure": "^17.6.7", - "@commitlint/load": "^17.6.7", + "@commitlint/load": "^17.7.0", "@commitlint/types": "^17.4.4", "chalk": "^4.1.0", "inquirer": "^6.5.2" diff --git a/@commitlint/rules/CHANGELOG.md b/@commitlint/rules/CHANGELOG.md index bb17ed88117..947a7d6ec5f 100644 --- a/@commitlint/rules/CHANGELOG.md +++ b/@commitlint/rules/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/rules + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package @commitlint/rules diff --git a/@commitlint/rules/package.json b/@commitlint/rules/package.json index 4b592887ed7..6032c917fa3 100644 --- a/@commitlint/rules/package.json +++ b/@commitlint/rules/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/rules", - "version": "17.6.7", + "version": "17.7.0", "description": "Lint your commit messages", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -35,7 +35,7 @@ }, "license": "MIT", "devDependencies": { - "@commitlint/parse": "^17.6.7", + "@commitlint/parse": "^17.7.0", "@commitlint/test": "^17.4.2", "@commitlint/utils": "^17.4.0", "conventional-changelog-angular": "6.0.0", diff --git a/@commitlint/travis-cli/CHANGELOG.md b/@commitlint/travis-cli/CHANGELOG.md index 33539592c26..bf114052cd3 100644 --- a/@commitlint/travis-cli/CHANGELOG.md +++ b/@commitlint/travis-cli/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/travis-cli + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package @commitlint/travis-cli diff --git a/@commitlint/travis-cli/package.json b/@commitlint/travis-cli/package.json index 13c91921af7..1ea4b21aa4b 100644 --- a/@commitlint/travis-cli/package.json +++ b/@commitlint/travis-cli/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/travis-cli", - "version": "17.6.7", + "version": "17.7.0", "description": "Lint all relevant commits for a change or PR on Travis CI", "files": [ "lib/", @@ -40,7 +40,7 @@ "@commitlint/utils": "^17.4.0" }, "dependencies": { - "@commitlint/cli": "^17.6.7", + "@commitlint/cli": "^17.7.0", "execa": "^5.0.0" }, "gitHead": "70f7f4688b51774e7ac5e40e896cdaa3f132b2bc" diff --git a/@packages/test-environment/CHANGELOG.md b/@packages/test-environment/CHANGELOG.md index 257d51c6423..6785f832755 100644 --- a/@packages/test-environment/CHANGELOG.md +++ b/@packages/test-environment/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + +**Note:** Version bump only for package @commitlint/test-environment + + + + + # [17.1.0](https://github.com/conventional-changelog/commitlint/compare/v17.0.3...v17.1.0) (2022-08-27) **Note:** Version bump only for package @commitlint/test-environment diff --git a/@packages/test-environment/package.json b/@packages/test-environment/package.json index 922fad74af0..67bf0bc1976 100644 --- a/@packages/test-environment/package.json +++ b/@packages/test-environment/package.json @@ -1,6 +1,6 @@ { "name": "@commitlint/test-environment", - "version": "17.1.0", + "version": "17.7.0", "description": "test environment for @commitlint", "private": true, "main": "lib/test-environment.js", diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e874bc3069..d62e42f2f91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [17.7.0](https://github.com/conventional-changelog/commitlint/compare/v17.6.7...v17.7.0) (2023-08-09) + + +### Features + +* **load:** use cosmiconfig-typescript-loader v5 to remove ts-node dependency for @commitlint/load ([#3633](https://github.com/conventional-changelog/commitlint/issues/3633)) ([4aa46d7](https://github.com/conventional-changelog/commitlint/commit/4aa46d796ad74958f5569d3346b60a1f92c33892)) + + +### Reverts + +* eslint-config-prettier to v8 ([f279ff7](https://github.com/conventional-changelog/commitlint/commit/f279ff787bd908372813a04b756629467506f51e)) +* prettier to v2 to not break lerna v6 publish ([cd854cb](https://github.com/conventional-changelog/commitlint/commit/cd854cb73d93396c166bdfef442bc92b1833cc72)) + + + + + ## [17.6.7](https://github.com/conventional-changelog/commitlint/compare/v17.6.6...v17.6.7) (2023-07-19) **Note:** Version bump only for package @commitlint/root diff --git a/lerna.json b/lerna.json index 791365c38ab..f2d1d304668 100644 --- a/lerna.json +++ b/lerna.json @@ -2,5 +2,5 @@ "lerna": "4", "npmClient": "yarn", "useWorkspaces": true, - "version": "17.6.7" + "version": "17.7.0" }