Skip to content

Commit

Permalink
add rule for func-name-matching, #256
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonLab committed Oct 24, 2016
1 parent f027b07 commit f488e7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rules/stylistic_issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,6 @@ module.exports = {
beforeColon: false, afterColon: true, mode: 'strict'
}], // https://github.com/dwyl/goodparts/issues/198
'no-restricted-syntax': 0, // https://github.com/dwyl/goodparts/issues/111
'no-continue': 2 // https://github.com/dwyl/goodparts/issues/162
'no-continue': 2, // https://github.com/dwyl/goodparts/issues/162,
'func-name-matching': 2 // https://github.com/dwyl/goodparts/issues/256
};
4 changes: 4 additions & 0 deletions test/fixtures/stylistic_issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,5 +295,9 @@ module.exports = {
'key-spacing': {
fail: ['var obj = {key : 42};'],
pass: ['var obj = {key: 42};']
},
'func-name-matching': {
fail: ['var bar = function foo () {return 42;};'],
pass: ['var bar = function bar () {return 42;};']
}
};

0 comments on commit f488e7a

Please sign in to comment.