Lint for using for ... in in favor of for ... of

Co-authored-by: Jonatan Witoszek <jonatanwitoszek@gmail.com>
This commit is contained in:
Krzysztof Wolski 2022-07-22 17:53:33 +02:00 committed by GitHub
parent 3f9f854e7d
commit cd039517d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,14 @@
"react/react-in-jsx-scope": "off", // next does not require react imports
"import/extensions": "off", // file extension not required when importing
"react/jsx-filename-extension": "off",
"no-restricted-syntax": "off",
"no-restricted-syntax": [
"error",
{
selector: "ForInStatement",
message: "for ... in disallowed, use for ... of instead",
},
],
"no-underscore-dangle": "off",
"no-await-in-loop": "off",
"react/jsx-props-no-spreading": "off",