Skip to content

Commit

Permalink
Docs: Update error unsuppression example
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonrayhamilton committed May 12, 2015
1 parent b7dc400 commit ef439d0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,11 @@ grunt.initConfig({
```

```js
// jscs:allowNamesAsIdentifiers EOL
var EOL = require('os').EOL;
// jscs:disallowNamesAsIdentifiers EOL
// jscs:allowWords mx
dsn.resolveMx('example.com', function (error, addresses) {
var mx = addresses[0];
});
// jscs:disallowWords mx

if (age > 80) var reachingEol = true; // invalid
var mx = Math.max(5, 0); // invalid
```
10 changes: 6 additions & 4 deletions lib/rules/require-dictionary-words.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,13 @@
* ```
*
* ```js
* // jscs:allowNamesAsIdentifiers EOL
* var EOL = require('os').EOL;
* // jscs:disallowNamesAsIdentifiers EOL
* // jscs:allowWords mx
* dsn.resolveMx('example.com', function (error, addresses) {
* var mx = addresses[0];
* });
* // jscs:disallowWords mx
*
* if (age > 80) var reachingEol = true; // invalid
* var mx = Math.max(5, 0); // invalid
* ```
*/

Expand Down

0 comments on commit ef439d0

Please sign in to comment.