Skip to content
This repository was archived by the owner on Mar 7, 2019. It is now read-only.

Commit 2eec51f

Browse files
Do not use class-methods-use-this
1 parent 810c80f commit 2eec51f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

standard/best-practices.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ module.exports = {
1414
// This rule enforces usage of return statement in callbacks of array's methods.
1515
'array-callback-return': 1,
1616

17-
// Enforce that class methods utilize this
18-
// If a class method does not use `this`, it can safely be made a static function.
19-
'class-methods-use-this': 1,
20-
2117
// This rule enforces consistent use of trailing commas in object and array literals
2218
// Allow trailing commas for func parameters, array and object literals spread across
2319
// multiple lines

unused.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ module.exports = {
1414
// Unused in favour of `no-var` rule. Front-end could have some interest in this rule.
1515
'block-scoped-var': 0,
1616

17+
// Enforce that class methods utilize `this`
18+
// Unused, many a time you need to add a method on a class just to make it adhere to a
19+
// prescribed API (ie. React components).
20+
'class-methods-use-this': 0,
21+
1722
// Blacklist certain identifiers
1823
// Unused, too restrictive.
1924
'id-blacklist': 0,

0 commit comments

Comments
 (0)