Refactoring all rules to remove duplicate code
Ignore js in src/rules