Skip to content

Commit 4bc76bf

Browse files
fix: allow throw statements inside async functions
1 parent 569abf0 commit 4bc76bf

File tree

3 files changed

+82
-76
lines changed

3 files changed

+82
-76
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"eslint-config-prettier": "^8.3.0",
8282
"eslint-import-resolver-typescript": "^2.3.0",
8383
"eslint-plugin-eslint-comments": "^3.2.0",
84-
"eslint-plugin-functional": "^4.0.0",
84+
"eslint-plugin-functional": "^4.2.0",
8585
"eslint-plugin-import": "^2.25.2",
8686
"eslint-plugin-jsdoc": "^37.0.3",
8787
"eslint-plugin-markdown": "^2.2.0",

src/plugins/functional.ts

+6
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ export const settings: Linter.Config = {
2929
allowReturningBranches: true,
3030
},
3131
],
32+
"functional/no-throw-statement": [
33+
"error",
34+
{
35+
allowInAsyncFunctions: true,
36+
},
37+
],
3238
"functional/no-try-statement": "off",
3339
"functional/prefer-readonly-type": [
3440
"error",

yarn.lock

+75-75
Original file line numberDiff line numberDiff line change
@@ -2732,10 +2732,10 @@ eslint-plugin-eslint-comments@^3.2.0:
27322732
escape-string-regexp "^1.0.5"
27332733
ignore "^5.0.5"
27342734

2735-
eslint-plugin-functional@^4.0.0:
2736-
version "4.1.1"
2737-
resolved "https://registry.yarnpkg.com/eslint-plugin-functional/-/eslint-plugin-functional-4.1.1.tgz#181b6c491fb73f05887cf51349118eeef0681bd5"
2738-
integrity sha512-FgYMsScNCDilsxpYLboYLkY/y36VfocUD02tB1CJc8q4d+/H06ADKa9v6Dmk8kKlzIIW4V/wfNOVuxNusa0avw==
2735+
eslint-plugin-functional@^4.2.0:
2736+
version "4.2.0"
2737+
resolved "https://registry.yarnpkg.com/eslint-plugin-functional/-/eslint-plugin-functional-4.2.0.tgz#b6d942c07c760eb30c943e02ef041971a23674e6"
2738+
integrity sha512-3v1DuKQTGwJo93UQ5SKzEjvJTaMGfznzwgGjWEBhLXxJfOMhcW7O6QUO1pmb5aLou9hoh7r31lkPvWmbIbIbew==
27392739
dependencies:
27402740
"@typescript-eslint/experimental-utils" "^5.0.0"
27412741
deepmerge-ts "^2.0.1"
@@ -5373,77 +5373,77 @@ npm@^8.3.0:
53735373
resolved "https://registry.yarnpkg.com/npm/-/npm-8.4.0.tgz#3675a8208eb73cf7bdc78c06d8524827b14df696"
53745374
integrity sha512-j32JsNpXI0TwuZd2p67X+U83lEqHrc0+CGIUGNwQqubMPj610+BongAfX0SmTCvyz7PzSIkxftuInNSmweF0hQ==
53755375
dependencies:
5376-
"@isaacs/string-locale-compare" "*"
5377-
"@npmcli/arborist" "*"
5378-
"@npmcli/ci-detect" "*"
5379-
"@npmcli/config" "*"
5380-
"@npmcli/map-workspaces" "*"
5381-
"@npmcli/package-json" "*"
5382-
"@npmcli/run-script" "*"
5383-
abbrev "*"
5384-
ansicolors "*"
5385-
ansistyles "*"
5386-
archy "*"
5387-
cacache "*"
5388-
chalk "*"
5389-
chownr "*"
5390-
cli-columns "*"
5391-
cli-table3 "*"
5392-
columnify "*"
5393-
fastest-levenshtein "*"
5394-
glob "*"
5395-
graceful-fs "*"
5396-
hosted-git-info "*"
5397-
ini "*"
5398-
init-package-json "*"
5399-
is-cidr "*"
5400-
json-parse-even-better-errors "*"
5401-
libnpmaccess "*"
5402-
libnpmdiff "*"
5403-
libnpmexec "*"
5404-
libnpmfund "*"
5405-
libnpmhook "*"
5406-
libnpmorg "*"
5407-
libnpmpack "*"
5408-
libnpmpublish "*"
5409-
libnpmsearch "*"
5410-
libnpmteam "*"
5411-
libnpmversion "*"
5412-
make-fetch-happen "*"
5413-
minipass "*"
5414-
minipass-pipeline "*"
5415-
mkdirp "*"
5416-
mkdirp-infer-owner "*"
5417-
ms "*"
5418-
node-gyp "*"
5419-
nopt "*"
5420-
npm-audit-report "*"
5421-
npm-install-checks "*"
5422-
npm-package-arg "*"
5423-
npm-pick-manifest "*"
5424-
npm-profile "*"
5425-
npm-registry-fetch "*"
5426-
npm-user-validate "*"
5427-
npmlog "*"
5428-
opener "*"
5429-
pacote "*"
5430-
parse-conflict-json "*"
5431-
proc-log "*"
5432-
qrcode-terminal "*"
5433-
read "*"
5434-
read-package-json "*"
5435-
read-package-json-fast "*"
5436-
readdir-scoped-modules "*"
5437-
rimraf "*"
5438-
semver "*"
5439-
ssri "*"
5440-
tar "*"
5441-
text-table "*"
5442-
tiny-relative-date "*"
5443-
treeverse "*"
5444-
validate-npm-package-name "*"
5445-
which "*"
5446-
write-file-atomic "*"
5376+
"@isaacs/string-locale-compare" "^1.1.0"
5377+
"@npmcli/arborist" "^4.3.0"
5378+
"@npmcli/ci-detect" "^1.4.0"
5379+
"@npmcli/config" "^2.4.0"
5380+
"@npmcli/map-workspaces" "^2.0.0"
5381+
"@npmcli/package-json" "^1.0.1"
5382+
"@npmcli/run-script" "^2.0.0"
5383+
abbrev "~1.1.1"
5384+
ansicolors "~0.3.2"
5385+
ansistyles "~0.1.3"
5386+
archy "~1.0.0"
5387+
cacache "^15.3.0"
5388+
chalk "^4.1.2"
5389+
chownr "^2.0.0"
5390+
cli-columns "^4.0.0"
5391+
cli-table3 "^0.6.0"
5392+
columnify "~1.5.4"
5393+
fastest-levenshtein "^1.0.12"
5394+
glob "^7.2.0"
5395+
graceful-fs "^4.2.8"
5396+
hosted-git-info "^4.1.0"
5397+
ini "^2.0.0"
5398+
init-package-json "^2.0.5"
5399+
is-cidr "^4.0.2"
5400+
json-parse-even-better-errors "^2.3.1"
5401+
libnpmaccess "^5.0.1"
5402+
libnpmdiff "^3.0.0"
5403+
libnpmexec "^3.0.3"
5404+
libnpmfund "^2.0.2"
5405+
libnpmhook "^7.0.1"
5406+
libnpmorg "^3.0.1"
5407+
libnpmpack "^3.0.1"
5408+
libnpmpublish "^5.0.1"
5409+
libnpmsearch "^4.0.1"
5410+
libnpmteam "^3.0.1"
5411+
libnpmversion "^2.0.2"
5412+
make-fetch-happen "^10.0.0"
5413+
minipass "^3.1.6"
5414+
minipass-pipeline "^1.2.4"
5415+
mkdirp "^1.0.4"
5416+
mkdirp-infer-owner "^2.0.0"
5417+
ms "^2.1.2"
5418+
node-gyp "^8.4.1"
5419+
nopt "^5.0.0"
5420+
npm-audit-report "^2.1.5"
5421+
npm-install-checks "^4.0.0"
5422+
npm-package-arg "^8.1.5"
5423+
npm-pick-manifest "^6.1.1"
5424+
npm-profile "^6.0.0"
5425+
npm-registry-fetch "^12.0.1"
5426+
npm-user-validate "^1.0.1"
5427+
npmlog "^6.0.0"
5428+
opener "^1.5.2"
5429+
pacote "^12.0.3"
5430+
parse-conflict-json "^2.0.1"
5431+
proc-log "^1.0.0"
5432+
qrcode-terminal "^0.12.0"
5433+
read "~1.0.7"
5434+
read-package-json "^4.1.1"
5435+
read-package-json-fast "^2.0.3"
5436+
readdir-scoped-modules "^1.1.0"
5437+
rimraf "^3.0.2"
5438+
semver "^7.3.5"
5439+
ssri "^8.0.1"
5440+
tar "^6.1.11"
5441+
text-table "~0.2.0"
5442+
tiny-relative-date "^1.3.0"
5443+
treeverse "^1.0.4"
5444+
validate-npm-package-name "~3.0.0"
5445+
which "^2.0.2"
5446+
write-file-atomic "^4.0.0"
54475447

54485448
npmlog@*, npmlog@^6.0.0:
54495449
version "6.0.0"

0 commit comments

Comments
 (0)