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

Commit 295ae26

Browse files
Add new rules from ESLint 3.4
1 parent 9bf5781 commit 295ae26

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

standard/best-practices.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ 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+
1721
// This rule enforces consistent use of trailing commas in object and array literals
1822
// Allow trailing commas for func parameters, array and object literals spread across
1923
// multiple lines
@@ -249,6 +253,11 @@ module.exports = {
249253
// This rule is aimed to flag usage of + operators with strings.
250254
'prefer-template': 1,
251255

256+
// Require symbol description
257+
// This rule requires a description when creating symbols. Using description promotes easier
258+
// debugging - when a symbol is logged the description is used.
259+
'symbol-description': 1,
260+
252261
// Require Variable Declarations to be at the top of their scope
253262
// This rule aims to keep all variable declarations in the leading series of statements.
254263
// Allowing multiple declarations helps promote maintainability.

0 commit comments

Comments
 (0)