Skip to content

Instantly share code, notes, and snippets.

@iegik
Last active January 27, 2021 10:45
Show Gist options
  • Save iegik/007b1e4dfa5052383c4198d031501187 to your computer and use it in GitHub Desktop.
Save iegik/007b1e4dfa5052383c4198d031501187 to your computer and use it in GitHub Desktop.

Before rafactoring, clean the code base

  1. Use Git
  2. Choose your style guide and use linters
  3. Create graph and clean dead code
  4. Determinate code duplication, use patterns

Git

Using git saves time to find a bug, by code author or feature

Code duplication

npx jsinspect --ignore "node_modules|jsx" src > jsinspect.out

NOTE: Has issues with some jsx features: danielstjules/jsinspect#87

Code smells

Categories of code smells

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment