Skip to content

Commit

Permalink
build: Allow TS functions to be used before their definition
Browse files Browse the repository at this point in the history
This is fine, TypeScript will check them correctly.  And it is very
useful for global functions, at least.  And we allow functions to be
used before their definitions in JavaScript files.
  • Loading branch information
mvollmer committed Nov 14, 2024
1 parent b0e8216 commit 8d178e8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,12 @@
// https://typescript-eslint.io/rules/no-use-before-define
// Note: you must disable the base rule as it can report incorrect errors
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "error",

"@typescript-eslint/no-use-before-define": [
"error",
{
"functions": false
}
],
// as recommended by https://typescript-eslint.io/rules/no-unused-vars/
"@typescript-eslint/no-unused-vars": [
"error",
Expand Down

0 comments on commit 8d178e8

Please sign in to comment.