Skip to content

Commit 8440dd1

Browse files
authored
Merge pull request #13 from GrowflowTeam/use-functions-before-define-is-fine
Fix: functions are hoisted, it's fine to lazily declare them
2 parents 0d06331 + a85a94a commit 8440dd1

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

packages/eslint/core.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@ module.exports = {
9090
// it's probably fine
9191
'no-await-in-loop': 'warn',
9292

93+
// functions are hoisted. why is this not the default?
94+
'no-use-before-define': [
95+
'error',
96+
{
97+
functions: false,
98+
classes: true,
99+
variables: true,
100+
},
101+
],
102+
93103
// https://stackoverflow.com/a/63833015/316108
94104
'no-unused-vars': 'off',
95105
'@typescript-eslint/no-unused-vars': 'error',

packages/eslint/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"publishConfig": {
66
"access": "public"
77
},
8-
"version": "10.3.0",
8+
"version": "10.3.1",
99
"repository": {
1010
"type": "git",
1111
"url": "https://github.com/GrowflowTeam/javascript.git"

0 commit comments

Comments
 (0)