Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort-comp: say "should" instead of "must" #372

Merged
merged 2 commits into from
Jan 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'}]
}]
});