digitalbazaar / eslint-config-digitalbazaar

BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Add max-classes-per-file 1 to the rules #41

Open aljones15 opened 4 years ago

aljones15 commented 4 years ago

https://eslint.org/docs/rules/max-classes-per-file

We don't use es6 classes much, but when we do we should probably enforce this rule of one class per file.

Suggestion:

"max-classes-per-file": ["error", 1]
davidlehn commented 4 years ago

Is this an issue in practice?

aljones15 commented 4 years ago

I might have seen 2 classes defined in a single file (which was probably written by me), however I am trying to get consensus on if we consider 1 class per module to be good enough practice to add a rule for it.

On Mon, Aug 24, 2020 at 1:22 PM David I. Lehn notifications@github.com wrote:

Is this an issue in practice?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/digitalbazaar/eslint-config-digitalbazaar/issues/41#issuecomment-679259883, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACD6CBC2H3QLEUMAHBEUPTSCKOUPANCNFSM4QJQJJ5Q .

-- Andrew Jones