Skip to content
Merged
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
58 changes: 17 additions & 41 deletions packages/eslint-config/best-practices/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,47 +192,23 @@ module.exports = {
// disallow declaring the same variable more then once
'no-redeclare': 'error',

// // disallow certain object properties
// // https://eslint.org/docs/rules/no-restricted-properties
// 'no-restricted-properties': ['error', {
// object: 'arguments',
// property: 'callee',
// message: 'arguments.callee is deprecated',
// }, {
// object: 'global',
// property: 'isFinite',
// message: 'Please use Number.isFinite instead',
// }, {
// object: 'self',
// property: 'isFinite',
// message: 'Please use Number.isFinite instead',
// }, {
// object: 'window',
// property: 'isFinite',
// message: 'Please use Number.isFinite instead',
// }, {
// object: 'global',
// property: 'isNaN',
// message: 'Please use Number.isNaN instead',
// }, {
// object: 'self',
// property: 'isNaN',
// message: 'Please use Number.isNaN instead',
// }, {
// object: 'window',
// property: 'isNaN',
// message: 'Please use Number.isNaN instead',
// }, {
// property: '__defineGetter__',
// message: 'Please use Object.defineProperty instead.',
// }, {
// property: '__defineSetter__',
// message: 'Please use Object.defineProperty instead.',
// }, {
// object: 'Math',
// property: 'pow',
// message: 'Use the exponentiation operator (**) instead.',
// }],
// disallow certain object properties
// https://eslint.org/docs/rules/no-restricted-properties
'no-restricted-properties': [
'error',
{
object: 'describe',
property: 'only',
},
{
object: 'it',
property: 'only',
},
{
object: 'context',
property: 'only',
},
],

// disallow use of assignment in return statement
'no-return-assign': ['error', 'always'],
Expand Down