Skip to content

Commit ef439d0

Browse files
Docs: Update error unsuppression example
1 parent b7dc400 commit ef439d0

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,11 @@ grunt.initConfig({
180180
```
181181

182182
```js
183-
// jscs:allowNamesAsIdentifiers EOL
184-
var EOL = require('os').EOL;
185-
// jscs:disallowNamesAsIdentifiers EOL
183+
// jscs:allowWords mx
184+
dsn.resolveMx('example.com', function (error, addresses) {
185+
var mx = addresses[0];
186+
});
187+
// jscs:disallowWords mx
186188

187-
if (age > 80) var reachingEol = true; // invalid
189+
var mx = Math.max(5, 0); // invalid
188190
```

lib/rules/require-dictionary-words.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,13 @@
137137
* ```
138138
*
139139
* ```js
140-
* // jscs:allowNamesAsIdentifiers EOL
141-
* var EOL = require('os').EOL;
142-
* // jscs:disallowNamesAsIdentifiers EOL
140+
* // jscs:allowWords mx
141+
* dsn.resolveMx('example.com', function (error, addresses) {
142+
* var mx = addresses[0];
143+
* });
144+
* // jscs:disallowWords mx
143145
*
144-
* if (age > 80) var reachingEol = true; // invalid
146+
* var mx = Math.max(5, 0); // invalid
145147
* ```
146148
*/
147149

0 commit comments

Comments
 (0)