Skip to content

Commit b150039

Browse files
committed
[eslint config] enable object-shorthand rule.
Fixes airbnb#621.
1 parent 28a83da commit b150039

File tree

1 file changed

+2
-1
lines changed
  • packages/eslint-config-airbnb/rules

1 file changed

+2
-1
lines changed

packages/eslint-config-airbnb/rules/es6.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ module.exports = {
4040
// require let or const instead of var
4141
'no-var': 2,
4242
// require method and property shorthand syntax for object literals
43-
'object-shorthand': 0,
43+
// https://github.com/eslint/eslint/blob/master/docs/rules/object-shorthand.md
44+
'object-shorthand': [2, "always", { "ignoreConstructors": true }],
4445
// suggest using of const declaration for variables that are never modified after declared
4546
'prefer-const': 2,
4647
// suggest using the spread operator instead of .apply()

0 commit comments

Comments
 (0)