Make lint patterns more generic and add hook for appending custom rules