Procházet zdrojové kódy

removed unused code and files

Bernadette Elena Hammerle před 2 roky
rodič
revize
4672538b2a
8 změnil soubory, kde provedl 765 přidání a 1198 odebrání
  1. 752 1099
      package-lock.json
  2. 13 11
      package.json
  3. 0 37
      src/AlertDialog.js
  4. 0 8
      src/App.test.js
  5. 0 12
      src/helpers.js
  6. 0 13
      src/index.css
  7. 0 13
      src/reportWebVitals.js
  8. 0 5
      src/setupTests.js

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 752 - 1099
package-lock.json


+ 13 - 11
package.json

@@ -3,10 +3,6 @@
   "version": "0.1.0",
   "private": true,
   "dependencies": {
-    "@material-ui/core": "^4.11.4",
-    "@testing-library/jest-dom": "^5.11.10",
-    "@testing-library/react": "^11.2.5",
-    "@testing-library/user-event": "^12.8.3",
     "bootstrap": "^4.6.0",
     "devextreme": "^21.1.3",
     "devextreme-react": "^21.1.3",
@@ -15,10 +11,8 @@
     "react-bootstrap": "^1.6.0",
     "react-dom": "^17.0.2",
     "react-router-dom": "^5.2.0",
-    "react-scripts": "4.0.3",
     "react-snap": "^1.23.0",
-    "reactstrap": "^8.9.0",
-    "web-vitals": "^1.1.1"
+    "reactstrap": "^8.9.0"
   },
   "scripts": {
     "start": "react-scripts start",
@@ -28,11 +22,9 @@
     "eject": "react-scripts eject"
   },
   "eslintConfig": {
-    "extends": [
-      "react-app",
-      "react-app/jest"
-    ]
+    "extends": "@imaginary-cloud/react"
   },
+  "prettier": "@imaginary-cloud/prettier-config",
   "browserslist": {
     "production": [
       ">0.2%",
@@ -44,5 +36,15 @@
       "last 1 firefox version",
       "last 1 safari version"
     ]
+  },
+  "devDependencies": {
+    "eslint": "^7.31.0",
+    "eslint-config-airbnb": "^18.2.1",
+    "eslint-config-prettier": "^6.15.0",
+    "eslint-plugin-import": "^2.23.4",
+    "eslint-plugin-jsx-a11y": "^6.4.1",
+    "eslint-plugin-prettier": "^3.4.0",
+    "eslint-plugin-react": "^7.24.0",
+    "eslint-plugin-react-hooks": "^2.5.1"
   }
 }

+ 0 - 37
src/AlertDialog.js

@@ -1,37 +0,0 @@
-import Dialog from "@material-ui/core/Dialog";
-import DialogActions from "@material-ui/core/DialogActions";
-import DialogContent from "@material-ui/core/DialogContent";
-import DialogContentText from "@material-ui/core/DialogContentText";
-import DialogTitle from "@material-ui/core/DialogTitle";
-import Button from "@material-ui/core/Button";
-
-export const Alert = ({showAlert, finishCalc, showIdmtResults}) => {
-  return(
-    <div>
-      <Dialog
-        open={showAlert}
-        onClose={finishCalc}
-        aria-labelledby="alert-dialog-title"
-        aria-describedby="alert-dialog-description"
-      >
-        <DialogTitle id="alert-dialog-title">{"Ergebnis überprüfen oder abgeben?"}</DialogTitle>
-
-        <DialogContent>
-          <DialogContentText id="alert-dialog-description">
-            Willst du dein Ergebnis nochmal überprüfen oder gleich abgeben?
-          </DialogContentText>
-        </DialogContent>
-
-        <DialogActions>
-          <Button onClick={showIdmtResults} color="primary" autoFocus>
-            Prüfen
-          </Button>
-          <Button onClick={finishCalc} color="primary">
-            Abgeben
-          </Button>
-        </DialogActions>
-
-      </Dialog>
-    </div>
-  )
-};

+ 0 - 8
src/App.test.js

@@ -1,8 +0,0 @@
-import { render, screen } from '@testing-library/react';
-import App from './App';
-
-test('renders learn react link', () => {
-  render(<App />);
-  const linkElement = screen.getByText(/learn react/i);
-  expect(linkElement).toBeInTheDocument();
-});

+ 0 - 12
src/helpers.js

@@ -5,18 +5,6 @@ export const handleKeyDown = (e) => {
   }
 }
 
-export const addNumbersToGrid = (numbersArr, sign) => {
-  const nrGrid = []
-  for (let noIdx in numbersArr){
-    let nr = numbersArr[noIdx].join("").replace(/&nbsp;/g, " ");
-    if (parseInt(noIdx) === numbersArr.length-1){
-      nr = sign + " " + nr;
-    }
-    nrGrid.push({id: parseInt(noIdx)+3, number: nr});
-  }
-  return nrGrid;
-}
-
 
 export const afterCommaLen = (number) => {
   let noStrList = number.toString().split(".");

+ 0 - 13
src/index.css

@@ -1,13 +0,0 @@
-body {
-  margin: 0;
-  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
-    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
-    sans-serif;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-}
-
-code {
-  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
-    monospace;
-}

+ 0 - 13
src/reportWebVitals.js

@@ -1,13 +0,0 @@
-const reportWebVitals = onPerfEntry => {
-  if (onPerfEntry && onPerfEntry instanceof Function) {
-    import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
-      getCLS(onPerfEntry);
-      getFID(onPerfEntry);
-      getFCP(onPerfEntry);
-      getLCP(onPerfEntry);
-      getTTFB(onPerfEntry);
-    });
-  }
-};
-
-export default reportWebVitals;

+ 0 - 5
src/setupTests.js

@@ -1,5 +0,0 @@
-// jest-dom adds custom jest matchers for asserting on DOM nodes.
-// allows you to do things like:
-// expect(element).toHaveTextContent(/react/i)
-// learn more: https://github.com/testing-library/jest-dom
-import '@testing-library/jest-dom';

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů