Skip to content

Files

Latest commit

 

History

History
19 lines (11 loc) · 621 Bytes

no-unnecessary-class.md

File metadata and controls

19 lines (11 loc) · 621 Bytes

Pattern: Unnecessary class

Issue: -

Description

Disallows classes that are not strictly necessary. Users who come from a Java-style OO language may wrap their utility functions in an extra class, instead of putting them at the top level.

Configuration

Three arguments may be optionally provided:

  • "allow-constructor-only" ignores classes whose members are constructors.
  • "allow-empty-class" ignores class DemoClass {}.
  • "allow-static-only" ignores classes whose members are static.

Further Reading