{"id":1782,"date":"2018-12-11T13:43:49","date_gmt":"2018-12-11T12:43:49","guid":{"rendered":"https:\/\/www.thecodecampus.de\/blog\/?p=1782"},"modified":"2023-12-20T19:52:16","modified_gmt":"2023-12-20T18:52:16","slug":"using-git-hooks-to-keep-your-codebase-clean","status":"publish","type":"post","link":"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/","title":{"rendered":"Using git hooks to keep your codebase clean"},"content":{"rendered":"<h2>Problem<\/h2>\n<p>Let&#8217;s be honest &#8211; developers tend to be lazy. Whenever you start a new project you&#8217;re probably saying to yourself that you want to do everything better this time but often times your new project becomes the same mess as your previous one. I want to introduce a neat little trick that might help your codebase to stay clean from the beginning. We&#8217;re only taking a look at how you can force all of your developers to use the same codestyle across your new angular project that was created using the <a href=\"https:\/\/cli.angular.io\/\">angular-cli<\/a>.<\/p>\n<h2>tl;dr;<\/h2>\n<p>install\u00a0<a href=\"https:\/\/www.npmjs.com\/package\/husky\">husky<\/a><\/p>\n<pre class=\"lang:sh decode:true \">npm i husky --save-dev<\/pre>\n<p>trigger the linter whenever the <strong>git postcommit<\/strong>\u00a0hook is called<\/p>\n<pre class=\"lang:js decode:true \">\"scripts\": {\r\n  \"lint\": \"ng lint\",\r\n  \"precommit\": \"npm run lint\"\r\n}<\/pre>\n<p>Now you&#8217;re not able to commit when your code contains linting errors.<\/p>\n<h2>Goal<\/h2>\n<p>In bigger projects with a team size larger than 2-3 people you will typically encounter situations where developers have different opinions about how the applications code should look like. This is why linters became popular and are almost a standard in web application development. The angular-cli comes with a bundled linter that you can configure through the auto-generated\u00a0<strong>tslint.json<\/strong>.<\/p>\n<p>I discovered that even though there are global linting rules people tend to forget about them until the build server tries to build the application, fails and sends you an email about the failure. I stumbled across the husky package and figured it might solve the issues we had. In the following setup I&#8217;ll show you how exactly you can integrate this workflow into you project.<\/p>\n<h2>Setup<\/h2>\n<p>install the npm package <a href=\"https:\/\/www.npmjs.com\/package\/husky\">husky<\/a>. This package allows you to trigger scripts in your <strong>package.json<\/strong> whenever git hooks are executed.<\/p>\n<pre class=\"lang:sh decode:true\">npm i husky --save-dev<\/pre>\n<p>add the following to the scripts section of your package.json<\/p>\n<pre class=\"lang:js decode:true\">\"scripts\": {\r\n  \"lint\": \"ng lint\",\r\n  \"precommit\": \"npm run lint\"\r\n}<\/pre>\n<p>now whenever you&#8217;re performing a <strong>git commit<\/strong>\u00a0either through the commandline or via your IDE the precommit hook will trigger and execute whatever script you defined. In our case we want to tell our linter to lint the whole codebase and search for violations of our linting rules. Since we&#8217;re dealing with an angular application that is set up using the angular-cli the command we want to run is <strong>ng lint<\/strong>.<\/p>\n<p>Whenever your code contains a linting error the <strong>ng lint<\/strong> command will finish with a non zero exit code and will therefore fail the <strong>git commit<\/strong> command and present an error message to you.<\/p>\n<h2>Advanced Setup<\/h2>\n<p>If linting the codebase is not enough for you, you&#8217;ll might want to add a <strong>prepush\u00a0<\/strong>hook that executes unit tests and only allows the developer to push the changes if all the unit tests execute just fine. This of course requires the tests to run fast (hint: <a href=\"https:\/\/www.xfive.co\/blog\/testing-angular-faster-jest\/\">jest could you with that<\/a>).<\/p>\n<pre class=\"lang:js decode:true \">\"scripts\": {\r\n  \"test\": \"ng test\",\r\n  \"lint\": \"ng lint\",\r\n  \"precommit\": \"npm run lint\",\r\n  \"prepush\": \"npm run test\"\r\n}<\/pre>\n<p>To avoid the <strong>package.json<\/strong> to get bloated with tons of entries husky lets you use a separate config file. You can copy-paste all the hooks you defined in the script section of your\u00a0<strong>package.json<\/strong> into a new file called <strong>.huskyrc<\/strong><\/p>\n<div class=\"line\">\n<pre class=\"lang:js decode:true\">\/\/ .huskyrc\r\n{\r\n  \"hooks\": {\r\n    \"precommit\": \"npm test\"\r\n  }\r\n}<\/pre>\n<\/div>\n<p>There might be situations where you don&#8217;t want to run those hooks. You can easily bypass them using the &#8211;no-verify flag when using git commit from the commandline or ticking the designated checkbox in your IDE (IntelliJ in my case) to do that.<\/p>\n<div id=\"attachment_1784\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-11-um-13.06.38.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1784\" class=\"wp-image-1784 size-medium\" src=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-11-um-13.06.38-300x285.png\" alt=\"disable commit hooks in IntelliJ\" width=\"300\" height=\"285\" srcset=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-11-um-13.06.38-300x285.png 300w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-11-um-13.06.38-768x728.png 768w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-11-um-13.06.38-1024x971.png 1024w, https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-11-um-13.06.38.png 1358w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1784\" class=\"wp-caption-text\">disable commit hooks in IntelliJ<\/p><\/div>\n<h2>Further Reading<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.npmjs.com\/package\/husky\">husky<\/a><\/li>\n<li><a href=\"https:\/\/www.xfive.co\/blog\/testing-angular-faster-jest\/\">jest<\/a><\/li>\n<li><a href=\"https:\/\/cli.angular.io\/\">angular-cli<\/a><\/li>\n<li><a href=\"https:\/\/git-scm.com\/docs\/githooks\">complete list of git hooks<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Problem Let&#8217;s be honest &#8211; developers tend to be lazy. Whenever you start a new project you&#8217;re probably saying to yourself that you want to do everything better this time but often times your new project becomes the same mess as your previous one. I want to introduce a neat little trick that might help [&#8230;]<br \/><a class=\"meta-big\" href=\"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/\"> READ MORE<\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73,79],"tags":[],"class_list":["post-1782","post","type-post","status-publish","format-standard","hentry","category-angular","category-tooling"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using git hooks to keep your codebase clean - Web Development Blog<\/title>\n<meta name=\"description\" content=\"Elevate code hygiene! Harness Git hooks for a pristine codebase. Streamline workflows, maintain cleanliness. Optimize development now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using git hooks to keep your codebase clean - Web Development Blog\" \/>\n<meta property=\"og:description\" content=\"Elevate code hygiene! Harness Git hooks for a pristine codebase. Streamline workflows, maintain cleanliness. Optimize development now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Development tips and tricks - theCodeCampus Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-11T12:43:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-20T18:52:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-11-um-13.06.38-300x285.png\" \/>\n<meta name=\"author\" content=\"Kai Henzler\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kai Henzler\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/using-git-hooks-to-keep-your-codebase-clean\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/using-git-hooks-to-keep-your-codebase-clean\\\/\"},\"author\":{\"name\":\"Kai Henzler\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/person\\\/b9decc610011ed03b2117b5e02032132\"},\"headline\":\"Using git hooks to keep your codebase clean\",\"datePublished\":\"2018-12-11T12:43:49+00:00\",\"dateModified\":\"2023-12-20T18:52:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/using-git-hooks-to-keep-your-codebase-clean\\\/\"},\"wordCount\":563,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/using-git-hooks-to-keep-your-codebase-clean\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/Bildschirmfoto-2018-12-11-um-13.06.38-300x285.png\",\"articleSection\":[\"Angular\",\"Tooling\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/using-git-hooks-to-keep-your-codebase-clean\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/using-git-hooks-to-keep-your-codebase-clean\\\/\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/using-git-hooks-to-keep-your-codebase-clean\\\/\",\"name\":\"Using git hooks to keep your codebase clean - Web Development Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/using-git-hooks-to-keep-your-codebase-clean\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/using-git-hooks-to-keep-your-codebase-clean\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/Bildschirmfoto-2018-12-11-um-13.06.38-300x285.png\",\"datePublished\":\"2018-12-11T12:43:49+00:00\",\"dateModified\":\"2023-12-20T18:52:16+00:00\",\"description\":\"Elevate code hygiene! Harness Git hooks for a pristine codebase. Streamline workflows, maintain cleanliness. Optimize development now!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/using-git-hooks-to-keep-your-codebase-clean\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/using-git-hooks-to-keep-your-codebase-clean\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/using-git-hooks-to-keep-your-codebase-clean\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/Bildschirmfoto-2018-12-11-um-13.06.38.png\",\"contentUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/Bildschirmfoto-2018-12-11-um-13.06.38.png\",\"width\":1358,\"height\":1288},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/using-git-hooks-to-keep-your-codebase-clean\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using git hooks to keep your codebase clean\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\",\"name\":\"Web Development tips and tricks - theCodeCampus Blog\",\"description\":\"Tips, tricks, and experiences about developing web and mobile applications with Angular, TypeScript, and Testing.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#organization\",\"name\":\"theCodeCampus\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch.jpg\",\"contentUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/TCC-Logo-Bildmarke-quadratisch.jpg\",\"width\":156,\"height\":156,\"caption\":\"theCodeCampus\"},\"image\":{\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/#\\\/schema\\\/person\\\/b9decc610011ed03b2117b5e02032132\",\"name\":\"Kai Henzler\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/kai-henzler-tcc-author-96x96.webp\",\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/kai-henzler-tcc-author-96x96.webp\",\"contentUrl\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/kai-henzler-tcc-author-96x96.webp\",\"caption\":\"Kai Henzler\"},\"description\":\"I'm a web developer who is around since the AngularJS days (10+ years). My focus is on teaching others how to write simple and maintainable code.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/kai-henzler-58484599\\\/\"],\"url\":\"https:\\\/\\\/www.thecodecampus.de\\\/blog\\\/author\\\/khenzler\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using git hooks to keep your codebase clean - Web Development Blog","description":"Elevate code hygiene! Harness Git hooks for a pristine codebase. Streamline workflows, maintain cleanliness. Optimize development now!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/","og_locale":"en_US","og_type":"article","og_title":"Using git hooks to keep your codebase clean - Web Development Blog","og_description":"Elevate code hygiene! Harness Git hooks for a pristine codebase. Streamline workflows, maintain cleanliness. Optimize development now!","og_url":"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/","og_site_name":"Web Development tips and tricks - theCodeCampus Blog","article_published_time":"2018-12-11T12:43:49+00:00","article_modified_time":"2023-12-20T18:52:16+00:00","og_image":[{"url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-11-um-13.06.38-300x285.png","type":"","width":"","height":""}],"author":"Kai Henzler","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kai Henzler","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/#article","isPartOf":{"@id":"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/"},"author":{"name":"Kai Henzler","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/person\/b9decc610011ed03b2117b5e02032132"},"headline":"Using git hooks to keep your codebase clean","datePublished":"2018-12-11T12:43:49+00:00","dateModified":"2023-12-20T18:52:16+00:00","mainEntityOfPage":{"@id":"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/"},"wordCount":563,"commentCount":0,"publisher":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#organization"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/#primaryimage"},"thumbnailUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-11-um-13.06.38-300x285.png","articleSection":["Angular","Tooling"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/","url":"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/","name":"Using git hooks to keep your codebase clean - Web Development Blog","isPartOf":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/#primaryimage"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/#primaryimage"},"thumbnailUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-11-um-13.06.38-300x285.png","datePublished":"2018-12-11T12:43:49+00:00","dateModified":"2023-12-20T18:52:16+00:00","description":"Elevate code hygiene! Harness Git hooks for a pristine codebase. Streamline workflows, maintain cleanliness. Optimize development now!","breadcrumb":{"@id":"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/#primaryimage","url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-11-um-13.06.38.png","contentUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2018\/12\/Bildschirmfoto-2018-12-11-um-13.06.38.png","width":1358,"height":1288},{"@type":"BreadcrumbList","@id":"https:\/\/www.thecodecampus.de\/blog\/using-git-hooks-to-keep-your-codebase-clean\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.thecodecampus.de\/blog\/"},{"@type":"ListItem","position":2,"name":"Using git hooks to keep your codebase clean"}]},{"@type":"WebSite","@id":"https:\/\/www.thecodecampus.de\/blog\/#website","url":"https:\/\/www.thecodecampus.de\/blog\/","name":"Web Development tips and tricks - theCodeCampus Blog","description":"Tips, tricks, and experiences about developing web and mobile applications with Angular, TypeScript, and Testing.","publisher":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.thecodecampus.de\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.thecodecampus.de\/blog\/#organization","name":"theCodeCampus","url":"https:\/\/www.thecodecampus.de\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch.jpg","contentUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/01\/TCC-Logo-Bildmarke-quadratisch.jpg","width":156,"height":156,"caption":"theCodeCampus"},"image":{"@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.thecodecampus.de\/blog\/#\/schema\/person\/b9decc610011ed03b2117b5e02032132","name":"Kai Henzler","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/06\/kai-henzler-tcc-author-96x96.webp","url":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/06\/kai-henzler-tcc-author-96x96.webp","contentUrl":"https:\/\/www.thecodecampus.de\/blog\/wp-content\/uploads\/2024\/06\/kai-henzler-tcc-author-96x96.webp","caption":"Kai Henzler"},"description":"I'm a web developer who is around since the AngularJS days (10+ years). My focus is on teaching others how to write simple and maintainable code.","sameAs":["https:\/\/www.linkedin.com\/in\/kai-henzler-58484599\/"],"url":"https:\/\/www.thecodecampus.de\/blog\/author\/khenzler\/"}]}},"_links":{"self":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/1782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/comments?post=1782"}],"version-history":[{"count":4,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/1782\/revisions"}],"predecessor-version":[{"id":1788,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/posts\/1782\/revisions\/1788"}],"wp:attachment":[{"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/media?parent=1782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/categories?post=1782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thecodecampus.de\/blog\/wp-json\/wp\/v2\/tags?post=1782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}