Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions examples/eslint/node4/object-shorthand.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict';

function foo() {}

const someVal = 42;
const okFor = 88;

const thisIs = { okFor: someVal };
const thisIsNot = { okFor: okFor };

foo(thisIs, thisIsNot);
11 changes: 11 additions & 0 deletions examples/eslint/node4/object-shorthand.out.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict';

function foo() {}

const someVal = 42;
const okFor = 88;

const thisIs = { okFor: someVal };
const thisIsNot = { okFor };

foo(thisIs, thisIsNot);
3 changes: 3 additions & 0 deletions lib/rules/opinions.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,7 @@ module.exports = {

// See: https://eslint.org/docs/rules/no-extra-semi
'no-extra-semi': 'error',

// See: https://eslint.org/docs/rules/object-shorthand
'object-shorthand': 'error',
};