diff --git a/docs/rules/id-match.md b/docs/rules/id-match.md index 55f5e32539f..0d9deebd76d 100644 --- a/docs/rules/id-match.md +++ b/docs/rules/id-match.md @@ -23,20 +23,6 @@ For example, to enforce a camelcase naming convention: } ``` -Examples of **correct** code for this rule with the `"^[a-z]+([A-Z][a-z]+)*$"` option: - -```js -/*eslint id-match: ["error", "^[a-z]+([A-Z][a-z]+)*$"]*/ - -var myFavoriteColor = "#112C85"; -var foo = bar.baz_boom; -var foo = { qux: bar.baz_boom }; -do_something(); -var obj = { - my_pref: 1 -}; -``` - Examples of **incorrect** code for this rule with the `"^[a-z]+([A-Z][a-z]+)*$"` option: ```js @@ -54,6 +40,20 @@ obj.do_something = function() { }; ``` +Examples of **correct** code for this rule with the `"^[a-z]+([A-Z][a-z]+)*$"` option: + +```js +/*eslint id-match: ["error", "^[a-z]+([A-Z][a-z]+)*$"]*/ + +var myFavoriteColor = "#112C85"; +var foo = bar.baz_boom; +var foo = { qux: bar.baz_boom }; +do_something(); +var obj = { + my_pref: 1 +}; +``` + This rule has an object option: * `"properties": true` requires object properties to match the specified regular expression