Skip to content

Instantly share code, notes, and snippets.

View duc-codehq's full-sized avatar

Duc D. Nguyen duc-codehq

View GitHub Profile
@duc-codehq
duc-codehq / angular-lint.md
Created December 18, 2022 06:49
Angular ESLint with Prettier, AirBnB Styleguide, Husky and lint-staged configuration

Install Angular ESLint

ng add @angular-eslint/schematics

To lint Jasmine spec files, install appropriate npm-package

npm i eslint-plugin-jasmine -D

And add a new block of rules in overrides for files with *.spec.ts extension:

"overrides": [
  ...,
@duc-codehq
duc-codehq / clean_code.md
Created July 19, 2022 07:13 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@duc-codehq
duc-codehq / ts-boilerplate.md
Created December 29, 2021 08:43 — forked from silver-xu/ts-boilerplate.md
Setup a Node.js project with Typescript, ESLint, Prettier, Husky

Setup a Node.js project with Typescript, ESLint, Prettier, Husky

1_D8Wwwce8wS3auLAiM3BQKA

Starting a personal node project could be easy; starting a team node project could be challenging.

I am a developer currently working in SEEK Australia.

In my experience, common mistakes developer make when starting a projects are:

  • No Linting