From 0e9517dbea80006de7124fa6fe29533b1869ddf0 Mon Sep 17 00:00:00 2001 From: subho004 Date: Mon, 20 Nov 2023 16:52:17 +0530 Subject: [PATCH] fix4 --- .eslintrc.json | 29 +++++++++++++++++++++++++++++ output.js | 36 ------------------------------------ package-lock.json | 32 ++++++++++++++++---------------- package.json | 4 ++-- 4 files changed, 47 insertions(+), 54 deletions(-) create mode 100644 .eslintrc.json delete mode 100644 output.js diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..2e83ecf --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,29 @@ +{ + "env": { + "browser": true, + "es2021": true, + "node": true + }, + "extends": ["eslint:recommended", "plugin:react/recommended"], + "parserOptions": { + "ecmaFeatures": { + "jsx": true + }, + "ecmaVersion": 2021, + "sourceType": "module" + }, + "plugins": ["react", "react-hooks"], + "rules": { + // Add or modify rules as needed + "react/prop-types": "off", // Disable prop-types validation (optional) + "react/react-in-jsx-scope": "off", // React is in scope for JSX (optional) + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "warn" + // Other rules... + }, + "settings": { + "react": { + "version": "detect" // Automatically detect the React version + } + } +} diff --git a/output.js b/output.js deleted file mode 100644 index 0cdc2b4..0000000 --- a/output.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -var _react = _interopRequireDefault(require("react")); -var _client = _interopRequireDefault(require("react-dom/client")); -var _App = _interopRequireDefault(require("./App.jsx")); -require("./index.css"); -var _reactRouterDom = require("react-router-dom"); -var _NotFound = _interopRequireDefault(require("utils/NotFound404/NotFound404.jsx")); -var _Home = _interopRequireDefault(require("pages/Home/Home.jsx")); -var _Team = _interopRequireDefault(require("pages/Team/Team.jsx")); -var _MainLayout = _interopRequireDefault(require("components/Layout/MainLayout.jsx")); -var _jsxRuntime = require("react/jsx-runtime"); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -var routes = [{ - path: "/", - element: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MainLayout["default"], {}), - children: [{ - path: "/", - element: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Home["default"], {}) - }, { - path: "/team", - element: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Team["default"], {}) - }] -}, { - path: "*", - element: /*#__PURE__*/(0, _jsxRuntime.jsx)(_NotFound["default"], {}) -}]; -var router = (0, _reactRouterDom.createBrowserRouter)(routes); -//error in this file -_client["default"].createRoot(document.getElementById("root")).render( /*#__PURE__*/(0, _jsxRuntime.jsx)(_react["default"].StrictMode, { - children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_App["default"], { - children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.RouterProvider, { - router: router - }) - }) -})); diff --git a/package-lock.json b/package-lock.json index fe240b6..2feae15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,8 +27,8 @@ "@vitejs/plugin-react": "^4.0.3", "babel-cli": "^6.26.0", "babel-loader": "^9.1.3", - "eslint": "^8.45.0", - "eslint-plugin-react": "^7.32.2", + "eslint": "^8.54.0", + "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", "sass": "^1.69.5", @@ -2376,9 +2376,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", - "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", + "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -4988,15 +4988,15 @@ } }, "node_modules/eslint": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", - "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", + "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.53.0", + "@eslint/js": "8.54.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -11929,9 +11929,9 @@ } }, "@eslint/js": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", - "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", + "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", "dev": true }, "@humanwhocodes/config-array": { @@ -14074,15 +14074,15 @@ "dev": true }, "eslint": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", - "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", + "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.53.0", + "@eslint/js": "8.54.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", diff --git a/package.json b/package.json index 1a386f6..3a7a4ef 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,8 @@ "@vitejs/plugin-react": "^4.0.3", "babel-cli": "^6.26.0", "babel-loader": "^9.1.3", - "eslint": "^8.45.0", - "eslint-plugin-react": "^7.32.2", + "eslint": "^8.54.0", + "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", "sass": "^1.69.5",