From c0edb70fe49b6f234aec3fc6bebf3aab7aeba603 Mon Sep 17 00:00:00 2001 From: Szymon Brud Date: Sat, 24 Feb 2024 00:28:13 +0100 Subject: [PATCH] fix: delete web vitials, update prettier, remove eject command from script --- .husky/.commitlintrc.json | 2 +- .prettierrc.js | 2 +- package.json | 4 +--- src/index.js | 3 --- src/reportWebVitals.js | 13 ------------- 5 files changed, 3 insertions(+), 21 deletions(-) delete mode 100644 src/reportWebVitals.js diff --git a/.husky/.commitlintrc.json b/.husky/.commitlintrc.json index 5642197..36f92c9 100644 --- a/.husky/.commitlintrc.json +++ b/.husky/.commitlintrc.json @@ -1,6 +1,6 @@ { "extends": ["@commitlint/config-conventional"], "rules": { - "type-enum": [2, "always", ["ci", "chore", "docs", "ticket","feat", "fix", "perf", "refactor", "revert", "style"]] + "type-enum": [2, "always", ["feat", "fix"]] } } \ No newline at end of file diff --git a/.prettierrc.js b/.prettierrc.js index 304353b..018f7e8 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,5 +1,5 @@ module.exports = { - endOfLine: 'lf', + endOfLine: 'auto', semi: true, singleQuote: true, tabWidth: 2, diff --git a/package.json b/package.json index a7b31e6..539be3b 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,7 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", - "styled-components": "^6.1.8", - "web-vitals": "^2.1.4" + "styled-components": "^6.1.8" }, "scripts": { "start": "react-scripts start", @@ -19,7 +18,6 @@ "test": "react-scripts test", "test:ci": "react-scripts test --reporters=jest-junit", "test:e2e": "cypress open", - "eject": "react-scripts eject", "check-branch-name": "chmod 755 ./.husky/hooks/check_branch_naming.sh && sh ./.husky/hooks/check_branch_naming.sh", "prepare": "husky install" }, diff --git a/src/index.js b/src/index.js index 75db233..c99475c 100644 --- a/src/index.js +++ b/src/index.js @@ -5,7 +5,6 @@ import { ThemeProvider } from 'styled-components'; import App from './App'; import GlobalStyle from './assets/styles/GlobalStyle'; import { theme } from './assets/styles/Theme'; -import reportWebVitals from './reportWebVitals'; const root = ReactDOM.createRoot(document.getElementById('root')); root.render( @@ -16,5 +15,3 @@ root.render( ); - -reportWebVitals(); diff --git a/src/reportWebVitals.js b/src/reportWebVitals.js deleted file mode 100644 index 532f29b..0000000 --- a/src/reportWebVitals.js +++ /dev/null @@ -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;