Skip to content

Commit

Permalink
Merge pull request #372 from SystemParadox/patch-2
Browse files Browse the repository at this point in the history
Replace "must" by "should" in sort-comp error message
  • Loading branch information
yannickcr committed Jan 6, 2016
2 parents 30a2b08 + e2e1f3d commit 44ad202
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/rules/sort-comp.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports = Components.detect(function(context, components) {

var errors = {};

var MISPOSITION_MESSAGE = '{{propA}} must be placed {{position}} {{propB}}';
var MISPOSITION_MESSAGE = '{{propA}} should be placed {{position}} {{propB}}';

var methodsOrder = getMethodsOrder({
order: [
Expand Down
10 changes: 5 additions & 5 deletions tests/lib/rules/sort-comp.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ ruleTester.run('sort-comp', rule, {
'});'
].join('\n'),
parserOptions: parserOptions,
errors: [{message: 'render must be placed after displayName'}]
errors: [{message: 'render should be placed after displayName'}]
}, {
// Must run rule when render uses createElement instead of JSX
code: [
Expand All @@ -217,7 +217,7 @@ ruleTester.run('sort-comp', rule, {
'});'
].join('\n'),
parserOptions: parserOptions,
errors: [{message: 'render must be placed after displayName'}]
errors: [{message: 'render should be placed after displayName'}]
}, {
// Must force a custom method to be placed before render
code: [
Expand All @@ -229,7 +229,7 @@ ruleTester.run('sort-comp', rule, {
'});'
].join('\n'),
parserOptions: parserOptions,
errors: [{message: 'render must be placed after onClick'}]
errors: [{message: 'render should be placed after onClick'}]
}, {
// Must force a custom method to be placed after render if no 'everything-else' group is specified
code: [
Expand All @@ -248,7 +248,7 @@ ruleTester.run('sort-comp', rule, {
]
}],
parserOptions: parserOptions,
errors: [{message: 'onClick must be placed after render'}]
errors: [{message: 'onClick should be placed after render'}]
}, {
// Must validate static properties
code: [
Expand All @@ -261,6 +261,6 @@ ruleTester.run('sort-comp', rule, {
].join('\n'),
parser: 'babel-eslint',
parserOptions: parserOptions,
errors: [{message: 'render must be placed after displayName'}]
errors: [{message: 'render should be placed after displayName'}]
}]
});

0 comments on commit 44ad202

Please sign in to comment.