kashi326 / inertia-react-laravel-template

Prefer var declarations be placed at the top of their scope JS-0102
Anti-pattern
Minor
2 years ago2 years old
All 'var' declarations must be at the top of the function scope
11/* harmony export */ __webpack_require__.d(__webpack_exports__, {
12/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
13/* harmony export */ });
14/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");15
16
17var Home = function Home() {
All 'var' declarations must be at the top of the function scope
14/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
15
16
17var Home = function Home() {18  var foo = "React";19  var bar = "TypeScript";20  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h1", null, "Hello ", foo, " + ", bar);21};22
23/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Home);
24
All 'var' declarations must be at the top of the function scope
14/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
15
16
17var Home = function Home() {18  var foo = "React";19  var bar = "TypeScript";20  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("h1", null, "Hello ", foo, " + ", bar);21};22
23/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Home);
24
All 'var' declarations must be at the top of the function scope
11/* harmony export */ __webpack_require__.d(__webpack_exports__, {
12/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
13/* harmony export */ });
14/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");15
16
17var Home = function Home() {
All 'var' declarations must be at the top of the function scope
15/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
16
17
18var Home = function Home() {19  var foo = "React";20  var bar = "TypeScript";21  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h1", null, "Hello ", foo, " + ", bar);22};23
24/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Home);
25