@@ -123,27 +123,28 @@ module.exports = { |
123 | 123 | 'no-proto': 'error', |
124 | 124 | 'no-redeclare': 'error', |
125 | 125 | 'no-restricted-modules': ['error', 'sys'], |
| 126 | + /* eslint-disable max-len */ |
126 | 127 | 'no-restricted-properties': [ |
127 | 128 | 'error', |
128 | 129 | { |
129 | 130 | object: 'assert', |
130 | 131 | property: 'deepEqual', |
131 | | - message: 'Use assert.deepStrictEqual().', |
| 132 | + message: 'Use `assert.deepStrictEqual()`.', |
132 | 133 | }, |
133 | 134 | { |
134 | 135 | object: 'assert', |
135 | 136 | property: 'notDeepEqual', |
136 | | - message: 'Use assert.notDeepStrictEqual().', |
| 137 | + message: 'Use `assert.notDeepStrictEqual()`.', |
137 | 138 | }, |
138 | 139 | { |
139 | 140 | object: 'assert', |
140 | 141 | property: 'equal', |
141 | | - message: 'Use assert.strictEqual() rather than assert.equal().', |
| 142 | + message: 'Use `assert.strictEqual()` rather than `assert.equal()`.', |
142 | 143 | }, |
143 | 144 | { |
144 | 145 | object: 'assert', |
145 | 146 | property: 'notEqual', |
146 | | - message: 'Use assert.notStrictEqual() rather than assert.notEqual().', |
| 147 | + message: 'Use `assert.notStrictEqual()` rather than `assert.notEqual()`.', |
147 | 148 | }, |
148 | 149 | { |
149 | 150 | property: '__defineGetter__', |
@@ -154,7 +155,6 @@ module.exports = { |
154 | 155 | message: '__defineSetter__ is deprecated.', |
155 | 156 | } |
156 | 157 | ], |
157 | | - /* eslint-disable max-len */ |
158 | 158 | // If this list is modified, please copy the change to lib/.eslintrc.yaml |
159 | 159 | // and test/.eslintrc.yaml. |
160 | 160 | 'no-restricted-syntax': [ |
@@ -169,31 +169,31 @@ module.exports = { |
169 | 169 | }, |
170 | 170 | { |
171 | 171 | selector: "CallExpression[callee.object.name='assert'][callee.property.name='rejects'][arguments.length<2]", |
172 | | - message: 'assert.rejects() must be invoked with at least two arguments.', |
| 172 | + message: '`assert.rejects()` must be invoked with at least two arguments.', |
173 | 173 | }, |
174 | 174 | { |
175 | 175 | selector: "CallExpression[callee.object.name='assert'][callee.property.name='strictEqual'][arguments.2.type='Literal']", |
176 | 176 | message: 'Do not use a literal for the third argument of assert.strictEqual()' |
177 | 177 | }, |
178 | 178 | { |
179 | 179 | selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])", |
180 | | - message: 'Use an object as second argument of assert.throws()', |
| 180 | + message: 'Use an object as second argument of `assert.throws()`.', |
181 | 181 | }, |
182 | 182 | { |
183 | 183 | selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.length<2]", |
184 | | - message: 'assert.throws() must be invoked with at least two arguments.', |
| 184 | + message: '`assert.throws()` must be invoked with at least two arguments.', |
185 | 185 | }, |
186 | 186 | { |
187 | 187 | selector: "CallExpression[callee.name='setTimeout'][arguments.length<2]", |
188 | | - message: 'setTimeout() must be invoked with at least two arguments.', |
| 188 | + message: '`setTimeout()` must be invoked with at least two arguments.', |
189 | 189 | }, |
190 | 190 | { |
191 | 191 | selector: "CallExpression[callee.name='setInterval'][arguments.length<2]", |
192 | | - message: 'setInterval() must be invoked with at least 2 arguments.', |
| 192 | + message: '`setInterval()` must be invoked with at least two arguments.', |
193 | 193 | }, |
194 | 194 | { |
195 | 195 | selector: 'ThrowStatement > CallExpression[callee.name=/Error$/]', |
196 | | - message: 'Use new keyword when throwing an Error.', |
| 196 | + message: 'Use `new` keyword when throwing an `Error`.', |
197 | 197 | } |
198 | 198 | ], |
199 | 199 | /* eslint-enable max-len */ |
|