在.eslintrc.js的rules中添加一条规则
rules: { "no-use-before-define": 'off', "@typescript-eslint/no-use-before-define": ["error"] }