Skip to content

Commit

Permalink
Docs: Sync messageId examples' style with other examples (#9816)
Browse files Browse the repository at this point in the history
  • Loading branch information
platinumazure committed Jan 14, 2018
1 parent 1d61930 commit 2e87ddd
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions docs/developer-guide/working-with-rules.md
Expand Up @@ -208,7 +208,7 @@ module.exports = {
messageId: "avoidName",
data: {
name: "foo",
},
}
});
}
}
Expand All @@ -218,14 +218,14 @@ module.exports = {

// in the file to lint:

var foo = 2
var foo = 2;
// ^ error: Avoid using variables named 'foo'

// In your tests:
var rule = require('../../../lib/rules/no-insecure-random')
var RuleTester = require('eslint').RuleTester
var rule = require('../../../lib/rules/no-insecure-random');
var RuleTester = require('eslint').RuleTester;

var ruleTester = new RuleTester()
var ruleTester = new RuleTester();
ruleTester.run('my-rule', rule, {
valid: ['bar', 'baz'],

Expand All @@ -235,11 +235,11 @@ ruleTester.run('my-rule', rule, {
errors: [
{
messageId: 'foo',
},
],
},
],
})
}
]
}
]
});
{% endraw %}
```

Expand Down

0 comments on commit 2e87ddd

Please sign in to comment.