diff --git a/.eslintrc.js b/.eslintrc.js index 8347d066ed22ec..d0aa8955351e5e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -123,27 +123,28 @@ module.exports = { 'no-proto': 'error', 'no-redeclare': 'error', 'no-restricted-modules': ['error', 'sys'], + /* eslint-disable max-len */ 'no-restricted-properties': [ 'error', { object: 'assert', property: 'deepEqual', - message: 'Use assert.deepStrictEqual().', + message: 'Use `assert.deepStrictEqual()`.', }, { object: 'assert', property: 'notDeepEqual', - message: 'Use assert.notDeepStrictEqual().', + message: 'Use `assert.notDeepStrictEqual()`.', }, { object: 'assert', property: 'equal', - message: 'Use assert.strictEqual() rather than assert.equal().', + message: 'Use `assert.strictEqual()` rather than `assert.equal()`.', }, { object: 'assert', property: 'notEqual', - message: 'Use assert.notStrictEqual() rather than assert.notEqual().', + message: 'Use `assert.notStrictEqual()` rather than `assert.notEqual()`.', }, { property: '__defineGetter__', @@ -154,7 +155,6 @@ module.exports = { message: '__defineSetter__ is deprecated.', } ], - /* eslint-disable max-len */ // If this list is modified, please copy the change to lib/.eslintrc.yaml // and test/.eslintrc.yaml. 'no-restricted-syntax': [ @@ -169,7 +169,7 @@ module.exports = { }, { selector: "CallExpression[callee.object.name='assert'][callee.property.name='rejects'][arguments.length<2]", - message: 'assert.rejects() must be invoked with at least two arguments.', + message: '`assert.rejects()` must be invoked with at least two arguments.', }, { selector: "CallExpression[callee.object.name='assert'][callee.property.name='strictEqual'][arguments.2.type='Literal']", @@ -177,23 +177,23 @@ module.exports = { }, { selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])", - message: 'Use an object as second argument of assert.throws()', + message: 'Use an object as second argument of `assert.throws()`.', }, { selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.length<2]", - message: 'assert.throws() must be invoked with at least two arguments.', + message: '`assert.throws()` must be invoked with at least two arguments.', }, { selector: "CallExpression[callee.name='setTimeout'][arguments.length<2]", - message: 'setTimeout() must be invoked with at least two arguments.', + message: '`setTimeout()` must be invoked with at least two arguments.', }, { selector: "CallExpression[callee.name='setInterval'][arguments.length<2]", - message: 'setInterval() must be invoked with at least 2 arguments.', + message: '`setInterval()` must be invoked with at least two arguments.', }, { selector: 'ThrowStatement > CallExpression[callee.name=/Error$/]', - message: 'Use new keyword when throwing an Error.', + message: 'Use `new` keyword when throwing an `Error`.', } ], /* eslint-enable max-len */