From 191c7196f53099843c31bf45a26ae70923856c56 Mon Sep 17 00:00:00 2001 From: Lovingly <42682205+lovinglyy@users.noreply.github.com> Date: Fri, 14 Sep 2018 20:05:11 -0300 Subject: [PATCH 1/3] "Default" typo pattern for .eslintrc.js messages * all methods and syntax keywords between backticks * written numbers --- .eslintrc.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 9c3a78d81cd27a..4a9f14f616f8ed 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -128,22 +128,22 @@ module.exports = { { 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__', @@ -164,27 +164,27 @@ 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='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 */ From 030aa6417ea62204e69e24b97f27e916219c88e7 Mon Sep 17 00:00:00 2001 From: Lovingly <42682205+lovinglyy@users.noreply.github.com> Date: Sat, 15 Sep 2018 00:06:27 -0300 Subject: [PATCH 2/3] tools: .eslintrc.js messages "default" typo style * moving /* eslint-disable max-len */ --- .eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 4a9f14f616f8ed..4ccc93ecb5ecd9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -123,6 +123,7 @@ module.exports = { 'no-proto': 'error', 'no-redeclare': 'error', 'no-restricted-modules': ['error', 'sys'], + /* eslint-disable max-len */ 'no-restricted-properties': [ 'error', { @@ -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 'no-restricted-syntax': [ 'error', From 776c9aec24b331df8245f8051c57e35cbae4a45e Mon Sep 17 00:00:00 2001 From: Lovingly <42682205+lovinglyy@users.noreply.github.com> Date: Mon, 17 Sep 2018 00:09:34 -0300 Subject: [PATCH 3/3] tools: .eslintrc.js messages "default" typo style * Error object backtick --- .eslintrc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 4ccc93ecb5ecd9..5a1e131d561051 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -168,7 +168,7 @@ 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]", @@ -184,7 +184,7 @@ module.exports = { }, { 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 */