eslint: Exempt function variables from no-use-before-define.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-11-08 03:54:15 -08:00 committed by Tim Abbott
parent a208870b59
commit e2cc125583
1 changed files with 9 additions and 3 deletions

View File

@ -104,7 +104,7 @@ module.exports = {
"error",
{args: "all", argsIgnorePattern: "^_", ignoreRestSiblings: true},
],
"no-use-before-define": ["error", {functions: false}],
"no-use-before-define": ["error", {functions: false, variables: false}],
"no-useless-concat": "error",
"no-useless-constructor": "error",
"no-var": "error",
@ -198,7 +198,10 @@ module.exports = {
"error",
{args: "all", argsIgnorePattern: "^_", ignoreRestSiblings: true},
],
"@typescript-eslint/no-use-before-define": ["error", {functions: false}],
"@typescript-eslint/no-use-before-define": [
"error",
{functions: false, variables: false},
],
"@typescript-eslint/parameter-properties": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/restrict-plus-operands": ["error", {}],
@ -249,7 +252,10 @@ module.exports = {
"error",
{args: "all", argsIgnorePattern: "^_", ignoreRestSiblings: true},
],
"@typescript-eslint/no-use-before-define": ["error", {functions: false}],
"@typescript-eslint/no-use-before-define": [
"error",
{functions: false, variables: false},
],
"@typescript-eslint/parameter-properties": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/restrict-plus-operands": ["error", {}],